Commit f5515885 authored by David S. Miller's avatar David S. Miller

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-02-16

This series contains updates to i40e/i40evf only.

Shannon adds flags to MAC allocation requests to signify that the MAC VLAN
filters should come from the shared resource pool.  Added a new "set switch
config" admin queue command and the new Cisco VXLAN-GPE cloud tunnel type
for the admin queue commands.  Added more detail to the NVM update debug
message in order to see the full ethtool request data.  Also added a few
more bits of netdev data into the debugfs output for dump VSI.

Pandi fixes the width of two datatypes which were being declared a different
size from what they are assigned.

Anjali fixes an issue where we were not doing write-back on interrupt
throttle for legacy case in x722.

Mitch adds a counter for ARQ overflows since sometimes an ever-growing
number indicates that something bad is happening.  Also added 20G speed for
Tx bandwidth calculations.

Jesse refactors the DCB function based on a community suggestion to change
the multi-level if statement into a switch statement.  Cleans up VF device
IDs in the PF, since it does not need to know them.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 86f44778 82f399c9
...@@ -393,6 +393,7 @@ struct i40e_pf { ...@@ -393,6 +393,7 @@ struct i40e_pf {
struct i40e_vf *vf; struct i40e_vf *vf;
int num_alloc_vfs; /* actual number of VFs allocated */ int num_alloc_vfs; /* actual number of VFs allocated */
u32 vf_aq_requests; u32 vf_aq_requests;
u32 arq_overflows; /* Not fatal, possibly indicative of problems */
/* DCBx/DCBNL capability for PF that indicates /* DCBx/DCBNL capability for PF that indicates
* whether DCBx is managed by firmware or host * whether DCBx is managed by firmware or host
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
*/ */
#define I40E_FW_API_VERSION_MAJOR 0x0001 #define I40E_FW_API_VERSION_MAJOR 0x0001
#define I40E_FW_API_VERSION_MINOR 0x0004 #define I40E_FW_API_VERSION_MINOR 0x0005
struct i40e_aq_desc { struct i40e_aq_desc {
__le16 flags; __le16 flags;
...@@ -145,6 +145,7 @@ enum i40e_admin_queue_opc { ...@@ -145,6 +145,7 @@ enum i40e_admin_queue_opc {
i40e_aqc_opc_remove_statistics = 0x0202, i40e_aqc_opc_remove_statistics = 0x0202,
i40e_aqc_opc_set_port_parameters = 0x0203, i40e_aqc_opc_set_port_parameters = 0x0203,
i40e_aqc_opc_get_switch_resource_alloc = 0x0204, i40e_aqc_opc_get_switch_resource_alloc = 0x0204,
i40e_aqc_opc_set_switch_config = 0x0205,
i40e_aqc_opc_add_vsi = 0x0210, i40e_aqc_opc_add_vsi = 0x0210,
i40e_aqc_opc_update_vsi_parameters = 0x0211, i40e_aqc_opc_update_vsi_parameters = 0x0211,
...@@ -229,6 +230,7 @@ enum i40e_admin_queue_opc { ...@@ -229,6 +230,7 @@ enum i40e_admin_queue_opc {
i40e_aqc_opc_nvm_config_read = 0x0704, i40e_aqc_opc_nvm_config_read = 0x0704,
i40e_aqc_opc_nvm_config_write = 0x0705, i40e_aqc_opc_nvm_config_write = 0x0705,
i40e_aqc_opc_oem_post_update = 0x0720, i40e_aqc_opc_oem_post_update = 0x0720,
i40e_aqc_opc_thermal_sensor = 0x0721,
/* virtualization commands */ /* virtualization commands */
i40e_aqc_opc_send_msg_to_pf = 0x0801, i40e_aqc_opc_send_msg_to_pf = 0x0801,
...@@ -683,6 +685,17 @@ struct i40e_aqc_switch_resource_alloc_element_resp { ...@@ -683,6 +685,17 @@ struct i40e_aqc_switch_resource_alloc_element_resp {
I40E_CHECK_STRUCT_LEN(0x10, i40e_aqc_switch_resource_alloc_element_resp); I40E_CHECK_STRUCT_LEN(0x10, i40e_aqc_switch_resource_alloc_element_resp);
/* Set Switch Configuration (direct 0x0205) */
struct i40e_aqc_set_switch_config {
__le16 flags;
#define I40E_AQ_SET_SWITCH_CFG_PROMISC 0x0001
#define I40E_AQ_SET_SWITCH_CFG_L2_FILTER 0x0002
__le16 valid_flags;
u8 reserved[12];
};
I40E_CHECK_CMD_LENGTH(i40e_aqc_set_switch_config);
/* Add VSI (indirect 0x0210) /* Add VSI (indirect 0x0210)
* this indirect command uses struct i40e_aqc_vsi_properties_data * this indirect command uses struct i40e_aqc_vsi_properties_data
* as the indirect buffer (128 bytes) * as the indirect buffer (128 bytes)
...@@ -909,7 +922,8 @@ struct i40e_aqc_add_veb { ...@@ -909,7 +922,8 @@ struct i40e_aqc_add_veb {
I40E_AQC_ADD_VEB_PORT_TYPE_SHIFT) I40E_AQC_ADD_VEB_PORT_TYPE_SHIFT)
#define I40E_AQC_ADD_VEB_PORT_TYPE_DEFAULT 0x2 #define I40E_AQC_ADD_VEB_PORT_TYPE_DEFAULT 0x2
#define I40E_AQC_ADD_VEB_PORT_TYPE_DATA 0x4 #define I40E_AQC_ADD_VEB_PORT_TYPE_DATA 0x4
#define I40E_AQC_ADD_VEB_ENABLE_L2_FILTER 0x8 #define I40E_AQC_ADD_VEB_ENABLE_L2_FILTER 0x8 /* deprecated */
#define I40E_AQC_ADD_VEB_ENABLE_DISABLE_STATS 0x10
u8 enable_tcs; u8 enable_tcs;
u8 reserved[9]; u8 reserved[9];
}; };
...@@ -976,6 +990,7 @@ struct i40e_aqc_add_macvlan_element_data { ...@@ -976,6 +990,7 @@ struct i40e_aqc_add_macvlan_element_data {
#define I40E_AQC_MACVLAN_ADD_HASH_MATCH 0x0002 #define I40E_AQC_MACVLAN_ADD_HASH_MATCH 0x0002
#define I40E_AQC_MACVLAN_ADD_IGNORE_VLAN 0x0004 #define I40E_AQC_MACVLAN_ADD_IGNORE_VLAN 0x0004
#define I40E_AQC_MACVLAN_ADD_TO_QUEUE 0x0008 #define I40E_AQC_MACVLAN_ADD_TO_QUEUE 0x0008
#define I40E_AQC_MACVLAN_ADD_USE_SHARED_MAC 0x0010
__le16 queue_number; __le16 queue_number;
#define I40E_AQC_MACVLAN_CMD_QUEUE_SHIFT 0 #define I40E_AQC_MACVLAN_CMD_QUEUE_SHIFT 0
#define I40E_AQC_MACVLAN_CMD_QUEUE_MASK (0x7FF << \ #define I40E_AQC_MACVLAN_CMD_QUEUE_MASK (0x7FF << \
...@@ -1264,6 +1279,12 @@ struct i40e_aqc_add_remove_cloud_filters_element_data { ...@@ -1264,6 +1279,12 @@ struct i40e_aqc_add_remove_cloud_filters_element_data {
#define I40E_AQC_ADD_CLOUD_TNL_TYPE_NVGRE_OMAC 1 #define I40E_AQC_ADD_CLOUD_TNL_TYPE_NVGRE_OMAC 1
#define I40E_AQC_ADD_CLOUD_TNL_TYPE_GENEVE 2 #define I40E_AQC_ADD_CLOUD_TNL_TYPE_GENEVE 2
#define I40E_AQC_ADD_CLOUD_TNL_TYPE_IP 3 #define I40E_AQC_ADD_CLOUD_TNL_TYPE_IP 3
#define I40E_AQC_ADD_CLOUD_TNL_TYPE_RESERVED 4
#define I40E_AQC_ADD_CLOUD_TNL_TYPE_VXLAN_GPE 5
#define I40E_AQC_ADD_CLOUD_FLAGS_SHARED_OUTER_MAC 0x2000
#define I40E_AQC_ADD_CLOUD_FLAGS_SHARED_INNER_MAC 0x4000
#define I40E_AQC_ADD_CLOUD_FLAGS_SHARED_OUTER_IP 0x8000
__le32 tenant_id; __le32 tenant_id;
u8 reserved[4]; u8 reserved[4];
...@@ -1932,6 +1953,22 @@ struct i40e_aqc_nvm_oem_post_update_buffer { ...@@ -1932,6 +1953,22 @@ struct i40e_aqc_nvm_oem_post_update_buffer {
I40E_CHECK_STRUCT_LEN(0x28, i40e_aqc_nvm_oem_post_update_buffer); I40E_CHECK_STRUCT_LEN(0x28, i40e_aqc_nvm_oem_post_update_buffer);
/* Thermal Sensor (indirect 0x0721)
* read or set thermal sensor configs and values
* takes a sensor and command specific data buffer, not detailed here
*/
struct i40e_aqc_thermal_sensor {
u8 sensor_action;
#define I40E_AQ_THERMAL_SENSOR_READ_CONFIG 0
#define I40E_AQ_THERMAL_SENSOR_SET_CONFIG 1
#define I40E_AQ_THERMAL_SENSOR_READ_TEMP 2
u8 reserved[7];
__le32 addr_high;
__le32 addr_low;
};
I40E_CHECK_CMD_LENGTH(i40e_aqc_thermal_sensor);
/* Send to PF command (indirect 0x0801) id is only used by PF /* Send to PF command (indirect 0x0801) id is only used by PF
* Send to VF command (indirect 0x0802) id is only used by PF * Send to VF command (indirect 0x0802) id is only used by PF
* Send to Peer PF command (indirect 0x0803) * Send to Peer PF command (indirect 0x0803)
...@@ -2211,6 +2248,7 @@ struct i40e_aqc_add_udp_tunnel { ...@@ -2211,6 +2248,7 @@ struct i40e_aqc_add_udp_tunnel {
#define I40E_AQC_TUNNEL_TYPE_VXLAN 0x00 #define I40E_AQC_TUNNEL_TYPE_VXLAN 0x00
#define I40E_AQC_TUNNEL_TYPE_NGE 0x01 #define I40E_AQC_TUNNEL_TYPE_NGE 0x01
#define I40E_AQC_TUNNEL_TYPE_TEREDO 0x10 #define I40E_AQC_TUNNEL_TYPE_TEREDO 0x10
#define I40E_AQC_TUNNEL_TYPE_VXLAN_GPE 0x11
u8 reserved1[10]; u8 reserved1[10];
}; };
......
...@@ -62,14 +62,6 @@ static i40e_status i40e_set_mac_type(struct i40e_hw *hw) ...@@ -62,14 +62,6 @@ static i40e_status i40e_set_mac_type(struct i40e_hw *hw)
case I40E_DEV_ID_10G_BASE_T_X722: case I40E_DEV_ID_10G_BASE_T_X722:
hw->mac.type = I40E_MAC_X722; hw->mac.type = I40E_MAC_X722;
break; break;
case I40E_DEV_ID_X722_VF:
case I40E_DEV_ID_X722_VF_HV:
hw->mac.type = I40E_MAC_X722_VF;
break;
case I40E_DEV_ID_VF:
case I40E_DEV_ID_VF_HV:
hw->mac.type = I40E_MAC_VF;
break;
default: default:
hw->mac.type = I40E_MAC_GENERIC; hw->mac.type = I40E_MAC_GENERIC;
break; break;
......
...@@ -380,17 +380,20 @@ static void i40e_parse_cee_app_tlv(struct i40e_cee_feat_tlv *tlv, ...@@ -380,17 +380,20 @@ static void i40e_parse_cee_app_tlv(struct i40e_cee_feat_tlv *tlv,
{ {
u16 length, typelength, offset = 0; u16 length, typelength, offset = 0;
struct i40e_cee_app_prio *app; struct i40e_cee_app_prio *app;
u8 i, up, selector; u8 i;
typelength = ntohs(tlv->hdr.typelen); typelength = ntohs(tlv->hdr.typelen);
length = (u16)((typelength & I40E_LLDP_TLV_LEN_MASK) >> length = (u16)((typelength & I40E_LLDP_TLV_LEN_MASK) >>
I40E_LLDP_TLV_LEN_SHIFT); I40E_LLDP_TLV_LEN_SHIFT);
dcbcfg->numapps = length / sizeof(*app); dcbcfg->numapps = length / sizeof(*app);
if (!dcbcfg->numapps) if (!dcbcfg->numapps)
return; return;
for (i = 0; i < dcbcfg->numapps; i++) { for (i = 0; i < dcbcfg->numapps; i++) {
u8 up, selector;
app = (struct i40e_cee_app_prio *)(tlv->tlvinfo + offset); app = (struct i40e_cee_app_prio *)(tlv->tlvinfo + offset);
for (up = 0; up < I40E_MAX_USER_PRIORITY; up++) { for (up = 0; up < I40E_MAX_USER_PRIORITY; up++) {
if (app->prio_map & BIT(up)) if (app->prio_map & BIT(up))
...@@ -400,13 +403,17 @@ static void i40e_parse_cee_app_tlv(struct i40e_cee_feat_tlv *tlv, ...@@ -400,13 +403,17 @@ static void i40e_parse_cee_app_tlv(struct i40e_cee_feat_tlv *tlv,
/* Get Selector from lower 2 bits, and convert to IEEE */ /* Get Selector from lower 2 bits, and convert to IEEE */
selector = (app->upper_oui_sel & I40E_CEE_APP_SELECTOR_MASK); selector = (app->upper_oui_sel & I40E_CEE_APP_SELECTOR_MASK);
if (selector == I40E_CEE_APP_SEL_ETHTYPE) switch (selector) {
case I40E_CEE_APP_SEL_ETHTYPE:
dcbcfg->app[i].selector = I40E_APP_SEL_ETHTYPE; dcbcfg->app[i].selector = I40E_APP_SEL_ETHTYPE;
else if (selector == I40E_CEE_APP_SEL_TCPIP) break;
case I40E_CEE_APP_SEL_TCPIP:
dcbcfg->app[i].selector = I40E_APP_SEL_TCPIP; dcbcfg->app[i].selector = I40E_APP_SEL_TCPIP;
else break;
default:
/* Keep selector as it is for unknown types */ /* Keep selector as it is for unknown types */
dcbcfg->app[i].selector = selector; dcbcfg->app[i].selector = selector;
}
dcbcfg->app[i].protocolid = ntohs(app->protocol); dcbcfg->app[i].protocolid = ntohs(app->protocol);
/* Move to next app */ /* Move to next app */
......
...@@ -379,19 +379,27 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid) ...@@ -379,19 +379,27 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)
return; return;
} }
dev_info(&pf->pdev->dev, "vsi seid %d\n", seid); dev_info(&pf->pdev->dev, "vsi seid %d\n", seid);
if (vsi->netdev) if (vsi->netdev) {
dev_info(&pf->pdev->dev, struct net_device *nd = vsi->netdev;
" netdev: name = %s\n",
vsi->netdev->name); dev_info(&pf->pdev->dev, " netdev: name = %s, state = %lu, flags = 0x%08x\n",
nd->name, nd->state, nd->flags);
dev_info(&pf->pdev->dev, " features = 0x%08lx\n",
(unsigned long int)nd->features);
dev_info(&pf->pdev->dev, " hw_features = 0x%08lx\n",
(unsigned long int)nd->hw_features);
dev_info(&pf->pdev->dev, " vlan_features = 0x%08lx\n",
(unsigned long int)nd->vlan_features);
}
if (vsi->active_vlans) if (vsi->active_vlans)
dev_info(&pf->pdev->dev, dev_info(&pf->pdev->dev,
" vlgrp: & = %p\n", vsi->active_vlans); " vlgrp: & = %p\n", vsi->active_vlans);
dev_info(&pf->pdev->dev, dev_info(&pf->pdev->dev,
" netdev_registered = %i, current_netdev_flags = 0x%04x, state = %li flags = 0x%08lx\n", " state = %li flags = 0x%08lx, netdev_registered = %i, current_netdev_flags = 0x%04x\n",
vsi->netdev_registered, vsi->state, vsi->flags,
vsi->current_netdev_flags, vsi->state, vsi->flags); vsi->netdev_registered, vsi->current_netdev_flags);
if (vsi == pf->vsi[pf->lan_vsi]) if (vsi == pf->vsi[pf->lan_vsi])
dev_info(&pf->pdev->dev, "MAC address: %pM SAN MAC: %pM Port MAC: %pM\n", dev_info(&pf->pdev->dev, " MAC address: %pM SAN MAC: %pM Port MAC: %pM\n",
pf->hw.mac.addr, pf->hw.mac.addr,
pf->hw.mac.san_addr, pf->hw.mac.san_addr,
pf->hw.mac.port_addr); pf->hw.mac.port_addr);
......
...@@ -39,15 +39,11 @@ ...@@ -39,15 +39,11 @@
#define I40E_DEV_ID_20G_KR2 0x1587 #define I40E_DEV_ID_20G_KR2 0x1587
#define I40E_DEV_ID_20G_KR2_A 0x1588 #define I40E_DEV_ID_20G_KR2_A 0x1588
#define I40E_DEV_ID_10G_BASE_T4 0x1589 #define I40E_DEV_ID_10G_BASE_T4 0x1589
#define I40E_DEV_ID_VF 0x154C
#define I40E_DEV_ID_VF_HV 0x1571
#define I40E_DEV_ID_KX_X722 0x37CE #define I40E_DEV_ID_KX_X722 0x37CE
#define I40E_DEV_ID_QSFP_X722 0x37CF #define I40E_DEV_ID_QSFP_X722 0x37CF
#define I40E_DEV_ID_SFP_X722 0x37D0 #define I40E_DEV_ID_SFP_X722 0x37D0
#define I40E_DEV_ID_1G_BASE_T_X722 0x37D1 #define I40E_DEV_ID_1G_BASE_T_X722 0x37D1
#define I40E_DEV_ID_10G_BASE_T_X722 0x37D2 #define I40E_DEV_ID_10G_BASE_T_X722 0x37D2
#define I40E_DEV_ID_X722_VF 0x37CD
#define I40E_DEV_ID_X722_VF_HV 0x37D9
#define i40e_is_40G_device(d) ((d) == I40E_DEV_ID_QSFP_A || \ #define i40e_is_40G_device(d) ((d) == I40E_DEV_ID_QSFP_A || \
(d) == I40E_DEV_ID_QSFP_B || \ (d) == I40E_DEV_ID_QSFP_B || \
......
...@@ -143,6 +143,7 @@ static struct i40e_stats i40e_gstrings_stats[] = { ...@@ -143,6 +143,7 @@ static struct i40e_stats i40e_gstrings_stats[] = {
I40E_PF_STAT("rx_oversize", stats.rx_oversize), I40E_PF_STAT("rx_oversize", stats.rx_oversize),
I40E_PF_STAT("rx_jabber", stats.rx_jabber), I40E_PF_STAT("rx_jabber", stats.rx_jabber),
I40E_PF_STAT("VF_admin_queue_requests", vf_aq_requests), I40E_PF_STAT("VF_admin_queue_requests", vf_aq_requests),
I40E_PF_STAT("arq_overflows", arq_overflows),
I40E_PF_STAT("rx_hwtstamp_cleared", rx_hwtstamp_cleared), I40E_PF_STAT("rx_hwtstamp_cleared", rx_hwtstamp_cleared),
I40E_PF_STAT("fdir_flush_cnt", fd_flush_cnt), I40E_PF_STAT("fdir_flush_cnt", fd_flush_cnt),
I40E_PF_STAT("fdir_atr_match", stats.fd_atr_match), I40E_PF_STAT("fdir_atr_match", stats.fd_atr_match),
......
...@@ -51,7 +51,7 @@ static const char i40e_driver_string[] = ...@@ -51,7 +51,7 @@ static const char i40e_driver_string[] =
#define DRV_VERSION_MAJOR 1 #define DRV_VERSION_MAJOR 1
#define DRV_VERSION_MINOR 4 #define DRV_VERSION_MINOR 4
#define DRV_VERSION_BUILD 10 #define DRV_VERSION_BUILD 11
#define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \ #define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \
__stringify(DRV_VERSION_MINOR) "." \ __stringify(DRV_VERSION_MINOR) "." \
__stringify(DRV_VERSION_BUILD) DRV_KERN __stringify(DRV_VERSION_BUILD) DRV_KERN
...@@ -6257,6 +6257,7 @@ static void i40e_clean_adminq_subtask(struct i40e_pf *pf) ...@@ -6257,6 +6257,7 @@ static void i40e_clean_adminq_subtask(struct i40e_pf *pf)
if (hw->debug_mask & I40E_DEBUG_AQ) if (hw->debug_mask & I40E_DEBUG_AQ)
dev_info(&pf->pdev->dev, "ARQ Overflow Error detected\n"); dev_info(&pf->pdev->dev, "ARQ Overflow Error detected\n");
val &= ~I40E_PF_ARQLEN_ARQOVFL_MASK; val &= ~I40E_PF_ARQLEN_ARQOVFL_MASK;
pf->arq_overflows++;
} }
if (val & I40E_PF_ARQLEN_ARQCRIT_MASK) { if (val & I40E_PF_ARQLEN_ARQCRIT_MASK) {
if (hw->debug_mask & I40E_DEBUG_AQ) if (hw->debug_mask & I40E_DEBUG_AQ)
...@@ -10645,7 +10646,6 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -10645,7 +10646,6 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
u16 wol_nvm_bits; u16 wol_nvm_bits;
u16 link_status; u16 link_status;
int err; int err;
u32 len;
u32 val; u32 val;
u32 i; u32 i;
u8 set_fc_aq_fail; u8 set_fc_aq_fail;
...@@ -10904,8 +10904,8 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -10904,8 +10904,8 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
pf->num_alloc_vsi = pf->hw.func_caps.num_vsis; pf->num_alloc_vsi = pf->hw.func_caps.num_vsis;
/* Set up the *vsi struct and our local tracking of the MAIN PF vsi. */ /* Set up the *vsi struct and our local tracking of the MAIN PF vsi. */
len = sizeof(struct i40e_vsi *) * pf->num_alloc_vsi; pf->vsi = kcalloc(pf->num_alloc_vsi, sizeof(struct i40e_vsi *),
pf->vsi = kzalloc(len, GFP_KERNEL); GFP_KERNEL);
if (!pf->vsi) { if (!pf->vsi) {
err = -ENOMEM; err = -ENOMEM;
goto err_switch_setup; goto err_switch_setup;
......
...@@ -693,10 +693,11 @@ i40e_status i40e_nvmupd_command(struct i40e_hw *hw, ...@@ -693,10 +693,11 @@ i40e_status i40e_nvmupd_command(struct i40e_hw *hw,
/* early check for status command and debug msgs */ /* early check for status command and debug msgs */
upd_cmd = i40e_nvmupd_validate_command(hw, cmd, perrno); upd_cmd = i40e_nvmupd_validate_command(hw, cmd, perrno);
i40e_debug(hw, I40E_DEBUG_NVM, "%s state %d nvm_release_on_hold %d\n", i40e_debug(hw, I40E_DEBUG_NVM, "%s state %d nvm_release_on_hold %d cmd 0x%08x config 0x%08x offset 0x%08x data_size 0x%08x\n",
i40e_nvm_update_state_str[upd_cmd], i40e_nvm_update_state_str[upd_cmd],
hw->nvmupd_state, hw->nvmupd_state,
hw->aq.nvm_release_on_done); hw->aq.nvm_release_on_done,
cmd->command, cmd->config, cmd->offset, cmd->data_size);
if (upd_cmd == I40E_NVMUPD_INVALID) { if (upd_cmd == I40E_NVMUPD_INVALID) {
*perrno = -EFAULT; *perrno = -EFAULT;
......
...@@ -789,12 +789,20 @@ void i40e_force_wb(struct i40e_vsi *vsi, struct i40e_q_vector *q_vector) ...@@ -789,12 +789,20 @@ void i40e_force_wb(struct i40e_vsi *vsi, struct i40e_q_vector *q_vector)
if (q_vector->arm_wb_state) if (q_vector->arm_wb_state)
return; return;
val = I40E_PFINT_DYN_CTLN_WB_ON_ITR_MASK; if (vsi->back->flags & I40E_FLAG_MSIX_ENABLED) {
val = I40E_PFINT_DYN_CTLN_WB_ON_ITR_MASK |
I40E_PFINT_DYN_CTLN_ITR_INDX_MASK; /* set noitr */
wr32(&vsi->back->hw,
I40E_PFINT_DYN_CTLN(q_vector->v_idx +
vsi->base_vector - 1),
val);
} else {
val = I40E_PFINT_DYN_CTL0_WB_ON_ITR_MASK |
I40E_PFINT_DYN_CTL0_ITR_INDX_MASK; /* set noitr */
wr32(&vsi->back->hw, wr32(&vsi->back->hw, I40E_PFINT_DYN_CTL0, val);
I40E_PFINT_DYN_CTLN(q_vector->v_idx + }
vsi->base_vector - 1),
val);
q_vector->arm_wb_state = true; q_vector->arm_wb_state = true;
} else if (vsi->back->flags & I40E_FLAG_MSIX_ENABLED) { } else if (vsi->back->flags & I40E_FLAG_MSIX_ENABLED) {
u32 val = I40E_PFINT_DYN_CTLN_INTENA_MASK | u32 val = I40E_PFINT_DYN_CTLN_INTENA_MASK |
......
...@@ -2306,6 +2306,9 @@ int i40e_ndo_set_vf_bw(struct net_device *netdev, int vf_id, int min_tx_rate, ...@@ -2306,6 +2306,9 @@ int i40e_ndo_set_vf_bw(struct net_device *netdev, int vf_id, int min_tx_rate,
case I40E_LINK_SPEED_40GB: case I40E_LINK_SPEED_40GB:
speed = 40000; speed = 40000;
break; break;
case I40E_LINK_SPEED_20GB:
speed = 20000;
break;
case I40E_LINK_SPEED_10GB: case I40E_LINK_SPEED_10GB:
speed = 10000; speed = 10000;
break; break;
......
...@@ -91,8 +91,8 @@ struct i40e_vf { ...@@ -91,8 +91,8 @@ struct i40e_vf {
* When assigned, these will be non-zero, because VSI 0 is always * When assigned, these will be non-zero, because VSI 0 is always
* the main LAN VSI for the PF. * the main LAN VSI for the PF.
*/ */
u8 lan_vsi_idx; /* index into PF struct */ u16 lan_vsi_idx; /* index into PF struct */
u8 lan_vsi_id; /* ID as used by firmware */ u16 lan_vsi_id; /* ID as used by firmware */
u8 num_queue_pairs; /* num of qps assigned to VF vsis */ u8 num_queue_pairs; /* num of qps assigned to VF vsis */
u64 num_mdd_events; /* num of mdd events detected */ u64 num_mdd_events; /* num of mdd events detected */
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
*/ */
#define I40E_FW_API_VERSION_MAJOR 0x0001 #define I40E_FW_API_VERSION_MAJOR 0x0001
#define I40E_FW_API_VERSION_MINOR 0x0004 #define I40E_FW_API_VERSION_MINOR 0x0005
struct i40e_aq_desc { struct i40e_aq_desc {
__le16 flags; __le16 flags;
...@@ -145,6 +145,7 @@ enum i40e_admin_queue_opc { ...@@ -145,6 +145,7 @@ enum i40e_admin_queue_opc {
i40e_aqc_opc_remove_statistics = 0x0202, i40e_aqc_opc_remove_statistics = 0x0202,
i40e_aqc_opc_set_port_parameters = 0x0203, i40e_aqc_opc_set_port_parameters = 0x0203,
i40e_aqc_opc_get_switch_resource_alloc = 0x0204, i40e_aqc_opc_get_switch_resource_alloc = 0x0204,
i40e_aqc_opc_set_switch_config = 0x0205,
i40e_aqc_opc_add_vsi = 0x0210, i40e_aqc_opc_add_vsi = 0x0210,
i40e_aqc_opc_update_vsi_parameters = 0x0211, i40e_aqc_opc_update_vsi_parameters = 0x0211,
...@@ -229,6 +230,7 @@ enum i40e_admin_queue_opc { ...@@ -229,6 +230,7 @@ enum i40e_admin_queue_opc {
i40e_aqc_opc_nvm_config_read = 0x0704, i40e_aqc_opc_nvm_config_read = 0x0704,
i40e_aqc_opc_nvm_config_write = 0x0705, i40e_aqc_opc_nvm_config_write = 0x0705,
i40e_aqc_opc_oem_post_update = 0x0720, i40e_aqc_opc_oem_post_update = 0x0720,
i40e_aqc_opc_thermal_sensor = 0x0721,
/* virtualization commands */ /* virtualization commands */
i40e_aqc_opc_send_msg_to_pf = 0x0801, i40e_aqc_opc_send_msg_to_pf = 0x0801,
...@@ -680,6 +682,17 @@ struct i40e_aqc_switch_resource_alloc_element_resp { ...@@ -680,6 +682,17 @@ struct i40e_aqc_switch_resource_alloc_element_resp {
I40E_CHECK_STRUCT_LEN(0x10, i40e_aqc_switch_resource_alloc_element_resp); I40E_CHECK_STRUCT_LEN(0x10, i40e_aqc_switch_resource_alloc_element_resp);
/* Set Switch Configuration (direct 0x0205) */
struct i40e_aqc_set_switch_config {
__le16 flags;
#define I40E_AQ_SET_SWITCH_CFG_PROMISC 0x0001
#define I40E_AQ_SET_SWITCH_CFG_L2_FILTER 0x0002
__le16 valid_flags;
u8 reserved[12];
};
I40E_CHECK_CMD_LENGTH(i40e_aqc_set_switch_config);
/* Add VSI (indirect 0x0210) /* Add VSI (indirect 0x0210)
* this indirect command uses struct i40e_aqc_vsi_properties_data * this indirect command uses struct i40e_aqc_vsi_properties_data
* as the indirect buffer (128 bytes) * as the indirect buffer (128 bytes)
...@@ -906,7 +919,8 @@ struct i40e_aqc_add_veb { ...@@ -906,7 +919,8 @@ struct i40e_aqc_add_veb {
I40E_AQC_ADD_VEB_PORT_TYPE_SHIFT) I40E_AQC_ADD_VEB_PORT_TYPE_SHIFT)
#define I40E_AQC_ADD_VEB_PORT_TYPE_DEFAULT 0x2 #define I40E_AQC_ADD_VEB_PORT_TYPE_DEFAULT 0x2
#define I40E_AQC_ADD_VEB_PORT_TYPE_DATA 0x4 #define I40E_AQC_ADD_VEB_PORT_TYPE_DATA 0x4
#define I40E_AQC_ADD_VEB_ENABLE_L2_FILTER 0x8 #define I40E_AQC_ADD_VEB_ENABLE_L2_FILTER 0x8 /* deprecated */
#define I40E_AQC_ADD_VEB_ENABLE_DISABLE_STATS 0x10
u8 enable_tcs; u8 enable_tcs;
u8 reserved[9]; u8 reserved[9];
}; };
...@@ -973,6 +987,7 @@ struct i40e_aqc_add_macvlan_element_data { ...@@ -973,6 +987,7 @@ struct i40e_aqc_add_macvlan_element_data {
#define I40E_AQC_MACVLAN_ADD_HASH_MATCH 0x0002 #define I40E_AQC_MACVLAN_ADD_HASH_MATCH 0x0002
#define I40E_AQC_MACVLAN_ADD_IGNORE_VLAN 0x0004 #define I40E_AQC_MACVLAN_ADD_IGNORE_VLAN 0x0004
#define I40E_AQC_MACVLAN_ADD_TO_QUEUE 0x0008 #define I40E_AQC_MACVLAN_ADD_TO_QUEUE 0x0008
#define I40E_AQC_MACVLAN_ADD_USE_SHARED_MAC 0x0010
__le16 queue_number; __le16 queue_number;
#define I40E_AQC_MACVLAN_CMD_QUEUE_SHIFT 0 #define I40E_AQC_MACVLAN_CMD_QUEUE_SHIFT 0
#define I40E_AQC_MACVLAN_CMD_QUEUE_MASK (0x7FF << \ #define I40E_AQC_MACVLAN_CMD_QUEUE_MASK (0x7FF << \
...@@ -1261,6 +1276,12 @@ struct i40e_aqc_add_remove_cloud_filters_element_data { ...@@ -1261,6 +1276,12 @@ struct i40e_aqc_add_remove_cloud_filters_element_data {
#define I40E_AQC_ADD_CLOUD_TNL_TYPE_NVGRE_OMAC 1 #define I40E_AQC_ADD_CLOUD_TNL_TYPE_NVGRE_OMAC 1
#define I40E_AQC_ADD_CLOUD_TNL_TYPE_GENEVE 2 #define I40E_AQC_ADD_CLOUD_TNL_TYPE_GENEVE 2
#define I40E_AQC_ADD_CLOUD_TNL_TYPE_IP 3 #define I40E_AQC_ADD_CLOUD_TNL_TYPE_IP 3
#define I40E_AQC_ADD_CLOUD_TNL_TYPE_RESERVED 4
#define I40E_AQC_ADD_CLOUD_TNL_TYPE_VXLAN_GPE 5
#define I40E_AQC_ADD_CLOUD_FLAGS_SHARED_OUTER_MAC 0x2000
#define I40E_AQC_ADD_CLOUD_FLAGS_SHARED_INNER_MAC 0x4000
#define I40E_AQC_ADD_CLOUD_FLAGS_SHARED_OUTER_IP 0x8000
__le32 tenant_id; __le32 tenant_id;
u8 reserved[4]; u8 reserved[4];
...@@ -1929,6 +1950,22 @@ struct i40e_aqc_nvm_oem_post_update_buffer { ...@@ -1929,6 +1950,22 @@ struct i40e_aqc_nvm_oem_post_update_buffer {
I40E_CHECK_STRUCT_LEN(0x28, i40e_aqc_nvm_oem_post_update_buffer); I40E_CHECK_STRUCT_LEN(0x28, i40e_aqc_nvm_oem_post_update_buffer);
/* Thermal Sensor (indirect 0x0721)
* read or set thermal sensor configs and values
* takes a sensor and command specific data buffer, not detailed here
*/
struct i40e_aqc_thermal_sensor {
u8 sensor_action;
#define I40E_AQ_THERMAL_SENSOR_READ_CONFIG 0
#define I40E_AQ_THERMAL_SENSOR_SET_CONFIG 1
#define I40E_AQ_THERMAL_SENSOR_READ_TEMP 2
u8 reserved[7];
__le32 addr_high;
__le32 addr_low;
};
I40E_CHECK_CMD_LENGTH(i40e_aqc_thermal_sensor);
/* Send to PF command (indirect 0x0801) id is only used by PF /* Send to PF command (indirect 0x0801) id is only used by PF
* Send to VF command (indirect 0x0802) id is only used by PF * Send to VF command (indirect 0x0802) id is only used by PF
* Send to Peer PF command (indirect 0x0803) * Send to Peer PF command (indirect 0x0803)
...@@ -2103,6 +2140,7 @@ struct i40e_aqc_add_udp_tunnel { ...@@ -2103,6 +2140,7 @@ struct i40e_aqc_add_udp_tunnel {
#define I40E_AQC_TUNNEL_TYPE_VXLAN 0x00 #define I40E_AQC_TUNNEL_TYPE_VXLAN 0x00
#define I40E_AQC_TUNNEL_TYPE_NGE 0x01 #define I40E_AQC_TUNNEL_TYPE_NGE 0x01
#define I40E_AQC_TUNNEL_TYPE_TEREDO 0x10 #define I40E_AQC_TUNNEL_TYPE_TEREDO 0x10
#define I40E_AQC_TUNNEL_TYPE_VXLAN_GPE 0x11
u8 reserved1[10]; u8 reserved1[10];
}; };
......
...@@ -307,7 +307,8 @@ static void i40evf_force_wb(struct i40e_vsi *vsi, struct i40e_q_vector *q_vector ...@@ -307,7 +307,8 @@ static void i40evf_force_wb(struct i40e_vsi *vsi, struct i40e_q_vector *q_vector
if (q_vector->arm_wb_state) if (q_vector->arm_wb_state)
return; return;
val = I40E_VFINT_DYN_CTLN1_WB_ON_ITR_MASK; val = I40E_VFINT_DYN_CTLN1_WB_ON_ITR_MASK |
I40E_VFINT_DYN_CTLN1_ITR_INDX_MASK; /* set noitr */
wr32(&vsi->back->hw, wr32(&vsi->back->hw,
I40E_VFINT_DYN_CTLN1(q_vector->v_idx + I40E_VFINT_DYN_CTLN1(q_vector->v_idx +
......
...@@ -38,7 +38,7 @@ static const char i40evf_driver_string[] = ...@@ -38,7 +38,7 @@ static const char i40evf_driver_string[] =
#define DRV_VERSION_MAJOR 1 #define DRV_VERSION_MAJOR 1
#define DRV_VERSION_MINOR 4 #define DRV_VERSION_MINOR 4
#define DRV_VERSION_BUILD 4 #define DRV_VERSION_BUILD 7
#define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \ #define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \
__stringify(DRV_VERSION_MINOR) "." \ __stringify(DRV_VERSION_MINOR) "." \
__stringify(DRV_VERSION_BUILD) \ __stringify(DRV_VERSION_BUILD) \
...@@ -1837,6 +1837,7 @@ static void i40evf_reset_task(struct work_struct *work) ...@@ -1837,6 +1837,7 @@ static void i40evf_reset_task(struct work_struct *work)
break; break;
msleep(I40EVF_RESET_WAIT_MS); msleep(I40EVF_RESET_WAIT_MS);
} }
pci_set_master(adapter->pdev);
/* extra wait to make sure minimum wait is met */ /* extra wait to make sure minimum wait is met */
msleep(I40EVF_RESET_WAIT_MS); msleep(I40EVF_RESET_WAIT_MS);
if (i == I40EVF_RESET_WAIT_COUNT) { if (i == I40EVF_RESET_WAIT_COUNT) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment