Skip to content

Commit 4615855

Browse files
committed
Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue
Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2024-12-03 (ice, idpf, ixgbe, ixgbevf, igb) This series contains updates to ice, idpf, ixgbe, ixgbevf, and igb drivers. For ice: Arkadiusz corrects search for determining whether PHY clock recovery is supported on the device. Przemyslaw corrects mask used for PHY timestamps on ETH56G devices. Wojciech adds missing virtchnl ops which caused NULL pointer dereference. Marcin fixes VLAN filter settings for uplink VSI in switchdev mode. For idpf: Josh restores setting of completion tag for empty buffers. For ixgbevf: Jake removes incorrect initialization/support of IPSEC for mailbox version 1.5. For ixgbe: Jake rewords and downgrades misleading message when negotiation of VF mailbox version is not supported. Tore Amundsen corrects value for BASE-BX10 capability. For igb: Yuan Can adds proper teardown on failed pci_register_driver() call. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: igb: Fix potential invalid memory access in igb_init_module() ixgbe: Correct BASE-BX10 compliance code ixgbe: downgrade logging of unsupported VF API version to debug ixgbevf: stop attempting IPSEC offload on Mailbox API 1.5 idpf: set completion tag for "empty" bufs associated with a packet ice: Fix VLAN pruning in switchdev mode ice: Fix NULL pointer dereference in switchdev ice: fix PHY timestamp extraction for ETH56G ice: fix PHY Clock Recovery availability check ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 1831729 + 0566f83 commit 4615855

File tree

11 files changed

+41
-18
lines changed

11 files changed

+41
-18
lines changed

