|
@@ -676,6 +676,8 @@ static void hub_init_func3(struct work_struct *ws);
|
|
static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
|
|
static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
|
|
{
|
|
{
|
|
struct usb_device *hdev = hub->hdev;
|
|
struct usb_device *hdev = hub->hdev;
|
|
|
|
+ struct usb_hcd *hcd;
|
|
|
|
+ int ret;
|
|
int port1;
|
|
int port1;
|
|
int status;
|
|
int status;
|
|
bool need_debounce_delay = false;
|
|
bool need_debounce_delay = false;
|
|
@@ -714,6 +716,25 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
|
|
usb_autopm_get_interface_no_resume(
|
|
usb_autopm_get_interface_no_resume(
|
|
to_usb_interface(hub->intfdev));
|
|
to_usb_interface(hub->intfdev));
|
|
return; /* Continues at init2: below */
|
|
return; /* Continues at init2: below */
|
|
|
|
+ } else if (type == HUB_RESET_RESUME) {
|
|
|
|
+ /* The internal host controller state for the hub device
|
|
|
|
+ * may be gone after a host power loss on system resume.
|
|
|
|
+ * Update the device's info so the HW knows it's a hub.
|
|
|
|
+ */
|
|
|
|
+ hcd = bus_to_hcd(hdev->bus);
|
|
|
|
+ if (hcd->driver->update_hub_device) {
|
|
|
|
+ ret = hcd->driver->update_hub_device(hcd, hdev,
|
|
|
|
+ &hub->tt, GFP_NOIO);
|
|
|
|
+ if (ret < 0) {
|
|
|
|
+ dev_err(hub->intfdev, "Host not "
|
|
|
|
+ "accepting hub info "
|
|
|
|
+ "update.\n");
|
|
|
|
+ dev_err(hub->intfdev, "LS/FS devices "
|
|
|
|
+ "and hubs may not work "
|
|
|
|
+ "under this hub\n.");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ hub_power_on(hub, true);
|
|
} else {
|
|
} else {
|
|
hub_power_on(hub, true);
|
|
hub_power_on(hub, true);
|
|
}
|
|
}
|