The disconnect routine counts the completed_receivers/spare_senders list
to see if the completion handler has finished. It then kills the tasklet.
However the tasklet was being scheduled after adding to the lists, creating
a micro race. So schedule the tasklet before adding to the list.
speedtouch.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff -Nru a/drivers/usb/misc/speedtouch.c b/drivers/usb/misc/speedtouch.c
--- a/drivers/usb/misc/speedtouch.c Sat Feb 8 17:53:40 2003
+++ b/drivers/usb/misc/speedtouch.c Sat Feb 8 17:53:40 2003
@@ -334,12 +334,11 @@
return;
}
+ tasklet_schedule (&instance->receive_tasklet);
/* may not be in_interrupt() */
spin_lock_irqsave (&instance->completed_receivers_lock, flags);
list_add_tail (&rcv->list, &instance->completed_receivers);
spin_unlock_irqrestore (&instance->completed_receivers_lock, flags);
- PDEBUG ("udsl_complete_receive: scheduling tasklet\n");
- tasklet_schedule (&instance->receive_tasklet);
}
static void udsl_process_receive (unsigned long data)
@@ -497,13 +496,12 @@
return;
}
+ tasklet_schedule (&instance->send_tasklet);
/* may not be in_interrupt() */
spin_lock_irqsave (&instance->send_lock, flags);
list_add (&snd->list, &instance->spare_senders);
list_add (&snd->buffer->list, &instance->spare_buffers);
spin_unlock_irqrestore (&instance->send_lock, flags);
- PDEBUG ("udsl_complete_send: scheduling tasklet\n");
- tasklet_schedule (&instance->send_tasklet);
}
static void udsl_process_send (unsigned long data)
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel