aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-06-25 20:55:45 -0400
committerDavid S. Miller <davem@davemloft.net>2014-06-25 20:55:45 -0400
commit0b2fda896575f562c7cf297659fff2007984bec4 (patch)
tree1769df5b46b0410f4aed18a796571efb2dfc15de
parenta69f5edb8ba20c87c5f7c96ec40581f9f51f2910 (diff)
parent25941f94ba2dbb0b8e451a917aa12a547994c738 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2014-06-24 This series contains updates to i40e and i40evf. Greg provides a patch to stop the VF device after setting its MAC address. This is due to if the host VMM administrator has changed the VF device's MAC address then the i40e driver needs to halt the VF device so that the administrator will be forced to reload the VF driver so that the VF driver will start using the newly assigned MAC address. Shannon provides several patches for i40e, first makes prep_for_test() a void function since the return value was being ignored for the most part by all its callers. Adds a log warning when the firmware's API minor/major number is not what we expect to assist the user by informing them they may need to update their NVM or SW. Cleans up a stray print message so that it is similar to other print messages. Ensures to set the WoL flag when setting LAA and allow the user to set LAA again. So do not short-circuit the LAA assignment when the driver thinks it has already been done as it is possible that the user might want to force the address setting again. Provides a couple more LAA fixes to ensure the LAA gets restored after resets. Neerav provides a patch for i40e to add a PF reset when a malicious driver event for the PF occurs. As per the specification when the PF driver receives a malicious driver event the queue that caused the event is already stopped and it is expected that the function that owns the queue will reset the queue, but in some cases it may not be possible to determine the queue, so it is suggested to reset the whole function. Carolyn fixes ethtool coalesce settings to allow 0 as a disable value and adds message to user about invalid values. Jesse removes a reserved type which was not removed from the code. Catherine provides a patch to add the ability to enable/disable link from set_link)restart_an() which will make it easy to toggle link without calling set_phy_config() when no other link settings need to change. Anjali provides a patch to ensure we do a PF reset on Tx hang and that way we avoid any Malicious Driver Detect (MDD) events because of a Tx queue disable failure. v2: - fixed the un-needed return in patch 2 based on feedback from Sergei Shtylyov - added punctuation to print statements and code comment based on feedback from Sergei Shtylyov ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e.h2
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_common.c8
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_ethtool.c31
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_main.c125
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_prototype.h3
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_txrx.h1
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_type.h1
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c2
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40e_txrx.h1
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40e_type.h1
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40evf_main.c2
11 files changed, 128 insertions, 49 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index 817e179dc3f9..2ec6e8a11ee1 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -362,6 +362,7 @@ struct i40e_mac_filter {
362 bool is_vf; /* filter belongs to a VF */ 362 bool is_vf; /* filter belongs to a VF */
363 bool is_netdev; /* filter belongs to a netdev */ 363 bool is_netdev; /* filter belongs to a netdev */
364 bool changed; /* filter needs to be sync'd to the HW */ 364 bool changed; /* filter needs to be sync'd to the HW */
365 bool is_laa; /* filter is a Locally Administered Address */
365}; 366};
366 367
367struct i40e_veb { 368struct i40e_veb {
@@ -617,6 +618,7 @@ static inline void i40e_dbg_init(void) {}
617static inline void i40e_dbg_exit(void) {} 618static inline void i40e_dbg_exit(void) {}
618#endif /* CONFIG_DEBUG_FS*/ 619#endif /* CONFIG_DEBUG_FS*/
619void i40e_irq_dynamic_enable(struct i40e_vsi *vsi, int vector); 620void i40e_irq_dynamic_enable(struct i40e_vsi *vsi, int vector);
621void i40e_irq_dynamic_disable(struct i40e_vsi *vsi, int vector);
620void i40e_irq_dynamic_disable_icr0(struct i40e_pf *pf); 622void i40e_irq_dynamic_disable_icr0(struct i40e_pf *pf);
621void i40e_irq_dynamic_enable_icr0(struct i40e_pf *pf); 623void i40e_irq_dynamic_enable_icr0(struct i40e_pf *pf);
622int i40e_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd); 624int i40e_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd);
diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index a51bba634718..bbace40bd114 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -971,12 +971,14 @@ i40e_status i40e_aq_clear_pxe_mode(struct i40e_hw *hw,
971/** 971/**
972 * i40e_aq_set_link_restart_an 972 * i40e_aq_set_link_restart_an
973 * @hw: pointer to the hw struct 973 * @hw: pointer to the hw struct
974 * @enable_link: if true: enable link, if false: disable link
974 * @cmd_details: pointer to command details structure or NULL 975 * @cmd_details: pointer to command details structure or NULL
975 * 976 *
976 * Sets up the link and restarts the Auto-Negotiation over the link. 977 * Sets up the link and restarts the Auto-Negotiation over the link.
977 **/ 978 **/
978i40e_status i40e_aq_set_link_restart_an(struct i40e_hw *hw, 979i40e_status i40e_aq_set_link_restart_an(struct i40e_hw *hw,
979 struct i40e_asq_cmd_details *cmd_details) 980 bool enable_link,
981 struct i40e_asq_cmd_details *cmd_details)
980{ 982{
981 struct i40e_aq_desc desc; 983 struct i40e_aq_desc desc;
982 struct i40e_aqc_set_link_restart_an *cmd = 984 struct i40e_aqc_set_link_restart_an *cmd =
@@ -987,6 +989,10 @@ i40e_status i40e_aq_set_link_restart_an(struct i40e_hw *hw,
987 i40e_aqc_opc_set_link_restart_an); 989 i40e_aqc_opc_set_link_restart_an);
988 990
989 cmd->command = I40E_AQ_PHY_RESTART_AN; 991 cmd->command = I40E_AQ_PHY_RESTART_AN;
992 if (enable_link)
993 cmd->command |= I40E_AQ_PHY_LINK_ENABLE;
994 else
995 cmd->command &= ~I40E_AQ_PHY_LINK_ENABLE;
990 996
991 status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); 997 status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
992 998
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 4a488ffcd6b0..df89b6c3db41 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -1027,9 +1027,10 @@ static int i40e_nway_reset(struct net_device *netdev)
1027 struct i40e_netdev_priv *np = netdev_priv(netdev); 1027 struct i40e_netdev_priv *np = netdev_priv(netdev);
1028 struct i40e_pf *pf = np->vsi->back; 1028 struct i40e_pf *pf = np->vsi->back;
1029 struct i40e_hw *hw = &pf->hw; 1029 struct i40e_hw *hw = &pf->hw;
1030 bool link_up = hw->phy.link_info.link_info & I40E_AQ_LINK_UP;
1030 i40e_status ret = 0; 1031 i40e_status ret = 0;
1031 1032
1032 ret = i40e_aq_set_link_restart_an(hw, NULL); 1033 ret = i40e_aq_set_link_restart_an(hw, link_up, NULL);
1033 if (ret) { 1034 if (ret) {
1034 netdev_info(netdev, "link restart failed, aq_err=%d\n", 1035 netdev_info(netdev, "link restart failed, aq_err=%d\n",
1035 pf->hw.aq.asq_last_status); 1036 pf->hw.aq.asq_last_status);
@@ -1105,17 +1106,36 @@ static int i40e_set_coalesce(struct net_device *netdev,
1105 if (ec->tx_max_coalesced_frames_irq || ec->rx_max_coalesced_frames_irq) 1106 if (ec->tx_max_coalesced_frames_irq || ec->rx_max_coalesced_frames_irq)
1106 vsi->work_limit = ec->tx_max_coalesced_frames_irq; 1107 vsi->work_limit = ec->tx_max_coalesced_frames_irq;
1107 1108
1109 vector = vsi->base_vector;
1108 if ((ec->rx_coalesce_usecs >= (I40E_MIN_ITR << 1)) && 1110 if ((ec->rx_coalesce_usecs >= (I40E_MIN_ITR << 1)) &&
1109 (ec->rx_coalesce_usecs <= (I40E_MAX_ITR << 1))) 1111 (ec->rx_coalesce_usecs <= (I40E_MAX_ITR << 1))) {
1110 vsi->rx_itr_setting = ec->rx_coalesce_usecs; 1112 vsi->rx_itr_setting = ec->rx_coalesce_usecs;
1111 else 1113 } else if (ec->rx_coalesce_usecs == 0) {
1114 vsi->rx_itr_setting = ec->rx_coalesce_usecs;
1115 i40e_irq_dynamic_disable(vsi, vector);
1116 if (ec->use_adaptive_rx_coalesce)
1117 netif_info(pf, drv, netdev,
1118 "Rx-secs=0, need to disable adaptive-Rx for a complete disable\n");
1119 } else {
1120 netif_info(pf, drv, netdev,
1121 "Invalid value, Rx-usecs range is 0, 8-8160\n");
1112 return -EINVAL; 1122 return -EINVAL;
1123 }
1113 1124
1114 if ((ec->tx_coalesce_usecs >= (I40E_MIN_ITR << 1)) && 1125 if ((ec->tx_coalesce_usecs >= (I40E_MIN_ITR << 1)) &&
1115 (ec->tx_coalesce_usecs <= (I40E_MAX_ITR << 1))) 1126 (ec->tx_coalesce_usecs <= (I40E_MAX_ITR << 1))) {
1116 vsi->tx_itr_setting = ec->tx_coalesce_usecs; 1127 vsi->tx_itr_setting = ec->tx_coalesce_usecs;
1117 else 1128 } else if (ec->tx_coalesce_usecs == 0) {
1129 vsi->tx_itr_setting = ec->tx_coalesce_usecs;
1130 i40e_irq_dynamic_disable(vsi, vector);
1131 if (ec->use_adaptive_tx_coalesce)
1132 netif_info(pf, drv, netdev,
1133 "Tx-secs=0, need to disable adaptive-Tx for a complete disable\n");
1134 } else {
1135 netif_info(pf, drv, netdev,
1136 "Invalid value, Tx-usecs range is 0, 8-8160\n");
1118 return -EINVAL; 1137 return -EINVAL;
1138 }
1119 1139
1120 if (ec->use_adaptive_rx_coalesce) 1140 if (ec->use_adaptive_rx_coalesce)
1121 vsi->rx_itr_setting |= I40E_ITR_DYNAMIC; 1141 vsi->rx_itr_setting |= I40E_ITR_DYNAMIC;
@@ -1127,7 +1147,6 @@ static int i40e_set_coalesce(struct net_device *netdev,
1127 else 1147 else
1128 vsi->tx_itr_setting &= ~I40E_ITR_DYNAMIC; 1148 vsi->tx_itr_setting &= ~I40E_ITR_DYNAMIC;
1129 1149
1130 vector = vsi->base_vector;
1131 for (i = 0; i < vsi->num_q_vectors; i++, vector++) { 1150 for (i = 0; i < vsi->num_q_vectors; i++, vector++) {
1132 q_vector = vsi->q_vectors[i]; 1151 q_vector = vsi->q_vectors[i];
1133 q_vector->rx.itr = ITR_TO_REG(vsi->rx_itr_setting); 1152 q_vector->rx.itr = ITR_TO_REG(vsi->rx_itr_setting);
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index b167fc2c4abe..5980d6b3fb1a 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -39,7 +39,7 @@ static const char i40e_driver_string[] =
39 39
40#define DRV_VERSION_MAJOR 0 40#define DRV_VERSION_MAJOR 0
41#define DRV_VERSION_MINOR 4 41#define DRV_VERSION_MINOR 4
42#define DRV_VERSION_BUILD 13 42#define DRV_VERSION_BUILD 17
43#define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \ 43#define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \
44 __stringify(DRV_VERSION_MINOR) "." \ 44 __stringify(DRV_VERSION_MINOR) "." \
45 __stringify(DRV_VERSION_BUILD) DRV_KERN 45 __stringify(DRV_VERSION_BUILD) DRV_KERN
@@ -278,7 +278,7 @@ static void i40e_tx_timeout(struct net_device *netdev)