From: Greg KH <gregkh@linuxfoundation.org>
To: Darren Stevens <darren@stevens-zone.net>
Cc: linuxppc-dev@lists.ozlabs.org, oss@buserror.net,
chzigotzky@xenosoft.de, robh@kernel.org,
stern@rowland.harvard.edu, linux-usb@vger.kernel.org
Subject: Re: [PATCH RFC] drivers/usb/ehci-fsl: Fix interrupt setup in host mode.
Date: Wed, 22 Jun 2022 08:11:24 +0200 [thread overview]
Message-ID: <YrKyjITQbhiHiCcq@kroah.com> (raw)
In-Reply-To: <20220621230941.381f9791@Cyrus.lan>
On Tue, Jun 21, 2022 at 11:09:41PM +0100, Darren Stevens wrote:
> In patch a1a2b7125e1079 (Drop static setup of IRQ resource from DT
> core) we stopped platform_get_resource() from returning the IRQ, as all
> drivers were supposed to have switched to platform_get_irq()
> Unfortunately the Freescale EHCI driver in host mode got missed. Fix
> it. Also fix allocation of resources to work with current kernel.
>
> Fixes:a1a2b7125e1079 (Drop static setup of IRQ resource from DT core)
Nit, please put a space after the :.
Also not that many characters are needed, as you can see in our
documentation, this is the proper format:
Fixes: a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core")
> Reported-by Christian Zigotzky <chzigotzky@xenosoft.de>
> Signed-off-by Darren Stevens <darren@stevens-zone.net>
> ---
> Tested on AmigaOne X5000/20 and X5000/40 not sure if this is entirely
> correct fix though. Contains code by Rob Herring (in fsl-mph-dr-of.c)
>
> diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
> index 385be30..d0bf7fb 100644
> --- a/drivers/usb/host/ehci-fsl.c
> +++ b/drivers/usb/host/ehci-fsl.c
> @@ -23,6 +23,7 @@
> #include <linux/platform_device.h>
> #include <linux/fsl_devices.h>
> #include <linux/of_platform.h>
> +#include <linux/of_address.h>
> #include <linux/io.h>
>
> #include "ehci.h"
> @@ -46,9 +47,10 @@ static struct hc_driver __read_mostly
> fsl_ehci_hc_driver; */
> static int fsl_ehci_drv_probe(struct platform_device *pdev)
> {
> + struct device_node *dn = pdev->dev.of_node;
> struct fsl_usb2_platform_data *pdata;
> struct usb_hcd *hcd;
> - struct resource *res;
> + struct resource res;
> int irq;
> int retval;
> u32 tmp;
> @@ -76,14 +78,10 @@ static int fsl_ehci_drv_probe(struct
> platform_device *pdev) return -ENODEV;
> }
>
> - res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> - if (!res) {
> - dev_err(&pdev->dev,
> - "Found HC with no IRQ. Check %s setup!\n",
> - dev_name(&pdev->dev));
> - return -ENODEV;
> + irq = platform_get_irq(pdev, 0);
> + if (irq < 0) {
> + return irq;
> }
Did you run checkpatch on this? Coding style is not correct :(
thanks,
greg k-h
WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <gregkh@linuxfoundation.org>
To: Darren Stevens <darren@stevens-zone.net>
Cc: robh@kernel.org, linux-usb@vger.kernel.org, oss@buserror.net,
stern@rowland.harvard.edu, chzigotzky@xenosoft.de,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH RFC] drivers/usb/ehci-fsl: Fix interrupt setup in host mode.
Date: Wed, 22 Jun 2022 08:11:24 +0200 [thread overview]
Message-ID: <YrKyjITQbhiHiCcq@kroah.com> (raw)
In-Reply-To: <20220621230941.381f9791@Cyrus.lan>
On Tue, Jun 21, 2022 at 11:09:41PM +0100, Darren Stevens wrote:
> In patch a1a2b7125e1079 (Drop static setup of IRQ resource from DT
> core) we stopped platform_get_resource() from returning the IRQ, as all
> drivers were supposed to have switched to platform_get_irq()
> Unfortunately the Freescale EHCI driver in host mode got missed. Fix
> it. Also fix allocation of resources to work with current kernel.
>
> Fixes:a1a2b7125e1079 (Drop static setup of IRQ resource from DT core)
Nit, please put a space after the :.
Also not that many characters are needed, as you can see in our
documentation, this is the proper format:
Fixes: a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core")
> Reported-by Christian Zigotzky <chzigotzky@xenosoft.de>
> Signed-off-by Darren Stevens <darren@stevens-zone.net>
> ---
> Tested on AmigaOne X5000/20 and X5000/40 not sure if this is entirely
> correct fix though. Contains code by Rob Herring (in fsl-mph-dr-of.c)
>
> diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
> index 385be30..d0bf7fb 100644
> --- a/drivers/usb/host/ehci-fsl.c
> +++ b/drivers/usb/host/ehci-fsl.c
> @@ -23,6 +23,7 @@
> #include <linux/platform_device.h>
> #include <linux/fsl_devices.h>
> #include <linux/of_platform.h>
> +#include <linux/of_address.h>
> #include <linux/io.h>
>
> #include "ehci.h"
> @@ -46,9 +47,10 @@ static struct hc_driver __read_mostly
> fsl_ehci_hc_driver; */
> static int fsl_ehci_drv_probe(struct platform_device *pdev)
> {
> + struct device_node *dn = pdev->dev.of_node;
> struct fsl_usb2_platform_data *pdata;
> struct usb_hcd *hcd;
> - struct resource *res;
> + struct resource res;
> int irq;
> int retval;
> u32 tmp;
> @@ -76,14 +78,10 @@ static int fsl_ehci_drv_probe(struct
> platform_device *pdev) return -ENODEV;
> }
>
> - res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> - if (!res) {
> - dev_err(&pdev->dev,
> - "Found HC with no IRQ. Check %s setup!\n",
> - dev_name(&pdev->dev));
> - return -ENODEV;
> + irq = platform_get_irq(pdev, 0);
> + if (irq < 0) {
> + return irq;
> }
Did you run checkpatch on this? Coding style is not correct :(
thanks,
greg k-h
next prev parent reply other threads:[~2022-06-22 6:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-21 22:09 [PATCH RFC] drivers/usb/ehci-fsl: Fix interrupt setup in host mode Darren Stevens
2022-06-22 6:11 ` Greg KH [this message]
2022-06-22 6:11 ` Greg KH
2022-06-24 3:45 ` Michael Ellerman
2022-06-27 15:42 ` Rob Herring
2022-06-27 15:42 ` Rob Herring
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=YrKyjITQbhiHiCcq@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=chzigotzky@xenosoft.de \
--cc=darren@stevens-zone.net \
--cc=linux-usb@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=oss@buserror.net \
--cc=robh@kernel.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.