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

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

Jeff Kirsher says:

====================
40GbE Intel Wired LAN Driver Updates 2016-06-27

This series contains updates to i40e and i40evf only.

Mitch provides several changes, first adds functions to enable and disable
VSI on a VEB, which allows for configuration of limited promiscuous mode
specifically for bridging purposes. Sets the RSS Hash Enable registers by
default now that VF RSS is configured by the PF driver. Fixed a issue
where we could overflow the buffer, by checking the address count and bail
out of the loop at the appropriate time. Removed the need for a reset
when the device enters limited promiscuous mode, since this was causing
heartburn for people who were using VFs and bridging.

Catherine adds a call to set the client interface down when we put the VSI
down. Fixed an issue where RSS queues was being limited to the number
of CPUs, so if a user wants to use more queues than CPUs, we want to
trust they know what they are doing and let them.

Greg cleans up the driver suspend routine to ensure we are calling
synchronize_irq() before freeing IRQ vectors and explicitly free the other
causes interrupt resources and shut down the MSIX interrupt.

Serey fixes i40e_set_settings() to not fail when a Direct Attach (DA)
cable is used.

Avinash fixes a supported link bug by removing code which was not allowing
100BaseT to show up in the supported link modes for 10GBaseT PHYs.

Shannon adds a bit of information to the error messages to help determine
the source of error by adding VSI info to macaddr messages.

Tushar Dave fixes error received when turning off TSO on some systems,
which was caused by enabling FD_SB without checking availability of
MSIx vectors, so add the check.

Neerav fixes a possible panic when LLDP/DCBX change happens and the
driver tried to notify the client(s) for each of the PF VSIs, which would
panic when it reached a VSI that did not have any netdev associated with
it.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>

