]> err.no Git - linux-2.6/commit
USB: mutual exclusion for EHCI init and port resets
authorAlan Stern <stern@rowland.harvard.edu>
Wed, 10 Oct 2007 20:27:07 +0000 (16:27 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 12 Oct 2007 21:55:34 +0000 (14:55 -0700)
commit32fe01985aa2cb2562f6fc171e526e279abe10db
tree0c1865a1d3e91ae0839147430480c4099b16a06f
parent17f060224fb9f435c6f9306b7b61419d038def13
USB: mutual exclusion for EHCI init and port resets

This patch (as999) fixes a problem that sometimes shows up when host
controller driver modules are loaded in the wrong order.  If ehci-hcd
happens to initialize an EHCI controller while the companion OHCI or
UHCI controller is in the middle of a port reset, the reset can fail
and the companion may get very confused.  The patch adds an
rw-semaphore and uses it to keep EHCI initialization and port resets
mutually exclusive.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: David Brownell <david-b@pacbell.net>
Cc: David Miller <davem@davemloft.net>
Cc: Dely L Sy <dely.l.sy@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/hcd.h
drivers/usb/core/hub.c
drivers/usb/host/ehci-hcd.c