drivers/net/ethernet/intel/ice/ice_common.c

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,8 @@ ice_aq_get_netlist_node(struct ice_hw *hw, struct ice_aqc_get_link_topo *cmd,
542542
/**
543543
* ice_find_netlist_node
544544
* @hw: pointer to the hw struct
545-
* @node_type_ctx: type of netlist node to look for
545+
* @node_type: type of netlist node to look for
546+
* @ctx: context of the search
546547
* @node_part_number: node part number to look for
547548
* @node_handle: output parameter if node found - optional
548549
*
@@ -552,10 +553,12 @@ ice_aq_get_netlist_node(struct ice_hw *hw, struct ice_aqc_get_link_topo *cmd,
552553
* valid if the function returns zero, and should be ignored on any non-zero
553554
* return value.
554555
*
555-
* Returns: 0 if the node is found, -ENOENT if no handle was found, and
556-
* a negative error code on failure to access the AQ.
556+
* Return:
557+
* * 0 if the node is found,
558+
* * -ENOENT if no handle was found,
559+
* * negative error code on failure to access the AQ.
557560
*/
558-
static int ice_find_netlist_node(struct ice_hw *hw, u8 node_type_ctx,
561+
static int ice_find_netlist_node(struct ice_hw *hw, u8 node_type, u8 ctx,
559562
u8 node_part_number, u16 *node_handle)
560563
{
561564
u8 idx;
@@ -566,8 +569,8 @@ static int ice_find_netlist_node(struct ice_hw *hw, u8 node_type_ctx,
566569
int status;
567570

568571
cmd.addr.topo_params.node_type_ctx =
569-
FIELD_PREP(ICE_AQC_LINK_TOPO_NODE_TYPE_M,
570-
node_type_ctx);
572+
FIELD_PREP(ICE_AQC_LINK_TOPO_NODE_TYPE_M, node_type) |
573+
FIELD_PREP(ICE_AQC_LINK_TOPO_NODE_CTX_M, ctx);
571574
cmd.addr.topo_params.index = idx;
572575

573576
status = ice_aq_get_netlist_node(hw, &cmd,
@@ -2747,9 +2750,11 @@ bool ice_is_pf_c827(struct ice_hw *hw)
27472750
*/
27482751
bool ice_is_phy_rclk_in_netlist(struct ice_hw *hw)
27492752
{
2750-
if (ice_find_netlist_node(hw, ICE_AQC_LINK_TOPO_NODE_TYPE_CLK_CTRL,
2753+
if (ice_find_netlist_node(hw, ICE_AQC_LINK_TOPO_NODE_TYPE_PHY,
2754+
ICE_AQC_LINK_TOPO_NODE_CTX_PORT,
27512755
ICE_AQC_GET_LINK_TOPO_NODE_NR_C827, NULL) &&
2752-
ice_find_netlist_node(hw, ICE_AQC_LINK_TOPO_NODE_TYPE_CLK_CTRL,
2756+
ice_find_netlist_node(hw, ICE_AQC_LINK_TOPO_NODE_TYPE_PHY,
2757+
ICE_AQC_LINK_TOPO_NODE_CTX_PORT,
27532758
ICE_AQC_GET_LINK_TOPO_NODE_NR_E822_PHY, NULL))
27542759
return false;
27552760

@@ -2765,6 +2770,7 @@ bool ice_is_phy_rclk_in_netlist(struct ice_hw *hw)
27652770
bool ice_is_clock_mux_in_netlist(struct ice_hw *hw)
27662771
{
27672772
if (ice_find_netlist_node(hw, ICE_AQC_LINK_TOPO_NODE_TYPE_CLK_MUX,
2773+
ICE_AQC_LINK_TOPO_NODE_CTX_GLOBAL,
27682774
ICE_AQC_GET_LINK_TOPO_NODE_NR_GEN_CLK_MUX,
27692775
NULL))
27702776
return false;
@@ -2785,12 +2791,14 @@ bool ice_is_clock_mux_in_netlist(struct ice_hw *hw)
27852791
bool ice_is_cgu_in_netlist(struct ice_hw *hw)
27862792
{
27872793
if (!ice_find_netlist_node(hw, ICE_AQC_LINK_TOPO_NODE_TYPE_CLK_CTRL,
2794+
ICE_AQC_LINK_TOPO_NODE_CTX_GLOBAL,
27882795
ICE_AQC_GET_LINK_TOPO_NODE_NR_ZL30632_80032,
27892796
NULL)) {
27902797
hw->cgu_part_number = ICE_AQC_GET_LINK_TOPO_NODE_NR_ZL30632_80032;
27912798
return true;
27922799
} else if (!ice_find_netlist_node(hw,
27932800
ICE_AQC_LINK_TOPO_NODE_TYPE_CLK_CTRL,
2801+
ICE_AQC_LINK_TOPO_NODE_CTX_GLOBAL,
27942802
ICE_AQC_GET_LINK_TOPO_NODE_NR_SI5383_5384,
27952803
NULL)) {
27962804
hw->cgu_part_number = ICE_AQC_GET_LINK_TOPO_NODE_NR_SI5383_5384;
@@ -2809,6 +2817,7 @@ bool ice_is_cgu_in_netlist(struct ice_hw *hw)
28092817
bool ice_is_gps_in_netlist(struct ice_hw *hw)
28102818
{
28112819
if (ice_find_netlist_node(hw, ICE_AQC_LINK_TOPO_NODE_TYPE_GPS,
2820+
ICE_AQC_LINK_TOPO_NODE_CTX_GLOBAL,
28122821
ICE_AQC_GET_LINK_TOPO_NODE_NR_GEN_GPS, NULL))
28132822
return false;
28142823

drivers/net/ethernet/intel/ice/ice_main.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6408,10 +6408,12 @@ ice_set_vlan_filtering_features(struct ice_vsi *vsi, netdev_features_t features)
64086408
int err = 0;
64096409

64106410
/* support Single VLAN Mode (SVM) and Double VLAN Mode (DVM) by checking
6411-
* if either bit is set
6411+
* if either bit is set. In switchdev mode Rx filtering should never be
6412+
* enabled.
64126413
*/
6413-
if (features &
6414-
(NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_HW_VLAN_STAG_FILTER))
6414+
if ((features &
6415+
(NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_HW_VLAN_STAG_FILTER)) &&
6416+
!ice_is_eswitch_mode_switchdev(vsi->back))
64156417
err = vlan_ops->ena_rx_filtering(vsi);
64166418
else
64176419
err = vlan_ops->dis_rx_filtering(vsi);

drivers/net/ethernet/intel/ice/ice_ptp_hw.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1518,7 +1518,8 @@ static int ice_read_ptp_tstamp_eth56g(struct ice_hw *hw, u8 port, u8 idx,
15181518
* lower 8 bits in the low register, and the upper 32 bits in the high
15191519
* register.
15201520
*/
1521-
*tstamp = ((u64)hi) << TS_PHY_HIGH_S | ((u64)lo & TS_PHY_LOW_M);
1521+
*tstamp = FIELD_PREP(TS_PHY_HIGH_M, hi) |
1522+
FIELD_PREP(TS_PHY_LOW_M, lo);
15221523

15231524
return 0;
15241525
}

drivers/net/ethernet/intel/ice/ice_ptp_hw.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -682,9 +682,8 @@ static inline bool ice_is_dual(struct ice_hw *hw)
682682
#define TS_HIGH_M 0xFF
683683
#define TS_HIGH_S 32
684684

685-
#define TS_PHY_LOW_M 0xFF
686-
#define TS_PHY_HIGH_M 0xFFFFFFFF
687-
#define TS_PHY_HIGH_S 8
685+
#define TS_PHY_LOW_M GENMASK(7, 0)
686+
#define TS_PHY_HIGH_M GENMASK_ULL(39, 8)
688687

689688
#define BYTES_PER_IDX_ADDR_L_U 8
690689
#define BYTES_PER_IDX_ADDR_L 4

drivers/net/ethernet/intel/ice/ice_virtchnl.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4128,6 +4128,9 @@ static const struct ice_virtchnl_ops ice_virtchnl_dflt_ops = {
41284128
.get_qos_caps = ice_vc_get_qos_caps,
41294129
.cfg_q_bw = ice_vc_cfg_q_bw,
41304130
.cfg_q_quanta = ice_vc_cfg_q_quanta,
4131+
/* If you add a new op here please make sure to add it to
4132+
* ice_virtchnl_repr_ops as well.
4133+
*/
41314134
};
41324135

41334136
/**
@@ -4258,6 +4261,9 @@ static const struct ice_virtchnl_ops ice_virtchnl_repr_ops = {
42584261
.dis_vlan_stripping_v2_msg = ice_vc_dis_vlan_stripping_v2_msg,
42594262
.ena_vlan_insertion_v2_msg = ice_vc_ena_vlan_insertion_v2_msg,
42604263
.dis_vlan_insertion_v2_msg = ice_vc_dis_vlan_insertion_v2_msg,
4264+
.get_qos_caps = ice_vc_get_qos_caps,
4265+
.cfg_q_bw = ice_vc_cfg_q_bw,
4266+
.cfg_q_quanta = ice_vc_cfg_q_quanta,
42614267
};
42624268

42634269
/**

drivers/net/ethernet/intel/idpf/idpf_txrx.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2448,6 +2448,7 @@ static void idpf_tx_splitq_map(struct idpf_tx_queue *tx_q,
24482448
* rest of the packet.
24492449
*/
24502450
tx_buf->type = LIBETH_SQE_EMPTY;
2451+
idpf_tx_buf_compl_tag(tx_buf) = params->compl_tag;
24512452

24522453
/* Adjust the DMA offset and the remaining size of the
24532454
* fragment. On the first iteration of this loop,

drivers/net/ethernet/intel/igb/igb_main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,10 @@ static int __init igb_init_module(void)
637637
dca_register_notify(&dca_notifier);
638638
#endif
639639
ret = pci_register_driver(&igb_driver);
640+
#ifdef CONFIG_IGB_DCA
641+
if (ret)
642+
dca_unregister_notify(&dca_notifier);
643+
#endif
640644
return ret;
641645
}
642646

drivers/net/ethernet/intel/ixgbe/ixgbe_common.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ u32 ixgbe_read_reg(struct ixgbe_hw *hw, u32 reg);
194194
dev_err(&adapter->pdev->dev, format, ## arg)
195195
#define e_dev_notice(format, arg...) \
196196
dev_notice(&adapter->pdev->dev, format, ## arg)
197+
#define e_dbg(msglvl, format, arg...) \
198+
netif_dbg(adapter, msglvl, adapter->netdev, format, ## arg)
197199
#define e_info(msglvl, format, arg...) \
198200
netif_info(adapter, msglvl, adapter->netdev, format, ## arg)
199201
#define e_err(msglvl, format, arg...) \

drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#define IXGBE_SFF_1GBASESX_CAPABLE 0x1
4141
#define IXGBE_SFF_1GBASELX_CAPABLE 0x2
4242
#define IXGBE_SFF_1GBASET_CAPABLE 0x8
43-
#define IXGBE_SFF_BASEBX10_CAPABLE 0x64
43+
#define IXGBE_SFF_BASEBX10_CAPABLE 0x40
4444
#define IXGBE_SFF_10GBASESR_CAPABLE 0x10
4545
#define IXGBE_SFF_10GBASELR_CAPABLE 0x20
4646
#define IXGBE_SFF_SOFT_RS_SELECT_MASK 0x8

drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,7 @@ static int ixgbe_negotiate_vf_api(struct ixgbe_adapter *adapter,
10481048
break;
10491049
}
10501050

1051-
e_info(drv, "VF %d requested invalid api version %u\n", vf, api);
1051+
e_dbg(drv, "VF %d requested unsupported api version %u\n", vf, api);
10521052

10531053
return -1;
10541054
}

0 commit comments

Comments
 (0)