🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
3 messages
3 total messages Started by Hongmei Xu Thu, 29 Oct 2026 05:47
[PATCH net-next v3] net: phy: aquantia: Add support for 5GbaseR
#8468
Author: Hongmei Xu
Date: Thu, 29 Oct 2026 05:47
88 lines
19211 bytes
Aquantia PHYs can operate with a 5G USX interface between the PHY
and MAC, reported as interface type 12 in the PHYXS vendor interface
status register (MDIO_PHYXS_VEND_IF_STATUS_TYPE_USX_5G).

Without this change, aqr_gen1_read_status() falls through to the
default case and sets phydev->link = false when the interface type
is USX 5G, preventing 5G links from coming up.

Add the missing PHY_INTERFACE_MODE_5GBASER handling in three places:

- aqr_gen1_read_status(): map USX 5G interface type to
  PHY_INTERFACE_MODE_5GBASER so the link is correctly reported
- aqr_gen1_config_init(): accept PHY_INTERFACE_MODE_5GBASER as a
  valid interface mode, otherwise the PHY is rejected with -ENODEV
- aqr_gen2_get_rate_matching(): return RATE_MATCH_PAUSE for
  PHY_INTERFACE_MODE_5GBASER, consistent with 10GBASER and 2500BASEX,
  since the MAC-side interface runs at a fixed rate and the PHY handles
  rate adaptation via pause frames

Co-developed-by: Sagar Cheluvegowda <sagar.cheluvegowda@oss.qualcomm.com>
Signed-off-by: Sagar Cheluvegowda <sagar.cheluvegowda@oss.qualcomm.com>
Signed-off-by: Hongmei Xu <hongmei.xu@oss.qualcomm.com>
---
Changes in v3:
- Add git tree name net-next to the subject line. [PATCH net-next]
- Add Co-developer
- Link to v2: https://patch.msgid.link/20260923-aquantia-support-5gbaser-v2-1-4d789dc21418@oss.qualcomm.com

Changes in v2:
- Fix the local variable assignment error in API: aqr_gen1_read_status,
  should use interface rather than phydev->interface,
  interface = PHY_INTERFACE_MODE_5GBASER.
- Link to v1: https://patch.msgid.link/20260923-aquantia-support-5gbaser-v1-1-537d39bb8c35@oss.qualcomm.com
---
 drivers/net/phy/aquantia/aquantia_main.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/net/phy/aquantia/aquantia_main.c b/drivers/net/phy/aquantia/aquantia_main.c
index e95d391a6dc2..1e3df47365e4 100644
--- a/drivers/net/phy/aquantia/aquantia_main.c
+++ b/drivers/net/phy/aquantia/aquantia_main.c
@@ -49,6 +49,7 @@
 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_RXAUI	7
 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_OFF	9
 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_OCSGMII	10
+#define MDIO_PHYXS_VEND_IF_STATUS_TYPE_USX_5G	12
 
 #define MDIO_AN_VEND_PROV			0xc400
 #define MDIO_AN_VEND_PROV_1000BASET_FULL	BIT(15)
@@ -585,6 +586,9 @@ static int aqr_gen1_read_status(struct phy_device *phydev)
 	case MDIO_PHYXS_VEND_IF_STATUS_TYPE_OCSGMII:
 		interface = PHY_INTERFACE_MODE_2500BASEX;
 		break;
+	case MDIO_PHYXS_VEND_IF_STATUS_TYPE_USX_5G:
+		interface = PHY_INTERFACE_MODE_5GBASER;
+		break;
 	case MDIO_PHYXS_VEND_IF_STATUS_TYPE_OFF:
 	default:
 		phydev->link = false;
@@ -786,7 +790,8 @@ static int aqr_gen1_config_init(struct phy_device *phydev)
 	    phydev->interface != PHY_INTERFACE_MODE_10GKR &&
 	    phydev->interface != PHY_INTERFACE_MODE_10GBASER &&
 	    phydev->interface != PHY_INTERFACE_MODE_XAUI &&
