Re: [linux-usb-devel] Re: USB: irq 11: nobody cared!

Alan Stern
2003-09-09T14:09:51Z

On Tue, 9 Sep 2003, Arkadiusz Miskiewicz wrote:

> On Monday 08 of September 2003 18:38, David Brownell wrote:
> > Try changing uhci_reset() so it calls hc_reset() first,
> > and then does the config space write to get rid of "legacy
> > support mode". That's the sequence it used before, which
> > seems odd because it's resetting hardware that it's not yet
> > responsible for. Maybe the hc_reset() code should turn off
> > that legacy mode, and do some IRQ blocking.
> Unfortunately that didn't change a thing. Still I see ,,disable irq #xx'' and
> usb is not working properly here.

reset_hc() doesn't do very much; it turns the controller off but doesn't
disable interrupts. If the problem is extraneous interrupts arriving
during this time, maybe disabling them is the answer. Try the patch
below.

Alan Stern

===== uhci-hcd.c 1.65 vs edited =====
--- 1.65/drivers/usb/host/uhci-hcd.c Wed Sep 3 11:47:18 2003
+++ edited/drivers/usb/host/uhci-hcd.c Tue Sep 9 10:05:38 2003
@@ -1960,8 +1960,9 @@
{
unsigned int io_addr = uhci->io_addr;

- /* Global reset for 50ms */
+ /* Disable interrupts and global reset for 50ms */
uhci->state = UHCI_RESET;
+ outw(0, io_addr + USBINTR);
outw(USBCMD_GRESET, io_addr + USBCMD);
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout((HZ*50+999) / 1000);