|
@@ -79,6 +79,8 @@ static const struct pci_device_id i40e_pci_tbl[] = {
|
|
|
{PCI_VDEVICE(INTEL, I40E_DEV_ID_SFP_X722), 0},
|
|
|
{PCI_VDEVICE(INTEL, I40E_DEV_ID_1G_BASE_T_X722), 0},
|
|
|
{PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_BASE_T_X722), 0},
|
|
|
+ {PCI_VDEVICE(INTEL, I40E_DEV_ID_20G_KR2), 0},
|
|
|
+ {PCI_VDEVICE(INTEL, I40E_DEV_ID_20G_KR2_A), 0},
|
|
|
/* required last entry */
|
|
|
{0, }
|
|
|
};
|
|
@@ -474,6 +476,7 @@ static struct rtnl_link_stats64 *i40e_get_netdev_stats_struct(
|
|
|
stats->tx_errors = vsi_stats->tx_errors;
|
|
|
stats->tx_dropped = vsi_stats->tx_dropped;
|
|
|
stats->rx_errors = vsi_stats->rx_errors;
|
|
|
+ stats->rx_dropped = vsi_stats->rx_dropped;
|
|
|
stats->rx_crc_errors = vsi_stats->rx_crc_errors;
|
|
|
stats->rx_length_errors = vsi_stats->rx_length_errors;
|
|
|
|
|
@@ -1269,7 +1272,7 @@ bool i40e_is_vsi_in_vlan(struct i40e_vsi *vsi)
|
|
|
* so we have to go through all the list in order to make sure
|
|
|
*/
|
|
|
list_for_each_entry(f, &vsi->mac_filter_list, list) {
|
|
|
- if (f->vlan >= 0)
|
|
|
+ if (f->vlan >= 0 || vsi->info.pvid)
|
|
|
return true;
|
|
|
}
|
|
|
|
|
@@ -3064,7 +3067,7 @@ void i40e_irq_dynamic_enable_icr0(struct i40e_pf *pf)
|
|
|
/**
|
|
|
* i40e_irq_dynamic_enable - Enable default interrupt generation settings
|
|
|
* @vsi: pointer to a vsi
|
|
|
- * @vector: enable a particular Hw Interrupt vector
|
|
|
+ * @vector: enable a particular Hw Interrupt vector, without base_vector
|
|
|
**/
|
|
|
void i40e_irq_dynamic_enable(struct i40e_vsi *vsi, int vector)
|
|
|
{
|
|
@@ -3075,7 +3078,7 @@ void i40e_irq_dynamic_enable(struct i40e_vsi *vsi, int vector)
|
|
|
val = I40E_PFINT_DYN_CTLN_INTENA_MASK |
|
|
|
I40E_PFINT_DYN_CTLN_CLEARPBA_MASK |
|
|
|
(I40E_ITR_NONE << I40E_PFINT_DYN_CTLN_ITR_INDX_SHIFT);
|
|
|
- wr32(hw, I40E_PFINT_DYN_CTLN(vector - 1), val);
|
|
|
+ wr32(hw, I40E_PFINT_DYN_CTLN(vector + vsi->base_vector - 1), val);
|
|
|
/* skip the flush */
|
|
|
}
|
|
|
|
|
@@ -3218,8 +3221,7 @@ static int i40e_vsi_enable_irq(struct i40e_vsi *vsi)
|
|
|
int i;
|
|
|
|
|
|
if (pf->flags & I40E_FLAG_MSIX_ENABLED) {
|
|
|
- for (i = vsi->base_vector;
|
|
|
- i < (vsi->num_q_vectors + vsi->base_vector); i++)
|
|
|
+ for (i = 0; i < vsi->num_q_vectors; i++)
|
|
|
i40e_irq_dynamic_enable(vsi, i);
|
|
|
} else {
|
|
|
i40e_irq_dynamic_enable_icr0(pf);
|
|
@@ -3451,8 +3453,7 @@ static bool i40e_clean_fdir_tx_irq(struct i40e_ring *tx_ring, int budget)
|
|
|
tx_ring->next_to_clean = i;
|
|
|
|
|
|
if (vsi->back->flags & I40E_FLAG_MSIX_ENABLED) {
|
|
|
- i40e_irq_dynamic_enable(vsi,
|
|
|
- tx_ring->q_vector->v_idx + vsi->base_vector);
|
|
|
+ i40e_irq_dynamic_enable(vsi, tx_ring->q_vector->v_idx);
|
|
|
}
|
|
|
return budget > 0;
|
|
|
}
|
|
@@ -5905,10 +5906,12 @@ static void i40e_watchdog_subtask(struct i40e_pf *pf)
|
|
|
if (pf->vsi[i] && pf->vsi[i]->netdev)
|
|
|
i40e_update_stats(pf->vsi[i]);
|
|
|
|
|
|
- /* Update the stats for the active switching components */
|
|
|
- for (i = 0; i < I40E_MAX_VEB; i++)
|
|
|
- if (pf->veb[i])
|
|
|
- i40e_update_veb_stats(pf->veb[i]);
|
|
|
+ if (pf->flags & I40E_FLAG_VEB_STATS_ENABLED) {
|
|
|
+ /* Update the stats for the active switching components */
|
|
|
+ for (i = 0; i < I40E_MAX_VEB; i++)
|
|
|
+ if (pf->veb[i])
|
|
|
+ i40e_update_veb_stats(pf->veb[i]);
|
|
|
+ }
|
|
|
|
|
|
i40e_ptp_rx_hang(pf->vsi[pf->lan_vsi]);
|
|
|
}
|
|
@@ -7996,6 +7999,9 @@ static int i40e_sw_init(struct i40e_pf *pf)
|
|
|
pf->lan_veb = I40E_NO_VEB;
|
|
|
pf->lan_vsi = I40E_NO_VSI;
|
|
|
|
|
|
+ /* By default FW has this off for performance reasons */
|
|
|
+ pf->flags &= ~I40E_FLAG_VEB_STATS_ENABLED;
|
|
|
+
|
|
|
/* set up queue assignment tracking */
|
|
|
size = sizeof(struct i40e_lump_tracking)
|
|
|
+ (sizeof(u16) * pf->hw.func_caps.num_tx_qp);
|
|
@@ -8175,9 +8181,6 @@ static void i40e_del_vxlan_port(struct net_device *netdev,
|
|
|
pf->vxlan_ports[idx] = 0;
|
|
|
pf->pending_vxlan_bitmap |= BIT_ULL(idx);
|
|
|
pf->flags |= I40E_FLAG_VXLAN_FILTER_SYNC;
|
|
|
-
|
|
|
- dev_info(&pf->pdev->dev, "deleting vxlan port %d\n",
|
|
|
- ntohs(port));
|
|
|
} else {
|
|
|
netdev_warn(netdev, "vxlan port %d was not found, not deleting\n",
|
|
|
ntohs(port));
|
|
@@ -9939,7 +9942,6 @@ static void i40e_print_features(struct i40e_pf *pf)
|
|
|
static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|
|
{
|
|
|
struct i40e_aq_get_phy_abilities_resp abilities;
|
|
|
- unsigned long ioremap_len;
|
|
|
struct i40e_pf *pf;
|
|
|
struct i40e_hw *hw;
|
|
|
static u16 pfs_found;
|
|
@@ -9992,15 +9994,15 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|
|
hw = &pf->hw;
|
|
|
hw->back = pf;
|
|
|
|
|
|
- ioremap_len = min_t(unsigned long, pci_resource_len(pdev, 0),
|
|
|
- I40E_MAX_CSR_SPACE);
|
|
|
+ pf->ioremap_len = min_t(int, pci_resource_len(pdev, 0),
|
|
|
+ I40E_MAX_CSR_SPACE);
|
|
|
|
|
|
- hw->hw_addr = ioremap(pci_resource_start(pdev, 0), ioremap_len);
|
|
|
+ hw->hw_addr = ioremap(pci_resource_start(pdev, 0), pf->ioremap_len);
|
|
|
if (!hw->hw_addr) {
|
|
|
err = -EIO;
|
|
|
dev_info(&pdev->dev, "ioremap(0x%04x, 0x%04x) failed: 0x%x\n",
|
|
|
(unsigned int)pci_resource_start(pdev, 0),
|
|
|
- (unsigned int)pci_resource_len(pdev, 0), err);
|
|
|
+ pf->ioremap_len, err);
|
|
|
goto err_ioremap;
|
|
|
}
|
|
|
hw->vendor_id = pdev->vendor;
|
|
@@ -10538,7 +10540,7 @@ static void i40e_pci_error_resume(struct pci_dev *pdev)
|
|
|
|
|
|
rtnl_lock();
|
|
|
i40e_handle_reset_warning(pf);
|
|
|
- rtnl_lock();
|
|
|
+ rtnl_unlock();
|
|
|
}
|
|
|
|
|
|
/**
|