Commit ffcdc18d authored by Vikram Pandita's avatar Vikram Pandita Committed by Greg Kroah-Hartman
Browse files

USB Core: hub.c: prevent re-enumeration on HNP



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: default avatarVikram Pandita <vikram.pandita@ti.com>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Acked-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b29dbbd8
...@@ -1443,7 +1443,7 @@ int usb_new_device(struct usb_device *udev) ...@@ -1443,7 +1443,7 @@ int usb_new_device(struct usb_device *udev)
if (err < 0) if (err < 0)
dev_dbg(&udev->dev, "HNP fail, %d\n", err); dev_dbg(&udev->dev, "HNP fail, %d\n", err);
} }
err = -ENODEV; err = -ENOTSUPP;
goto fail; goto fail;
} }
#endif #endif
...@@ -2582,7 +2582,7 @@ loop: ...@@ -2582,7 +2582,7 @@ loop:
ep0_reinit(udev); ep0_reinit(udev);
release_address(udev); release_address(udev);
usb_put_dev(udev); usb_put_dev(udev);
if (status == -ENOTCONN) if ((status == -ENOTCONN) || (status == -ENOTSUPP))
break; break;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment