From: Heiner Kallweit <hkallweit1@gmail.com>
To: Anthony Felice <tony.felice@timesys.com>
Cc: Akshay Bhat <akshay.bhat@timesys.com>,
"David S. Miller" <davem@davemloft.net>,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Nathan Chancellor <natechancellor@gmail.com>,
Rob Herring <robh@kernel.org>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Andrew Lunn <andrew@lunn.ch>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: tc35815: Fix phydev supported/advertising mask
Date: Mon, 27 Apr 2020 11:10:39 +0200 [thread overview]
Message-ID: <62ec43c6-e9e4-555b-4c91-dda22b3620c7@gmail.com> (raw)
In-Reply-To: <20200427020101.3059-1-tony.felice@timesys.com>
On 27.04.2020 04:00, Anthony Felice wrote:
> Commit 3c1bcc8614db ("net: ethernet: Convert phydev advertize and
> supported from u32 to link mode") updated ethernet drivers to use a
> linkmode bitmap. It mistakenly dropped a bitwise negation in the
> tc35815 ethernet driver on a bitmask to set the supported/advertising
> flags.
>
> Found by Anthony via code inspection, not tested as I do not have the
> required hardware.
>
> Fixes: 3c1bcc8614db ("net: ethernet: Convert phydev advertize and supported from u32 to link mode")
> Signed-off-by: Anthony Felice <tony.felice@timesys.com>
> Reviewed-by: Akshay Bhat <akshay.bhat@timesys.com>
> ---
> drivers/net/ethernet/toshiba/tc35815.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/toshiba/tc35815.c b/drivers/net/ethernet/toshiba/tc35815.c
> index 3fd43d30b20d..a1066fbb93b5 100644
> --- a/drivers/net/ethernet/toshiba/tc35815.c
> +++ b/drivers/net/ethernet/toshiba/tc35815.c
> @@ -643,7 +643,7 @@ static int tc_mii_probe(struct net_device *dev)
> linkmode_set_bit(ETHTOOL_LINK_MODE_10baseT_Half_BIT, mask);
> linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Half_BIT, mask);
> }
> - linkmode_and(phydev->supported, phydev->supported, mask);
> + linkmode_andnot(phydev->supported, phydev->supported, mask);
> linkmode_copy(phydev->advertising, phydev->supported);
>
> lp->link = 0;
>
> base-commit: 55b2af1c23eb12663015998079992f79fdfa56c8
>
Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com>
The complete structure of this code is quite weird (e.g. using module
parameters to force a link mode), but the driver seems to be too old
that anybody would spend effort on refactoring it.
next prev parent reply other threads:[~2020-04-27 9:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-27 2:00 [PATCH] net: tc35815: Fix phydev supported/advertising mask Anthony Felice
2020-04-27 9:10 ` Heiner Kallweit [this message]
2020-04-27 12:37 ` Andrew Lunn
2020-04-27 18:52 ` 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=62ec43c6-e9e4-555b-4c91-dda22b3620c7@gmail.com \
--to=hkallweit1@gmail.com \
--cc=akshay.bhat@timesys.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=natechancellor@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=robh@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=suzuki.poulose@arm.com \
--cc=tony.felice@timesys.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 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).