Re: [PATCH] net: phy: fix auto-negotiation in case of 'down-shift'

2020-11-24 Thread Antonio Borneo
On Tue, 2020-11-24 at 15:37 +, Russell King - ARM Linux admin wrote: > On Tue, Nov 24, 2020 at 04:17:42PM +0100, Antonio Borneo wrote: > > On Tue, 2020-11-24 at 14:56 +, Russell King - ARM Linux admin wrote: > > > Userspace doesn't expect the advertising mask to change beneath it. > > > Sin

RE: [PATCH] net: phy: fix auto-negotiation in case of 'down-shift'

2020-11-24 Thread David Laight
From: Russell King > Sent: 24 November 2020 15:17 ... > That said, _if_ the PHY has a way to read the resolved state rather > than reading the advertisement registers, that is what should be > used (as I said previously) rather than trying to decode the > advertisement registers ourselves. That is

Re: [PATCH] net: phy: fix auto-negotiation in case of 'down-shift'

2020-11-24 Thread Russell King - ARM Linux admin
On Tue, Nov 24, 2020 at 04:17:42PM +0100, Antonio Borneo wrote: > On Tue, 2020-11-24 at 14:56 +, Russell King - ARM Linux admin wrote: > > Userspace doesn't expect the advertising mask to change beneath it. > > Since updates from userspace are done using a read-modify-write of > > the ksettings

Re: [PATCH] net: phy: fix auto-negotiation in case of 'down-shift'

2020-11-24 Thread Antonio Borneo
On Tue, 2020-11-24 at 15:17 +, Russell King - ARM Linux admin wrote: > On Tue, Nov 24, 2020 at 04:03:40PM +0100, Heiner Kallweit wrote: > > Am 24.11.2020 um 15:38 schrieb Antonio Borneo: > > > If the auto-negotiation fails to establish a gigabit link, the phy > > > can try to 'down-shift': it r

Re: [PATCH] net: phy: fix auto-negotiation in case of 'down-shift'

2020-11-24 Thread Heiner Kallweit
Am 24.11.2020 um 16:17 schrieb Antonio Borneo: > On Tue, 2020-11-24 at 14:56 +, Russell King - ARM Linux admin wrote: >> On Tue, Nov 24, 2020 at 03:38:48PM +0100, Antonio Borneo wrote: >>> If the auto-negotiation fails to establish a gigabit link, the phy >>> can try to 'down-shift': it resets

Re: [PATCH] net: phy: fix auto-negotiation in case of 'down-shift'

2020-11-24 Thread Antonio Borneo
On Tue, 2020-11-24 at 14:56 +, Russell King - ARM Linux admin wrote: > On Tue, Nov 24, 2020 at 03:38:48PM +0100, Antonio Borneo wrote: > > If the auto-negotiation fails to establish a gigabit link, the phy > > can try to 'down-shift': it resets the bits in MII_CTRL1000 to > > stop advertising 1

Re: [PATCH] net: phy: fix auto-negotiation in case of 'down-shift'

2020-11-24 Thread Russell King - ARM Linux admin
On Tue, Nov 24, 2020 at 04:03:40PM +0100, Heiner Kallweit wrote: > Am 24.11.2020 um 15:38 schrieb Antonio Borneo: > > If the auto-negotiation fails to establish a gigabit link, the phy > > can try to 'down-shift': it resets the bits in MII_CTRL1000 to > > stop advertising 1Gbps and retries the nego

Re: [PATCH] net: phy: fix auto-negotiation in case of 'down-shift'

2020-11-24 Thread Heiner Kallweit
Am 24.11.2020 um 15:38 schrieb Antonio Borneo: > If the auto-negotiation fails to establish a gigabit link, the phy > can try to 'down-shift': it resets the bits in MII_CTRL1000 to > stop advertising 1Gbps and retries the negotiation at 100Mbps. > I see that Russell answered already. My 2cts: Are

Re: [PATCH] net: phy: fix auto-negotiation in case of 'down-shift'

2020-11-24 Thread Russell King - ARM Linux admin
On Tue, Nov 24, 2020 at 03:38:48PM +0100, Antonio Borneo wrote: > If the auto-negotiation fails to establish a gigabit link, the phy > can try to 'down-shift': it resets the bits in MII_CTRL1000 to > stop advertising 1Gbps and retries the negotiation at 100Mbps. > > From commit 5502b218e001 ("net:

[PATCH] net: phy: fix auto-negotiation in case of 'down-shift'

2020-11-24 Thread Antonio Borneo
If the auto-negotiation fails to establish a gigabit link, the phy can try to 'down-shift': it resets the bits in MII_CTRL1000 to stop advertising 1Gbps and retries the negotiation at 100Mbps. >From commit 5502b218e001 ("net: phy: use phy_resolve_aneg_linkmode in genphy_read_status") the content o