Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue

Tony Nguyen says:

====================
Intel Wired LAN Driver Updates 2026-01-09 (ice, ixgbe, idpf)

For ice:
Grzegorz commonizes firmware loading process across all ice devices.

Michal adjusts default queue allocation to be based on
netif_get_num_default_rss_queues() rather than num_online_cpus().

For ixgbe:
Birger Koblitz adds support for 10G-BX modules.

For idpf:
Sreedevi converts always successful function to return void.

Andy Shevchenko fixes kdocs for missing 'Return:' in idpf_txrx.c file.

* '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue:
idpf: Fix kernel-doc descriptions to avoid warnings
idpf: update idpf_up_complete() return type to void
ice: use netif_get_num_default_rss_queues()
ixgbe: Add 10G-BX support
ice: unify PHY FW loading status handler for E800 devices
====================

Link: https://patch.msgid.link/20260109210647.3849008-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+146 -117
+22 -59
drivers/net/ethernet/intel/ice/ice_common.c
··· 204 204 } 205 205 206 206 /** 207 - * ice_is_pf_c827 - check if pf contains c827 phy 208 - * @hw: pointer to the hw struct 209 - * 210 - * Return: true if the device has c827 phy. 211 - */ 212 - static bool ice_is_pf_c827(struct ice_hw *hw) 213 - { 214 - struct ice_aqc_get_link_topo cmd = {}; 215 - u8 node_part_number; 216 - u16 node_handle; 217 - int status; 218 - 219 - if (hw->mac_type != ICE_MAC_E810) 220 - return false; 221 - 222 - if (hw->device_id != ICE_DEV_ID_E810C_QSFP) 223 - return true; 224 - 225 - cmd.addr.topo_params.node_type_ctx = 226 - FIELD_PREP(ICE_AQC_LINK_TOPO_NODE_TYPE_M, ICE_AQC_LINK_TOPO_NODE_TYPE_PHY) | 227 - FIELD_PREP(ICE_AQC_LINK_TOPO_NODE_CTX_M, ICE_AQC_LINK_TOPO_NODE_CTX_PORT); 228 - cmd.addr.topo_params.index = 0; 229 - 230 - status = ice_aq_get_netlist_node(hw, &cmd, &node_part_number, 231 - &node_handle); 232 - 233 - if (status || node_part_number != ICE_AQC_GET_LINK_TOPO_NODE_NR_C827) 234 - return false; 235 - 236 - if (node_handle == E810C_QSFP_C827_0_HANDLE || node_handle == E810C_QSFP_C827_1_HANDLE) 237 - return true; 238 - 239 - return false; 240 - } 241 - 242 - /** 243 207 * ice_clear_pf_cfg - Clear PF configuration 244 208 * @hw: pointer to the hardware structure 245 209 * ··· 922 958 } 923 959 924 960 /** 925 - * ice_wait_for_fw - wait for full FW readiness 961 + * ice_wait_fw_load - wait for PHY firmware loading to complete 926 962 * @hw: pointer to the hardware structure 927 - * @timeout: milliseconds that can elapse before timing out 963 + * @timeout: milliseconds that can elapse before timing out, 0 to bypass waiting 928 964 * 929 - * Return: 0 on success, -ETIMEDOUT on timeout. 965 + * Return: 966 + * * 0 on success 967 + * * negative on timeout 930 968 */ 931 - static int ice_wait_for_fw(struct ice_hw *hw, u32 timeout) 969 + static int ice_wait_fw_load(struct ice_hw *hw, u32 timeout) 932 970 { 933 - int fw_loading; 934 - u32 elapsed = 0; 971 + int fw_loading_reg; 935 972 936 - while (elapsed <= timeout) { 937 - fw_loading = rd32(hw, GL_MNG_FWSM) & GL_MNG_FWSM_FW_LOADING_M; 938 - 939 - /* firmware was not yet loaded, we have to wait more */ 940 - if (fw_loading) { 941 - elapsed += 100; 942 - msleep(100); 943 - continue; 944 - } 973 + if (!timeout) 945 974 return 0; 946 - } 947 975 948 - return -ETIMEDOUT; 976 + fw_loading_reg = rd32(hw, GL_MNG_FWSM) & GL_MNG_FWSM_FW_LOADING_M; 977 + /* notify the user only once if PHY FW is still loading */ 978 + if (fw_loading_reg) 979 + dev_info(ice_hw_to_dev(hw), "Link initialization is blocked by PHY FW initialization. Link initialization will continue after PHY FW initialization completes.\n"); 980 + else 981 + return 0; 982 + 983 + return rd32_poll_timeout(hw, GL_MNG_FWSM, fw_loading_reg, 984 + !(fw_loading_reg & GL_MNG_FWSM_FW_LOADING_M), 985 + 10000, timeout * 1000); 949 986 } 950 987 951 988 static int __fwlog_send_cmd(void *priv, struct libie_aq_desc *desc, void *buf, ··· 1136 1171 * due to necessity of loading FW from an external source. 1137 1172 * This can take even half a minute. 1138 1173 */ 1139 - if (ice_is_pf_c827(hw)) { 1140 - status = ice_wait_for_fw(hw, 30000); 1141 - if (status) { 1142 - dev_err(ice_hw_to_dev(hw), "ice_wait_for_fw timed out"); 1143 - goto err_unroll_fltr_mgmt_struct; 1144 - } 1174 + status = ice_wait_fw_load(hw, 30000); 1175 + if (status) { 1176 + dev_err(ice_hw_to_dev(hw), "ice_wait_fw_load timed out"); 1177 + goto err_unroll_fltr_mgmt_struct; 1145 1178 } 1146 1179 1147 1180 hw->lane_num = ice_get_phy_lane_number(hw);
+3 -2
drivers/net/ethernet/intel/ice/ice_irq.c
··· 106 106 #define ICE_RDMA_AEQ_MSIX 1 107 107 static int ice_get_default_msix_amount(struct ice_pf *pf) 108 108 { 109 - return ICE_MIN_LAN_OICR_MSIX + num_online_cpus() + 109 + return ICE_MIN_LAN_OICR_MSIX + netif_get_num_default_rss_queues() + 110 110 (test_bit(ICE_FLAG_FD_ENA, pf->flags) ? ICE_FDIR_MSIX : 0) + 111 - (ice_is_rdma_ena(pf) ? num_online_cpus() + ICE_RDMA_AEQ_MSIX : 0); 111 + (ice_is_rdma_ena(pf) ? netif_get_num_default_rss_queues() + 112 + ICE_RDMA_AEQ_MSIX : 0); 112 113 } 113 114 114 115 /**
+8 -4
drivers/net/ethernet/intel/ice/ice_lib.c
··· 159 159 160 160 static u16 ice_get_rxq_count(struct ice_pf *pf) 161 161 { 162 - return min(ice_get_avail_rxq_count(pf), num_online_cpus()); 162 + return min(ice_get_avail_rxq_count(pf), 163 + netif_get_num_default_rss_queues()); 163 164 } 164 165 165 166 static u16 ice_get_txq_count(struct ice_pf *pf) 166 167 { 167 - return min(ice_get_avail_txq_count(pf), num_online_cpus()); 168 + return min(ice_get_avail_txq_count(pf), 169 + netif_get_num_default_rss_queues()); 168 170 } 169 171 170 172 /** ··· 909 907 if (vsi->type == ICE_VSI_CHNL) 910 908 vsi->rss_size = min_t(u16, vsi->num_rxq, max_rss_size); 911 909 else 912 - vsi->rss_size = min_t(u16, num_online_cpus(), 910 + vsi->rss_size = min_t(u16, 911 + netif_get_num_default_rss_queues(), 913 912 max_rss_size); 914 913 vsi->rss_lut_type = ICE_LUT_PF; 915 914 break; 916 915 case ICE_VSI_SF: 917 916 vsi->rss_table_size = ICE_LUT_VSI_SIZE; 918 - vsi->rss_size = min_t(u16, num_online_cpus(), max_rss_size); 917 + vsi->rss_size = min_t(u16, netif_get_num_default_rss_queues(), 918 + max_rss_size); 919 919 vsi->rss_lut_type = ICE_LUT_VSI; 920 920 break; 921 921 case ICE_VSI_VF:
+2 -11
drivers/net/ethernet/intel/idpf/idpf_lib.c
··· 1429 1429 /** 1430 1430 * idpf_up_complete - Complete interface up sequence 1431 1431 * @vport: virtual port structure 1432 - * 1433 - * Returns 0 on success, negative on failure. 1434 1432 */ 1435 - static int idpf_up_complete(struct idpf_vport *vport) 1433 + static void idpf_up_complete(struct idpf_vport *vport) 1436 1434 { 1437 1435 struct idpf_netdev_priv *np = netdev_priv(vport->netdev); 1438 1436 ··· 1440 1442 } 1441 1443 1442 1444 set_bit(IDPF_VPORT_UP, np->state); 1443 - 1444 - return 0; 1445 1445 } 1446 1446 1447 1447 /** ··· 1580 1584 goto disable_vport; 1581 1585 } 1582 1586 1583 - err = idpf_up_complete(vport); 1584 - if (err) { 1585 - dev_err(&adapter->pdev->dev, "Failed to complete interface up for vport %u: %d\n", 1586 - vport->vport_id, err); 1587 - goto disable_vport; 1588 - } 1587 + idpf_up_complete(vport); 1589 1588 1590 1589 if (rtnl) 1591 1590 rtnl_unlock();
+58 -36
drivers/net/ethernet/intel/idpf/idpf_txrx.c
··· 19 19 * Make sure we don't exceed maximum scatter gather buffers for a single 20 20 * packet. 21 21 * TSO case has been handled earlier from idpf_features_check(). 22 + * 23 + * Return: %true if skb exceeds max descriptors per packet, %false otherwise. 22 24 */ 23 25 static bool idpf_chk_linearize(const struct sk_buff *skb, 24 26 unsigned int max_bufs, ··· 174 172 * idpf_tx_buf_alloc_all - Allocate memory for all buffer resources 175 173 * @tx_q: queue for which the buffers are allocated 176 174 * 177 - * Returns 0 on success, negative on failure 175 + * Return: 0 on success, negative on failure 178 176 */ 179 177 static int idpf_tx_buf_alloc_all(struct idpf_tx_queue *tx_q) 180 178 { ··· 198 196 * @vport: vport to allocate resources for 199 197 * @tx_q: the tx ring to set up 200 198 * 201 - * Returns 0 on success, negative on failure 199 + * Return: 0 on success, negative on failure 202 200 */ 203 201 static int idpf_tx_desc_alloc(const struct idpf_vport *vport, 204 202 struct idpf_tx_queue *tx_q) ··· 299 297 * idpf_tx_desc_alloc_all - allocate all queues Tx resources 300 298 * @vport: virtual port private structure 301 299 * 302 - * Returns 0 on success, negative on failure 300 + * Return: 0 on success, negative on failure 303 301 */ 304 302 static int idpf_tx_desc_alloc_all(struct idpf_vport *vport) 305 303 { ··· 550 548 * idpf_rx_hdr_buf_alloc_all - Allocate memory for header buffers 551 549 * @bufq: ring to use 552 550 * 553 - * Returns 0 on success, negative on failure. 551 + * Return: 0 on success, negative on failure. 554 552 */ 555 553 static int idpf_rx_hdr_buf_alloc_all(struct idpf_buf_queue *bufq) 556 554 { ··· 602 600 * @bufq: buffer queue to post to 603 601 * @buf_id: buffer id to post 604 602 * 605 - * Returns false if buffer could not be allocated, true otherwise. 603 + * Return: %false if buffer could not be allocated, %true otherwise. 606 604 */ 607 605 static bool idpf_rx_post_buf_desc(struct idpf_buf_queue *bufq, u16 buf_id) 608 606 { ··· 651 649 * @bufq: buffer queue to post working set to 652 650 * @working_set: number of buffers to put in working set 653 651 * 654 - * Returns true if @working_set bufs were posted successfully, false otherwise. 652 + * Return: %true if @working_set bufs were posted successfully, %false otherwise. 655 653 */ 656 654 static bool idpf_rx_post_init_bufs(struct idpf_buf_queue *bufq, 657 655 u16 working_set) ··· 720 718 * idpf_rx_buf_alloc_all - Allocate memory for all buffer resources 721 719 * @rxbufq: queue for which the buffers are allocated 722 720 * 723 - * Returns 0 on success, negative on failure 721 + * Return: 0 on success, negative on failure 724 722 */ 725 723 static int idpf_rx_buf_alloc_all(struct idpf_buf_queue *rxbufq) 726 724 { ··· 748 746 * @bufq: buffer queue to create page pool for 749 747 * @type: type of Rx buffers to allocate 750 748 * 751 - * Returns 0 on success, negative on failure 749 + * Return: 0 on success, negative on failure 752 750 */ 753 751 static int idpf_rx_bufs_init(struct idpf_buf_queue *bufq, 754 752 enum libeth_fqe_type type) ··· 783 781 * idpf_rx_bufs_init_all - Initialize all RX bufs 784 782 * @vport: virtual port struct 785 783 * 786 - * Returns 0 on success, negative on failure 784 + * Return: 0 on success, negative on failure 787 785 */ 788 786 int idpf_rx_bufs_init_all(struct idpf_vport *vport) 789 787 { ··· 838 836 * @vport: vport to allocate resources for 839 837 * @rxq: Rx queue for which the resources are setup 840 838 * 841 - * Returns 0 on success, negative on failure 839 + * Return: 0 on success, negative on failure 842 840 */ 843 841 static int idpf_rx_desc_alloc(const struct idpf_vport *vport, 844 842 struct idpf_rx_queue *rxq) ··· 900 898 * idpf_rx_desc_alloc_all - allocate all RX queues resources 901 899 * @vport: virtual port structure 902 900 * 903 - * Returns 0 on success, negative on failure 901 + * Return: 0 on success, negative on failure 904 902 */ 905 903 static int idpf_rx_desc_alloc_all(struct idpf_vport *vport) 906 904 { ··· 1428 1426 * dereference the queue from queue groups. This allows us to quickly pull a 1429 1427 * txq based on a queue index. 1430 1428 * 1431 - * Returns 0 on success, negative on failure 1429 + * Return: 0 on success, negative on failure 1432 1430 */ 1433 1431 static int idpf_vport_init_fast_path_txqs(struct idpf_vport *vport) 1434 1432 { ··· 1561 1559 * @vport_msg: message to fill with data 1562 1560 * @max_q: vport max queue info 1563 1561 * 1564 - * Return 0 on success, error value on failure. 1562 + * Return: 0 on success, error value on failure. 1565 1563 */ 1566 1564 int idpf_vport_calc_total_qs(struct idpf_adapter *adapter, u16 vport_idx, 1567 1565 struct virtchnl2_create_vport *vport_msg, ··· 1696 1694 * @vport: vport to allocate txq groups for 1697 1695 * @num_txq: number of txqs to allocate for each group 1698 1696 * 1699 - * Returns 0 on success, negative on failure 1697 + * Return: 0 on success, negative on failure 1700 1698 */ 1701 1699 static int idpf_txq_group_alloc(struct idpf_vport *vport, u16 num_txq) 1702 1700 { ··· 1788 1786 * @vport: vport to allocate rxq groups for 1789 1787 * @num_rxq: number of rxqs to allocate for each group 1790 1788 * 1791 - * Returns 0 on success, negative on failure 1789 + * Return: 0 on success, negative on failure 1792 1790 */ 1793 1791 static int idpf_rxq_group_alloc(struct idpf_vport *vport, u16 num_rxq) 1794 1792 { ··· 1917 1915 * idpf_vport_queue_grp_alloc_all - Allocate all queue groups/resources 1918 1916 * @vport: vport with qgrps to allocate 1919 1917 * 1920 - * Returns 0 on success, negative on failure 1918 + * Return: 0 on success, negative on failure 1921 1919 */ 1922 1920 static int idpf_vport_queue_grp_alloc_all(struct idpf_vport *vport) 1923 1921 { ··· 1946 1944 * idpf_vport_queues_alloc - Allocate memory for all queues 1947 1945 * @vport: virtual port 1948 1946 * 1949 - * Allocate memory for queues associated with a vport. Returns 0 on success, 1950 - * negative on failure. 1947 + * Allocate memory for queues associated with a vport. 1948 + * 1949 + * Return: 0 on success, negative on failure. 1951 1950 */ 1952 1951 int idpf_vport_queues_alloc(struct idpf_vport *vport) 1953 1952 { ··· 2175 2172 * @budget: Used to determine if we are in netpoll 2176 2173 * @cleaned: returns number of packets cleaned 2177 2174 * 2178 - * Returns true if there's any budget left (e.g. the clean is finished) 2175 + * Return: %true if there's any budget left (e.g. the clean is finished) 2179 2176 */ 2180 2177 static bool idpf_tx_clean_complq(struct idpf_compl_queue *complq, int budget, 2181 2178 int *cleaned) ··· 2401 2398 } 2402 2399 2403 2400 /** 2404 - * idpf_tx_splitq_has_room - check if enough Tx splitq resources are available 2401 + * idpf_txq_has_room - check if enough Tx splitq resources are available 2405 2402 * @tx_q: the queue to be checked 2406 2403 * @descs_needed: number of descriptors required for this packet 2407 2404 * @bufs_needed: number of Tx buffers required for this packet ··· 2532 2529 * idpf_tx_splitq_bump_ntu - adjust NTU and generation 2533 2530 * @txq: the tx ring to wrap 2534 2531 * @ntu: ring index to bump 2532 + * 2533 + * Return: the next ring index hopping to 0 when wraps around 2535 2534 */ 2536 2535 static unsigned int idpf_tx_splitq_bump_ntu(struct idpf_tx_queue *txq, u16 ntu) 2537 2536 { ··· 2802 2797 * @skb: pointer to skb 2803 2798 * @off: pointer to struct that holds offload parameters 2804 2799 * 2805 - * Returns error (negative) if TSO was requested but cannot be applied to the 2800 + * Return: error (negative) if TSO was requested but cannot be applied to the 2806 2801 * given skb, 0 if TSO does not apply to the given skb, or 1 otherwise. 2807 2802 */ 2808 2803 int idpf_tso(struct sk_buff *skb, struct idpf_tx_offload_params *off) ··· 2880 2875 * 2881 2876 * Since the TX buffer rings mimics the descriptor ring, update the tx buffer 2882 2877 * ring entry to reflect that this index is a context descriptor 2878 + * 2879 + * Return: pointer to the next descriptor 2883 2880 */ 2884 2881 static union idpf_flex_tx_ctx_desc * 2885 2882 idpf_tx_splitq_get_ctx_desc(struct idpf_tx_queue *txq) ··· 2900 2893 * idpf_tx_drop_skb - free the SKB and bump tail if necessary 2901 2894 * @tx_q: queue to send buffer on 2902 2895 * @skb: pointer to skb 2896 + * 2897 + * Return: always NETDEV_TX_OK 2903 2898 */ 2904 2899 netdev_tx_t idpf_tx_drop_skb(struct idpf_tx_queue *tx_q, struct sk_buff *skb) 2905 2900 { ··· 3003 2994 * @skb: send buffer 3004 2995 * @tx_q: queue to send buffer on 3005 2996 * 3006 - * Returns NETDEV_TX_OK if sent, else an error code 2997 + * Return: NETDEV_TX_OK if sent, else an error code 3007 2998 */ 3008 2999 static netdev_tx_t idpf_tx_splitq_frame(struct sk_buff *skb, 3009 3000 struct idpf_tx_queue *tx_q) ··· 3129 3120 * @skb: send buffer 3130 3121 * @netdev: network interface device structure 3131 3122 * 3132 - * Returns NETDEV_TX_OK if sent, else an error code 3123 + * Return: NETDEV_TX_OK if sent, else an error code 3133 3124 */ 3134 3125 netdev_tx_t idpf_tx_start(struct sk_buff *skb, struct net_device *netdev) 3135 3126 { ··· 3279 3270 * @rx_desc: Receive descriptor 3280 3271 * @decoded: Decoded Rx packet type related fields 3281 3272 * 3282 - * Return 0 on success and error code on failure 3283 - * 3284 3273 * Populate the skb fields with the total number of RSC segments, RSC payload 3285 3274 * length and packet type. 3275 + * 3276 + * Return: 0 on success and error code on failure 3286 3277 */ 3287 3278 static int idpf_rx_rsc(struct idpf_rx_queue *rxq, struct sk_buff *skb, 3288 3279 const struct virtchnl2_rx_flex_desc_adv_nic_3 *rx_desc, ··· 3380 3371 * This function checks the ring, descriptor, and packet information in 3381 3372 * order to populate the hash, checksum, protocol, and 3382 3373 * other fields within the skb. 3374 + * 3375 + * Return: 0 on success and error code on failure 3383 3376 */ 3384 3377 static int 3385 3378 __idpf_rx_process_skb_fields(struct idpf_rx_queue *rxq, struct sk_buff *skb, ··· 3476 3465 * @stat_err_field: field from descriptor to test bits in 3477 3466 * @stat_err_bits: value to mask 3478 3467 * 3468 + * Return: %true if any of given @stat_err_bits are set, %false otherwise. 3479 3469 */ 3480 3470 static bool idpf_rx_splitq_test_staterr(const u8 stat_err_field, 3481 3471 const u8 stat_err_bits) ··· 3488 3476 * idpf_rx_splitq_is_eop - process handling of EOP buffers 3489 3477 * @rx_desc: Rx descriptor for current buffer 3490 3478 * 3491 - * If the buffer is an EOP buffer, this function exits returning true, 3492 - * otherwise return false indicating that this is in fact a non-EOP buffer. 3479 + * Return: %true if the buffer is an EOP buffer, %false otherwise, indicating 3480 + * that this is in fact a non-EOP buffer. 3493 3481 */ 3494 3482 static bool idpf_rx_splitq_is_eop(struct virtchnl2_rx_flex_desc_adv_nic_3 *rx_desc) 3495 3483 { ··· 3508 3496 * expensive overhead for IOMMU access this provides a means of avoiding 3509 3497 * it by maintaining the mapping of the page to the system. 3510 3498 * 3511 - * Returns amount of work completed 3499 + * Return: amount of work completed 3512 3500 */ 3513 3501 static int idpf_rx_splitq_clean(struct idpf_rx_queue *rxq, int budget) 3514 3502 { ··· 3638 3626 * @buf_id: buffer ID 3639 3627 * @buf_desc: Buffer queue descriptor 3640 3628 * 3641 - * Return 0 on success and negative on failure. 3629 + * Return: 0 on success and negative on failure. 3642 3630 */ 3643 3631 static int idpf_rx_update_bufq_desc(struct idpf_buf_queue *bufq, u32 buf_id, 3644 3632 struct virtchnl2_splitq_rx_buf_desc *buf_desc) ··· 3765 3753 * @irq: interrupt number 3766 3754 * @data: pointer to a q_vector 3767 3755 * 3756 + * Return: always IRQ_HANDLED 3768 3757 */ 3769 3758 static irqreturn_t idpf_vport_intr_clean_queues(int __always_unused irq, 3770 3759 void *data) ··· 3887 3874 /** 3888 3875 * idpf_vport_intr_buildreg_itr - Enable default interrupt generation settings 3889 3876 * @q_vector: pointer to q_vector 3877 + * 3878 + * Return: value to be written back to HW to enable interrupt generation 3890 3879 */ 3891 3880 static u32 idpf_vport_intr_buildreg_itr(struct idpf_q_vector *q_vector) 3892 3881 { ··· 4020 4005 /** 4021 4006 * idpf_vport_intr_req_irq - get MSI-X vectors from the OS for the vport 4022 4007 * @vport: main vport structure 4008 + * 4009 + * Return: 0 on success, negative on failure 4023 4010 */ 4024 4011 static int idpf_vport_intr_req_irq(struct idpf_vport *vport) 4025 4012 { ··· 4232 4215 * @budget: Used to determine if we are in netpoll 4233 4216 * @cleaned: returns number of packets cleaned 4234 4217 * 4235 - * Returns false if clean is not complete else returns true 4218 + * Return: %false if clean is not complete else returns %true 4236 4219 */ 4237 4220 static bool idpf_tx_splitq_clean_all(struct idpf_q_vector *q_vec, 4238 4221 int budget, int *cleaned) ··· 4259 4242 * @budget: Used to determine if we are in netpoll 4260 4243 * @cleaned: returns number of packets cleaned 4261 4244 * 4262 - * Returns false if clean is not complete else returns true 4245 + * Return: %false if clean is not complete else returns %true 4263 4246 */ 4264 4247 static bool idpf_rx_splitq_clean_all(struct idpf_q_vector *q_vec, int budget, 4265 4248 int *cleaned) ··· 4302 4285 * idpf_vport_splitq_napi_poll - NAPI handler 4303 4286 * @napi: struct from which you get q_vector 4304 4287 * @budget: budget provided by stack 4288 + * 4289 + * Return: how many packets were cleaned 4305 4290 */ 4306 4291 static int idpf_vport_splitq_napi_poll(struct napi_struct *napi, int budget) 4307 4292 { ··· 4452 4433 * idpf_vport_intr_init_vec_idx - Initialize the vector indexes 4453 4434 * @vport: virtual port 4454 4435 * 4455 - * Initialize vector indexes with values returened over mailbox 4436 + * Initialize vector indexes with values returned over mailbox. 4437 + * 4438 + * Return: 0 on success, negative on failure 4456 4439 */ 4457 4440 static int idpf_vport_intr_init_vec_idx(struct idpf_vport *vport) 4458 4441 { ··· 4520 4499 * idpf_vport_intr_alloc - Allocate memory for interrupt vectors 4521 4500 * @vport: virtual port 4522 4501 * 4523 - * We allocate one q_vector per queue interrupt. If allocation fails we 4524 - * return -ENOMEM. 4502 + * Allocate one q_vector per queue interrupt. 4503 + * 4504 + * Return: 0 on success, if allocation fails we return -ENOMEM. 4525 4505 */ 4526 4506 int idpf_vport_intr_alloc(struct idpf_vport *vport) 4527 4507 { ··· 4609 4587 * idpf_vport_intr_init - Setup all vectors for the given vport 4610 4588 * @vport: virtual port 4611 4589 * 4612 - * Returns 0 on success or negative on failure 4590 + * Return: 0 on success or negative on failure 4613 4591 */ 4614 4592 int idpf_vport_intr_init(struct idpf_vport *vport) 4615 4593 { ··· 4648 4626 * idpf_config_rss - Send virtchnl messages to configure RSS 4649 4627 * @vport: virtual port 4650 4628 * 4651 - * Return 0 on success, negative on failure 4629 + * Return: 0 on success, negative on failure 4652 4630 */ 4653 4631 int idpf_config_rss(struct idpf_vport *vport) 4654 4632 {
+7
drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
··· 342 342 return 0; 343 343 } 344 344 345 + if (hw->phy.sfp_type == ixgbe_sfp_type_10g_bx_core0 || 346 + hw->phy.sfp_type == ixgbe_sfp_type_10g_bx_core1) { 347 + *speed = IXGBE_LINK_SPEED_10GB_FULL; 348 + *autoneg = false; 349 + return 0; 350 + } 351 + 345 352 /* 346 353 * Determine link capabilities based on the stored value of AUTOC, 347 354 * which represents EEPROM defaults. If AUTOC value has not been
+2
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
··· 351 351 case ixgbe_sfp_type_1g_lx_core1: 352 352 case ixgbe_sfp_type_1g_bx_core0: 353 353 case ixgbe_sfp_type_1g_bx_core1: 354 + case ixgbe_sfp_type_10g_bx_core0: 355 + case ixgbe_sfp_type_10g_bx_core1: 354 356 ethtool_link_ksettings_add_link_mode(cmd, supported, 355 357 FIBRE); 356 358 ethtool_link_ksettings_add_link_mode(cmd, advertising,
+40 -5
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
··· 1534 1534 struct ixgbe_adapter *adapter = hw->back; 1535 1535 u8 oui_bytes[3] = {0, 0, 0}; 1536 1536 u8 bitrate_nominal = 0; 1537 + u8 sm_length_100m = 0; 1537 1538 u8 comp_codes_10g = 0; 1538 1539 u8 comp_codes_1g = 0; 1540 + u8 sm_length_km = 0; 1539 1541 u16 enforce_sfp = 0; 1540 1542 u32 vendor_oui = 0; 1541 1543 u8 identifier = 0; ··· 1680 1678 else 1681 1679 hw->phy.sfp_type = 1682 1680 ixgbe_sfp_type_1g_bx_core1; 1681 + /* Support Ethernet 10G-BX, checking the Bit Rate 1682 + * Nominal Value as per SFF-8472 to be 12.5 Gb/s (67h) and 1683 + * Single Mode fibre with at least 1km link length 1684 + */ 1685 + } else if ((!comp_codes_10g) && (bitrate_nominal == 0x67) && 1686 + (!(cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)) && 1687 + (!(cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE))) { 1688 + status = hw->phy.ops.read_i2c_eeprom(hw, 1689 + IXGBE_SFF_SM_LENGTH_KM, 1690 + &sm_length_km); 1691 + if (status != 0) 1692 + goto err_read_i2c_eeprom; 1693 + status = hw->phy.ops.read_i2c_eeprom(hw, 1694 + IXGBE_SFF_SM_LENGTH_100M, 1695 + &sm_length_100m); 1696 + if (status != 0) 1697 + goto err_read_i2c_eeprom; 1698 + if (sm_length_km > 0 || sm_length_100m >= 10) { 1699 + if (hw->bus.lan_id == 0) 1700 + hw->phy.sfp_type = 1701 + ixgbe_sfp_type_10g_bx_core0; 1702 + else 1703 + hw->phy.sfp_type = 1704 + ixgbe_sfp_type_10g_bx_core1; 1705 + } else { 1706 + hw->phy.sfp_type = ixgbe_sfp_type_unknown; 1707 + } 1683 1708 } else { 1684 1709 hw->phy.sfp_type = ixgbe_sfp_type_unknown; 1685 1710 } ··· 1797 1768 hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 || 1798 1769 hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1 || 1799 1770 hw->phy.sfp_type == ixgbe_sfp_type_1g_bx_core0 || 1800 - hw->phy.sfp_type == ixgbe_sfp_type_1g_bx_core1)) { 1771 + hw->phy.sfp_type == ixgbe_sfp_type_1g_bx_core1 || 1772 + hw->phy.sfp_type == ixgbe_sfp_type_10g_bx_core0 || 1773 + hw->phy.sfp_type == ixgbe_sfp_type_10g_bx_core1)) { 1801 1774 hw->phy.type = ixgbe_phy_sfp_unsupported; 1802 1775 return -EOPNOTSUPP; 1803 1776 } ··· 1817 1786 hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 || 1818 1787 hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1 || 1819 1788 hw->phy.sfp_type == ixgbe_sfp_type_1g_bx_core0 || 1820 - hw->phy.sfp_type == ixgbe_sfp_type_1g_bx_core1)) { 1789 + hw->phy.sfp_type == ixgbe_sfp_type_1g_bx_core1 || 1790 + hw->phy.sfp_type == ixgbe_sfp_type_10g_bx_core0 || 1791 + hw->phy.sfp_type == ixgbe_sfp_type_10g_bx_core1)) { 1821 1792 /* Make sure we're a supported PHY type */ 1822 1793 if (hw->phy.type == ixgbe_phy_sfp_intel) 1823 1794 return 0; ··· 2049 2016 return -EOPNOTSUPP; 2050 2017 2051 2018 /* 2052 - * Limiting active cables and 1G Phys must be initialized as 2019 + * Limiting active cables, 10G BX and 1G Phys must be initialized as 2053 2020 * SR modules 2054 2021 */ 2055 2022 if (sfp_type == ixgbe_sfp_type_da_act_lmt_core0 || 2056 2023 sfp_type == ixgbe_sfp_type_1g_lx_core0 || 2057 2024 sfp_type == ixgbe_sfp_type_1g_cu_core0 || 2058 2025 sfp_type == ixgbe_sfp_type_1g_sx_core0 || 2059 - sfp_type == ixgbe_sfp_type_1g_bx_core0) 2026 + sfp_type == ixgbe_sfp_type_1g_bx_core0 || 2027 + sfp_type == ixgbe_sfp_type_10g_bx_core0) 2060 2028 sfp_type = ixgbe_sfp_type_srlr_core0; 2061 2029 else if (sfp_type == ixgbe_sfp_type_da_act_lmt_core1 || 2062 2030 sfp_type == ixgbe_sfp_type_1g_lx_core1 || 2063 2031 sfp_type == ixgbe_sfp_type_1g_cu_core1 || 2064 2032 sfp_type == ixgbe_sfp_type_1g_sx_core1 || 2065 - sfp_type == ixgbe_sfp_type_1g_bx_core1) 2033 + sfp_type == ixgbe_sfp_type_1g_bx_core1 || 2034 + sfp_type == ixgbe_sfp_type_10g_bx_core1) 2066 2035 sfp_type = ixgbe_sfp_type_srlr_core1; 2067 2036 2068 2037 /* Read offset to PHY init contents */
+2
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h
··· 32 32 #define IXGBE_SFF_QSFP_1GBE_COMP 0x86 33 33 #define IXGBE_SFF_QSFP_CABLE_LENGTH 0x92 34 34 #define IXGBE_SFF_QSFP_DEVICE_TECH 0x93 35 + #define IXGBE_SFF_SM_LENGTH_KM 0xE 36 + #define IXGBE_SFF_SM_LENGTH_100M 0xF 35 37 36 38 /* Bitmasks */ 37 39 #define IXGBE_SFF_DA_PASSIVE_CABLE 0x4
+2
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
··· 3286 3286 ixgbe_sfp_type_1g_lx_core1 = 14, 3287 3287 ixgbe_sfp_type_1g_bx_core0 = 15, 3288 3288 ixgbe_sfp_type_1g_bx_core1 = 16, 3289 + ixgbe_sfp_type_10g_bx_core0 = 17, 3290 + ixgbe_sfp_type_10g_bx_core1 = 18, 3289 3291 3290 3292 ixgbe_sfp_type_not_present = 0xFFFE, 3291 3293 ixgbe_sfp_type_unknown = 0xFFFF