Skip to content

Commit

Permalink
USB Core: hub.c: prevent re-enumeration on HNP
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vikram Pandita authored and Greg Kroah-Hartman committed Jul 12, 2007
1 parent b29dbbd commit ffcdc18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/core/hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -2582,7 +2582,7 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1,
ep0_reinit(udev);
release_address(udev);
usb_put_dev(udev);
if (status == -ENOTCONN)
if ((status == -ENOTCONN) || (status == -ENOTSUPP))
break;
}

Expand Down

0 comments on commit ffcdc18

Please sign in to comment.