diff options
author | Peter Chen <peter.chen@freescale.com> | 2014-09-28 22:09:31 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-29 11:50:39 -0400 |
commit | e5a9d62199af2ae6c4e7aa13614199b6dbaf5eb2 (patch) | |
tree | 595c684f56490bf89237638dcf6678500b9b3f8a /drivers/usb/core | |
parent | bb50564258b5414d434a383ea6b02443521eb5ce (diff) |
usb: core: return -ENOTSUPP for all targeted hosts
The current code only returns -ENOTSUPP for OTG host, but in fact,
embedded host also needs to returns -ENOTSUPP if the peripheral
is not at TPL.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/hub.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 374b3f93071c..1d21b2c21f9b 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -2319,11 +2319,12 @@ static int usb_enumerate_device(struct usb_device *udev) | |||
2319 | return err; | 2319 | return err; |
2320 | 2320 | ||
2321 | if (IS_ENABLED(CONFIG_USB_OTG_WHITELIST) && hcd->tpl_support && | 2321 | if (IS_ENABLED(CONFIG_USB_OTG_WHITELIST) && hcd->tpl_support && |
2322 | !is_targeted(udev) && IS_ENABLED(CONFIG_USB_OTG)) { | 2322 | !is_targeted(udev)) { |
2323 | /* Maybe it can talk to us, though we can't talk to it. | 2323 | /* Maybe it can talk to us, though we can't talk to it. |
2324 | * (Includes HNP test device.) | 2324 | * (Includes HNP test device.) |
2325 | */ | 2325 | */ |
2326 | if (udev->bus->b_hnp_enable || udev->bus->is_b_host) { | 2326 | if (IS_ENABLED(CONFIG_USB_OTG) && (udev->bus->b_hnp_enable |
2327 | || udev->bus->is_b_host)) { | ||
2327 | err = usb_port_suspend(udev, PMSG_AUTO_SUSPEND); | 2328 | err = usb_port_suspend(udev, PMSG_AUTO_SUSPEND); |
2328 | if (err < 0) | 2329 | if (err < 0) |
2329 | dev_dbg(&udev->dev, "HNP fail, %d\n", err); | 2330 | dev_dbg(&udev->dev, "HNP fail, %d\n", err); |