netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@microchip.com>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	"David S . Miller" <davem@davemloft.net>
Cc: Bartosz Folta <bfolta@cadence.com>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net: macb: fix phy interrupt parsing
Date: Thu, 27 Apr 2017 11:36:44 +0200	[thread overview]
Message-ID: <c133034e-c696-f3a3-fd02-1dbf2a9552b5@microchip.com> (raw)
In-Reply-To: <20170426100628.14493-1-alexandre.belloni@free-electrons.com>

Le 26/04/2017 à 12:06, Alexandre Belloni a écrit :
> Since 83a77e9ec415, the phydev irq is explicitly set to PHY_POLL when
> there is no pdata. It doesn't work on DT enabled platforms because the
> phydev irq is already set by libphy before.
> 
> Fixes: 83a77e9ec415 ("net: macb: Added PCI wrapper for Platform Driver.")

Means 4.10+

> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>

Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>

Seems a good candidate for net stable.

Bye,

> ---
>  drivers/net/ethernet/cadence/macb.c | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
> index e131ecd17ab9..004223a866fe 100644
> --- a/drivers/net/ethernet/cadence/macb.c
> +++ b/drivers/net/ethernet/cadence/macb.c
> @@ -432,15 +432,17 @@ static int macb_mii_probe(struct net_device *dev)
>  	}
>  
>  	pdata = dev_get_platdata(&bp->pdev->dev);
> -	if (pdata && gpio_is_valid(pdata->phy_irq_pin)) {
> -		ret = devm_gpio_request(&bp->pdev->dev, pdata->phy_irq_pin,
> -					"phy int");
> -		if (!ret) {
> -			phy_irq = gpio_to_irq(pdata->phy_irq_pin);
> -			phydev->irq = (phy_irq < 0) ? PHY_POLL : phy_irq;
> +	if (pdata) {
> +		if (gpio_is_valid(pdata->phy_irq_pin)) {
> +			ret = devm_gpio_request(&bp->pdev->dev,
> +						pdata->phy_irq_pin, "phy int");
> +			if (!ret) {
> +				phy_irq = gpio_to_irq(pdata->phy_irq_pin);
> +				phydev->irq = (phy_irq < 0) ? PHY_POLL : phy_irq;
> +			}
> +		} else {
> +			phydev->irq = PHY_POLL;
>  		}
> -	} else {
> -		phydev->irq = PHY_POLL;
>  	}
>  
>  	/* attach the mac to the phy */
> 


-- 
Nicolas Ferre

  reply	other threads:[~2017-04-27  9:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-26 10:06 [PATCH] net: macb: fix phy interrupt parsing Alexandre Belloni
2017-04-27  9:36 ` Nicolas Ferre [this message]
2017-05-01  2:22 ` David Miller

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=c133034e-c696-f3a3-fd02-1dbf2a9552b5@microchip.com \
    --to=nicolas.ferre@microchip.com \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=bfolta@cadence.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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).