Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
0af91a8
i40e: Fix waiting for queues of all VSIs to be disabled
ivecera Nov 8, 2023
e23b905
i40e: Fix wrong mask used during DCB config
ivecera Nov 30, 2023
f0c7450
i40e: Use existing helper to find flow director VSI
ivecera Nov 24, 2023
1b4dd45
i40e: Introduce and use macros for iterating VSIs and VEBs
ivecera Nov 24, 2023
4fd2763
i40e: Add helpers to find VSI and VEB by SEID and use them
ivecera Nov 24, 2023
a0aca67
i40e: Fix broken support for floating VEBs
ivecera Nov 24, 2023
ba764b8
i40e: Remove VEB recursion
ivecera Nov 24, 2023
baec878
ice: introduce new E825C devices family
gnitka Dec 6, 2023
05e763e
ice: Add helper function ice_is_generic_mac
gnitka Dec 6, 2023
514d151
ice: add support for 3k signing DDP sections for E825C
gnitka Dec 6, 2023
2dd3238
ice: Add support for devlink loopback param.
pkaminsk Dec 8, 2023
182026c
e1000e: correct maximum frequency adjustment values
jacob-keller Dec 12, 2023
30d6cf8
e1000e: remove force SMBUS from ULP enable flow to avoid PHY loss issue
vlifshts Dec 27, 2023
92fac4a
e1000e: Workaround for sporadic MDI error on Meteor Lake systems
vlifshts Jan 5, 2024
992af46
ice: Add a new counter for Rx EIPE errors
ani-bxd Jan 3, 2024
3e8ed8f
e1000e: Minor flow correction in e1000_shutdown function
vlifshts Jan 4, 2024
fbf3064
idpf: avoid compiler padding in virtchnl2_ptype struct
plinga1 Jan 9, 2024
35af134
igb: Fix string truncation warnings in igb_set_fw_version
KunWuChan Jan 15, 2024
a65a8a8
ice: Add check for lport extraction to LAG init
dmertman Jan 19, 2024
c7e3af0
ixgbe: Fix an error handling path in ixgbe_read_iosf_sb_reg_x550()
tititiou36 Jan 20, 2024
ae1e0fe
iavf: fix reset in early states
azaki1 Jan 23, 2024
b033ef4
iavf: allow an early reset event to be processed
azaki1 Jan 23, 2024
b6e59a3
ice: remove duplicate comment
pmstillw Jan 22, 2024
44e6c53
ice: introduce PTP state machine
Jan 23, 2024
7bf6c27
ice: pass reset type to PTP reset functions
jacob-keller Jan 23, 2024
bfa1fca
ice: rename verify_cached to has_ready_bitmap
jacob-keller Jan 23, 2024
fb545e6
ice: don't check has_ready_bitmap in E810 functions
jacob-keller Jan 23, 2024
51bc565
ice: rename ice_ptp_tx_cfg_intr
jacob-keller Jan 23, 2024
2d9c8d4
ice: factor out ice_ptp_rebuild_owner()
jacob-keller Jan 23, 2024
4214968
ice: stop destroying and reinitalizing Tx tracker during reset
jacob-keller Jan 23, 2024
10df98a
ice: make ice_vsi_cfg_rxq() static
mfijalko Jan 23, 2024
a8dcaf0
ice: make ice_vsi_cfg_txq() static
mfijalko Jan 23, 2024
8a1b146
ice: devlink PF MSI-X max and min parameter
Nov 23, 2023
256193b
ice: remove splitting MSI-X between features
Nov 23, 2023
6b96764
ice: get rid of num_lan_msix field
Nov 23, 2023
1525f4d
ice, irdma: move interrupts code to irdma
Nov 23, 2023
d86aaf1
ice: trade dyn_allowed only as suggestion
Nov 23, 2023
7818092
ice: enable_rdma devlink param
Nov 23, 2023
f1b8be8
ice: simplify VF MSI-X managing
Nov 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Documentation/networking/devlink/ice.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Parameters
==========

.. list-table:: Generic parameters implemented
:widths: 5 5 90

* - Name
- Mode
Expand All @@ -22,6 +23,20 @@ Parameters
- runtime
- mutually exclusive with ``enable_roce``

.. list-table:: Driver specific parameters implemented
:widths: 5 5 90

* - Name
- Mode
- Description
* - ``loopback``
- runtime
- Controls loopback behavior by tuning scheduler bandwidth.
Supported values are ``enabled``, ``disabled``, ``prioritized``.
The latter allows for bandwidth higher than external port speed
when looping back traffic between VFs. Works with 8x10G and 4x25G
cards.

