Skip to content

Commit cdae5bc

Browse files
Jiawen WuPaolo Abeni
authored andcommitted
net: txgbe: Implement SRIOV for AML devices
Since .mac_link_up and .mac_link_down are changed for AML 25G/10G NICs, the SR-IOV related function should be invoked in these new functions, to bring VFs link up. Signed-off-by: Jiawen Wu <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent 182af02 commit cdae5bc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "../libwx/wx_lib.h"
1111
#include "../libwx/wx_ptp.h"
1212
#include "../libwx/wx_hw.h"
13+
#include "../libwx/wx_sriov.h"
1314
#include "txgbe_type.h"
1415
#include "txgbe_aml.h"
1516
#include "txgbe_hw.h"
@@ -315,6 +316,8 @@ static void txgbe_mac_link_up_aml(struct phylink_config *config,
315316
wx->last_rx_ptp_check = jiffies;
316317
if (test_bit(WX_STATE_PTP_RUNNING, wx->state))
317318
wx_ptp_reset_cyclecounter(wx);
319+
/* ping all the active vfs to let them know we are going up */
320+
wx_ping_all_vfs_with_link_status(wx, true);
318321
}
319322

320323
static void txgbe_mac_link_down_aml(struct phylink_config *config,
@@ -329,6 +332,8 @@ static void txgbe_mac_link_down_aml(struct phylink_config *config,
329332
wx->speed = SPEED_UNKNOWN;
330333
if (test_bit(WX_STATE_PTP_RUNNING, wx->state))
331334
wx_ptp_reset_cyclecounter(wx);
335+
/* ping all the active vfs to let them know we are going down */
336+
wx_ping_all_vfs_with_link_status(wx, false);
332337
}
333338

334339
static void txgbe_mac_config_aml(struct phylink_config *config, unsigned int mode,

0 commit comments

Comments
 (0)