+183 -73
+1
drivers/net/ethernet/intel/i40e/i40e.h
··· 283 283 #endif /* I40E_FCOE */ 284 284 u16 num_lan_qps; /* num lan queues this PF has set up */ 285 285 u16 num_lan_msix; /* num queue vectors for the base PF vsi */ 286 + u16 num_fdsb_msix; /* num queue vectors for sideband Fdir */ 286 287 u16 num_iwarp_msix; /* num of iwarp vectors for this PF */ 287 288 int iwarp_base_vector; 288 289 int queues_left; /* queues left unclaimed */
+56
drivers/net/ethernet/intel/i40e/i40e_common.c
··· 1967 1967 } 1968 1968 1969 1969 /** 1970 + * i40e_aq_set_default_vsi 1971 + * @hw: pointer to the hw struct 1972 + * @seid: vsi number 1973 + * @cmd_details: pointer to command details structure or NULL 1974 + **/ 1975 + i40e_status i40e_aq_set_default_vsi(struct i40e_hw *hw, 1976 + u16 seid, 1977 + struct i40e_asq_cmd_details *cmd_details) 1978 + { 1979 + struct i40e_aq_desc desc; 1980 + struct i40e_aqc_set_vsi_promiscuous_modes *cmd = 1981 + (struct i40e_aqc_set_vsi_promiscuous_modes *) 1982 + &desc.params.raw; 1983 + i40e_status status; 1984 + 1985 + i40e_fill_default_direct_cmd_desc(&desc, 1986 + i40e_aqc_opc_set_vsi_promiscuous_modes); 1987 + 1988 + cmd->promiscuous_flags = cpu_to_le16(I40E_AQC_SET_VSI_DEFAULT); 1989 + cmd->valid_flags = cpu_to_le16(I40E_AQC_SET_VSI_DEFAULT); 1990 + cmd->seid = cpu_to_le16(seid); 1991 + 1992 + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); 1993 + 1994 + return status; 1995 + } 1996 + 1997 + /** 1998 + * i40e_aq_clear_default_vsi 1999 + * @hw: pointer to the hw struct 2000 + * @seid: vsi number 2001 + * @cmd_details: pointer to command details structure or NULL 2002 + **/ 2003 + i40e_status i40e_aq_clear_default_vsi(struct i40e_hw *hw, 2004 + u16 seid, 2005 + struct i40e_asq_cmd_details *cmd_details) 2006 + { 2007 + struct i40e_aq_desc desc; 2008 + struct i40e_aqc_set_vsi_promiscuous_modes *cmd = 2009 + (struct i40e_aqc_set_vsi_promiscuous_modes *) 2010 + &desc.params.raw; 2011 + i40e_status status; 2012 + 2013 + i40e_fill_default_direct_cmd_desc(&desc, 2014 + i40e_aqc_opc_set_vsi_promiscuous_modes); 2015 + 2016 + cmd->promiscuous_flags = cpu_to_le16(0); 2017 + cmd->valid_flags = cpu_to_le16(I40E_AQC_SET_VSI_DEFAULT); 2018 + cmd->seid = cpu_to_le16(seid); 2019 + 2020 + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); 2021 + 2022 + return status; 2023 + } 2024 + 2025 + /** 1970 2026 * i40e_aq_set_vsi_unicast_promiscuous 1971 2027 * @hw: pointer to the hw struct 1972 2028 * @seid: vsi number
+2 -2
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
··· 313 313 *advertising |= ADVERTISED_Autoneg | 314 314 ADVERTISED_40000baseCR4_Full; 315 315 } 316 - if ((phy_types & I40E_CAP_PHY_TYPE_100BASE_TX) && 317 - !(phy_types & I40E_CAP_PHY_TYPE_1000BASE_T)) { 316 + if (phy_types & I40E_CAP_PHY_TYPE_100BASE_TX) { 318 317 *supported |= SUPPORTED_Autoneg | 319 318 SUPPORTED_100baseT_Full; 320 319 *advertising |= ADVERTISED_Autoneg | ··· 662 663 if (hw->phy.media_type != I40E_MEDIA_TYPE_BASET && 663 664 hw->phy.media_type != I40E_MEDIA_TYPE_FIBER && 664 665 hw->phy.media_type != I40E_MEDIA_TYPE_BACKPLANE && 666 + hw->phy.media_type != I40E_MEDIA_TYPE_DA && 665 667 hw->phy.link_info.link_info & I40E_AQ_LINK_UP) 666 668 return -EOPNOTSUPP; 667 669
+105 -68
drivers/net/ethernet/intel/i40e/i40e_main.c
··· 40 40 #define DRV_KERN "-k" 41 41 42 42 #define DRV_VERSION_MAJOR 1 43 - #define DRV_VERSION_MINOR 5 44 - #define DRV_VERSION_BUILD 16 43 + #define DRV_VERSION_MINOR 6 44 + #define DRV_VERSION_BUILD 4 45 45 #define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \ 46 46 __stringify(DRV_VERSION_MINOR) "." \ 47 47 __stringify(DRV_VERSION_BUILD) DRV_KERN ··· 1579 1579 vsi->tc_config.numtc = numtc; 1580 1580 vsi->tc_config.enabled_tc = enabled_tc ? enabled_tc : 1; 1581 1581 /* Number of queues per enabled TC */ 1582 - /* In MFP case we can have a much lower count of MSIx 1583 - * vectors available and so we need to lower the used 1584 - * q count. 1585 - */ 1586 - if (pf->flags & I40E_FLAG_MSIX_ENABLED) 1587 - qcount = min_t(int, vsi->alloc_queue_pairs, pf->num_lan_msix); 1588 - else 1589 - qcount = vsi->alloc_queue_pairs; 1582 + qcount = vsi->alloc_queue_pairs; 1583 + 1590 1584 num_tc_qps = qcount / numtc; 1591 1585 num_tc_qps = min_t(int, num_tc_qps, i40e_pf_get_max_q_per_tc(pf)); 1592 1586 ··· 1834 1840 { 1835 1841 struct list_head tmp_del_list, tmp_add_list; 1836 1842 struct i40e_mac_filter *f, *ftmp, *fclone; 1843 + struct i40e_hw *hw = &vsi->back->hw; 1837 1844 bool promisc_forced_on = false; 1838 1845 bool add_happened = false; 1846 + char vsi_name[16] = "PF"; 1839 1847 int filter_list_len = 0; 1840 1848 u32 changed_flags = 0; 1841 1849 i40e_status aq_ret = 0; ··· 1864 1868 1865 1869 INIT_LIST_HEAD(&tmp_del_list); 1866 1870 INIT_LIST_HEAD(&tmp_add_list); 1871 + 1872 + if (vsi->type == I40E_VSI_SRIOV) 1873 + snprintf(vsi_name, sizeof(vsi_name) - 1, "VF %d", vsi->vf_id); 1874 + else if (vsi->type != I40E_VSI_MAIN) 1875 + snprintf(vsi_name, sizeof(vsi_name) - 1, "vsi %d", vsi->seid); 1867 1876 1868 1877 if (vsi->flags & I40E_VSI_FLAG_FILTER_CHANGED) { 1869 1878 vsi->flags &= ~I40E_VSI_FLAG_FILTER_CHANGED; ··· 1921 1920 if (!list_empty(&tmp_del_list)) { 1922 1921 int del_list_size; 1923 1922 1924 - filter_list_len = pf->hw.aq.asq_buf_size / 1923 + filter_list_len = hw->aq.asq_buf_size / 1925 1924 sizeof(struct i40e_aqc_remove_macvlan_element_data); 1926 1925 del_list_size = filter_list_len * 1927 1926 sizeof(struct i40e_aqc_remove_macvlan_element_data); ··· 1953 1952 1954 1953 /* flush a full buffer */ 1955 1954 if (num_del == filter_list_len) { 1956 - aq_ret = i40e_aq_remove_macvlan(&pf->hw, 1957 - vsi->seid, 1958 - del_list, 1959 - num_del, 1960 - NULL); 1961 - aq_err = pf->hw.aq.asq_last_status; 1955 + aq_ret = 1956 + i40e_aq_remove_macvlan(hw, vsi->seid, 1957 + del_list, 1958 + num_del, NULL); 1959 + aq_err = hw->aq.asq_last_status; 1962 1960 num_del = 0; 1963 1961 memset(del_list, 0, del_list_size); 1964 1962 1965 1963 if (aq_ret && aq_err != I40E_AQ_RC_ENOENT) { 1966 1964 retval = -EIO; 1967 1965 dev_err(&pf->pdev->dev, 1968 - "ignoring delete macvlan error, err %s, aq_err %s while flushing a full buffer\n", 1969 - i40e_stat_str(&pf->hw, aq_ret), 1970 - i40e_aq_str(&pf->hw, aq_err)); 1966 + "ignoring delete macvlan error on %s, err %s, aq_err %s while flushing a full buffer\n", 1967 + vsi_name, 1968 + i40e_stat_str(hw, aq_ret), 1969 + i40e_aq_str(hw, aq_err)); 1971 1970 } 1972 1971 } 1973 1972 /* Release memory for MAC filter entries which were ··· 1978 1977 } 1979 1978 1980 1979 if (num_del) { 1981 - aq_ret = i40e_aq_remove_macvlan(&pf->hw, vsi->seid, 1982 - del_list, num_del, 1983 - NULL); 1984 - aq_err = pf->hw.aq.asq_last_status; 1980 + aq_ret = i40e_aq_remove_macvlan(hw, vsi->seid, del_list, 1981 + num_del, NULL); 1982 + aq_err = hw->aq.asq_last_status; 1985 1983 num_del = 0; 1986 1984 1987 1985 if (aq_ret && aq_err != I40E_AQ_RC_ENOENT) 1988 1986 dev_info(&pf->pdev->dev, 1989 - "ignoring delete macvlan error, err %s aq_err %s\n", 1990 - i40e_stat_str(&pf->hw, aq_ret), 1991 - i40e_aq_str(&pf->hw, aq_err)); 1987 + "ignoring delete macvlan error on %s, err %s aq_err %s\n", 1988 + vsi_name, 1989 + i40e_stat_str(hw, aq_ret), 1990 + i40e_aq_str(hw, aq_err)); 1992 1991 } 1993 1992 1994 1993 kfree(del_list); ··· 1999 1998 int add_list_size; 2000 1999 2001 2000 /* do all the adds now */ 2002 - filter_list_len = pf->hw.aq.asq_buf_size / 2001 + filter_list_len = hw->aq.asq_buf_size / 2003 2002 sizeof(struct i40e_aqc_add_macvlan_element_data), 2004 2003 add_list_size = filter_list_len * 2005 2004 sizeof(struct i40e_aqc_add_macvlan_element_data); ··· 2034 2033 2035 2034 /* flush a full buffer */ 2036 2035 if (num_add == filter_list_len) { 2037 - aq_ret = i40e_aq_add_macvlan(&pf->hw, vsi->seid, 2036 + aq_ret = i40e_aq_add_macvlan(hw, vsi->seid, 2038 2037 add_list, num_add, 2039 2038 NULL); 2040 - aq_err = pf->hw.aq.asq_last_status; 2039 + aq_err = hw->aq.asq_last_status; 2041 2040 num_add = 0; 2042 2041 2043 2042 if (aq_ret) ··· 2052 2051 } 2053 2052 2054 2053 if (num_add) { 2055 - aq_ret = i40e_aq_add_macvlan(&pf->hw, vsi->seid, 2054 + aq_ret = i40e_aq_add_macvlan(hw, vsi->seid, 2056 2055 add_list, num_add, NULL); 2057 - aq_err = pf->hw.aq.asq_last_status; 2056 + aq_err = hw->aq.asq_last_status; 2058 2057 num_add = 0; 2059 2058 } 2060 2059 kfree(add_list); ··· 2063 2062 if (add_happened && aq_ret && aq_err != I40E_AQ_RC_EINVAL) { 2064 2063 retval = i40e_aq_rc_to_posix(aq_ret, aq_err); 2065 2064 dev_info(&pf->pdev->dev, 2066 - "add filter failed, err %s aq_err %s\n", 2067 - i40e_stat_str(&pf->hw, aq_ret), 2068 - i40e_aq_str(&pf->hw, aq_err)); 2069 - if ((pf->hw.aq.asq_last_status == I40E_AQ_RC_ENOSPC) && 2065 + "add filter failed on %s, err %s aq_err %s\n", 2066 + vsi_name, 2067 + i40e_stat_str(hw, aq_ret), 2068 + i40e_aq_str(hw, aq_err)); 2069 + if ((hw->aq.asq_last_status == I40E_AQ_RC_ENOSPC) && 2070 2070 !test_bit(__I40E_FILTER_OVERFLOW_PROMISC, 2071 2071 &vsi->state)) { 2072 2072 promisc_forced_on = true; 2073 2073 set_bit(__I40E_FILTER_OVERFLOW_PROMISC, 2074 2074 &vsi->state); 2075 - dev_info(&pf->pdev->dev, "promiscuous mode forced on\n"); 2075 + dev_info(&pf->pdev->dev, "promiscuous mode forced on %s\n", 2076 + vsi_name); 2076 2077 } 2077 2078 } 2078 2079 } ··· 2096 2093 NULL); 2097 2094 if (aq_ret) { 2098 2095 retval = i40e_aq_rc_to_posix(aq_ret, 2099 - pf->hw.aq.asq_last_status); 2096 + hw->aq.asq_last_status); 2100 2097 dev_info(&pf->pdev->dev, 2101 - "set multi promisc failed, err %s aq_err %s\n", 2102 - i40e_stat_str(&pf->hw, aq_ret), 2103 - i40e_aq_str(&pf->hw, 2104 - pf->hw.aq.asq_last_status)); 2098 + "set multi promisc failed on %s, err %s aq_err %s\n", 2099 + vsi_name, 2100 + i40e_stat_str(hw, aq_ret), 2101 + i40e_aq_str(hw, hw->aq.asq_last_status)); 2105 2102 } 2106 2103 } 2107 2104 if ((changed_flags & IFF_PROMISC) || promisc_forced_on) { ··· 2120 2117 */ 2121 2118 if (pf->cur_promisc != cur_promisc) { 2122 2119 pf->cur_promisc = cur_promisc; 2123 - set_bit(__I40E_PF_RESET_REQUESTED, &pf->state); 2120 + if (cur_promisc) 2121 + aq_ret = 2122 + i40e_aq_set_default_vsi(hw, 2123 + vsi->seid, 2124 + NULL); 2125 + else 2126 + aq_ret = 2127 + i40e_aq_clear_default_vsi(hw, 2128 + vsi->seid, 2129 + NULL); 2130 + if (aq_ret) { 2131 + retval = i40e_aq_rc_to_posix(aq_ret, 2132 + hw->aq.asq_last_status); 2133 + dev_info(&pf->pdev->dev, 2134 + "Set default VSI failed on %s, err %s, aq_err %s\n", 2135 + vsi_name, 2136 + i40e_stat_str(hw, aq_ret), 2137 + i40e_aq_str(hw, 2138 + hw->aq.asq_last_status)); 2139 + } 2124 2140 } 2125 2141 } else { 2126 2142 aq_ret = i40e_aq_set_vsi_unicast_promiscuous( 2127 - &vsi->back->hw, 2143 + hw, 2128 2144 vsi->seid, 2129 2145 cur_promisc, NULL, 2130 2146 true); 2131 2147 if (aq_ret) { 2132 2148 retval = 2133 2149 i40e_aq_rc_to_posix(aq_ret, 2134 - pf->hw.aq.asq_last_status); 2150 + hw->aq.asq_last_status); 2135 2151 dev_info(&pf->pdev->dev, 2136 - "set unicast promisc failed, err %d, aq_err %d\n", 2137 - aq_ret, pf->hw.aq.asq_last_status); 2152 + "set unicast promisc failed on %s, err %s, aq_err %s\n", 2153 + vsi_name, 2154 + i40e_stat_str(hw, aq_ret), 2155 + i40e_aq_str(hw, 2156 + hw->aq.asq_last_status)); 2138 2157 } 2139 2158 aq_ret = i40e_aq_set_vsi_multicast_promiscuous( 2140 - &vsi->back->hw, 2159 + hw, 2141 2160 vsi->seid, 2142 2161 cur_promisc, NULL); 2143 2162 if (aq_ret) { 2144 2163 retval = 2145 2164 i40e_aq_rc_to_posix(aq_ret, 2146 - pf->hw.aq.asq_last_status); 2165 + hw->aq.asq_last_status); 2147 2166 dev_info(&pf->pdev->dev, 2148 - "set multicast promisc failed, err %d, aq_err %d\n", 2149 - aq_ret, pf->hw.aq.asq_last_status); 2167 + "set multicast promisc failed on %s, err %s, aq_err %s\n", 2168 + vsi_name, 2169 + i40e_stat_str(hw, aq_ret), 2170 + i40e_aq_str(hw, 2171 + hw->aq.asq_last_status)); 2150 2172 } 2151 2173 } 2152 2174 aq_ret = i40e_aq_set_vsi_broadcast(&vsi->back->hw, ··· 2182 2154 pf->hw.aq.asq_last_status); 2183 2155 dev_info(&pf->pdev->dev, 2184 2156 "set brdcast promisc failed, err %s, aq_err %s\n", 2185 - i40e_stat_str(&pf->hw, aq_ret), 2186 - i40e_aq_str(&pf->hw, 2187 - pf->hw.aq.asq_last_status)); 2157 + i40e_stat_str(hw, aq_ret), 2158 + i40e_aq_str(hw, 2159 + hw->aq.asq_last_status)); 2188 2160 } 2189 2161 } 2190 2162 out: ··· 3975 3947 /* clear the affinity_mask in the IRQ descriptor */ 3976 3948 irq_set_affinity_hint(pf->msix_entries[vector].vector, 3977 3949 NULL); 3950 + synchronize_irq(pf->msix_entries[vector].vector); 3978 3951 free_irq(pf->msix_entries[vector].vector, 3979 3952 vsi->q_vectors[i]); 3980 3953 ··· 4982 4953 if (pf->vsi[v]->netdev) 4983 4954 i40e_dcbnl_set_all(pf->vsi[v]); 4984 4955 } 4985 - i40e_notify_client_of_l2_param_changes(pf->vsi[v]); 4986 4956 } 4987 4957 } 4988 4958 ··· 5206 5178 usleep_range(1000, 2000); 5207 5179 i40e_down(vsi); 5208 5180 5209 - /* Give a VF some time to respond to the reset. The 5210 - * two second wait is based upon the watchdog cycle in 5211 - * the VF driver. 5212 - */ 5213 - if (vsi->type == I40E_VSI_SRIOV) 5214 - msleep(2000); 5215 5181 i40e_up(vsi); 5216 5182 clear_bit(__I40E_CONFIG_BUSY, &pf->state); 5217 5183 } ··· 5248 5226 i40e_clean_tx_ring(vsi->tx_rings[i]); 5249 5227 i40e_clean_rx_ring(vsi->rx_rings[i]); 5250 5228 } 5229 + 5230 + i40e_notify_client_of_netdev_close(vsi, false); 5231 + 5251 5232 } 5252 5233 5253 5234 /** ··· 5729 5704 i40e_service_event_schedule(pf); 5730 5705 } else { 5731 5706 i40e_pf_unquiesce_all_vsi(pf); 5707 + /* Notify the client for the DCB changes */ 5708 + i40e_notify_client_of_l2_param_changes(pf->vsi[pf->lan_vsi]); 5732 5709 } 5733 5710 5734 5711 exit: ··· 5955 5928 if (I40E_DEBUG_FD & pf->hw.debug_mask) 5956 5929 dev_info(&pf->pdev->dev, "FD Filter table flushed and FD-SB replayed.\n"); 5957 5930 } 5958 - 5959 5931 } 5960 5932 5961 5933 /** ··· 7186 7160 vsi->alloc_queue_pairs = 1; 7187 7161 vsi->num_desc = ALIGN(I40E_FDIR_RING_COUNT, 7188 7162 I40E_REQ_DESCRIPTOR_MULTIPLE); 7189 - vsi->num_q_vectors = 1; 7163 + vsi->num_q_vectors = pf->num_fdsb_msix; 7190 7164 break; 7191 7165 7192 7166 case I40E_VSI_VMDQ2: ··· 7570 7544 /* reserve one vector for sideband flow director */ 7571 7545 if (pf->flags & I40E_FLAG_FD_SB_ENABLED) { 7572 7546 if (vectors_left) { 7547 + pf->num_fdsb_msix = 1; 7573 7548 v_budget++; 7574 7549 vectors_left--; 7575 7550 } else { 7551 + pf->num_fdsb_msix = 0; 7576 7552 pf->flags &= ~I40E_FLAG_FD_SB_ENABLED; 7577 7553 } 7578 7554 } ··· 8593 8565 /* Enable filters and mark for reset */ 8594 8566 if (!(pf->flags & I40E_FLAG_FD_SB_ENABLED)) 8595 8567 need_reset = true; 8596 - pf->flags |= I40E_FLAG_FD_SB_ENABLED; 8568 + /* enable FD_SB only if there is MSI-X vector */ 8569 + if (pf->num_fdsb_msix > 0) 8570 + pf->flags |= I40E_FLAG_FD_SB_ENABLED; 8597 8571 } else { 8598 8572 /* turn off filters, mark for reset and clear SW filter list */ 8599 8573 if (pf->flags & I40E_FLAG_FD_SB_ENABLED) { ··· 10083 10053 static int i40e_add_veb(struct i40e_veb *veb, struct i40e_vsi *vsi) 10084 10054 { 10085 10055 struct i40e_pf *pf = veb->pf; 10086 - bool is_default = veb->pf->cur_promisc; 10087 10056 bool enable_stats = !!(pf->flags & I40E_FLAG_VEB_STATS_ENABLED); 10088 10057 int ret; 10089 10058 10090 - /* get a VEB from the hardware */ 10091 10059 ret = i40e_aq_add_veb(&pf->hw, veb->uplink_seid, vsi->seid, 10092 - veb->enabled_tc, is_default, 10060 + veb->enabled_tc, false, 10093 10061 &veb->seid, enable_stats, NULL); 10062 + 10063 + /* get a VEB from the hardware */ 10094 10064 if (ret) { 10095 10065 dev_info(&pf->pdev->dev, 10096 10066 "couldn't add VEB, err %s aq_err %s\n", ··· 11471 11441 { 11472 11442 struct i40e_pf *pf = pci_get_drvdata(pdev); 11473 11443 struct i40e_hw *hw = &pf->hw; 11444 + int retval = 0; 11474 11445 11475 11446 set_bit(__I40E_SUSPENDED, &pf->state); 11476 11447 set_bit(__I40E_DOWN, &pf->state); ··· 11483 11452 wr32(hw, I40E_PFPM_APM, (pf->wol_en ? I40E_PFPM_APM_APME_MASK : 0)); 11484 11453 wr32(hw, I40E_PFPM_WUFC, (pf->wol_en ? I40E_PFPM_WUFC_MAG_MASK : 0)); 11485 11454 11455 + i40e_stop_misc_vector(pf); 11456 + 11457 + retval = pci_save_state(pdev); 11458 + if (retval) 11459 + return retval; 11460 + 11486 11461 pci_wake_from_d3(pdev, pf->wol_en); 11487 11462 pci_set_power_state(pdev, PCI_D3hot); 11488 11463 11489 - return 0; 11464 + return retval; 11490 11465 } 11491 11466 11492 11467 /**
+2
drivers/net/ethernet/intel/i40e/i40e_prototype.h
··· 98 98 struct i40e_asq_cmd_details *cmd_details); 99 99 i40e_status i40e_aq_set_default_vsi(struct i40e_hw *hw, u16 vsi_id, 100 100 struct i40e_asq_cmd_details *cmd_details); 101 + i40e_status i40e_aq_clear_default_vsi(struct i40e_hw *hw, u16 vsi_id, 102 + struct i40e_asq_cmd_details *cmd_details); 101 103 enum i40e_status_code i40e_aq_get_phy_capabilities(struct i40e_hw *hw, 102 104 bool qualified_modules, bool report_init, 103 105 struct i40e_aq_get_phy_abilities_resp *abilities,
+6
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
··· 665 665 goto error_alloc_vsi_res; 666 666 } 667 667 if (type == I40E_VSI_SRIOV) { 668 + u64 hena = i40e_pf_get_default_rss_hena(pf); 669 + 668 670 vf->lan_vsi_idx = vsi->idx; 669 671 vf->lan_vsi_id = vsi->id; 670 672 /* If the port VLAN has been configured and then the ··· 689 687 vf->default_lan_addr.addr, vf->vf_id); 690 688 } 691 689 spin_unlock_bh(&vsi->mac_filter_list_lock); 690 + i40e_write_rx_ctl(&pf->hw, I40E_VFQF_HENA1(0, vf->vf_id), 691 + (u32)hena); 692 + i40e_write_rx_ctl(&pf->hw, I40E_VFQF_HENA1(1, vf->vf_id), 693 + (u32)(hena >> 32)); 692 694 } 693 695 694 696 /* program mac filter */
+3 -3
drivers/net/ethernet/intel/i40evf/i40evf_main.c
··· 37 37 #define DRV_KERN "-k" 38 38 39 39 #define DRV_VERSION_MAJOR 1 40 - #define DRV_VERSION_MINOR 5 41 - #define DRV_VERSION_BUILD 10 40 + #define DRV_VERSION_MINOR 6 41 + #define DRV_VERSION_BUILD 4 42 42 #define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \ 43 43 __stringify(DRV_VERSION_MINOR) "." \ 44 44 __stringify(DRV_VERSION_BUILD) \ ··· 825 825 826 826 ether_addr_copy(f->macaddr, macaddr); 827 827 828 - list_add(&f->list, &adapter->mac_filter_list); 828 + list_add_tail(&f->list, &adapter->mac_filter_list); 829 829 f->add = true; 830 830 adapter->aq_required |= I40EVF_FLAG_AQ_ADD_MAC_FILTER; 831 831 }
+8
drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
··· 434 434 ether_addr_copy(veal->list[i].addr, f->macaddr); 435 435 i++; 436 436 f->add = false; 437 + if (i == count) 438 + break; 437 439 } 438 440 } 439 441 if (!more) ··· 499 497 i++; 500 498 list_del(&f->list); 501 499 kfree(f); 500 + if (i == count) 501 + break; 502 502 } 503 503 } 504 504 if (!more) ··· 564 560 vvfl->vlan_id[i] = f->vlan; 565 561 i++; 566 562 f->add = false; 563 + if (i == count) 564 + break; 567 565 } 568 566 } 569 567 if (!more) ··· 629 623 i++; 630 624 list_del(&f->list); 631 625 kfree(f); 626 + if (i == count) 627 + break; 632 628 } 633 629 } 634 630 if (!more)