mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Murphy <dmurphy@ti.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: <davem@davemloft.net>, <f.fainelli@gmail.com>,
	<hkallweit1@gmail.com>, <mkubecek@suse.cz>,
	<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next 2/3] net: dp83869: Add ability to advertise Fiber connection
Date: Wed, 16 Sep 2020 15:54:34 -0500	[thread overview]
Message-ID: <4b297d8a-b4da-0e19-a5fb-6dda89ca4148@ti.com> (raw)
In-Reply-To: <20200915201718.GD3526428@lunn.ch>

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



  reply	other threads:[~2020-09-16 20:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15 18:17 [PATCH net-next 0/3] 100base Fx link modes Dan Murphy
2020-09-15 18:17 ` [PATCH net-next 1/3] ethtool: Add 100base-FX link mode entries Dan Murphy
2020-09-15 20:10   ` Andrew Lunn
2020-09-15 23:26     ` Dan Murphy
2020-09-15 20:21   ` Andrew Lunn
2020-09-15 23:29     ` Dan Murphy
2020-09-17 15:03       ` Dan Murphy
2020-09-15 18:17 ` [PATCH net-next 2/3] net: dp83869: Add ability to advertise Fiber connection Dan Murphy
2020-09-15 20:17   ` Andrew Lunn
2020-09-16 20:54     ` Dan Murphy [this message]
2020-09-16 22:13       ` Andrew Lunn
2020-09-17 14:57         ` Dan Murphy
2020-09-15 18:17 ` [PATCH net-next 3/3] net: phy: dp83822: Update the fiber advertisement for speed Dan Murphy

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=4b297d8a-b4da-0e19-a5fb-6dda89ca4148@ti.com \
    --to=dmurphy@ti.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®