]> err.no Git - linux-2.6/commitdiff
USB Core: hub.c: prevent re-enumeration on HNP
authorVikram Pandita <vikram.pandita@ti.com>
Sat, 26 May 2007 04:31:07 +0000 (21:31 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 12 Jul 2007 23:29:51 +0000 (16:29 -0700)
Patch is to prevent the OTG host of doing 3 times enumeration of
device when the Host suspends for HNP.  The error code used in
this case is ENOTSUPP.

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/hub.c

index 08f0c22fa9173d49bf1dcdc706c3dfb51c997213..7946d7b6c71a03997e81667e08a9f4cb242d8d89 100644 (file)
@@ -1443,7 +1443,7 @@ int usb_new_device(struct usb_device *udev)
                        if (err < 0)
                                dev_dbg(&udev->dev, "HNP fail, %d\n", err);
                }
-               err = -ENODEV;
+               err = -ENOTSUPP;
                goto fail;
        }
 #endif
@@ -2582,7 +2582,7 @@ loop:
                ep0_reinit(udev);
                release_address(udev);
                usb_put_dev(udev);
-               if (status == -ENOTCONN)
+               if ((status == -ENOTCONN) || (status == -ENOTSUPP))
                        break;
        }