airo driver: fix races, oops, etc..
Quoted 20 lines · Benjamin Herrenschmidt
Here's a patch against Linus current
airo.c, it adds back some fixes I did during OLS on the previous version of this driver. I couldn't test this new 'fixed' version though as I don't have the airo card anymore:- Initialize the
work_structstructures used by the driver
- Change most ofschedule_work()toschedule_delayed_work(). The problem withschedule_work()is that theworker_threadwill neverschedule()if the work keeps getting added back to the list by the callback, which typically happened with this driver when the xmit work gets scheduled while the semaphore was used by a pending command. Note that -ac tree has a modified version of this driver that gets rid of this "over-smart" work queue stuff and uses normal spinlock instead, probably at the expense of some latency...
- Fix a small signed vs. unsigned char issue
- Remove boguspci_module_init(), usepci_register_driver()instead and add missingpci_unregister_driver()so the module can now be removed without leaving stale references (and thus avoid an oops next time the driver list is walked by the device core).
Quoted 1 line
Jeff, if you are ok with these, please send to Linus,
Ben,
Would you mind sending your patch to Javier (who is the
current maintainer). Javier did some work lately to fix some of those problems, and I think your patch collides with it.
Thanks... Jean