net/txgbe: fill in functionality gaps for Amber-Lite NICs
cover net/txgbe: fill in functionality gaps for Amber-Lite NICs
This patchset adds missing functionality for Amber-Lite NICs in the txgbe driver, addressing previously overlooked features to improve support for these devices, particularly for the VF.
Zaiyu Wang (6):
net/txgbe: add Amber-Lite 25G VF IDs to PCI ID map net/txgbe: add flush operation for Amber-Lite NICs net/txgbe: add RSS register selection for Amber-Lite 25G VF net/txgbe: add BME reset for Amber-Lite 25G VF net/txgbe: add check link for Amber-Lite VF net/txgbe: add PF-triggered VF link status change handling
drivers/net/txgbe/base/txgbe_mbx.h | 2 + drivers/net/txgbe/base/txgbe_regs.h | 16 +++++- drivers/net/txgbe/base/txgbe_vf.c | 52 ++++++++++++----- drivers/net/txgbe/txgbe_ethdev_vf.c | 87 +++++++++++++++++++++++++++-- 4 files changed, 136 insertions(+), 21 deletions(-)
Signature · 1 line
2.21.0.windows.1
PATCH 1/6 net/txgbe: add Amber-Lite 25G VF IDs to PCI ID map
Add three Amber-Lite 25G VF device IDs (0x5001, 0x5024, 0x5124) to pci_id_txgbevf_map for proper device recognition and driver matching.
--- drivers/net/txgbe/txgbe_ethdev_vf.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/txgbe/txgbe_ethdev_vf.c +3 -0
@@ -74,6 +74,9 @@ static void txgbevf_dev_interrupt_handler(void *param);static const struct rte_pci_id pci_id_txgbevf_map[] = { {RTE_PCI_DEVICE (PCI_VENDOR_ID_WANGXUN ,TXGBE_DEV_ID_SP1000_VF ) }, {RTE_PCI_DEVICE (PCI_VENDOR_ID_WANGXUN ,TXGBE_DEV_ID_WX1820_VF ) }, + {RTE_PCI_DEVICE (PCI_VENDOR_ID_WANGXUN ,TXGBE_DEV_ID_AML_VF ) }, + {RTE_PCI_DEVICE (PCI_VENDOR_ID_WANGXUN ,TXGBE_DEV_ID_AML5024_VF ) }, + {RTE_PCI_DEVICE (PCI_VENDOR_ID_WANGXUN ,TXGBE_DEV_ID_AML5124_VF ) }, { .vendor_id =0 ,/* sentinel */ }, };
Signature · 1 line
2.21.0.windows.1
PATCH 2/6 net/txgbe: add flush operation for Amber-Lite NICs
In reply to Zaiyu WangAdd flush operation for AML NICs to ensure configuration takes effect. The flush forces hardware to apply new settings right after driver updates. Missing flush may cause potential negative impacts as configurations could remain pending.
--- drivers/net/txgbe/base/txgbe_regs.h | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/txgbe/base/txgbe_regs.h +3 -0
@@ -1997,9 +1997,12 @@ static inline void txgbe_flush(struct txgbe_hw *hw) {switch (hw->mac.type) {case txgbe_mac_sp: +case txgbe_mac_aml: +case txgbe_mac_aml40:rd32 (hw,TXGBE_PWR );break ;case txgbe_mac_sp_vf: +case txgbe_mac_aml_vf:rd32 (hw,TXGBE_VFSTATUS );break ;default :
Signature · 1 line
2.21.0.windows.1
PATCH 3/6 net/txgbe: add RSS register selection for Amber-Lite 25G VF
In reply to Zaiyu WangA mapping function is used to distinguish between PF and VF during RSS setup, ensuring access to the correct registers. This feature is added specifically for Amber-Lite 25G VF, while 40G VF remains unchanged.
--- drivers/net/txgbe/base/txgbe_regs.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/txgbe/base/txgbe_regs.h +4 -2
@@ -1816,11 +1816,13 @@ txgbe_map_reg(struct txgbe_hw *hw, u32 reg) {switch (reg) {case TXGBE_REG_RSSTBL : -if (hw->mac.type == txgbe_mac_sp_vf) +if (hw->mac.type == txgbe_mac_sp_vf || + hw->mac.type == txgbe_mac_aml_vf) reg =TXGBE_VFRSSTBL (0 );break ;case TXGBE_REG_RSSKEY : -if (hw->mac.type == txgbe_mac_sp_vf) +if (hw->mac.type == txgbe_mac_sp_vf || + hw->mac.type == txgbe_mac_aml_vf) reg =TXGBE_VFRSSKEY (0 );break ;default :
Signature · 1 line
2.21.0.windows.1
PATCH 4/6 net/txgbe: add BME reset for Amber-Lite 25G VF
In reply to Zaiyu WangDuring VF reset, the PCIE BME (bus master enable) register needs to be reconfigured to ensure proper NIC functionality.
--- drivers/net/txgbe/base/txgbe_regs.h | 2 ++ drivers/net/txgbe/base/txgbe_vf.c | 4 ++++ 2 files changed, 6 insertions(+)
drivers/net/txgbe/base/txgbe_regs.h +2 -0
@@ -1273,6 +1273,8 @@ enum txgbe_5tuple_protocol {#define TXGBE_BMECTL 0x012020#define TXGBE_BMEPEND 0x000168 +#define TXGBE_BME_AML 0x0004B8 +/* P2V Mailbox */ #define TXGBE_MBMEM (i) (0x005000 + 0x40 * (i))/* 0-63 */ #define TXGBE_MBCTL (i) (0x000600 + 4 * (i))/* 0-63 */
drivers/net/txgbe/base/txgbe_vf.c +4 -0
@@ -133,6 +133,10 @@ s32 txgbe_reset_hw_vf(struct txgbe_hw *hw)usec_delay (5 ); } +/* amlite: bme */ +if (hw->mac.type == txgbe_mac_aml_vf) +wr32 (hw,TXGBE_BME_AML ,0x1 ); +if (!timeout)return TXGBE_ERR_RESET_FAILED ;
Signature · 1 line
2.21.0.windows.1
PATCH 5/6 net/txgbe: add check link for Amber-Lite VF
In reply to Zaiyu WangEnhanced the VF's check mac link implementation to provide accurate link rate information for newly supported Amber-Lite NICs VF.
--- drivers/net/txgbe/base/txgbe_regs.h | 5 +++ drivers/net/txgbe/base/txgbe_vf.c | 48 +++++++++++++++++++++-------- 2 files changed, 40 insertions(+), 13 deletions(-)
drivers/net/txgbe/base/txgbe_regs.h +5 -0
@@ -1305,6 +1305,11 @@ enum txgbe_5tuple_protocol {#define TXGBE_VFSTATUS_BW_10G LS(0x1, 1, 0x7)#define TXGBE_VFSTATUS_BW_1G LS(0x2, 1, 0x7)#define TXGBE_VFSTATUS_BW_100M LS(0x4, 1, 0x7) +#define TXGBE_VFSTATUS_BW_MASK_AML MS(1, 0xF) +#define TXGBE_VFSTATUS_BW_AML_50G LS(0x1, 1, 0xF) +#define TXGBE_VFSTATUS_BW_AML_40G LS(0x2, 1, 0xF) +#define TXGBE_VFSTATUS_BW_AML_25G LS(0x4, 1, 0xF) +#define TXGBE_VFSTATUS_BW_AML_10G LS(0x8, 1, 0xF)#define TXGBE_VFSTATUS_BUSY MS(4, 0x1)#define TXGBE_VFSTATUS_LANID MS(8, 0x1)#define TXGBE_VFRST 0x000008
drivers/net/txgbe/base/txgbe_vf.c +35 -13
59 lines not on this page · raw message
Signature · 1 line
2.21.0.windows.1
PATCH 6/6 net/txgbe: add PF-triggered VF link status change handling
In reply to Zaiyu WangOur Linux kernel driver add TXGBE_NOFITY_VF_LINK_STATUS field in mailbox message when pf notifying vf of LSC event since txgbe-2.0.0. So we can process VF link down/up via PF's mailbox notifications, and directly update VF link status based on PF status
For legacy kernel driver compatibility, trigger link_update to check vf link status changes when receive a mailbox message without TXGBE_NOFITY_VF_LINK_STATUS filed from pf.
--- drivers/net/txgbe/base/txgbe_mbx.h | 2 + drivers/net/txgbe/txgbe_ethdev_vf.c | 84 ++++++++++++++++++++++++++--- 2 files changed, 80 insertions(+), 6 deletions(-)
drivers/net/txgbe/base/txgbe_mbx.h +2 -0
@@ -49,6 +49,8 @@ enum txgbe_pfvf_api_rev {#define TXGBE_VF_SET_MULTICAST 0x03/* VF requests PF to set MC addr */ #define TXGBE_VF_SET_VLAN 0x04/* VF requests PF to set VLAN */ +#define TXGBE_NOFITY_VF_LINK_STATUS 0x01/* PF notify VF link status */ +/* mailbox API, version 1.0 VF requests */ #define TXGBE_VF_SET_LPE 0x05/* VF requests PF to set VMOLR.LPE */ #define TXGBE_VF_SET_MACVLAN 0x06/* VF requests PF for unicast filter */
drivers/net/txgbe/txgbe_ethdev_vf.c +78 -6
96 lines not on this page · raw message
Signature · 1 line
2.21.0.windows.1
Stephen Hemminger
AppliedQuoted 12 lines · On Thu, 23 Oct 2025 20:13:49 +0800 Zaiyu Wang <[email protected]> wrote:
This patchset adds missing functionality for Amber-Lite NICs in the txgbe driver, addressing previously overlooked features to improve support for these devices, particularly for the VF.
Zaiyu Wang (6):
net/txgbe: add Amber-Lite 25G VF IDs to PCI ID map net/txgbe: add flush operation for Amber-Lite NICs net/txgbe: add RSS register selection for Amber-Lite 25G VF net/txgbe: add BME reset for Amber-Lite 25G VF net/txgbe: add check link for Amber-Lite VF net/txgbe: add PF-triggered VF link status change handling
Quoted 6 lines
drivers/net/txgbe/base/txgbe_mbx.h | 2 + drivers/net/txgbe/base/txgbe_regs.h | 16 +++++- drivers/net/txgbe/base/txgbe_vf.c | 52 ++++++++++++----- drivers/net/txgbe/txgbe_ethdev_vf.c | 87 +++++++++++++++++++++++++++-- 4 files changed, 136 insertions(+), 21 deletions(-)
Queued to next-net