On Tuesday 13 June 2006 11:08 am, Alan Stern wrote: > > > This works okay with external hubs that are polled only 4 times per second > > > and with edge-triggered status interrupts (like UHCI and, I assume, > > > EHCI). > > > But with level-triggered interrupts it will fail badly. Khubd will > > > not clear the source before re-enabling the interrupt. > > > > > > I can think of two possible solutions. The first is to call hub_quiesce > > > instead of setting hub->busy_bits. This has the disadvantage that khubd > > > won't be able to respond to events on other ports while one port is being > > > reset or resumed.
In principle, I like the idea of the USB stack having more such internal concurrency (two activities on one hub at the same time). > > > The second solution is to avoid calling usb_enable_root_hub_irq if > > > hub->busy_bits is nonzero. This has the same disadvantage but it affects > > > only OHCI controllers, not all hubs, both root and external. That would seem to be simplest; it could be called "later" when those bits are all cleared, right? And strictly speaking it would not be needed with all OHCI controllers. (Not that I'd plan on making the code know about that specific implementation quirk.) > > > Do you have a preference? > > > > Both seem kind of roundabout. If the issue is that some of the > > PORT_STATUS_C_* bits are wrongly left set, why not just have those > > routines clear them before returning? Or make sure that khubd is > > smart enough to notice change bits that can safely be ignored? > > That isn't the issue. The bits _are_ cleared properly before the routines > return. > > But while the routines are running those bits do get set and they can > cause khubd events. They cannot safely be ignored in khubd _unless_ the > reset or resume routines are running. And if they are ignored, then khubd > has to avoid re-enabling root-hub-status interrupts. _That_ is the issue. OK, I see now. - Dave _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel