| To: | Florian Fainelli <florian@openwrt.org> |
|---|---|
| Subject: | Re: [PATCH 11/13] USB: EHCI: add ignore_oc flag to disable overcurrent checking |
| From: | Alan Stern <stern@rowland.harvard.edu> |
| Date: | Mon, 28 Jan 2013 15:08:21 -0500 (EST) |
| Cc: | linux-mips@linux-mips.org, <ralf@linux-mips.org>, <jogo@openwrt.org>, <mbizon@freebox.fr>, <cenerkee@gmail.com>, <linux-usb@vger.kernel.org>, <gregkh@linuxfoundation.org>, <blogic@openwrt.org> |
| In-reply-to: | <1359399991-2236-12-git-send-email-florian@openwrt.org> |
| List-archive: | <http://www.linux-mips.org/archives/linux-mips/> |
| List-help: | <mailto:ecartis@linux-mips.org?Subject=help> |
| List-id: | linux-mips <linux-mips.eddie.linux-mips.org> |
| List-owner: | <mailto:ralf@linux-mips.org> |
| List-post: | <mailto:linux-mips@linux-mips.org> |
| List-software: | Ecartis version 1.0.0 |
| List-subscribe: | <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips> |
| List-unsubscribe: | <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips> |
| Sender: | linux-mips-bounce@linux-mips.org |
On Mon, 28 Jan 2013, Florian Fainelli wrote:
> This patch adds an ignore_oc flag which can be set by EHCI controller
> not supporting or wanting to disable overcurrent checking. The EHCI
> platform data in include/linux/usb/ehci_pdriver.h is also augmented to
> take advantage of this new flag.
>
> Signed-off-by: Florian Fainelli <florian@openwrt.org>
> ---
> drivers/usb/host/ehci-hcd.c | 2 +-
> drivers/usb/host/ehci-hub.c | 4 ++--
> drivers/usb/host/ehci.h | 1 +
> include/linux/usb/ehci_pdriver.h | 1 +
> 4 files changed, 5 insertions(+), 3 deletions(-)
You forgot to add
ehci->ignore_oc = pdata->ignore_oc;
to ehci_platform_reset(). This makes me wonder: Either the patches
were not tested very well or else the new ignore_oc stuff isn't needed.
> diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
> index c97503b..bd435ac 100644
> --- a/drivers/usb/host/ehci-hcd.c
> +++ b/drivers/usb/host/ehci-hcd.c
> @@ -634,7 +634,7 @@ static int ehci_run (struct usb_hcd *hcd)
> "USB %x.%x started, EHCI %x.%02x%s\n",
> ((ehci->sbrn & 0xf0)>>4), (ehci->sbrn & 0x0f),
> temp >> 8, temp & 0xff,
> - ignore_oc ? ", overcurrent ignored" : "");
> + (ignore_oc || ehci->ignore_oc) ? ", overcurrent ignored" : "");
You could simplify the code here and other places if you add
ehci->ignore_oc ||= ignore_oc;
to ehci_init(). Then you wouldn't need to test ignore_oc all the time.
Alan Stern
|
| Previous by Date: | Re: [PATCH 08/13] MIPS: BCM63XX: introduce BCM63XX_EHCI configuration symbol, Florian Fainelli |
|---|---|
| Next by Date: | Re: [PATCH 08/13] MIPS: BCM63XX: introduce BCM63XX_EHCI configuration symbol, Alan Stern |
| Previous by Thread: | [PATCH 11/13] USB: EHCI: add ignore_oc flag to disable overcurrent checking, Florian Fainelli |
| Next by Thread: | Re: [PATCH 11/13] USB: EHCI: add ignore_oc flag to disable overcurrent checking, Florian Fainelli |
| Indexes: | [Date] [Thread] [Top] [All Lists] |