lkml.org 
[lkml]   [2008]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] usb ehci_iaa_watchdog fix
On Wed, 2 Apr 2008, David Brownell wrote:

> Those hcd->state tests have been getting more and more
> dodgey as time goes by. At this point I hardly trust
> any of them. There *IS* no clear state machine which
> governs the usbcore/HCD interaction.

ISTR trying to make that same point a few times over the past two or
three years... :-)

It would make more sense for each HCD to keep its own private "state"
variable. The interaction with usbcore can be broken down into a few
simple tests, such as:

Is the HC dead?
Is the HC (i.e., the PCI or platform device) suspended?
Is the HC running?
Is it okay to submit an URB?

There's plenty of redundancy in this list, and some of the information
may already be available in hcd->self.root_hub->state. In many or most
cases, these questions can't be answered in a race-free manner anyhow,
which limits their usefulness.

Alan Stern



\
 
 \ /
  Last update: 2008-04-02 22:59    [W:0.121 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site