All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <florian@openwrt.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org, jogo@openwrt.org,
	mbizon@freebox.fr, linux-usb@vger.kernel.org,
	gregkh@linuxfoundation.org, blogic@openwrt.org
Subject: Re: [PATCH 11/13] USB: EHCI: add ignore_oc flag to disable overcurrent checking
Date: Mon, 28 Jan 2013 21:58:13 +0100	[thread overview]
Message-ID: <5106E665.7020105@openwrt.org> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1301281500530.1997-100000@iolanthe.rowland.org>

Le 28/01/2013 21:08, Alan Stern a écrit :
> 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.

ignore_oc is not actually needed for all BCM63xx boards, and mine does 
not require it, but that is clearly an oversight, thanks for spotting this.

>
>> 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
>
>

  reply	other threads:[~2013-01-28 20:58 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-28 19:06 [PATCH 00/13] MIPS: BCM63XX: support for OHCI and EHCI integrated controllers Florian Fainelli
2013-01-28 19:06 ` [PATCH 01/13] MIPS: BCM63XX: add USB host clock enable delay Florian Fainelli
2013-01-28 19:06 ` [PATCH 02/13] MIPS: BCM63XX: add USB device clock enable delay to clock code Florian Fainelli
2013-01-28 19:06 ` [PATCH 03/13] MIPS: BCM63XX: move code touching the USB private register Florian Fainelli
2013-01-28 20:41   ` Felipe Balbi
2013-01-28 20:41     ` Felipe Balbi
2013-01-28 21:17     ` Florian Fainelli
2013-01-29  7:37       ` Felipe Balbi
2013-01-29  7:37         ` Felipe Balbi
2013-01-28 19:06 ` [PATCH 04/13] MIPS: BCM63XX: add OHCI/EHCI configuration bits to common USB code Florian Fainelli
2013-01-28 19:06 ` [PATCH 05/13] MIPS: BCM63XX: introduce BCM63XX_OHCI configuration symbol Florian Fainelli
2013-01-28 19:06 ` [PATCH 06/13] MIPS: BCM63XX: add support for the on-chip OHCI controller Florian Fainelli
2013-01-28 19:06 ` [PATCH 07/13] MIPS: BCM63XX: register OHCI controller if board enables it Florian Fainelli
2013-01-28 19:06 ` [PATCH 08/13] MIPS: BCM63XX: introduce BCM63XX_EHCI configuration symbol Florian Fainelli
2013-01-28 19:29   ` David Daney
2013-01-28 19:57     ` Florian Fainelli
2013-01-28 20:15       ` Alan Stern
2013-01-28 20:15         ` Alan Stern
2013-01-28 19:06 ` [PATCH 09/13] MIPS: BCM63XX: add support for the on-chip EHCI controller Florian Fainelli
2013-01-28 19:06 ` [PATCH 10/13] MIPS: BCM63XX: register EHCI controller if board enables it Florian Fainelli
2013-01-28 19:06 ` [PATCH 11/13] USB: EHCI: add ignore_oc flag to disable overcurrent checking Florian Fainelli
2013-01-28 20:08   ` Alan Stern
2013-01-28 20:08     ` Alan Stern
2013-01-28 20:58     ` Florian Fainelli [this message]
2013-01-28 19:06 ` [PATCH 12/13] MIPS: BCM63XX: EHCI controller does not support overcurrent Florian Fainelli
2013-01-28 19:06 ` [PATCH 13/13] MIPS: BCM63XX: update defconfig Florian Fainelli

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=5106E665.7020105@openwrt.org \
    --to=florian@openwrt.org \
    --cc=blogic@openwrt.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jogo@openwrt.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mbizon@freebox.fr \
    --cc=ralf@linux-mips.org \
    --cc=stern@rowland.harvard.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.