aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/hub.c
diff options
context:
space:
mode:
authorVikram Pandita <vikram.pandita@ti.com>2007-05-26 00:31:07 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-12 19:29:51 -0400
commitffcdc18d64d73ecce49c182f969977ae88ff4384 (patch)
tree66282f72235c24191f672aff96cc7305767d2aef /drivers/usb/core/hub.c
parentb29dbbd811b006deea85275e37fc1a09e8983d48 (diff)
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: 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>
Diffstat (limited to 'drivers/usb/core/hub.c')
-rw-r--r--drivers/usb/core/hub.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 08f0c22fa917..7946d7b6c71a 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -1443,7 +1443,7 @@ int usb_new_device(struct usb_device *udev)
1443 if (err < 0) 1443 if (err < 0)
1444 dev_dbg(&udev->dev, "HNP fail, %d\n", err); 1444 dev_dbg(&udev->dev, "HNP fail, %d\n", err);
1445 } 1445 }
1446 err = -ENODEV; 1446 err = -ENOTSUPP;
1447 goto fail; 1447 goto fail;
1448 } 1448 }
1449#endif 1449#endif
@@ -2582,7 +2582,7 @@ loop:
2582 ep0_reinit(udev); 2582 ep0_reinit(udev);
2583 release_address(udev); 2583 release_address(udev);
2584 usb_put_dev(udev); 2584 usb_put_dev(udev);
2585 if (status == -ENOTCONN) 2585 if ((status == -ENOTCONN) || (status == -ENOTSUPP))
2586 break; 2586 break;
2587 } 2587 }
2588 2588