USB: EHCI: resolve some unlikely races
authorAlan Stern <stern@rowland.harvard.edu>
Wed, 11 Jul 2012 15:23:16 +0000 (11:23 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Jul 2012 23:56:48 +0000 (16:56 -0700)
commit43fe3a99d9caf10b25f9c596e9854cdae30db418
tree596812dcd61ba9cbffe0e837d53dd3a2232ad214
parentc4f3476436f7452b97c8accb5dd7d53219a11a3f
USB: EHCI: resolve some unlikely races

This patch (as1589) resolves some unlikely races involving system
shutdown or controller death in ehci-hcd:

Shutdown races with both root-hub resume and controller
resume.

Controller death races with root-hub suspend.

A new bitflag is added to indicate that the controller has been shut
down (whether for system shutdown or because it died).  Tests are
added in the suspend and resume pathways to avoid reactivating the
controller after any sort of shutdown.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-hub.c
drivers/usb/host/ehci.h