From: Michael Walle <hidden> Date: 2021-02-18 19:34:24
Add paging support to the QCA AR8031/33 PHY. This will be needed if we
add support for the .config_inband_aneg callback, see series [1].
The driver itself already accesses the fiber page (without proper locking).
The former version of this patchset converted the access to
phy_read_paged(), but Vladimir Oltean mentioned that it is dead code.
Therefore, the second patch will just remove it.
changes since v1:
- second patch will remove at803x_aneg_done() altogether
Michael Walle (2):
net: phy: at803x: add pages support to AR8031/33
net: phy: at803x: remove at803x_aneg_done()
drivers/net/phy/at803x.c | 66 +++++++++++++++++++++-------------------
1 file changed, 35 insertions(+), 31 deletions(-)
--
2.20.1
From: Michael Walle <hidden> Date: 2021-02-18 19:35:13
The AR8031 has two register sets: Copper and Fiber. The fiber page is
used in case of 100Base-FX and 1000Base-X. But more importantly it is
also used for the SGMII link. Add support to switch between these two.
Signed-off-by: Michael Walle <redacted>
---
drivers/net/phy/at803x.c | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
From: Michael Walle <hidden> Date: 2021-02-18 19:35:51
at803x_aneg_done() is pretty much dead code since the patch series
"net: phy: improve and simplify phylib state machine" [1]. Just remove
it.
[1] https://lore.kernel.org/netdev/922c223b-7bc0-e0ec-345d-2034b796af91@gmail.com/
Suggested-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Michael Walle <redacted>
---
drivers/net/phy/at803x.c | 31 -------------------------------
1 file changed, 31 deletions(-)
@@ -754,36 +754,6 @@ static void at803x_link_change_notify(struct phy_device *phydev)}}-staticintat803x_aneg_done(structphy_device*phydev)-{-intccr;--intaneg_done=genphy_aneg_done(phydev);-if(aneg_done!=BMSR_ANEGCOMPLETE)-returnaneg_done;--/*-*inSGMIImode,ifcoppersideautonegissuccessful,-*alsocheckSGMIIsideautonegresult-*/-ccr=phy_read(phydev,AT803X_REG_CHIP_CONFIG);-if((ccr&AT803X_MODE_CFG_MASK)!=AT803X_MODE_CFG_SGMII)-returnaneg_done;--/* switch to SGMII/fiber page */-phy_write(phydev,AT803X_REG_CHIP_CONFIG,ccr&~AT803X_BT_BX_REG_SEL);--/* check if the SGMII link is OK. */-if(!(phy_read(phydev,AT803X_PSSR)&AT803X_PSSR_MR_AN_COMPLETE)){-phydev_warn(phydev,"803x_aneg_done: SGMII link is not ok\n");-aneg_done=0;-}-/* switch back to copper page */-phy_write(phydev,AT803X_REG_CHIP_CONFIG,ccr|AT803X_BT_BX_REG_SEL);--returnaneg_done;-}-staticintat803x_read_status(structphy_device*phydev){intss,err,old_link=phydev->link;
From: Vladimir Oltean <olteanv@gmail.com> Date: 2021-02-18 19:55:19
On Thu, Feb 18, 2021 at 07:52:38PM +0100, Michael Walle wrote:
Add paging support to the QCA AR8031/33 PHY. This will be needed if we
add support for the .config_inband_aneg callback, see series [1].
The driver itself already accesses the fiber page (without proper locking).
The former version of this patchset converted the access to
phy_read_paged(), but Vladimir Oltean mentioned that it is dead code.
Therefore, the second patch will just remove it.
changes since v1:
- second patch will remove at803x_aneg_done() altogether
I'm pretty sure net-next is closed now, since David sent the pull
request, and I didn't come to a conclusion yet regarding the final
form of the phy_config_inband_aneg method either.
From: Michael Walle <hidden> Date: 2021-02-18 20:01:52
Am 2021-02-18 20:26, schrieb Vladimir Oltean:
On Thu, Feb 18, 2021 at 07:52:38PM +0100, Michael Walle wrote:
quoted
Add paging support to the QCA AR8031/33 PHY. This will be needed if we
add support for the .config_inband_aneg callback, see series [1].
The driver itself already accesses the fiber page (without proper
locking).
The former version of this patchset converted the access to
phy_read_paged(), but Vladimir Oltean mentioned that it is dead code.
Therefore, the second patch will just remove it.
changes since v1:
- second patch will remove at803x_aneg_done() altogether
I'm pretty sure net-next is closed now, since David sent the pull
request, and I didn't come to a conclusion yet regarding the final
form of the phy_config_inband_aneg method either.
Yeah I wasn't sure. http://vger.kernel.org/~davem/net-next.html says
it is still open. But anyway, if not, I'll resend the patch after
the merge window. I've also thought about splitting it into two
individual patches, because they aren't dependent on each other
anymore.
We'll need the page support anyway, even if phy_config_inband_aneg
will change. Ok granted, the cover letter might be misleading then.
-michael
From: David Miller <davem@davemloft.net> Date: 2021-02-18 21:10:15
From: Michael Walle <redacted>
Date: Thu, 18 Feb 2021 20:46:10 +0100
Am 2021-02-18 20:26, schrieb Vladimir Oltean:
quoted
On Thu, Feb 18, 2021 at 07:52:38PM +0100, Michael Walle wrote:
quoted
Add paging support to the QCA AR8031/33 PHY. This will be needed if we
add support for the .config_inband_aneg callback, see series [1].
The driver itself already accesses the fiber page (without proper
locking).
The former version of this patchset converted the access to
phy_read_paged(), but Vladimir Oltean mentioned that it is dead code.
Therefore, the second patch will just remove it.
changes since v1:
- second patch will remove at803x_aneg_done() altogether
I'm pretty sure net-next is closed now, since David sent the pull
request, and I didn't come to a conclusion yet regarding the final
form of the phy_config_inband_aneg method either.
Yeah I wasn't sure. http://vger.kernel.org/~davem/net-next.html says
it is still open. But anyway, if not, I'll resend the patch after
the merge window. I've also thought about splitting it into two
individual patches, because they aren't dependent on each other
anymore.
It is closed now, so this will have to be deferred.
Thanks.