TXGBE feat new AML firmware
Subsystems (3)
Jiawen Wu
maintainerv2 cover TXGBE feat new AML firmware
The firmware of AML devices are redesigned to adapt to more PHY interfaces. Optimize the driver to be compatible with the new firmware.
---
v2:
- Detail the commit logs.
v1: https://lore.kernel.org/all/[email protected]/
---
Jiawen Wu (3):
net: txgbe: expend SW-FW mailbox buffer size to identify QSFP module
net: txgbe: optimize the flow to setup PHY for AML devices
net: txgbe: rename txgbe_get_phy_link()
drivers/net/ethernet/wangxun/libwx/wx_type.h | 2 - .../net/ethernet/wangxun/txgbe/txgbe_aml.c | 54 ++++++------------- .../net/ethernet/wangxun/txgbe/txgbe_type.h | 5 +- 3 files changed, 20 insertions(+), 41 deletions(-)
Signature · 1 line
2.48.1
Jiawen Wu
maintainerPATCH v2 1/3 net: txgbe: expend SW-FW mailbox buffer size to identify QSFP module
Recent firmware updates introduce additional fields in the mailbox message to provide more information for identifying 40G and 100G QSFP modules. To accommodate these new fields, expand the mailbox buffer size by 4 bytes.
Without this change, drivers built against the updated firmware cannot properly identify modules due to mismatched mailbox message lengths.
The old firmware version that used the smaller mailbox buffer has never been publicly released, so there are no backward-compatibility concerns.
--- drivers/net/ethernet/wangxun/txgbe/txgbe_type.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/wangxun/txgbe/txgbe_type.h +3 -1
@@ -352,7 +352,9 @@ struct txgbe_sfp_id {u8 vendor_oui0;/* A0H 0x25 */ u8 vendor_oui1;/* A0H 0x26 */ u8 vendor_oui2;/* A0H 0x27 */ -u8 reserved[3 ]; +u8 transceiver_type;/* A0H 0x83 */ +u8 sff_opt1;/* A0H 0xC0 */ +u8 reserved[5 ]; };struct txgbe_hic_i2c_read {
Signature · 1 line
2.48.1
Re: [PATCH net-next v2 1/3] net: txgbe: expend SW-FW mailbox buffer size to identify QSFP module
Quoted 11 lines · Jiawen Wu
Recent firmware updates introduce additional fields in the mailbox message to provide more information for identifying 40G and 100G QSFP modules. To accommodate these new fields, expand the mailbox buffer size by 4 bytes.
Without this change, drivers built against the updated firmware cannot properly identify modules due to mismatched mailbox message lengths.
The old firmware version that used the smaller mailbox buffer has never been publicly released, so there are no backward-compatibility concerns.
Signed-off-by Jiawen Wu <[email protected]>
Andrew
Jiawen Wu
maintainerPATCH v2 2/3 net: txgbe: optimize the flow to setup PHY for AML devices
In reply to Jiawen WuTo adapt to new firmware for AML devices, the driver should send the "SET_LINK_CMD" to the firmware only once when switching PHY interface mode, and no longer needs to re-trigger PHY configuration based on the RX signal interrupt (TXGBE_GPIOBIT_3).
In previous firmware versions, the PHY was configured only after receiving "SET_LINK_CMD", and might remain incomplete if the RX signal was lost. To handle this case, the driver used TXGBE_GPIOBIT_3 interrupt to resend the command. This workaround is no longer necessary with the new firmware.
And the unknown link speed is permitted in the mailbox buffer.
--- drivers/net/ethernet/wangxun/libwx/wx_type.h | 2 - .../net/ethernet/wangxun/txgbe/txgbe_aml.c | 50 ++++++------------- .../net/ethernet/wangxun/txgbe/txgbe_type.h | 1 + 3 files changed, 15 insertions(+), 38 deletions(-)
drivers/net/ethernet/wangxun/libwx/wx_type.h +0 -2
@@ -1271,8 +1271,6 @@ struct wx {/* PHY stuff */ bool notify_down; -int adv_speed; -int adv_duplex;unsigned int link;int speed;int duplex;
drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c +14 -36
95 lines not on this page · raw message
drivers/net/ethernet/wangxun/txgbe/txgbe_type.h +1 -0
@@ -314,6 +314,7 @@ void txgbe_up(struct wx *wx);int txgbe_setup_tc (struct net_device *dev,u8 tc);void txgbe_do_reset (struct net_device *netdev); +#define TXGBE_LINK_SPEED_UNKNOWN 0#define TXGBE_LINK_SPEED_10GB_FULL 4#define TXGBE_LINK_SPEED_25GB_FULL 0x10
Signature · 1 line
2.48.1
Jiawen Wu
maintainerPATCH v2 3/3 net: txgbe: rename txgbe_get_phy_link()
In reply to Jiawen WuThe function txgbe_get_phy_link() is more appropriately named txgbe_get_mac_link(), since it reads the link status from the MAC register.
--- drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c +2 -2
@@ -118,7 +118,7 @@ static void txgbe_get_link_capabilities(struct wx *wx, int *speed, int *duplex) *duplex = *speed ==SPEED_UNKNOWN ?DUPLEX_HALF :DUPLEX_FULL ; } -static void txgbe_get_phy_link (struct wx *wx,int *speed) +static void txgbe_get_mac_link (struct wx *wx,int *speed) {u32 status;
@@ -234,7 +234,7 @@ static void txgbe_get_link_state(struct phylink_config *config,struct wx *wx =phylink_to_wx (config);int speed; -txgbe_get_phy_link (wx, &speed); +txgbe_get_mac_link (wx, &speed); state->link = speed !=SPEED_UNKNOWN ; state->speed = speed; state->duplex = state->link ?DUPLEX_FULL :DUPLEX_UNKNOWN ;
Signature · 1 line
2.48.1
This series was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Quoted 8 lines · On Tue, 14 Oct 2025 14:17:23 +0800 you wrote:
The firmware of AML devices are redesigned to adapt to more PHY interfaces. Optimize the driver to be compatible with the new firmware.
---
v2:
- Detail the commit logs.[...]
Here is the summary with links:
- [net-next,v2,1/3] net: txgbe: expend SW-FW mailbox buffer size to identify QSFP module
https://git.kernel.org/netdev/net-next/c/af3fce9f1bb4 - [net-next,v2,2/3] net: txgbe: optimize the flow to setup PHY for AML devices https://git.kernel.org/netdev/net-next/c/1f863ce5c712 - [net-next,v2,3/3] net: txgbe: rename txgbe_get_phy_link() https://git.kernel.org/netdev/net-next/c/a058de9262f4
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html