提交 ffcdc18d 编写于 作者: V Vikram Pandita 提交者: Greg Kroah-Hartman

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: NVikram Pandita <vikram.pandita@ti.com>
Acked-by: NAlan Stern <stern@rowland.harvard.edu>
Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 b29dbbd8
......@@ -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 @@ 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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册