Re: usb hcd questions
Alan Stern <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 25 Oct 2007, jidong xiao wrote: > Regarding "since root-hub status changes are often interrupt-driven"... > > Not quite understand about this,actually I saw in several place of the > source code, we still set poll_rh to 1,as I understand,usbcore will > poll for events whenever poll_rh is set. So if HCD often uses > interrupt to get root hub events, then under what condition,we need to > use poll? There are several different cases, depending on the driver. One common example is a remote-wakeup interrupt occurs; when this happens some controllers don't also set the root-hub-status-change bit. Thus we have to tell usbcore to poll for status changes after the root hub is resumed. Another example is OHCI arises from the fact that the interrupt requests are level-triggered instead of edge-triggered. Once an interrupt request has been made, status interrupts must be disabled until the hub driver has turned off the status-change bit. During that time interval (until the hub driver does its job), the driver uses polling. > Take uhci-hcd for example, note that, poll_rh is set inside > start_rh/uhci_resume, why the root hub needs to be polled at these > circumstances? UHCI is strange. It generates interrupts for root-hub status change events while the root hub is suspended but not while the root hub is running! So when the root hub first is started, and whenever it is resumed, the root hub needs to be polled. Alan Stern ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel