]> err.no Git - linux-2.6/blobdiff - drivers/usb/core/hub.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
[linux-2.6] / drivers / usb / core / hub.c
index 94789be54ca3a8c66bfd0e4b5e21c9b9112b5ab9..512d2d57d41e5e15761bb36cc8c2ee87727acd41 100644 (file)
@@ -713,18 +713,11 @@ static void hub_restart(struct usb_hub *hub, int type)
                }
 
                /* Was the power session lost while we were suspended? */
-               switch (type) {
-               case HUB_RESET_RESUME:
-                       portstatus = 0;
-                       portchange = USB_PORT_STAT_C_CONNECTION;
-                       break;
+               status = hub_port_status(hub, port1, &portstatus, &portchange);
 
-               case HUB_RESET:
-               case HUB_RESUME:
-                       status = hub_port_status(hub, port1,
-                                       &portstatus, &portchange);
-                       break;
-               }
+               /* If the device is gone, khubd will handle it later */
+               if (status == 0 && !(portstatus & USB_PORT_STAT_CONNECTION))
+                       continue;
 
                /* For "USB_PERSIST"-enabled children we must
                 * mark the child device for reset-resume and