lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4b297d8a-b4da-0e19-a5fb-6dda89ca4148@ti.com>
Date:   Wed, 16 Sep 2020 15:54:34 -0500
From:   Dan Murphy <dmurphy@...com>
To:     Andrew Lunn <andrew@...n.ch>
CC:     <davem@...emloft.net>, <f.fainelli@...il.com>,
        <hkallweit1@...il.com>, <mkubecek@...e.cz>,
        <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next 2/3] net: dp83869: Add ability to advertise Fiber
 connection

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@...35x-evm:~# ethtool -s eth0 speed 100 duplex full
root@...35x-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@...35x-evm:~# ethtool -s eth0 speed 10 duplex half
root@...35x-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@...35x-evm:~# ./mdio-test g eth0 0
0x0000
root@...35x-evm:~# ethtool -s eth0 speed 100 duplex full
root@...35x-evm:~# ./mdio-test g eth0 0
0x2100
root@...35x-evm:~# ethtool -s eth0 speed 10 duplex half
root@...35x-evm:~# ./mdio-test g eth0 0
0x0000
root@...35x-evm:~# ethtool -s eth0 speed 10 duplex full
root@...35x-evm:~# ./mdio-test g eth0 0
0x0100
root@...35x-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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