This patch monkeys what one of the UHCI driver does (I don't know what the
other does), so that linux stops BUG()ing when a driver wants to unlink an
urb. This is particularily useful for devices like network devices,
pegasus in particular.
This is against 2.3.99-pre9, and was done mostly using monkey
intelligence.
-- Cyrille
------------------------------------------------------------------------------
Grumpf.
--- drivers/usb/usb-ohci-orig.c Fri May 26 11:01:54 2000
+++ drivers/usb/usb-ohci.c Mon May 29 11:16:08 2000
@@ -548,12 +548,19 @@
urb_priv->ed->state |= ED_URB_DEL;
spin_unlock_irqrestore (&usb_ed_lock, flags);
if (!(urb->transfer_flags & USB_ASYNC_UNLINK)) {
- add_wait_queue (&op_wakeup, &wait);
- current->state = TASK_UNINTERRUPTIBLE;
- if (!schedule_timeout (HZ / 10)) /* wait until all TDs
are deleted */
- err("unlink URB timeout!");
- remove_wait_queue (&op_wakeup, &wait);
urb->status = -ENOENT;
+ if (in_interrupt()) { /* wait at least 1 frame */
+ static int errorcount = 10;
+ if (errorcount--)
+ warn("sohci_unlink_urb called from
+interrupt for urb %p", urb);
+ udelay(1000);
+ } else {
+ add_wait_queue (&op_wakeup, &wait);
+ current->state = TASK_UNINTERRUPTIBLE;
+ if (!schedule_timeout (HZ / 10)) /* wait until
+all TDs are deleted */
+ err("unlink URB timeout!");
+ remove_wait_queue (&op_wakeup, &wait);
+ }
} else
urb->status = -EINPROGRESS;
} else {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]