From: Andrew Lunn <andrew@lunn.ch>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
David Miller <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net] net: phy: fix reading fixed phy status
Date: Sun, 24 Feb 2019 18:57:10 +0100 [thread overview]
Message-ID: <20190224175710.GL26626@lunn.ch> (raw)
In-Reply-To: <7ab8732d-bcc1-cc49-4bc8-34826e78038b@gmail.com>
On Sun, Feb 24, 2019 at 06:01:18PM +0100, Heiner Kallweit wrote:
> With the switch to phy_resolve_aneg_linkmode() we don't read from the
> chip any longer what is advertised but use phydev->advertising directly.
> For a fixed phy however this bitmap is empty so far, what results in
> no common mode being found. This breaks DSA. Fix this by advertising
> everything that is supported. For a normal phy this done by phy_probe().
>
> Fixes: 5502b218e001 ("net: phy: use phy_resolve_aneg_linkmode in genphy_read_status")
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Tested-by: Andrew Lunn <andrew@lunn.ch>
But i tested on net-next, not net.
Andrew
> ---
> drivers/net/phy/fixed_phy.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c
> index b0d1368c3..1acd8bfdb 100644
> --- a/drivers/net/phy/fixed_phy.c
> +++ b/drivers/net/phy/fixed_phy.c
> @@ -22,6 +22,7 @@
> #include <linux/seqlock.h>
> #include <linux/idr.h>
> #include <linux/netdevice.h>
> +#include <linux/linkmode.h>
>
> #include "swphy.h"
>
> @@ -300,6 +301,8 @@ static struct phy_device *__fixed_phy_register(unsigned int irq,
> phy->supported);
> }
>
> + linkmode_copy(phy->advertising, phy->supported);
> +
> ret = phy_device_register(phy);
> if (ret) {
> phy_device_free(phy);
> --
> 2.20.1
>
next prev parent reply other threads:[~2019-02-24 17:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-24 17:01 [PATCH net] net: phy: fix reading fixed phy status Heiner Kallweit
2019-02-24 17:57 ` Andrew Lunn [this message]
2019-02-24 18:00 ` Heiner Kallweit
2019-02-25 6:29 ` 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=20190224175710.GL26626@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--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).