From: Julia Lawall <julia.lawall@inria.fr>
To: olteanv@gmail.com
Cc: netdev@vger.kernel.org, joe@perches.com
Subject: question about drivers/net/dsa/sja1105/sja1105_main.c
Date: Fri, 3 Apr 2020 15:46:40 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.21.2004031542220.2694@hadrien> (raw)
Hello,
The function sja1105_static_config_reload in sja1105_main.c contains the
code:
if (!an_enabled) {
int speed = SPEED_UNKNOWN;
if (bmcr & BMCR_SPEED1000)
speed = SPEED_1000;
else if (bmcr & BMCR_SPEED100)
speed = SPEED_100;
else if (bmcr & BMCR_SPEED10)
speed = SPEED_10;
sja1105_sgmii_pcs_force_speed(priv, speed);
}
The last test bmcr & BMCR_SPEED10 does not look correct, because according
to include/uapi/linux/mii.h, BMCR_SPEED10 is 0. What should be done
instead?
thanks,
julia
next reply other threads:[~2020-04-03 13:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-03 13:46 Julia Lawall [this message]
2020-04-03 14:36 ` question about drivers/net/dsa/sja1105/sja1105_main.c Vladimir Oltean
2020-04-03 21:02 ` Heiner Kallweit
2020-04-03 21:10 ` Joe Perches
2020-04-04 8:37 ` Vladimir Oltean
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=alpine.DEB.2.21.2004031542220.2694@hadrien \
--to=julia.lawall@inria.fr \
--cc=joe@perches.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.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