|
|
@@ -2595,9 +2595,20 @@ int i40e_vsi_add_vlan(struct i40e_vsi *vsi, u16 vid)
|
|
|
{
|
|
|
int err;
|
|
|
|
|
|
- if (!vid || vsi->info.pvid)
|
|
|
+ if (vsi->info.pvid)
|
|
|
return -EINVAL;
|
|
|
|
|
|
+ /* The network stack will attempt to add VID=0, with the intention to
|
|
|
+ * receive priority tagged packets with a VLAN of 0. Our HW receives
|
|
|
+ * these packets by default when configured to receive untagged
|
|
|
+ * packets, so we don't need to add a filter for this case.
|
|
|
+ * Additionally, HW interprets adding a VID=0 filter as meaning to
|
|
|
+ * receive *only* tagged traffic and stops receiving untagged traffic.
|
|
|
+ * Thus, we do not want to actually add a filter for VID=0
|
|
|
+ */
|
|
|
+ if (!vid)
|
|
|
+ return 0;
|
|
|
+
|
|
|
/* Locked once because all functions invoked below iterates list*/
|
|
|
spin_lock_bh(&vsi->mac_filter_hash_lock);
|
|
|
err = i40e_add_vlan_all_mac(vsi, vid);
|
|
|
@@ -2674,15 +2685,7 @@ static int i40e_vlan_rx_add_vid(struct net_device *netdev,
|
|
|
if (vid >= VLAN_N_VID)
|
|
|
return -EINVAL;
|
|
|
|
|
|
- /* If the network stack called us with vid = 0 then
|
|
|
- * it is asking to receive priority tagged packets with
|
|
|
- * vlan id 0. Our HW receives them by default when configured
|
|
|
- * to receive untagged packets so there is no need to add an
|
|
|
- * extra filter for vlan 0 tagged packets.
|
|
|
- */
|
|
|
- if (vid)
|
|
|
- ret = i40e_vsi_add_vlan(vsi, vid);
|
|
|
-
|
|
|
+ ret = i40e_vsi_add_vlan(vsi, vid);
|
|
|
if (!ret)
|
|
|
set_bit(vid, vsi->active_vlans);
|
|
|
|
|
|
@@ -2713,44 +2716,6 @@ static int i40e_vlan_rx_kill_vid(struct net_device *netdev,
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * i40e_macaddr_init - explicitly write the mac address filters
|
|
|
- *
|
|
|
- * @vsi: pointer to the vsi
|
|
|
- * @macaddr: the MAC address
|
|
|
- *
|
|
|
- * This is needed when the macaddr has been obtained by other
|
|
|
- * means than the default, e.g., from Open Firmware or IDPROM.
|
|
|
- * Returns 0 on success, negative on failure
|
|
|
- **/
|
|
|
-static int i40e_macaddr_init(struct i40e_vsi *vsi, u8 *macaddr)
|
|
|
-{
|
|
|
- int ret;
|
|
|
- struct i40e_aqc_add_macvlan_element_data element;
|
|
|
-
|
|
|
- ret = i40e_aq_mac_address_write(&vsi->back->hw,
|
|
|
- I40E_AQC_WRITE_TYPE_LAA_WOL,
|
|
|
- macaddr, NULL);
|
|
|
- if (ret) {
|
|
|
- dev_info(&vsi->back->pdev->dev,
|
|
|
- "Addr change for VSI failed: %d\n", ret);
|
|
|
- return -EADDRNOTAVAIL;
|
|
|
- }
|
|
|
-
|
|
|
- memset(&element, 0, sizeof(element));
|
|
|
- ether_addr_copy(element.mac_addr, macaddr);
|
|
|
- element.flags = cpu_to_le16(I40E_AQC_MACVLAN_ADD_PERFECT_MATCH);
|
|
|
- ret = i40e_aq_add_macvlan(&vsi->back->hw, vsi->seid, &element, 1, NULL);
|
|
|
- if (ret) {
|
|
|
- dev_info(&vsi->back->pdev->dev,
|
|
|
- "add filter failed err %s aq_err %s\n",
|
|
|
- i40e_stat_str(&vsi->back->hw, ret),
|
|
|
- i40e_aq_str(&vsi->back->hw,
|
|
|
- vsi->back->hw.aq.asq_last_status));
|
|
|
- }
|
|
|
- return ret;
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* i40e_restore_vlan - Reinstate vlans when vsi/netdev comes back up
|
|
|
* @vsi: the vsi being brought back up
|
|
|
@@ -3203,19 +3168,8 @@ static void i40e_vsi_config_dcb_rings(struct i40e_vsi *vsi)
|
|
|
**/
|
|
|
static void i40e_set_vsi_rx_mode(struct i40e_vsi *vsi)
|
|
|
{
|
|
|
- struct i40e_pf *pf = vsi->back;
|
|
|
- int err;
|
|
|
-
|
|
|
if (vsi->netdev)
|
|
|
i40e_set_rx_mode(vsi->netdev);
|
|
|
-
|
|
|
- if (!!(pf->flags & I40E_FLAG_PF_MAC)) {
|
|
|
- err = i40e_macaddr_init(vsi, pf->hw.mac.addr);
|
|
|
- if (err) {
|
|
|
- dev_warn(&pf->pdev->dev,
|
|
|
- "could not set up macaddr; err %d\n", err);
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -3495,7 +3449,7 @@ static void i40e_irq_affinity_notify(struct irq_affinity_notify *notify,
|
|
|
struct i40e_q_vector *q_vector =
|
|
|
container_of(notify, struct i40e_q_vector, affinity_notify);
|
|
|
|
|
|
- q_vector->affinity_mask = *mask;
|
|
|
+ cpumask_copy(&q_vector->affinity_mask, mask);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -5350,7 +5304,7 @@ static int i40e_init_pf_dcb(struct i40e_pf *pf)
|
|
|
int err = 0;
|
|
|
|
|
|
/* Do not enable DCB for SW1 and SW2 images even if the FW is capable */
|
|
|
- if (pf->flags & I40E_FLAG_NO_DCB_SUPPORT)
|
|
|
+ if (pf->hw_features & I40E_HW_NO_DCB_SUPPORT)
|
|
|
goto out;
|
|
|
|
|
|
/* Get the initial DCB configuration */
|
|
|
@@ -7332,7 +7286,7 @@ static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired)
|
|
|
wr32(hw, I40E_REG_MSS, val);
|
|
|
}
|
|
|
|
|
|
- if (pf->flags & I40E_FLAG_RESTART_AUTONEG) {
|
|
|
+ if (pf->hw_features & I40E_HW_RESTART_AUTONEG) {
|
|
|
msleep(75);
|
|
|
ret = i40e_aq_set_link_restart_an(&pf->hw, true, NULL);
|
|
|
if (ret)
|
|
|
@@ -7970,7 +7924,7 @@ static int i40e_alloc_rings(struct i40e_vsi *vsi)
|
|
|
ring->count = vsi->num_desc;
|
|
|
ring->size = 0;
|
|
|
ring->dcb_tc = 0;
|
|
|
- if (vsi->back->flags & I40E_FLAG_WB_ON_ITR_CAPABLE)
|
|
|
+ if (vsi->back->hw_features & I40E_HW_WB_ON_ITR_CAPABLE)
|
|
|
ring->flags = I40E_TXR_FLAGS_WB_ON_ITR;
|
|
|
ring->tx_itr_setting = pf->tx_itr_default;
|
|
|
vsi->tx_rings[i] = ring++;
|
|
|
@@ -7987,7 +7941,7 @@ static int i40e_alloc_rings(struct i40e_vsi *vsi)
|
|
|
ring->count = vsi->num_desc;
|
|
|
ring->size = 0;
|
|
|
ring->dcb_tc = 0;
|
|
|
- if (vsi->back->flags & I40E_FLAG_WB_ON_ITR_CAPABLE)
|
|
|
+ if (vsi->back->hw_features & I40E_HW_WB_ON_ITR_CAPABLE)
|
|
|
ring->flags = I40E_TXR_FLAGS_WB_ON_ITR;
|
|
|
set_ring_xdp(ring);
|
|
|
ring->tx_itr_setting = pf->tx_itr_default;
|
|
|
@@ -8523,7 +8477,7 @@ static int i40e_vsi_config_rss(struct i40e_vsi *vsi)
|
|
|
u8 *lut;
|
|
|
int ret;
|
|
|
|
|
|
- if (!(pf->flags & I40E_FLAG_RSS_AQ_CAPABLE))
|
|
|
+ if (!(pf->hw_features & I40E_HW_RSS_AQ_CAPABLE))
|
|
|
return 0;
|
|
|
|
|
|
if (!vsi->rss_size)
|
|
|
@@ -8653,7 +8607,7 @@ int i40e_config_rss(struct i40e_vsi *vsi, u8 *seed, u8 *lut, u16 lut_size)
|
|
|
{
|
|
|
struct i40e_pf *pf = vsi->back;
|
|
|
|
|
|
- if (pf->flags & I40E_FLAG_RSS_AQ_CAPABLE)
|
|
|
+ if (pf->hw_features & I40E_HW_RSS_AQ_CAPABLE)
|
|
|
return i40e_config_rss_aq(vsi, seed, lut, lut_size);
|
|
|
else
|
|
|
return i40e_config_rss_reg(vsi, seed, lut, lut_size);
|
|
|
@@ -8672,7 +8626,7 @@ int i40e_get_rss(struct i40e_vsi *vsi, u8 *seed, u8 *lut, u16 lut_size)
|
|
|
{
|
|
|
struct i40e_pf *pf = vsi->back;
|
|
|
|
|
|
- if (pf->flags & I40E_FLAG_RSS_AQ_CAPABLE)
|
|
|
+ if (pf->hw_features & I40E_HW_RSS_AQ_CAPABLE)
|
|
|
return i40e_get_rss_aq(vsi, seed, lut, lut_size);
|
|
|
else
|
|
|
return i40e_get_rss_reg(vsi, seed, lut, lut_size);
|
|
|
@@ -9000,25 +8954,56 @@ static int i40e_sw_init(struct i40e_pf *pf)
|
|
|
pf->hw.func_caps.fd_filters_best_effort;
|
|
|
}
|
|
|
|
|
|
+ if (pf->hw.mac.type == I40E_MAC_X722) {
|
|
|
+ pf->hw_features |= (I40E_HW_RSS_AQ_CAPABLE |
|
|
|
+ I40E_HW_128_QP_RSS_CAPABLE |
|
|
|
+ I40E_HW_ATR_EVICT_CAPABLE |
|
|
|
+ I40E_HW_WB_ON_ITR_CAPABLE |
|
|
|
+ I40E_HW_MULTIPLE_TCP_UDP_RSS_PCTYPE |
|
|
|
+ I40E_HW_NO_PCI_LINK_CHECK |
|
|
|
+ I40E_HW_USE_SET_LLDP_MIB |
|
|
|
+ I40E_HW_GENEVE_OFFLOAD_CAPABLE |
|
|
|
+ I40E_HW_PTP_L4_CAPABLE |
|
|
|
+ I40E_HW_WOL_MC_MAGIC_PKT_WAKE |
|
|
|
+ I40E_HW_OUTER_UDP_CSUM_CAPABLE);
|
|
|
+
|
|
|
+#define I40E_FDEVICT_PCTYPE_DEFAULT 0xc03
|
|
|
+ if (rd32(&pf->hw, I40E_GLQF_FDEVICTENA(1)) !=
|
|
|
+ I40E_FDEVICT_PCTYPE_DEFAULT) {
|
|
|
+ dev_warn(&pf->pdev->dev,
|
|
|
+ "FD EVICT PCTYPES are not right, disable FD HW EVICT\n");
|
|
|
+ pf->hw_features &= ~I40E_HW_ATR_EVICT_CAPABLE;
|
|
|
+ }
|
|
|
+ } else if ((pf->hw.aq.api_maj_ver > 1) ||
|
|
|
+ ((pf->hw.aq.api_maj_ver == 1) &&
|
|
|
+ (pf->hw.aq.api_min_ver > 4))) {
|
|
|
+ /* Supported in FW API version higher than 1.4 */
|
|
|
+ pf->hw_features |= I40E_HW_GENEVE_OFFLOAD_CAPABLE;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* Enable HW ATR eviction if possible */
|
|
|
+ if (pf->hw_features & I40E_HW_ATR_EVICT_CAPABLE)
|
|
|
+ pf->flags |= I40E_FLAG_HW_ATR_EVICT_ENABLED;
|
|
|
+
|
|
|
if ((pf->hw.mac.type == I40E_MAC_XL710) &&
|
|
|
(((pf->hw.aq.fw_maj_ver == 4) && (pf->hw.aq.fw_min_ver < 33)) ||
|
|
|
(pf->hw.aq.fw_maj_ver < 4))) {
|
|
|
- pf->flags |= I40E_FLAG_RESTART_AUTONEG;
|
|
|
+ pf->hw_features |= I40E_HW_RESTART_AUTONEG;
|
|
|
/* No DCB support for FW < v4.33 */
|
|
|
- pf->flags |= I40E_FLAG_NO_DCB_SUPPORT;
|
|
|
+ pf->hw_features |= I40E_HW_NO_DCB_SUPPORT;
|
|
|
}
|
|
|
|
|
|
/* Disable FW LLDP if FW < v4.3 */
|
|
|
if ((pf->hw.mac.type == I40E_MAC_XL710) &&
|
|
|
(((pf->hw.aq.fw_maj_ver == 4) && (pf->hw.aq.fw_min_ver < 3)) ||
|
|
|
(pf->hw.aq.fw_maj_ver < 4)))
|
|
|
- pf->flags |= I40E_FLAG_STOP_FW_LLDP;
|
|
|
+ pf->hw_features |= I40E_HW_STOP_FW_LLDP;
|
|
|
|
|
|
/* Use the FW Set LLDP MIB API if FW > v4.40 */
|
|
|
if ((pf->hw.mac.type == I40E_MAC_XL710) &&
|
|
|
(((pf->hw.aq.fw_maj_ver == 4) && (pf->hw.aq.fw_min_ver >= 40)) ||
|
|
|
(pf->hw.aq.fw_maj_ver >= 5)))
|
|
|
- pf->flags |= I40E_FLAG_USE_SET_LLDP_MIB;
|
|
|
+ pf->hw_features |= I40E_HW_USE_SET_LLDP_MIB;
|
|
|
|
|
|
if (pf->hw.func_caps.vmdq) {
|
|
|
pf->num_vmdq_vsis = I40E_DEFAULT_NUM_VMDQ_VSI;
|
|
|
@@ -9041,29 +9026,6 @@ static int i40e_sw_init(struct i40e_pf *pf)
|
|
|
I40E_MAX_VF_COUNT);
|
|
|
}
|
|
|
#endif /* CONFIG_PCI_IOV */
|
|
|
- if (pf->hw.mac.type == I40E_MAC_X722) {
|
|
|
- pf->flags |= I40E_FLAG_RSS_AQ_CAPABLE
|
|
|
- | I40E_FLAG_128_QP_RSS_CAPABLE
|
|
|
- | I40E_FLAG_HW_ATR_EVICT_CAPABLE
|
|
|
- | I40E_FLAG_OUTER_UDP_CSUM_CAPABLE
|
|
|
- | I40E_FLAG_WB_ON_ITR_CAPABLE
|
|
|
- | I40E_FLAG_MULTIPLE_TCP_UDP_RSS_PCTYPE
|
|
|
- | I40E_FLAG_NO_PCI_LINK_CHECK
|
|
|
- | I40E_FLAG_USE_SET_LLDP_MIB
|
|
|
- | I40E_FLAG_GENEVE_OFFLOAD_CAPABLE
|
|
|
- | I40E_FLAG_PTP_L4_CAPABLE
|
|
|
- | I40E_FLAG_WOL_MC_MAGIC_PKT_WAKE;
|
|
|
- } else if ((pf->hw.aq.api_maj_ver > 1) ||
|
|
|
- ((pf->hw.aq.api_maj_ver == 1) &&
|
|
|
- (pf->hw.aq.api_min_ver > 4))) {
|
|
|
- /* Supported in FW API version higher than 1.4 */
|
|
|
- pf->flags |= I40E_FLAG_GENEVE_OFFLOAD_CAPABLE;
|
|
|
- }
|
|
|
-
|
|
|
- /* Enable HW ATR eviction if possible */
|
|
|
- if (pf->flags & I40E_FLAG_HW_ATR_EVICT_CAPABLE)
|
|
|
- pf->flags |= I40E_FLAG_HW_ATR_EVICT_ENABLED;
|
|
|
-
|
|
|
pf->eeprom_version = 0xDEAD;
|
|
|
pf->lan_veb = I40E_NO_VEB;
|
|
|
pf->lan_vsi = I40E_NO_VSI;
|
|
|
@@ -9244,7 +9206,7 @@ static void i40e_udp_tunnel_add(struct net_device *netdev,
|
|
|
pf->udp_ports[next_idx].type = I40E_AQC_TUNNEL_TYPE_VXLAN;
|
|
|
break;
|
|
|
case UDP_TUNNEL_TYPE_GENEVE:
|
|
|
- if (!(pf->flags & I40E_FLAG_GENEVE_OFFLOAD_CAPABLE))
|
|
|
+ if (!(pf->hw_features & I40E_HW_GENEVE_OFFLOAD_CAPABLE))
|
|
|
return;
|
|
|
pf->udp_ports[next_idx].type = I40E_AQC_TUNNEL_TYPE_NGE;
|
|
|
break;
|
|
|
@@ -9311,7 +9273,7 @@ static int i40e_get_phys_port_id(struct net_device *netdev,
|
|
|
struct i40e_pf *pf = np->vsi->back;
|
|
|
struct i40e_hw *hw = &pf->hw;
|
|
|
|
|
|
- if (!(pf->flags & I40E_FLAG_PORT_ID_VALID))
|
|
|
+ if (!(pf->hw_features & I40E_HW_PORT_ID_VALID))
|
|
|
return -EOPNOTSUPP;
|
|
|
|
|
|
ppid->id_len = min_t(int, sizeof(hw->mac.port_addr), sizeof(ppid->id));
|
|
|
@@ -9689,7 +9651,7 @@ static int i40e_config_netdev(struct i40e_vsi *vsi)
|
|
|
NETIF_F_RXCSUM |
|
|
|
0;
|
|
|
|
|
|
- if (!(pf->flags & I40E_FLAG_OUTER_UDP_CSUM_CAPABLE))
|
|
|
+ if (!(pf->hw_features & I40E_HW_OUTER_UDP_CSUM_CAPABLE))
|
|
|
netdev->gso_partial_features |= NETIF_F_GSO_UDP_TUNNEL_CSUM;
|
|
|
|
|
|
netdev->gso_partial_features |= NETIF_F_GSO_GRE_CSUM;
|
|
|
@@ -9770,8 +9732,7 @@ static int i40e_config_netdev(struct i40e_vsi *vsi)
|
|
|
|
|
|
/* MTU range: 68 - 9706 */
|
|
|
netdev->min_mtu = ETH_MIN_MTU;
|
|
|
- netdev->max_mtu = I40E_MAX_RXBUFFER -
|
|
|
- (ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN);
|
|
|
+ netdev->max_mtu = I40E_MAX_RXBUFFER - I40E_PACKET_HDR_PAD;
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
|
@@ -10401,17 +10362,6 @@ struct i40e_vsi *i40e_vsi_setup(struct i40e_pf *pf, u8 type,
|
|
|
switch (vsi->type) {
|
|
|
/* setup the netdev if needed */
|
|
|
case I40E_VSI_MAIN:
|
|
|
- /* Apply relevant filters if a platform-specific mac
|
|
|
- * address was selected.
|
|
|
- */
|
|
|
- if (!!(pf->flags & I40E_FLAG_PF_MAC)) {
|
|
|
- ret = i40e_macaddr_init(vsi, pf->hw.mac.addr);
|
|
|
- if (ret) {
|
|
|
- dev_warn(&pf->pdev->dev,
|
|
|
- "could not set up macaddr; err %d\n",
|
|
|
- ret);
|
|
|
- }
|
|
|
- }
|
|
|
case I40E_VSI_VMDQ2:
|
|
|
ret = i40e_config_netdev(vsi);
|
|
|
if (ret)
|
|
|
@@ -10448,7 +10398,7 @@ struct i40e_vsi *i40e_vsi_setup(struct i40e_pf *pf, u8 type,
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
- if ((pf->flags & I40E_FLAG_RSS_AQ_CAPABLE) &&
|
|
|
+ if ((pf->hw_features & I40E_HW_RSS_AQ_CAPABLE) &&
|
|
|
(vsi->type == I40E_VSI_VMDQ2)) {
|
|
|
ret = i40e_vsi_config_rss(vsi);
|
|
|
}
|
|
|
@@ -11457,7 +11407,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|
|
* Ignore error return codes because if it was already disabled via
|
|
|
* hardware settings this will fail
|
|
|
*/
|
|
|
- if (pf->flags & I40E_FLAG_STOP_FW_LLDP) {
|
|
|
+ if (pf->hw_features & I40E_HW_STOP_FW_LLDP) {
|
|
|
dev_info(&pdev->dev, "Stopping firmware LLDP agent.\n");
|
|
|
i40e_aq_stop_lldp(hw, true, NULL);
|
|
|
}
|
|
|
@@ -11474,7 +11424,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|
|
ether_addr_copy(hw->mac.perm_addr, hw->mac.addr);
|
|
|
i40e_get_port_mac_addr(hw, hw->mac.port_addr);
|
|
|
if (is_valid_ether_addr(hw->mac.port_addr))
|
|
|
- pf->flags |= I40E_FLAG_PORT_ID_VALID;
|
|
|
+ pf->hw_features |= I40E_HW_PORT_ID_VALID;
|
|
|
|
|
|
pci_set_drvdata(pdev, pf);
|
|
|
pci_save_state(pdev);
|
|
|
@@ -11590,7 +11540,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|
|
wr32(hw, I40E_REG_MSS, val);
|
|
|
}
|
|
|
|
|
|
- if (pf->flags & I40E_FLAG_RESTART_AUTONEG) {
|
|
|
+ if (pf->hw_features & I40E_HW_RESTART_AUTONEG) {
|
|
|
msleep(75);
|
|
|
err = i40e_aq_set_link_restart_an(&pf->hw, true, NULL);
|
|
|
if (err)
|
|
|
@@ -11677,7 +11627,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|
|
* and will report PCI Gen 1 x 1 by default so don't bother
|
|
|
* checking them.
|
|
|
*/
|
|
|
- if (!(pf->flags & I40E_FLAG_NO_PCI_LINK_CHECK)) {
|
|
|
+ if (!(pf->hw_features & I40E_HW_NO_PCI_LINK_CHECK)) {
|
|
|
char speed[PCI_SPEED_SIZE] = "Unknown";
|
|
|
char width[PCI_WIDTH_SIZE] = "Unknown";
|
|
|
|
|
|
@@ -11748,9 +11698,9 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|
|
|
|
|
if ((pf->hw.device_id == I40E_DEV_ID_10G_BASE_T) ||
|
|
|
(pf->hw.device_id == I40E_DEV_ID_10G_BASE_T4))
|
|
|
- pf->flags |= I40E_FLAG_PHY_CONTROLS_LEDS;
|
|
|
+ pf->hw_features |= I40E_HW_PHY_CONTROLS_LEDS;
|
|
|
if (pf->hw.device_id == I40E_DEV_ID_SFP_I_X722)
|
|
|
- pf->flags |= I40E_FLAG_HAVE_CRT_RETIMER;
|
|
|
+ pf->hw_features |= I40E_HW_HAVE_CRT_RETIMER;
|
|
|
/* print a string summarizing features */
|
|
|
i40e_print_features(pf);
|
|
|
|
|
|
@@ -12062,7 +12012,7 @@ static void i40e_shutdown(struct pci_dev *pdev)
|
|
|
*/
|
|
|
i40e_notify_client_of_netdev_close(pf->vsi[pf->lan_vsi], false);
|
|
|
|
|
|
- if (pf->wol_en && (pf->flags & I40E_FLAG_WOL_MC_MAGIC_PKT_WAKE))
|
|
|
+ if (pf->wol_en && (pf->hw_features & I40E_HW_WOL_MC_MAGIC_PKT_WAKE))
|
|
|
i40e_enable_mc_magic_wake(pf);
|
|
|
|
|
|
i40e_prep_for_reset(pf, false);
|
|
|
@@ -12094,7 +12044,7 @@ static int i40e_suspend(struct pci_dev *pdev, pm_message_t state)
|
|
|
set_bit(__I40E_SUSPENDED, pf->state);
|
|
|
set_bit(__I40E_DOWN, pf->state);
|
|
|
|
|
|
- if (pf->wol_en && (pf->flags & I40E_FLAG_WOL_MC_MAGIC_PKT_WAKE))
|
|
|
+ if (pf->wol_en && (pf->hw_features & I40E_HW_WOL_MC_MAGIC_PKT_WAKE))
|
|
|
i40e_enable_mc_magic_wake(pf);
|
|
|
|
|
|
i40e_prep_for_reset(pf, false);
|