From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
<netdev@vger.kernel.org>, David Miller <davem@davemloft.net>
Subject: Re: [PATCH] macb: fix mdiobus_scan() error check
Date: Mon, 2 May 2016 09:39:52 +0200 [thread overview]
Message-ID: <57270448.2040006@atmel.com> (raw)
In-Reply-To: <2317306.aZN9iKAKYz@wasted.cogentembedded.com>
Le 01/05/2016 00:47, Sergei Shtylyov a écrit :
> Now mdiobus_scan() returns ERR_PTR(-ENODEV) instead of NULL if the PHY
> device ID was read as all ones. As this was not an error before, this
> value should be filtered out now in this driver.
>
> Fixes: b74766a0a0fe ("phylib: don't return NULL from get_phy_device()")
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Thanks.
>
> ---
> The patch is against DaveM's 'net-next.git' repo.
>
> drivers/net/ethernet/cadence/macb.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> Index: net-next/drivers/net/ethernet/cadence/macb.c
> ===================================================================
> --- net-next.orig/drivers/net/ethernet/cadence/macb.c
> +++ net-next/drivers/net/ethernet/cadence/macb.c
> @@ -458,7 +458,8 @@ static int macb_mii_init(struct macb *bp
> struct phy_device *phydev;
>
> phydev = mdiobus_scan(bp->mii_bus, i);
> - if (IS_ERR(phydev)) {
> + if (IS_ERR(phydev) &&
> + PTR_ERR(phydev) != -ENODEV) {
> err = PTR_ERR(phydev);
> break;
> }
>
>
--
Nicolas Ferre
next prev parent reply other threads:[~2016-05-02 7:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-30 22:47 [PATCH] macb: fix mdiobus_scan() error check Sergei Shtylyov
2016-05-01 16:03 ` Florian Fainelli
2016-05-02 7:39 ` Nicolas Ferre [this message]
2016-05-03 19:04 ` 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=57270448.2040006@atmel.com \
--to=nicolas.ferre@atmel.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.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 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.