forked from Minki/linux
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>
This commit is contained in:
parent
b29dbbd811
commit
ffcdc18d64
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user