aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarah Sharp <sarah.a.sharp@linux.intel.com>2011-03-11 16:46:17 -0500
committerSarah Sharp <sarah.a.sharp@linux.intel.com>2011-03-13 21:07:10 -0400
commit4814030ce11f08350b7a91573487ad4b600dae34 (patch)
treef0df7a6418a7f84173faf068b125ef673ff79e35
parentac04e6ff3e32699920ae75b22e2bec7f7c631434 (diff)
usb: Initialize hcd->state roothubs.
We would like to allow host controller drivers to stop using hcd->state. Unfortunately, some host controller drivers use hcd->state as an implicit way of telling the core that a controller has died. The roothub registration functions must assume the host died if hcd->state equals HC_STATE_HALT. To facilitate drivers that don't want to set hcd->state to HC_STATE_RUNNING in their initialization routines, we set the state to running before calling the host controller's start function. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
-rw-r--r--drivers/usb/core/hcd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index b70db6e78977..a97ed6d293e9 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -2347,6 +2347,7 @@ int usb_add_hcd(struct usb_hcd *hcd,
2347 (unsigned long long)hcd->rsrc_start); 2347 (unsigned long long)hcd->rsrc_start);
2348 } 2348 }
2349 2349
2350 hcd->state = HC_STATE_RUNNING;
2350 retval = hcd->driver->start(hcd); 2351 retval = hcd->driver->start(hcd);
2351 if (retval < 0) { 2352 if (retval < 0) {
2352 dev_err(hcd->self.controller, "startup error %d\n", retval); 2353 dev_err(hcd->self.controller, "startup error %d\n", retval);