-	    phydev->interface != PHY_INTERFACE_MODE_RXAUI)
+	    phydev->interface != PHY_INTERFACE_MODE_RXAUI &&
+	    phydev->interface != PHY_INTERFACE_MODE_5GBASER)
 		return -ENODEV;
 
 	WARN(phydev->interface == PHY_INTERFACE_MODE_XGMII,
@@ -1040,7 +1045,8 @@ static int aqr_gen2_get_rate_matching(struct phy_device *phydev,
 				      phy_interface_t iface)
 {
 	if (iface == PHY_INTERFACE_MODE_10GBASER ||
-	    iface == PHY_INTERFACE_MODE_2500BASEX)
+	    iface == PHY_INTERFACE_MODE_2500BASEX ||
+	    iface == PHY_INTERFACE_MODE_5GBASER)
 		return RATE_MATCH_PAUSE;
 	return RATE_MATCH_NONE;
 }

---
base-commit: 944ae66642b726bd6b25ae71b1e9ff88a0e0bdb0
change-id: 20260923-aquantia-support-5gbaser-e7271bde9f89

Best regards,
--  
Hongmei Xu <hongmei.xu@oss.qualcomm.com>
Re: [PATCH net-next v3] net: phy: aquantia: Add support for 5GbaseR
#8565
Author: Andrew Lunn
Date: Thu, 29 Oct 2026 13:28
24 lines
9098 bytes
> @@ -786,7 +790,8 @@ static int aqr_gen1_config_init(struct phy_device *phydev)
>  	    phydev->interface != PHY_INTERFACE_MODE_10GKR &&
>  	    phydev->interface != PHY_INTERFACE_MODE_10GBASER &&
>  	    phydev->interface != PHY_INTERFACE_MODE_XAUI &&
> -	    phydev->interface != PHY_INTERFACE_MODE_RXAUI)
> +	    phydev->interface != PHY_INTERFACE_MODE_RXAUI &&
> +	    phydev->interface != PHY_INTERFACE_MODE_5GBASER)

This is sorted based on speed. So 5GBASER goes earlier in the list.

>  {
>  	if (iface == PHY_INTERFACE_MODE_10GBASER ||
> -	    iface == PHY_INTERFACE_MODE_2500BASEX)
> +	    iface == PHY_INTERFACE_MODE_2500BASEX ||
> +	    iface == PHY_INTERFACE_MODE_5GBASER)
>  		return RATE_MATCH_PAUSE;

Please keep this in order, 10, 5, 2.5.

    Andrew

---
pw-bot: cr
Re: [PATCH net-next v3] net: phy: aquantia: Add support for 5GbaseR
#8812
Author: Hongmei Xu
Date: Fri, 30 Oct 2026 07:53
32 lines
17248 bytes
On Thu, Oct 29, 2026 at 9:28 PM Andrew Lunn <andrew@lunn.ch> wrote:
>
> > @@ -786,7 +790,8 @@ static int aqr_gen1_config_init(struct phy_device *phydev)
> >           phydev->interface != PHY_INTERFACE_MODE_10GKR &&
> >           phydev->interface != PHY_INTERFACE_MODE_10GBASER &&
> >           phydev->interface != PHY_INTERFACE_MODE_XAUI &&
> > -         phydev->interface != PHY_INTERFACE_MODE_RXAUI)
> > +         phydev->interface != PHY_INTERFACE_MODE_RXAUI &&
> > +         phydev->interface != PHY_INTERFACE_MODE_5GBASER)
>
> This is sorted based on speed. So 5GBASER goes earlier in the list.
Will fix in v4 — kept the interface modes sorted by speed.
>
> >  {
> >       if (iface == PHY_INTERFACE_MODE_10GBASER ||
> > -         iface == PHY_INTERFACE_MODE_2500BASEX)
> > +         iface == PHY_INTERFACE_MODE_2500BASEX ||
> > +         iface == PHY_INTERFACE_MODE_5GBASER)
> >               return RATE_MATCH_PAUSE;
>
> Please keep this in order, 10, 5, 2.5.
>
>     Andrew
>
> ---
> pw-bot: cr
Will fix in v4 — kept the rate matching conditions sorted by speed.

Regards,
Hongmei Xu
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads