USB: xhci: Respect critical sections.
authorSarah Sharp <sarah.a.sharp@linux.intel.com>
Thu, 14 May 2009 18:44:22 +0000 (11:44 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 16 Jun 2009 04:44:51 +0000 (21:44 -0700)
commitf88ba78d9ac0e1f583da4cada80b8816ca761a3f
treee02af0c83817517c2c5ba20c3cf9335b2f4ab9a9
parenta4d88302268d1e458f7c6eb7855f1ba4b3a7cffc
USB: xhci: Respect critical sections.

Narrow down time spent holding the xHCI spinlock so that it's only used to
protect the xHCI rings, not as mutual exclusion.  Stop allocating memory
while holding the spinlock and calling xhci_alloc_virt_device() and
xhci_endpoint_init().

The USB core should have locking in it to prevent device state to be
manipulated by more than one kernel thread.  E.g. you can't free a device
while you're in the middle of setting a new configuration.  So removing
the locks from the sections where xhci_alloc_dev() and
xhci_reset_bandwidth() touch xHCI's representation of the device should be
OK.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/xhci-hcd.c
drivers/usb/host/xhci-mem.c
drivers/usb/host/xhci.h