Skip to contentSkip to conversation

airo driver: fix races, oops, etc..

PATCH Jean Tourrilhes 1 participant 1 message Jul 29, 2003

lore
Share & tools
lore
#0 lore raw
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_struct structures used by the driver
- Change most of schedule_work() to schedule_delayed_work(). The problem with schedule_work() is that the worker_thread will never schedule() 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 bogus pci_module_init(), use pci_register_driver() instead and add missing pci_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