From: David Brownell <david-b@pacbell.net>
To: linux-omap-open-source@linux.omap.com
Subject: Re: [PATCH] USB: Fix OTG HNP for hub.c
Date: Tue, 29 May 2007 12:21:20 -0700 [thread overview]
Message-ID: <200705291221.20343.david-b@pacbell.net> (raw)
In-Reply-To: <1180440176127-git-send-email-felipebalbi@users.sourceforge.net>
On Tuesday 29 May 2007, Felipe Balbi wrote:
> From: Tony Lindgren <tony@atomide.com>
>
> This patch makes makes OTG Host Negotiation Protocol (HNP)
> to behave.
Not really. It makes it strongly *MIS* behave in fact,
since it always kicks off HNP ... even when it should not
do so, because the device is in the whitelist. (Called
the "Targeted Peripherals List", TPL, in jargonese.)
The two blocks of code are in the wrong order ...
A more limited patch would help. Specifically, just
fixing whatever bug was seen in the original code,
rather than abstracting it into a new subroutine and
changing the logic while doing so.
- Dave
> + /* If B-device wants to do HNP, it will do it after we suspend */
> + if (bus->b_hnp_enable) {
> + dev_err(&udev->dev, "trying HNP, suspending bus\n");
> + err = __usb_port_suspend(udev, udev->bus->otg_port);
> + if (err < 0) {
> + dev_err(&udev->dev, "suspend for HNP failed\n");
> + return -ENODEV;
> + }
> +
> + /* TB_ASE0_BRST, minimum 3.125 ms */
> + mdelay(4);
> +
> + /* Failed resume means B-device took over the bus with HNP */
> + err = usb_port_resume(udev);
> + if (err < 0) {
> + dev_err(&udev->dev, "HNP success\n");
> + return -ENODEV;
> + }
> + }
> +
> + /* HNP failed. Reject B-devices not in our whitelist */
> + if (!is_targeted(udev))
> + return -ENODEV;
> +
next prev parent reply other threads:[~2007-05-29 19:21 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-29 12:02 RFC PATCH Felipe Balbi
2007-05-29 12:02 ` [PATCH] USB: Disable file_storage USB_CONFIG_ATT_WAKEUP Felipe Balbi
2007-05-29 12:02 ` [PATCH] musb_hdrc: Implement workaround for tusb3.0 wbus bug rev2 Felipe Balbi
2007-05-29 12:02 ` [PATCH] musb_hdrc: Add SRP Interface and control it through sysfs Felipe Balbi
2007-05-29 12:02 ` [PATCH] Add Sysfs Interface to Control Vbus states Felipe Balbi
2007-05-29 12:02 ` [PATCH] Add more Test Modes Felipe Balbi
2007-05-29 12:02 ` [PATCH] musb_hdrc: Make HNP work Felipe Balbi
2007-05-29 12:02 ` [PATCH] USB: Fix OTG HNP for hub.c Felipe Balbi
2007-05-29 12:02 ` [PATCH] HSET tool for the MUSB Controler Felipe Balbi
2007-05-29 12:02 ` [PATCH] Leave GPIO[7:6] pullups enabled Felipe Balbi
[not found] ` <11804401803413-git-send-email-felipebalbi@users.sourceforge.net>
2007-05-29 12:02 ` [PATCH] Make SRP passes in all Electrical Tests Felipe Balbi
2007-05-29 14:39 ` Dirk Behme
2007-06-05 11:02 ` [PATCH] Leave GPIO[7:6] pullups enabled Tony Lindgren
2007-05-29 19:21 ` David Brownell [this message]
2007-05-29 19:24 ` [PATCH] USB: Fix OTG HNP for hub.c Felipe Balbi
2007-05-29 20:34 ` Tony Lindgren
2007-05-29 21:11 ` David Brownell
2007-05-29 21:26 ` Tony Lindgren
2007-05-29 17:16 ` [PATCH] Add more Test Modes David Brownell
2007-05-29 17:07 ` [PATCH] musb_hdrc: Add SRP Interface and control it through sysfs David Brownell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200705291221.20343.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=linux-omap-open-source@linux.omap.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox