Netdev List
 help / color / mirror / Atom feed
* question about drivers/net/dsa/sja1105/sja1105_main.c
@ 2020-04-03 13:46 Julia Lawall
  2020-04-03 14:36 ` Vladimir Oltean
  0 siblings, 1 reply; 5+ messages in thread
From: Julia Lawall @ 2020-04-03 13:46 UTC (permalink / raw)
  To: olteanv; +Cc: netdev, joe

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-04-04  8:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-03 13:46 question about drivers/net/dsa/sja1105/sja1105_main.c Julia Lawall
2020-04-03 14:36 ` Vladimir Oltean
2020-04-03 21:02   ` Heiner Kallweit
2020-04-03 21:10     ` Joe Perches
2020-04-04  8:37       ` Vladimir Oltean

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox