From: Sarah Sharp Date: Fri, 11 Mar 2011 21:46:17 +0000 (-0800) Subject: usb: Initialize hcd->state roothubs. X-Git-Tag: MMI-PSA29.97-13-9~20524^2~29 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4814030ce11f08350b7a91573487ad4b600dae34;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 --- 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, (unsigned long long)hcd->rsrc_start); } + hcd->state = HC_STATE_RUNNING; retval = hcd->driver->start(hcd); if (retval < 0) { dev_err(hcd->self.controller, "startup error %d\n", retval);