lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.2005111542310.11417-100000@netrider.rowland.org>
Date:   Mon, 11 May 2020 15:51:05 -0400 (EDT)
From:   Alan Stern <stern@...land.harvard.edu>
To:     Al Cooper <alcooperx@...il.com>
cc:     linux-kernel@...r.kernel.org,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        <bcm-kernel-feedback-list@...adcom.com>,
        <devicetree@...r.kernel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        <linux-usb@...r.kernel.org>,
        Mathias Nyman <mathias.nyman@...el.com>,
        Rob Herring <robh+dt@...nel.org>,
        Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: Re: [PATCH v9 4/5] usb: ehci: Add new EHCI driver for Broadcom STB
 SoC's

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@...il.com>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
> Reviewed-by: Florian Fainelli <f.fainelli@...il.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@...land.harvard.edu>

Alan Stern

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