Info versions
=============

Expand Down
2 changes: 0 additions & 2 deletions drivers/infiniband/hw/irdma/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,6 @@ static int irdma_save_msix_info(struct irdma_pci_f *rf)
iw_qvlist->num_vectors = rf->msix_count;
if (rf->msix_count <= num_online_cpus())
rf->msix_shared = true;
else if (rf->msix_count > num_online_cpus() + 1)
rf->msix_count = num_online_cpus() + 1;

pmsix = rf->msix_entries;
for (i = 0, ceq_idx = 0; i < rf->msix_count; i++, iw_qvinfo++) {
Expand Down
45 changes: 43 additions & 2 deletions drivers/infiniband/hw/irdma/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,42 @@ static void irdma_lan_unregister_qset(struct irdma_sc_vsi *vsi,
ibdev_dbg(&iwdev->ibdev, "WS: LAN free_res for rdma qset failed.\n");
}

static int irdma_init_interrupts(struct irdma_pci_f *rf, struct ice_pf *pf)
{
int i;

rf->msix_count = num_online_cpus() + IRDMA_NUM_AEQ_MSIX;
rf->msix_entries = kcalloc(rf->msix_count, sizeof(*rf->msix_entries),
GFP_KERNEL);
if (!rf->msix_entries)
return -ENOMEM;

for (i = 0; i < rf->msix_count; i++)
if (ice_alloc_rdma_qvector(pf, &rf->msix_entries[i]))
break;

if (i < IRDMA_MIN_MSIX) {
for (; i > 0; i--)
ice_free_rdma_qvector(pf, &rf->msix_entries[i]);

return -ENOMEM;
}

rf->msix_count = i;

return 0;
}

static void irdma_deinit_interrupts(struct irdma_pci_f *rf, struct ice_pf *pf)
{
int i;

for (i = 0; i < rf->msix_count; i++)
ice_free_rdma_qvector(pf, &rf->msix_entries[i]);

kfree(rf->msix_entries);
}

static void irdma_remove(struct auxiliary_device *aux_dev)
{
struct iidc_auxiliary_dev *iidc_adev = container_of(aux_dev,
Expand All @@ -216,6 +252,7 @@ static void irdma_remove(struct auxiliary_device *aux_dev)

irdma_ib_unregister_device(iwdev);
ice_rdma_update_vsi_filter(pf, iwdev->vsi_num, false);
irdma_deinit_interrupts(iwdev->rf, pf);

pr_debug("INIT: Gen2 PF[%d] device remove success\n", PCI_FUNC(pf->pdev->devfn));
}
Expand All @@ -230,9 +267,7 @@ static void irdma_fill_device_info(struct irdma_device *iwdev, struct ice_pf *pf
rf->gen_ops.unregister_qset = irdma_lan_unregister_qset;
rf->hw.hw_addr = pf->hw.hw_addr;
rf->pcidev = pf->pdev;
rf->msix_count = pf->num_rdma_msix;
rf->pf_id = pf->hw.pf_id;
rf->msix_entries = &pf->msix_entries[pf->rdma_base_vector];
rf->default_vsi.vsi_idx = vsi->vsi_num;
rf->protocol_used = pf->rdma_mode & IIDC_RDMA_PROTOCOL_ROCEV2 ?
IRDMA_ROCE_PROTOCOL_ONLY : IRDMA_IWARP_PROTOCOL_ONLY;
Expand Down Expand Up @@ -281,6 +316,10 @@ static int irdma_probe(struct auxiliary_device *aux_dev, const struct auxiliary_
irdma_fill_device_info(iwdev, pf, vsi);
rf = iwdev->rf;

err = irdma_init_interrupts(rf, pf);
if (err)
goto err_init_interrupts;

err = irdma_ctrl_init_hw(rf);
if (err)
goto err_ctrl_init;
Expand Down Expand Up @@ -311,6 +350,8 @@ static int irdma_probe(struct auxiliary_device *aux_dev, const struct auxiliary_
err_rt_init:
irdma_ctrl_deinit_hw(rf);
err_ctrl_init:
irdma_deinit_interrupts(rf, pf);
err_init_interrupts:
kfree(iwdev->rf);
ib_dealloc_device(&iwdev->ibdev);

Expand Down
3 changes: 3 additions & 0 deletions drivers/infiniband/hw/irdma/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ extern struct auxiliary_driver i40iw_auxiliary_drv;

#define IRDMA_IRQ_NAME_STR_LEN (64)

#define IRDMA_NUM_AEQ_MSIX 1
#define IRDMA_MIN_MSIX 2

enum init_completion_state {
INVALID_STATE = 0,
INITIAL_STATE,
Expand Down
20 changes: 20 additions & 0 deletions drivers/net/ethernet/intel/e1000e/e1000.h
Original file line number Diff line number Diff line change
Expand Up @@ -360,23 +360,43 @@ s32 e1000e_get_base_timinca(struct e1000_adapter *adapter, u32 *timinca);
* As a result, a shift of INCVALUE_SHIFT_n is used to fit a value of
* INCVALUE_n into the TIMINCA register allowing 32+8+(24-INCVALUE_SHIFT_n)
* bits to count nanoseconds leaving the rest for fractional nonseconds.
*
* Any given INCVALUE also has an associated maximum adjustment value. This
* maximum adjustment value is the largest increase (or decrease) which can be
* safely applied without overflowing the INCVALUE. Since INCVALUE has
* a maximum range of 24 bits, its largest value is 0xFFFFFF.
*
* To understand where the maximum value comes from, consider the following
* equation:
*
* new_incval = base_incval + (base_incval * adjustment) / 1billion
*
* To avoid overflow that means:
* max_incval = base_incval + (base_incval * max_adj) / billion
*
* Re-arranging:
* max_adj = floor(((max_incval - base_incval) * 1billion) / 1billion)
*/
#define INCVALUE_96MHZ 125
#define INCVALUE_SHIFT_96MHZ 17
#define INCPERIOD_SHIFT_96MHZ 2
#define INCPERIOD_96MHZ (12 >> INCPERIOD_SHIFT_96MHZ)
#define MAX_PPB_96MHZ 23999900 /* 23,999,900 ppb */

#define INCVALUE_25MHZ 40
#define INCVALUE_SHIFT_25MHZ 18
#define INCPERIOD_25MHZ 1
#define MAX_PPB_25MHZ 599999900 /* 599,999,900 ppb */

#define INCVALUE_24MHZ 125
#define INCVALUE_SHIFT_24MHZ 14
#define INCPERIOD_24MHZ 3
#define MAX_PPB_24MHZ 999999999 /* 999,999,999 ppb */

#define INCVALUE_38400KHZ 26
#define INCVALUE_SHIFT_38400KHZ 19
#define INCPERIOD_38400KHZ 1
#define MAX_PPB_38400KHZ 230769100 /* 230,769,100 ppb */

/* Another drawback of scaling the incvalue by a large factor is the
* 64-bit SYSTIM register overflows more quickly. This is dealt with
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/ethernet/intel/e1000e/hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@ struct e1000_phy_info {
u32 id;
u32 reset_delay_us; /* in usec */
u32 revision;
u32 retry_count;

enum e1000_media_type media_type;

Expand All @@ -644,6 +645,7 @@ struct e1000_phy_info {
bool polarity_correction;
bool speed_downgraded;
bool autoneg_wait_to_complete;
bool retry_enabled;
};

struct e1000_nvm_info {
Expand Down
56 changes: 46 additions & 10 deletions drivers/net/ethernet/intel/e1000e/ich8lan.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,18 @@ static bool e1000_phy_is_accessible_pchlan(struct e1000_hw *hw)
if (hw->mac.type >= e1000_pch_lpt) {
/* Only unforce SMBus if ME is not active */
if (!(er32(FWSM) & E1000_ICH_FWSM_FW_VALID)) {
/* Switching PHY interface always returns MDI error
* so disable retry mechanism to avoid wasting time
*/
e1000e_disable_phy_retry(hw);

/* Unforce SMBus mode in PHY */
e1e_rphy_locked(hw, CV_SMB_CTRL, &phy_reg);
phy_reg &= ~CV_SMB_CTRL_FORCE_SMBUS;
e1e_wphy_locked(hw, CV_SMB_CTRL, phy_reg);

e1000e_enable_phy_retry(hw);

/* Unforce SMBus mode in MAC */
mac_reg = er32(CTRL_EXT);
mac_reg &= ~E1000_CTRL_EXT_FORCE_SMBUS;
Expand Down Expand Up @@ -310,6 +317,11 @@ static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw)
goto out;
}

/* There is no guarantee that the PHY is accessible at this time
* so disable retry mechanism to avoid wasting time
*/
e1000e_disable_phy_retry(hw);

/* The MAC-PHY interconnect may be in SMBus mode. If the PHY is
* inaccessible and resetting the PHY is not blocked, toggle the
* LANPHYPC Value bit to force the interconnect to PCIe mode.
Expand Down Expand Up @@ -380,6 +392,8 @@ static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw)
break;
}

e1000e_enable_phy_retry(hw);

hw->phy.ops.release(hw);
if (!ret_val) {

Expand Down Expand Up @@ -449,6 +463,11 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw)

phy->id = e1000_phy_unknown;

if (hw->mac.type == e1000_pch_mtp) {
phy->retry_count = 2;
e1000e_enable_phy_retry(hw);
}

ret_val = e1000_init_phy_workarounds_pchlan(hw);
if (ret_val)
return ret_val;
Expand Down Expand Up @@ -1145,18 +1164,28 @@ s32 e1000_enable_ulp_lpt_lp(struct e1000_hw *hw, bool to_sx)
ret_val = hw->phy.ops.acquire(hw);
if (ret_val)
goto out;
/* Forcing SMBUS on MTL and above is not required */
if (hw->mac.type < e1000_pch_mtp) {
/* Switching PHY interface always returns MDI error
* so disable retry mechanism to avoid wasting time
*/
e1000e_disable_phy_retry(hw);

/* Force SMBus mode in PHY */
ret_val = e1000_read_phy_reg_hv_locked(hw, CV_SMB_CTRL, &phy_reg);
if (ret_val)
goto release;
phy_reg |= CV_SMB_CTRL_FORCE_SMBUS;
e1000_write_phy_reg_hv_locked(hw, CV_SMB_CTRL, phy_reg);
/* Force SMBus mode in PHY */
ret_val = e1000_read_phy_reg_hv_locked(hw, CV_SMB_CTRL,
&phy_reg);
if (ret_val)
goto release;
phy_reg |= CV_SMB_CTRL_FORCE_SMBUS;
e1000_write_phy_reg_hv_locked(hw, CV_SMB_CTRL, phy_reg);

/* Force SMBus mode in MAC */
mac_reg = er32(CTRL_EXT);
mac_reg |= E1000_CTRL_EXT_FORCE_SMBUS;
ew32(CTRL_EXT, mac_reg);
e1000e_enable_phy_retry(hw);

/* Force SMBus mode in MAC */
mac_reg = er32(CTRL_EXT);
mac_reg |= E1000_CTRL_EXT_FORCE_SMBUS;
ew32(CTRL_EXT, mac_reg);
}

/* Si workaround for ULP entry flow on i127/rev6 h/w. Enable
* LPLU and disable Gig speed when entering ULP
Expand Down Expand Up @@ -1313,6 +1342,11 @@ static s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force)
/* Toggle LANPHYPC Value bit */
e1000_toggle_lanphypc_pch_lpt(hw);

/* Switching PHY interface always returns MDI error
* so disable retry mechanism to avoid wasting time
*/
e1000e_disable_phy_retry(hw);

/* Unforce SMBus mode in PHY */
ret_val = e1000_read_phy_reg_hv_locked(hw, CV_SMB_CTRL, &phy_reg);
if (ret_val) {
Expand All @@ -1333,6 +1367,8 @@ static s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force)
phy_reg &= ~CV_SMB_CTRL_FORCE_SMBUS;
e1000_write_phy_reg_hv_locked(hw, CV_SMB_CTRL, phy_reg);

e1000e_enable_phy_retry(hw);

/* Unforce SMBus mode in MAC */
mac_reg = er32(CTRL_EXT);
mac_reg &= ~E1000_CTRL_EXT_FORCE_SMBUS;
Expand Down
8 changes: 4 additions & 4 deletions drivers/net/ethernet/intel/e1000e/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -6688,14 +6688,14 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool runtime)
if (adapter->hw.phy.type == e1000_phy_igp_3) {
e1000e_igp3_phy_powerdown_workaround_ich8lan(&adapter->hw);
} else if (hw->mac.type >= e1000_pch_lpt) {
if (wufc && !(wufc & (E1000_WUFC_EX | E1000_WUFC_MC | E1000_WUFC_BC)))
if (wufc && !(wufc & (E1000_WUFC_EX | E1000_WUFC_MC | E1000_WUFC_BC))) {
/* ULP does not support wake from unicast, multicast
* or broadcast.
*/
retval = e1000_enable_ulp_lpt_lp(hw, !runtime);

if (retval)
return retval;
if (retval)
return retval;
}
}

/* Ensure that the appropriate bits are set in LPI_CTRL
Expand Down
Loading