On Fri, 22 Apr 2005, David Brownell wrote:
> If an IRQ comes in before the root hub is "live" in usbcore, that
> would need to behave. It's clearly safe to register while the
> HCD has locked things and blocked the IRQ; not clearly safe to
> do it later...
I tried this out with an OHCI controller and it seemed to work. I'll post
the patches tomorrow.
But I encountered a problem with resume-detect interrupt handling.
Probably this has nothing to do my changes and was present all along, but
I haven't tested the vanilla driver to make sure. I'll do that next.
The scenario: I plugged in a single-interface USB device to the OHCI
controller (which happened to be usb1). Then after "cd
/sys/device/.../usb1" I did the following:
echo -n 3 >1-1/*0/power/state # Suspend the single interface
echo -n 3 >1-1/power/state # Suspend the attached device
At this point there was a normal "device suspended" debugging message,
followed by a message that the root hub was suspending. However both
power/state and *0/power/state contained 0, so as far as usbcore was
concerned neither the root hub device nor its driver was suspended.
echo -n 3 >*0/power/state # Suspend the root hub's driver
echo -n 3 >power/state # Suspend the root hub
This produced a debugging message saying the root hub was already
suspended, which seemed uncalled-for. (In the analogous situation,
uhci-hcd will simply change the root-hub state from UHCI_RH_AUTO_STOPPED
to UHCI_RH_SUSPENDED without giving an error message.) Anyway, both those
power/state files now contained 3.
Then I unplugged the device. This caused a complete system lockup.
Further testing showed that the (ints & OHCI_INTR_RD) case in ohci_irq()
was being executed over and over again. Apparently the interrupt source
was not getting cleared properly.
This is very reminiscent of the problem you found with the original
version of the root-hub-IRQ patch. Is it correct to assume that both
problems will be fixed by the same change to the driver?
Alan Stern
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel