|
@@ -1916,7 +1916,6 @@ static int hub_suspend(struct usb_interface *intf, pm_message_t msg)
|
|
struct usb_hub *hub = usb_get_intfdata (intf);
|
|
struct usb_hub *hub = usb_get_intfdata (intf);
|
|
struct usb_device *hdev = hub->hdev;
|
|
struct usb_device *hdev = hub->hdev;
|
|
unsigned port1;
|
|
unsigned port1;
|
|
- int status = 0;
|
|
|
|
|
|
|
|
/* fail if children aren't already suspended */
|
|
/* fail if children aren't already suspended */
|
|
for (port1 = 1; port1 <= hdev->maxchild; port1++) {
|
|
for (port1 = 1; port1 <= hdev->maxchild; port1++) {
|
|
@@ -1942,44 +1941,15 @@ static int hub_suspend(struct usb_interface *intf, pm_message_t msg)
|
|
|
|
|
|
/* stop khubd and related activity */
|
|
/* stop khubd and related activity */
|
|
hub_quiesce(hub);
|
|
hub_quiesce(hub);
|
|
-
|
|
|
|
- /* "global suspend" of the downstream HC-to-USB interface */
|
|
|
|
- if (!hdev->parent) {
|
|
|
|
- status = hcd_bus_suspend(hdev->bus);
|
|
|
|
- if (status != 0) {
|
|
|
|
- dev_dbg(&hdev->dev, "'global' suspend %d\n", status);
|
|
|
|
- hub_activate(hub);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- return status;
|
|
|
|
|
|
+ return 0;
|
|
}
|
|
}
|
|
|
|
|
|
static int hub_resume(struct usb_interface *intf)
|
|
static int hub_resume(struct usb_interface *intf)
|
|
{
|
|
{
|
|
struct usb_hub *hub = usb_get_intfdata (intf);
|
|
struct usb_hub *hub = usb_get_intfdata (intf);
|
|
- struct usb_device *hdev = hub->hdev;
|
|
|
|
- int status;
|
|
|
|
|
|
|
|
dev_dbg(&intf->dev, "%s\n", __FUNCTION__);
|
|
dev_dbg(&intf->dev, "%s\n", __FUNCTION__);
|
|
|
|
|
|
- /* "global resume" of the downstream HC-to-USB interface */
|
|
|
|
- if (!hdev->parent) {
|
|
|
|
- struct usb_bus *bus = hdev->bus;
|
|
|
|
- if (bus) {
|
|
|
|
- status = hcd_bus_resume (bus);
|
|
|
|
- if (status) {
|
|
|
|
- dev_dbg(&intf->dev, "'global' resume %d\n",
|
|
|
|
- status);
|
|
|
|
- return status;
|
|
|
|
- }
|
|
|
|
- } else
|
|
|
|
- return -EOPNOTSUPP;
|
|
|
|
- if (status == 0) {
|
|
|
|
- /* TRSMRCY = 10 msec */
|
|
|
|
- msleep(10);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/* tell khubd to look for changes on this hub */
|
|
/* tell khubd to look for changes on this hub */
|
|
hub_activate(hub);
|
|
hub_activate(hub);
|
|
return 0;
|
|
return 0;
|