LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] USB: OTG: Fix weirdnesses on enumerating partial otg devices
@ 2008-02-12 17:00 Felipe Balbi
  2008-02-12 10:28 ` David Brownell
  0 siblings, 1 reply; 9+ messages in thread
From: Felipe Balbi @ 2008-02-12 17:00 UTC (permalink / raw)
  To: linux-kernel, linux-usb; +Cc: me, david-b, Felipe Balbi

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-02-13 22:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-12 17:00 [PATCH] USB: OTG: Fix weirdnesses on enumerating partial otg devices Felipe Balbi
2008-02-12 10:28 ` David Brownell
2008-02-12 17:45   ` Felipe Balbi
2008-02-12 13:02     ` David Brownell
2008-02-12 20:22       ` Felipe Balbi
2008-02-12 20:32         ` David Brownell
2008-02-13 16:29           ` Felipe Balbi
2008-02-13 21:36             ` David Brownell
2008-02-14  5:03               ` Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).