Messages in this thread | | | Subject | Re: [PATCH net-next 2/3] net: dp83869: Add ability to advertise Fiber connection | From | Dan Murphy <> | Date | Wed, 16 Sep 2020 15:54:34 -0500 |
| |
Andrew
On 9/15/20 3:17 PM, Andrew Lunn wrote: >> + linkmode_set_bit(ETHTOOL_LINK_MODE_100baseFX_Full_BIT, >> + phydev->supported); >> + linkmode_set_bit(ETHTOOL_LINK_MODE_100baseFX_Half_BIT, >> + phydev->supported); >> + >> + /* Auto neg is not supported in 100base FX mode */ > Hi Dan > > If it does not support auto neg, how do you decide to do half duplex? > I don't see any code here which allows the user to configure it.
Ethtool has the provisions to set the duplex and speed right?.
The only call back I see which is valid is config_aneg which would still require a user space tool to set the needed link modes.
I could implement the config_aneg to call genphy_setup_forced if auto neg is disabled but that function just writes the BMCR which is already updated and if auto neg is enabled it would just call genphy_check_and_restart_aneg.
I verified the ethtool path with the DP83822 by reading the BMCR and ethtool displayed the correct advertisement
root@am335x-evm:~# ethtool -s eth0 speed 100 duplex full root@am335x-evm:~# ethtool eth0 Settings for eth0: Supported ports: [ TP MII FIBRE ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: No Supported FEC modes: Not reported Advertised link modes: 100baseT/Full
<snip>
root@am335x-evm:~# ethtool -s eth0 speed 10 duplex half root@am335x-evm:~# ethtool eth0 Settings for eth0: Supported ports: [ TP MII FIBRE ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: No Supported FEC modes: Not reported Advertised link modes: 10baseT/Half
root@am335x-evm:~# ./mdio-test g eth0 0 0x0000 root@am335x-evm:~# ethtool -s eth0 speed 100 duplex full root@am335x-evm:~# ./mdio-test g eth0 0 0x2100 root@am335x-evm:~# ethtool -s eth0 speed 10 duplex half root@am335x-evm:~# ./mdio-test g eth0 0 0x0000 root@am335x-evm:~# ethtool -s eth0 speed 10 duplex full root@am335x-evm:~# ./mdio-test g eth0 0 0x0100 root@am335x-evm:~# ethtool eth0 Settings for eth0: Supported ports: [ TP MII FIBRE ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: No Supported FEC modes: Not reported Advertised link modes: 10baseT/Full
Dan
| |