linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Al Cooper <alcooperx@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	<bcm-kernel-feedback-list@broadcom.com>,
	<devicetree@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	<linux-usb@vger.kernel.org>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Rob Herring <robh+dt@kernel.org>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: Re: [PATCH v9 4/5] usb: ehci: Add new EHCI driver for Broadcom STB SoC's
Date: Mon, 11 May 2020 15:51:05 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.2005111542310.11417-100000@netrider.rowland.org> (raw)
In-Reply-To: <20200511193643.30926-5-alcooperx@gmail.com>

On Mon, 11 May 2020, Al Cooper wrote:

> Add a new EHCI driver for Broadcom STB SoC's. A new EHCI driver
> was created instead of adding support to the existing ehci platform
> driver because of the code required to work around bugs in the EHCI
> controller. The primary workaround is for a bug where the Core
> violates the SOF interval between the first two SOFs transmitted after
> resume. This only happens if the resume occurs near the end of a
> microframe. The fix is to intercept the ehci-hcd request to complete
> RESUME and align it to the start of the next microframe.
> 
> Signed-off-by: Al Cooper <alcooperx@gmail.com>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
> ---

I hate to point this out...

> +static int ehci_brcm_probe(struct platform_device *pdev)
> +{
> +	struct device *dev = &pdev->dev;
> +	struct resource *res_mem;
> +	struct brcm_priv *priv;
> +	struct usb_hcd *hcd;
> +	int irq;
> +	int err;
> +
> +	err = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
> +	if (err)
> +		return err;
> +
> +	irq = platform_get_irq(pdev, 0);
> +	if (irq <= 0)
> +		return irq ? irq : EINVAL;

That should be -EINVAL.

To tell the truth, I'm not sure it's worthwhile checking for irq == 0.  
That's up to Greg to decide.

Anyway, as far as I'm concerned you can either change EINVAL to -EINVAL
or change the whole thing back to "if (irq < 0) return irq;".  Either
way, you may add:

Acked-by: Alan Stern <stern@rowland.harvard.edu>

Alan Stern


  reply	other threads:[~2020-05-11 19:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11 19:36 [PATCH v9 0/5] Add XHCI, EHCI and OHCI support for Broadcom STB SoS's Al Cooper
2020-05-11 19:36 ` [PATCH v9 1/5] usb: xhci: Change the XHCI link order in the Makefile Al Cooper
2020-05-11 19:36 ` [PATCH v9 2/5] dt-bindings: Add Broadcom STB USB support Al Cooper
2020-05-11 19:36 ` [PATCH v9 3/5] usb: xhci: xhci-plat: Add support for Broadcom STB SoC's Al Cooper
2020-05-11 19:36 ` [PATCH v9 4/5] usb: ehci: Add new EHCI driver " Al Cooper
2020-05-11 19:51   ` Alan Stern [this message]
2020-05-12 14:24     ` Alan Cooper
2020-05-11 19:36 ` [PATCH v9 5/5] usb: host: Add ability to build new Broadcom STB USB drivers Al Cooper

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=Pine.LNX.4.44L0.2005111542310.11417-100000@netrider.rowland.org \
    --to=stern@rowland.harvard.edu \
    --cc=alcooperx@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=robh+dt@kernel.org \
    --cc=yoshihiro.shimoda.uh@renesas.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;
as well as URLs for NNTP newsgroup(s).