[PATCH] USB: OTG: Fix weirdnesses on enumerating partial otg devices

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>, <linux-usb@...>
Cc: <me@...>, <david-b@...>, Felipe Balbi <felipe.balbi@...>
Date: Tuesday, February 12, 2008 - 1:00 pm

Remove the check for is_b_host upon enumerating otg devices as it
can trigger some weird behaviors on otg sessions. Some devices claim
to be b_host even though they have an a_connector attached to it.

Checking b_hnp_enable flag should be secure enough or terms of
otg compliancy.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
---
 drivers/usb/core/hub.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 68fc521..963cf9b 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -1315,7 +1315,7 @@ static int usb_configure_device_otg(struct usb_device *udev)
 		/* Maybe it can talk to us, though we can't talk to it.
 		 * (Includes HNP test device.)
 		 */
-		if (udev->bus->b_hnp_enable || udev->bus->is_b_host) {
+		if (udev->bus->b_hnp_enable) {
 			err = usb_port_suspend(udev);
 			if (err < 0)
 				dev_dbg(&udev->dev, "HNP fail, %d\n", err);
-- 
1.5.4.34.g053d9

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] USB: OTG: Fix weirdnesses on enumerating partial otg..., Felipe Balbi, (Tue Feb 12, 1:00 pm)