[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.2004031542220.2694@hadrien>
Date: Fri, 3 Apr 2020 15:46:40 +0200 (CEST)
From: Julia Lawall <julia.lawall@...ia.fr>
To: olteanv@...il.com
cc: netdev@...r.kernel.org, joe@...ches.com
Subject: question about drivers/net/dsa/sja1105/sja1105_main.c
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
Powered by blists - more mailing lists