* [net-next 01/14] i40e: Fix NPAR Tx Scheduler init
2015-03-05 16:46 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-03-05 Jeff Kirsher
@ 2015-03-05 16:46 ` Jeff Kirsher
2015-03-05 16:46 ` [net-next 02/14] i40e: during LED interaction ignore activity LED src modes Jeff Kirsher
` (13 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-03-05 16:46 UTC (permalink / raw)
To: davem; +Cc: Greg Rose, netdev, nhorman, sassmann, jogreene, Jeff Kirsher
From: Greg Rose <gregory.v.rose@intel.com>
Recent changes to the driver initialization have caused the BW
configurations to not take effect. We use a BW configuration read and
write back to "kick" the Tx scheduler into action.
Change-ID: I94ab377c58d3a3986e3de62b6c199be3fd2ee5e6
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 56bdaff..620dd23 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -7576,6 +7576,10 @@ static int i40e_sw_init(struct i40e_pf *pf)
mutex_init(&pf->switch_mutex);
+ /* If NPAR is enabled nudge the Tx scheduler */
+ if (pf->hw.func_caps.npar_enable && (!i40e_get_npar_bw_setting(pf)))
+ i40e_set_npar_bw_setting(pf);
+
sw_init_done:
return err;
}
--
1.9.3
^ permalink raw reply related [flat|nested] 20+ messages in thread* [net-next 02/14] i40e: during LED interaction ignore activity LED src modes
2015-03-05 16:46 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-03-05 Jeff Kirsher
2015-03-05 16:46 ` [net-next 01/14] i40e: Fix NPAR Tx Scheduler init Jeff Kirsher
@ 2015-03-05 16:46 ` Jeff Kirsher
2015-03-05 16:46 ` [net-next 03/14] i40e: Don't check operational or sync bit for App TLV Jeff Kirsher
` (12 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-03-05 16:46 UTC (permalink / raw)
To: davem; +Cc: Matt Jared, netdev, nhorman, sassmann, jogreene, Jeff Kirsher
From: Matt Jared <matthew.a.jared@intel.com>
Modify our get and set LED functions so they ignore activity LEDs,
as we are required to blink the link LEDs only.
Change-ID: I647ea67a6fc95cbbab6e3cd01d81ec9ae096a9ad
Signed-off-by: Matt Jared <matthew.a.jared@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_common.c | 35 ++++++++++++++++++++++++++-
1 file changed, 34 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index 1da7d05..cc10303 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -1083,8 +1083,11 @@ static u32 i40e_led_is_mine(struct i40e_hw *hw, int idx)
return gpio_val;
}
-#define I40E_LED0 22
+#define I40E_COMBINED_ACTIVITY 0xA
+#define I40E_FILTER_ACTIVITY 0xE
#define I40E_LINK_ACTIVITY 0xC
+#define I40E_MAC_ACTIVITY 0xD
+#define I40E_LED0 22
/**
* i40e_led_get - return current on/off mode
@@ -1097,6 +1100,7 @@ static u32 i40e_led_is_mine(struct i40e_hw *hw, int idx)
**/
u32 i40e_led_get(struct i40e_hw *hw)
{
+ u32 current_mode = 0;
u32 mode = 0;
int i;
@@ -1109,6 +1113,20 @@ u32 i40e_led_get(struct i40e_hw *hw)
if (!gpio_val)
continue;
+ /* ignore gpio LED src mode entries related to the activity
+ * LEDs
+ */
+ current_mode = ((gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK)
+ >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT);
+ switch (current_mode) {
+ case I40E_COMBINED_ACTIVITY:
+ case I40E_FILTER_ACTIVITY:
+ case I40E_MAC_ACTIVITY:
+ continue;
+ default:
+ break;
+ }
+
mode = (gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) >>
I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT;
break;
@@ -1128,6 +1146,7 @@ u32 i40e_led_get(struct i40e_hw *hw)
**/
void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)
{
+ u32 current_mode = 0;
int i;
if (mode & 0xfffffff0)
@@ -1142,6 +1161,20 @@ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)
if (!gpio_val)
continue;
+ /* ignore gpio LED src mode entries related to the activity
+ * LEDs
+ */
+ current_mode = ((gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK)
+ >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT);
+ switch (current_mode) {
+ case I40E_COMBINED_ACTIVITY:
+ case I40E_FILTER_ACTIVITY:
+ case I40E_MAC_ACTIVITY:
+ continue;
+ default:
+ break;
+ }
+
gpio_val &= ~I40E_GLGEN_GPIO_CTL_LED_MODE_MASK;
/* this & is a bit of paranoia, but serves as a range check */
gpio_val |= ((mode << I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT) &
--
1.9.3
^ permalink raw reply related [flat|nested] 20+ messages in thread* [net-next 03/14] i40e: Don't check operational or sync bit for App TLV
2015-03-05 16:46 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-03-05 Jeff Kirsher
2015-03-05 16:46 ` [net-next 01/14] i40e: Fix NPAR Tx Scheduler init Jeff Kirsher
2015-03-05 16:46 ` [net-next 02/14] i40e: during LED interaction ignore activity LED src modes Jeff Kirsher
@ 2015-03-05 16:46 ` Jeff Kirsher
2015-03-05 16:46 ` [net-next 04/14] i40e/i40evf: grab NVM devstarter version not image version Jeff Kirsher
` (11 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-03-05 16:46 UTC (permalink / raw)
To: davem; +Cc: Neerav Parikh, netdev, nhorman, sassmann, jogreene, Jeff Kirsher
From: Neerav Parikh <neerav.parikh@intel.com>
In CEE mode the firmware does not set the operational status bit of
the application TLV status as returned from the "Get CEE DCBX Oper Cfg"
AQ command. This occurs whenever a DCBX configuration is changed.
This is a workaround to remove the check for the operational and sync bits
of the application TLV status till a firmware fix is provided.
Change-ID: I1a31ff2fcadcb06feb5b55776a33593afc6ea176
Signed-off-by: Neerav Parikh <neerav.parikh@intel.com>
Acked-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_dcb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_dcb.c b/drivers/net/ethernet/intel/i40e/i40e_dcb.c
index 3ce4358..6e14667 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_dcb.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_dcb.c
@@ -459,7 +459,7 @@ static void i40e_cee_to_dcb_v1_config(
sync = (status & I40E_TLV_STATUS_SYNC) ? 1 : 0;
oper = (status & I40E_TLV_STATUS_OPER) ? 1 : 0;
/* Add APPs if Error is False and Oper/Sync is True */
- if (!err && sync && oper) {
+ if (!err) {
/* CEE operating configuration supports FCoE/iSCSI/FIP only */
dcbcfg->numapps = I40E_CEE_OPER_MAX_APPS;
--
1.9.3
^ permalink raw reply related [flat|nested] 20+ messages in thread* [net-next 04/14] i40e/i40evf: grab NVM devstarter version not image version
2015-03-05 16:46 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-03-05 Jeff Kirsher
` (2 preceding siblings ...)
2015-03-05 16:46 ` [net-next 03/14] i40e: Don't check operational or sync bit for App TLV Jeff Kirsher
@ 2015-03-05 16:46 ` Jeff Kirsher
2015-03-05 16:46 ` [net-next 05/14] i40e: use more portable sign extension Jeff Kirsher
` (10 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-03-05 16:46 UTC (permalink / raw)
To: davem; +Cc: Shannon Nelson, netdev, nhorman, sassmann, jogreene, Jeff Kirsher
From: Shannon Nelson <shannon.nelson@intel.com>
0x2A is the NVM version so it has useful data but it is per image
version every image can have a different one. 0x18 is the dev starter
version which all the images for release will have the same version.
Of the two 0x18 is more useful and is what should be displayed.
Change-ID: Idf493da13a42ab211e2de0bef287f5de51033cca
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_adminq.c | 3 ++-
drivers/net/ethernet/intel/i40e/i40e_type.h | 2 +-
drivers/net/ethernet/intel/i40evf/i40e_type.h | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq.c b/drivers/net/ethernet/intel/i40e/i40e_adminq.c
index dc2ed35..3e0d200 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_adminq.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq.c
@@ -606,7 +606,8 @@ i40e_status i40e_init_adminq(struct i40e_hw *hw)
goto init_adminq_free_arq;
/* get the NVM version info */
- i40e_read_nvm_word(hw, I40E_SR_NVM_IMAGE_VERSION, &hw->nvm.version);
+ i40e_read_nvm_word(hw, I40E_SR_NVM_DEV_STARTER_VERSION,
+ &hw->nvm.version);
i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_LO, &eetrack_lo);
i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_HI, &eetrack_hi);
hw->nvm.eetrack = (eetrack_hi << 16) | eetrack_lo;
diff --git a/drivers/net/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h
index 9006939..83032d2 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_type.h
@@ -1143,7 +1143,7 @@ struct i40e_hw_port_stats {
#define I40E_SR_EMP_MODULE_PTR 0x0F
#define I40E_SR_PBA_FLAGS 0x15
#define I40E_SR_PBA_BLOCK_PTR 0x16
-#define I40E_SR_NVM_IMAGE_VERSION 0x18
+#define I40E_SR_NVM_DEV_STARTER_VERSION 0x18
#define I40E_SR_NVM_WAKE_ON_LAN 0x19
#define I40E_SR_ALTERNATE_SAN_MAC_ADDRESS_PTR 0x27
#define I40E_SR_NVM_EETRACK_LO 0x2D
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_type.h b/drivers/net/ethernet/intel/i40evf/i40e_type.h
index a269386..eba6e4b 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_type.h
@@ -1116,7 +1116,7 @@ struct i40e_hw_port_stats {
/* Checksum and Shadow RAM pointers */
#define I40E_SR_NVM_CONTROL_WORD 0x00
#define I40E_SR_EMP_MODULE_PTR 0x0F
-#define I40E_SR_NVM_IMAGE_VERSION 0x18
+#define I40E_SR_NVM_DEV_STARTER_VERSION 0x18
#define I40E_SR_NVM_WAKE_ON_LAN 0x19
#define I40E_SR_ALTERNATE_SAN_MAC_ADDRESS_PTR 0x27
#define I40E_SR_NVM_EETRACK_LO 0x2D
--
1.9.3
^ permalink raw reply related [flat|nested] 20+ messages in thread* [net-next 05/14] i40e: use more portable sign extension
2015-03-05 16:46 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-03-05 Jeff Kirsher
` (3 preceding siblings ...)
2015-03-05 16:46 ` [net-next 04/14] i40e/i40evf: grab NVM devstarter version not image version Jeff Kirsher
@ 2015-03-05 16:46 ` Jeff Kirsher
2015-03-05 16:46 ` [net-next 06/14] i40e: fix XPS mask when resetting Jeff Kirsher
` (9 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-03-05 16:46 UTC (permalink / raw)
To: davem
Cc: Jesse Brandeburg, netdev, nhorman, sassmann, jogreene,
Kevin Scott, Jeff Kirsher
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
Use automatic sign extension by replacing 0xffff... constants
with ~(u64)0 or ~(u32)0.
Change-ID: I73cab4cd2611795bb12e00f0f24fafaaee07457c
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Kevin Scott <kevin.c.scott@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c b/drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c
index 4627588..0079ad7 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c
@@ -856,7 +856,7 @@ static void i40e_write_dword(u8 *hmc_bits,
if (ce_info->width < 32)
mask = ((u32)1 << ce_info->width) - 1;
else
- mask = 0xFFFFFFFF;
+ mask = ~(u32)0;
/* don't swizzle the bits until after the mask because the mask bits
* will be in a different bit position on big endian machines
@@ -908,7 +908,7 @@ static void i40e_write_qword(u8 *hmc_bits,
if (ce_info->width < 64)
mask = ((u64)1 << ce_info->width) - 1;
else
- mask = 0xFFFFFFFFFFFFFFFF;
+ mask = ~(u64)0;
/* don't swizzle the bits until after the mask because the mask bits
* will be in a different bit position on big endian machines
--
1.9.3
^ permalink raw reply related [flat|nested] 20+ messages in thread* [net-next 06/14] i40e: fix XPS mask when resetting
2015-03-05 16:46 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-03-05 Jeff Kirsher
` (4 preceding siblings ...)
2015-03-05 16:46 ` [net-next 05/14] i40e: use more portable sign extension Jeff Kirsher
@ 2015-03-05 16:46 ` Jeff Kirsher
2015-03-05 16:46 ` [net-next 07/14] i40e: Reassign incorrect PHY type to fix a FW bug Jeff Kirsher
` (8 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-03-05 16:46 UTC (permalink / raw)
To: davem; +Cc: Jesse Brandeburg, netdev, nhorman, sassmann, jogreene,
Jeff Kirsher
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
During resets (possibly caused by a Tx hang) the driver would
accidentally clear the XPS mask for all queues back to 0.
This caused higher CPU utilization and had some other performance impacts
for transmit tests.
Change-ID: I95f112432c9e643a153eaa31cd28cdcbfdd01831
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 620dd23..a287cc8 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -2399,20 +2399,20 @@ static void i40e_config_xps_tx_ring(struct i40e_ring *ring)
struct i40e_vsi *vsi = ring->vsi;
cpumask_var_t mask;
- if (ring->q_vector && ring->netdev) {
- /* Single TC mode enable XPS */
- if (vsi->tc_config.numtc <= 1 &&
- !test_and_set_bit(__I40E_TX_XPS_INIT_DONE, &ring->state)) {
+ if (!ring->q_vector || !ring->netdev)
+ return;
+
+ /* Single TC mode enable XPS */
+ if (vsi->tc_config.numtc <= 1) {
+ if (!test_and_set_bit(__I40E_TX_XPS_INIT_DONE, &ring->state))
netif_set_xps_queue(ring->netdev,
&ring->q_vector->affinity_mask,
ring->queue_index);
- } else if (alloc_cpumask_var(&mask, GFP_KERNEL)) {
- /* Disable XPS to allow selection based on TC */
- bitmap_zero(cpumask_bits(mask), nr_cpumask_bits);
- netif_set_xps_queue(ring->netdev, mask,
- ring->queue_index);
- free_cpumask_var(mask);
- }
+ } else if (alloc_cpumask_var(&mask, GFP_KERNEL)) {
+ /* Disable XPS to allow selection based on TC */
+ bitmap_zero(cpumask_bits(mask), nr_cpumask_bits);
+ netif_set_xps_queue(ring->netdev, mask, ring->queue_index);
+ free_cpumask_var(mask);
}
}
--
1.9.3
^ permalink raw reply related [flat|nested] 20+ messages in thread* [net-next 07/14] i40e: Reassign incorrect PHY type to fix a FW bug
2015-03-05 16:46 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-03-05 Jeff Kirsher
` (5 preceding siblings ...)
2015-03-05 16:46 ` [net-next 06/14] i40e: fix XPS mask when resetting Jeff Kirsher
@ 2015-03-05 16:46 ` Jeff Kirsher
2015-03-05 16:46 ` [net-next 08/14] i40e: Fix ethtool offline test Jeff Kirsher
` (7 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-03-05 16:46 UTC (permalink / raw)
To: davem; +Cc: Catherine Sullivan, netdev, nhorman, sassmann, jogreene,
Jeff Kirsher
From: Catherine Sullivan <catherine.sullivan@intel.com>
Some FW versions are incorrectly reporting a breakout cable as PHY type
0x3 when it should be 0x16 (I40E_PHY_TYPE_10GBASE_SFPP_CU).
If we get this value back from FW and the version is < 4.40, reassign it
to I40E_PHY_TYPE_10GBASE_SFPP_CU.
Change-ID: Ibb41a0e3cd2c0753744e8553959240df6ed13ae8
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_common.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index cc10303..0bfc82b 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -1481,6 +1481,10 @@ i40e_status i40e_aq_get_link_info(struct i40e_hw *hw,
else
hw_link_info->lse_enable = false;
+ if ((hw->aq.fw_maj_ver < 4 || (hw->aq.fw_maj_ver == 4 &&
+ hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE)
+ hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU;
+
/* save link status information */
if (link)
*link = *hw_link_info;
--
1.9.3
^ permalink raw reply related [flat|nested] 20+ messages in thread* [net-next 08/14] i40e: Fix ethtool offline test
2015-03-05 16:46 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-03-05 Jeff Kirsher
` (6 preceding siblings ...)
2015-03-05 16:46 ` [net-next 07/14] i40e: Reassign incorrect PHY type to fix a FW bug Jeff Kirsher
@ 2015-03-05 16:46 ` Jeff Kirsher
2015-03-05 16:46 ` [net-next 09/14] i40e: Add AOC PHY types to case statements Jeff Kirsher
` (6 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-03-05 16:46 UTC (permalink / raw)
To: davem; +Cc: Greg Rose, netdev, nhorman, sassmann, jogreene, Jeff Kirsher
From: Greg Rose <gregory.v.rose@intel.com>
If the system administrator is requesting an offline diagnostic test using
'ethtool -t' then we should, you know, actually take the device offline
before doing the testing.
Change-ID: I6afa1cbfcc821c9ab6e6f47ed4d8dc2d8dd20e82
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 7413b0e..415aebc 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -1530,6 +1530,7 @@ static void i40e_diag_test(struct net_device *netdev,
struct ethtool_test *eth_test, u64 *data)
{
struct i40e_netdev_priv *np = netdev_priv(netdev);
+ bool if_running = netif_running(netdev);
struct i40e_pf *pf = np->vsi->back;
if (eth_test->flags == ETH_TEST_FL_OFFLINE) {
@@ -1537,6 +1538,12 @@ static void i40e_diag_test(struct net_device *netdev,
netif_info(pf, drv, netdev, "offline testing starting\n");
set_bit(__I40E_TESTING, &pf->state);
+ /* If the device is online then take it offline */
+ if (if_running)
+ /* indicate we're in test mode */
+ dev_close(netdev);
+ else
+ i40e_do_reset(pf, (1 << __I40E_PF_RESET_REQUESTED));
/* Link test performed before hardware reset
* so autoneg doesn't interfere with test result
@@ -1559,6 +1566,9 @@ static void i40e_diag_test(struct net_device *netdev,
clear_bit(__I40E_TESTING, &pf->state);
i40e_do_reset(pf, (1 << __I40E_PF_RESET_REQUESTED));
+
+ if (if_running)
+ dev_open(netdev);
} else {
/* Online tests */
netif_info(pf, drv, netdev, "online testing starting\n");
--
1.9.3
^ permalink raw reply related [flat|nested] 20+ messages in thread* [net-next 09/14] i40e: Add AOC PHY types to case statements
2015-03-05 16:46 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-03-05 Jeff Kirsher
` (7 preceding siblings ...)
2015-03-05 16:46 ` [net-next 08/14] i40e: Fix ethtool offline test Jeff Kirsher
@ 2015-03-05 16:46 ` Jeff Kirsher
2015-03-05 16:46 ` [net-next 10/14] i40e/i40evf: Clean up some formatting and other things Jeff Kirsher
` (5 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-03-05 16:46 UTC (permalink / raw)
To: davem; +Cc: Catherine Sullivan, netdev, nhorman, sassmann, jogreene,
Jeff Kirsher
From: Catherine Sullivan <catherine.sullivan@intel.com>
Add the 10G and 40G AOC PHY types to the case statement in get_media_type
and ethtool get_settings so that the correct information gets reported
back to the user.
Change-ID: I1b4849d22199a9acf7c8807166d0317c1faad375
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_common.c | 2 ++
drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index 0bfc82b..99af788 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -834,6 +834,8 @@ static enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
case I40E_PHY_TYPE_10GBASE_CR1:
case I40E_PHY_TYPE_40GBASE_CR4:
case I40E_PHY_TYPE_10GBASE_SFPP_CU:
+ case I40E_PHY_TYPE_40GBASE_AOC:
+ case I40E_PHY_TYPE_10GBASE_AOC:
media = I40E_MEDIA_TYPE_DA;
break;
case I40E_PHY_TYPE_1000BASE_KX:
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 415aebc..764305e 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -259,6 +259,7 @@ static void i40e_get_settings_link_up(struct i40e_hw *hw,
break;
case I40E_PHY_TYPE_XLAUI:
case I40E_PHY_TYPE_XLPPI:
+ case I40E_PHY_TYPE_40GBASE_AOC:
ecmd->supported = SUPPORTED_40000baseCR4_Full;
break;
case I40E_PHY_TYPE_40GBASE_KR4:
@@ -328,6 +329,7 @@ static void i40e_get_settings_link_up(struct i40e_hw *hw,
case I40E_PHY_TYPE_XFI:
case I40E_PHY_TYPE_SFI:
case I40E_PHY_TYPE_10GBASE_SFPP_CU:
+ case I40E_PHY_TYPE_10GBASE_AOC:
ecmd->supported = SUPPORTED_10000baseT_Full;
break;
case I40E_PHY_TYPE_SGMII:
--
1.9.3
^ permalink raw reply related [flat|nested] 20+ messages in thread* [net-next 10/14] i40e/i40evf: Clean up some formatting and other things
2015-03-05 16:46 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-03-05 Jeff Kirsher
` (8 preceding siblings ...)
2015-03-05 16:46 ` [net-next 09/14] i40e: Add AOC PHY types to case statements Jeff Kirsher
@ 2015-03-05 16:46 ` Jeff Kirsher
2015-03-05 16:46 ` [net-next 11/14] i40e: Ioremap changes Jeff Kirsher
` (4 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-03-05 16:46 UTC (permalink / raw)
To: davem
Cc: Jesse Brandeburg, netdev, nhorman, sassmann, jogreene,
Neerav Parikh, Jeff Kirsher
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
Fix some double blank lines and un-split a function declaration that all
fits on one line. Also make i40e_get_priv_flags static.
Change-ID: I11b5d25d1153a06b286d0d2f5d916d7727c58e4a
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Neerav Parikh <neerav.parikh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_common.c | 1 -
drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 +-
drivers/net/ethernet/intel/i40e/i40e_fcoe.c | 2 --
drivers/net/ethernet/intel/i40e/i40e_fcoe.h | 1 -
drivers/net/ethernet/intel/i40e/i40e_main.c | 1 -
drivers/net/ethernet/intel/i40evf/i40e_common.c | 1 -
drivers/net/ethernet/intel/i40evf/i40e_prototype.h | 3 +--
drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c | 1 -
8 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index 99af788..10f9451 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -541,7 +541,6 @@ struct i40e_rx_ptype_decoded i40e_ptype_lookup[] = {
I40E_PTT_UNUSED_ENTRY(255)
};
-
/**
* i40e_init_shared_code - Initialize the shared code
* @hw: pointer to hardware structure
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 764305e..e045de1 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -2380,7 +2380,7 @@ static int i40e_set_channels(struct net_device *dev,
*
* Returns a u32 bitmap of flags.
**/
-u32 i40e_get_priv_flags(struct net_device *dev)
+static u32 i40e_get_priv_flags(struct net_device *dev)
{
struct i40e_netdev_priv *np = netdev_priv(dev);
struct i40e_vsi *vsi = np->vsi;
diff --git a/drivers/net/ethernet/intel/i40e/i40e_fcoe.c b/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
index 05d883e..0357b31 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
@@ -24,7 +24,6 @@
*
******************************************************************************/
-
#include <linux/if_ether.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
@@ -1447,7 +1446,6 @@ static int i40e_fcoe_set_features(struct net_device *netdev,
return 0;
}
-
static const struct net_device_ops i40e_fcoe_netdev_ops = {
.ndo_open = i40e_open,
.ndo_stop = i40e_close,
diff --git a/drivers/net/ethernet/intel/i40e/i40e_fcoe.h b/drivers/net/ethernet/intel/i40e/i40e_fcoe.h
index 21e0f58..0d49e2d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_fcoe.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_fcoe.h
@@ -37,7 +37,6 @@
#define I40E_FILTER_CONTEXT_DESC(R, i) \
(&(((struct i40e_fcoe_filter_context_desc *)((R)->desc))[i]))
-
/* receive queue descriptor filter status for FCoE */
#define I40E_RX_DESC_FLTSTAT_FCMASK 0x3
#define I40E_RX_DESC_FLTSTAT_NOMTCH 0x0 /* no ddp context match */
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index a287cc8..02b57c3 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -9586,7 +9586,6 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
dev_info(&pdev->dev,
"The driver for the device detected an older version of the NVM image than expected. Please update the NVM image.\n");
-
i40e_verify_eeprom(pf);
/* Rev 0 hardware was never productized */
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_common.c b/drivers/net/ethernet/intel/i40evf/i40e_common.c
index 50b0ee5..0335b3f 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_common.c
@@ -542,7 +542,6 @@ struct i40e_rx_ptype_decoded i40evf_ptype_lookup[] = {
I40E_PTT_UNUSED_ENTRY(255)
};
-
/**
* i40e_aq_send_msg_to_pf
* @hw: pointer to the hardware structure
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_prototype.h b/drivers/net/ethernet/intel/i40evf/i40e_prototype.h
index 9173834..58e37a4 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_prototype.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_prototype.h
@@ -59,8 +59,7 @@ void i40evf_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask,
void i40e_idle_aq(struct i40e_hw *hw);
void i40evf_resume_aq(struct i40e_hw *hw);
bool i40evf_check_asq_alive(struct i40e_hw *hw);
-i40e_status i40evf_aq_queue_shutdown(struct i40e_hw *hw,
- bool unloading);
+i40e_status i40evf_aq_queue_shutdown(struct i40e_hw *hw, bool unloading);
i40e_status i40e_set_mac_type(struct i40e_hw *hw);
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c b/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c
index 681a5d4..b68b731 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c
@@ -29,7 +29,6 @@
#include <linux/uaccess.h>
-
struct i40evf_stats {
char stat_string[ETH_GSTRING_LEN];
int stat_offset;
--
1.9.3
^ permalink raw reply related [flat|nested] 20+ messages in thread* [net-next 11/14] i40e: Ioremap changes
2015-03-05 16:46 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-03-05 Jeff Kirsher
` (9 preceding siblings ...)
2015-03-05 16:46 ` [net-next 10/14] i40e/i40evf: Clean up some formatting and other things Jeff Kirsher
@ 2015-03-05 16:46 ` Jeff Kirsher
2015-03-06 0:16 ` Ben Hutchings
2015-03-05 16:46 ` [net-next 12/14] i40e: move IRQ tracking setup into MSIX setup Jeff Kirsher
` (3 subsequent siblings)
14 siblings, 1 reply; 20+ messages in thread
From: Jeff Kirsher @ 2015-03-05 16:46 UTC (permalink / raw)
To: davem
Cc: Anjali Singhai, netdev, nhorman, sassmann, jogreene,
Jesse Brandeburg, Jeff Kirsher
From: Anjali Singhai <anjali.singhai@intel.com>
For future device support we do not want to map the whole CSR space since some
of it is mapped by other drivers with different mapping methods.
Note: As a side effect, the flash region (if exposed through the memory map)
gets unmapped too since it follows the future use region.
Change-ID: Ic729a2eacd692984220b1a415ff4fa0f98ea419a
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e.h | 1 +
drivers/net/ethernet/intel/i40e/i40e_main.c | 8 ++++++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index c513731..ce3fbb8 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -72,6 +72,7 @@
#define I40E_MAX_NUM_DESCRIPTORS 4096
#define I40E_MAX_REGISTER 0x800000
+#define I40E_MAX_CSR_SPACE (4 * 1024 * 1024 - 64 * 1024)
#define I40E_DEFAULT_NUM_DESCRIPTORS 512
#define I40E_REQ_DESCRIPTOR_MULTIPLE 32
#define I40E_MIN_NUM_DESCRIPTORS 64
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 02b57c3..f769005 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -9459,6 +9459,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
struct i40e_pf *pf;
struct i40e_hw *hw;
static u16 pfs_found;
+ u32 ioremap_len;
u16 link_status;
int err = 0;
u32 len;
@@ -9507,8 +9508,11 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
hw = &pf->hw;
hw->back = pf;
- hw->hw_addr = ioremap(pci_resource_start(pdev, 0),
- pci_resource_len(pdev, 0));
+
+ 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);
if (!hw->hw_addr) {
err = -EIO;
dev_info(&pdev->dev, "ioremap(0x%04x, 0x%04x) failed: 0x%x\n",
--
1.9.3
^ permalink raw reply related [flat|nested] 20+ messages in thread* Re: [net-next 11/14] i40e: Ioremap changes
2015-03-05 16:46 ` [net-next 11/14] i40e: Ioremap changes Jeff Kirsher
@ 2015-03-06 0:16 ` Ben Hutchings
2015-03-06 1:55 ` Jeff Kirsher
0 siblings, 1 reply; 20+ messages in thread
From: Ben Hutchings @ 2015-03-06 0:16 UTC (permalink / raw)
To: Jeff Kirsher
Cc: davem, Anjali Singhai, netdev, nhorman, sassmann, jogreene,
Jesse Brandeburg
[-- Attachment #1: Type: text/plain, Size: 1205 bytes --]
On Thu, 2015-03-05 at 08:46 -0800, Jeff Kirsher wrote:
[...]
> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> @@ -9459,6 +9459,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> struct i40e_pf *pf;
> struct i40e_hw *hw;
> static u16 pfs_found;
> + u32 ioremap_len;
> u16 link_status;
> int err = 0;
> u32 len;
> @@ -9507,8 +9508,11 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>
> hw = &pf->hw;
> hw->back = pf;
> - hw->hw_addr = ioremap(pci_resource_start(pdev, 0),
> - pci_resource_len(pdev, 0));
> +
> + ioremap_len = min_t(int, pci_resource_len(pdev, 0),
> + I40E_MAX_CSR_SPACE);
What type do you really want ioremap_len to be, u32 or int? (I think
the correct answer is unsigned long as that's the ioremap() parameter
type.)
Ben.
> + hw->hw_addr = ioremap(pci_resource_start(pdev, 0), ioremap_len);
> if (!hw->hw_addr) {
> err = -EIO;
> dev_info(&pdev->dev, "ioremap(0x%04x, 0x%04x) failed: 0x%x\n",
--
Ben Hutchings
Time is nature's way of making sure that everything doesn't happen at once.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [net-next 11/14] i40e: Ioremap changes
2015-03-06 0:16 ` Ben Hutchings
@ 2015-03-06 1:55 ` Jeff Kirsher
2015-03-06 2:15 ` David Miller
0 siblings, 1 reply; 20+ messages in thread
From: Jeff Kirsher @ 2015-03-06 1:55 UTC (permalink / raw)
To: Ben Hutchings
Cc: davem, Anjali Singhai, netdev, nhorman, sassmann, jogreene,
Jesse Brandeburg
[-- Attachment #1: Type: text/plain, Size: 1220 bytes --]
On Fri, 2015-03-06 at 00:16 +0000, Ben Hutchings wrote:
> On Thu, 2015-03-05 at 08:46 -0800, Jeff Kirsher wrote:
> [...]
> > --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> > +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> > @@ -9459,6 +9459,7 @@ static int i40e_probe(struct pci_dev *pdev,
> const struct pci_device_id *ent)
> > struct i40e_pf *pf;
> > struct i40e_hw *hw;
> > static u16 pfs_found;
> > + u32 ioremap_len;
> > u16 link_status;
> > int err = 0;
> > u32 len;
> > @@ -9507,8 +9508,11 @@ static int i40e_probe(struct pci_dev *pdev,
> const struct pci_device_id *ent)
> >
> > hw = &pf->hw;
> > hw->back = pf;
> > - hw->hw_addr = ioremap(pci_resource_start(pdev, 0),
> > - pci_resource_len(pdev, 0));
> > +
> > + ioremap_len = min_t(int, pci_resource_len(pdev, 0),
> > + I40E_MAX_CSR_SPACE);
>
> What type do you really want ioremap_len to be, u32 or int? (I think
> the correct answer is unsigned long as that's the ioremap() parameter
> type.)
Yeah, I agree. Once Dave updates his net-next tree with the patches he
has accepted, I will send out a fix.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [net-next 11/14] i40e: Ioremap changes
2015-03-06 1:55 ` Jeff Kirsher
@ 2015-03-06 2:15 ` David Miller
2015-03-06 2:36 ` Jeff Kirsher
0 siblings, 1 reply; 20+ messages in thread
From: David Miller @ 2015-03-06 2:15 UTC (permalink / raw)
To: jeffrey.t.kirsher
Cc: ben, anjali.singhai, netdev, nhorman, sassmann, jogreene,
jesse.brandeburg
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu, 05 Mar 2015 17:55:43 -0800
> Yeah, I agree. Once Dave updates his net-next tree with the patches he
> has accepted, I will send out a fix.
Just push it out now, sorry about that.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [net-next 11/14] i40e: Ioremap changes
2015-03-06 2:15 ` David Miller
@ 2015-03-06 2:36 ` Jeff Kirsher
0 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-03-06 2:36 UTC (permalink / raw)
To: David Miller
Cc: ben, anjali.singhai, netdev, nhorman, sassmann, jogreene,
jesse.brandeburg
[-- Attachment #1: Type: text/plain, Size: 377 bytes --]
On Thu, 2015-03-05 at 21:15 -0500, David Miller wrote:
> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Date: Thu, 05 Mar 2015 17:55:43 -0800
>
> > Yeah, I agree. Once Dave updates his net-next tree with the patches he
> > has accepted, I will send out a fix.
>
> Just push it out now, sorry about that.
Ok, working on it now and will have it sent here soon.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* [net-next 12/14] i40e: move IRQ tracking setup into MSIX setup
2015-03-05 16:46 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-03-05 Jeff Kirsher
` (10 preceding siblings ...)
2015-03-05 16:46 ` [net-next 11/14] i40e: Ioremap changes Jeff Kirsher
@ 2015-03-05 16:46 ` Jeff Kirsher
2015-03-05 16:46 ` [net-next 13/14] i40e: don't spam the system log Jeff Kirsher
` (2 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-03-05 16:46 UTC (permalink / raw)
To: davem; +Cc: Shannon Nelson, netdev, nhorman, sassmann, jogreene, Jeff Kirsher
From: Shannon Nelson <shannon.nelson@intel.com>
Move the IRQ tracking setup and teardown into the same routines that
do the IRQ setup and teardown. This keeps like activities together and
allows us to track exactly the number of vectors reserved from the OS,
which may be fewer than are available from the HW.
Change-ID: I6b2b1a955c5f0ac6b94c3084304ed0b2ea6777cf
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 60 ++++++++++++++---------------
1 file changed, 29 insertions(+), 31 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index f769005..bca62c1 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -3831,6 +3831,8 @@ static void i40e_reset_interrupt_capability(struct i40e_pf *pf)
pci_disable_msix(pf->pdev);
kfree(pf->msix_entries);
pf->msix_entries = NULL;
+ kfree(pf->irq_pile);
+ pf->irq_pile = NULL;
} else if (pf->flags & I40E_FLAG_MSI_ENABLED) {
pci_disable_msi(pf->pdev);
}
@@ -6933,15 +6935,14 @@ static int i40e_reserve_msix_vectors(struct i40e_pf *pf, int vectors)
*
* Work with the OS to set up the MSIX vectors needed.
*
- * Returns 0 on success, negative on failure
+ * Returns the number of vectors reserved or negative on failure
**/
static int i40e_init_msix(struct i40e_pf *pf)
{
- i40e_status err = 0;
struct i40e_hw *hw = &pf->hw;
int other_vecs = 0;
int v_budget, i;
- int vec;
+ int v_actual;
if (!(pf->flags & I40E_FLAG_MSIX_ENABLED))
return -ENODEV;
@@ -6990,9 +6991,9 @@ static int i40e_init_msix(struct i40e_pf *pf)
for (i = 0; i < v_budget; i++)
pf->msix_entries[i].entry = i;
- vec = i40e_reserve_msix_vectors(pf, v_budget);
+ v_actual = i40e_reserve_msix_vectors(pf, v_budget);
- if (vec != v_budget) {
+ if (v_actual != v_budget) {
/* If we have limited resources, we will start with no vectors
* for the special features and then allocate vectors to some
* of these features based on the policy and at the end disable
@@ -7005,22 +7006,24 @@ static int i40e_init_msix(struct i40e_pf *pf)
pf->num_vmdq_msix = 0;
}
- if (vec < I40E_MIN_MSIX) {
+ if (v_actual < I40E_MIN_MSIX) {
pf->flags &= ~I40E_FLAG_MSIX_ENABLED;
kfree(pf->msix_entries);
pf->msix_entries = NULL;
return -ENODEV;
- } else if (vec == I40E_MIN_MSIX) {
+ } else if (v_actual == I40E_MIN_MSIX) {
/* Adjust for minimal MSIX use */
pf->num_vmdq_vsis = 0;
pf->num_vmdq_qps = 0;
pf->num_lan_qps = 1;
pf->num_lan_msix = 1;
- } else if (vec != v_budget) {
+ } else if (v_actual != v_budget) {
+ int vec;
+
/* reserve the misc vector */
- vec--;
+ vec = v_actual - 1;
/* Scale vector usage down */
pf->num_vmdq_msix = 1; /* force VMDqs to only one vector */
@@ -7070,7 +7073,7 @@ static int i40e_init_msix(struct i40e_pf *pf)
pf->flags &= ~I40E_FLAG_FCOE_ENABLED;
}
#endif
- return err;
+ return v_actual;
}
/**
@@ -7147,11 +7150,12 @@ err_out:
**/
static void i40e_init_interrupt_scheme(struct i40e_pf *pf)
{
- int err = 0;
+ int vectors = 0;
+ ssize_t size;
if (pf->flags & I40E_FLAG_MSIX_ENABLED) {
- err = i40e_init_msix(pf);
- if (err) {
+ vectors = i40e_init_msix(pf);
+ if (vectors < 0) {
pf->flags &= ~(I40E_FLAG_MSIX_ENABLED |
#ifdef I40E_FCOE
I40E_FLAG_FCOE_ENABLED |
@@ -7171,18 +7175,26 @@ static void i40e_init_interrupt_scheme(struct i40e_pf *pf)
if (!(pf->flags & I40E_FLAG_MSIX_ENABLED) &&
(pf->flags & I40E_FLAG_MSI_ENABLED)) {
dev_info(&pf->pdev->dev, "MSI-X not available, trying MSI\n");
- err = pci_enable_msi(pf->pdev);
- if (err) {
- dev_info(&pf->pdev->dev, "MSI init failed - %d\n", err);
+ vectors = pci_enable_msi(pf->pdev);
+ if (vectors < 0) {
+ dev_info(&pf->pdev->dev, "MSI init failed - %d\n",
+ vectors);
pf->flags &= ~I40E_FLAG_MSI_ENABLED;
}
+ vectors = 1; /* one MSI or Legacy vector */
}
if (!(pf->flags & (I40E_FLAG_MSIX_ENABLED | I40E_FLAG_MSI_ENABLED)))
dev_info(&pf->pdev->dev, "MSI-X and MSI not available, falling back to Legacy IRQ\n");
+ /* set up vector assignment tracking */
+ size = sizeof(struct i40e_lump_tracking) + (sizeof(u16) * vectors);
+ pf->irq_pile = kzalloc(size, GFP_KERNEL);
+ pf->irq_pile->num_entries = vectors;
+ pf->irq_pile->search_hint = 0;
+
/* track first vector for misc interrupts */
- err = i40e_get_lump(pf, pf->irq_pile, 1, I40E_PILE_VALID_BIT-1);
+ (void)i40e_get_lump(pf, pf->irq_pile, 1, I40E_PILE_VALID_BIT - 1);
}
/**
@@ -7560,18 +7572,6 @@ static int i40e_sw_init(struct i40e_pf *pf)
pf->qp_pile->num_entries = pf->hw.func_caps.num_tx_qp;
pf->qp_pile->search_hint = 0;
- /* set up vector assignment tracking */
- size = sizeof(struct i40e_lump_tracking)
- + (sizeof(u16) * pf->hw.func_caps.num_msix_vectors);
- pf->irq_pile = kzalloc(size, GFP_KERNEL);
- if (!pf->irq_pile) {
- kfree(pf->qp_pile);
- err = -ENOMEM;
- goto sw_init_done;
- }
- pf->irq_pile->num_entries = pf->hw.func_caps.num_msix_vectors;
- pf->irq_pile->search_hint = 0;
-
pf->tx_timeout_recovery_level = 1;
mutex_init(&pf->switch_mutex);
@@ -9840,7 +9840,6 @@ err_configure_lan_hmc:
(void)i40e_shutdown_lan_hmc(hw);
err_init_lan_hmc:
kfree(pf->qp_pile);
- kfree(pf->irq_pile);
err_sw_init:
err_adminq_setup:
(void)i40e_shutdown_adminq(hw);
@@ -9940,7 +9939,6 @@ static void i40e_remove(struct pci_dev *pdev)
}
kfree(pf->qp_pile);
- kfree(pf->irq_pile);
kfree(pf->vsi);
iounmap(pf->hw.hw_addr);
--
1.9.3
^ permalink raw reply related [flat|nested] 20+ messages in thread* [net-next 13/14] i40e: don't spam the system log
2015-03-05 16:46 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-03-05 Jeff Kirsher
` (11 preceding siblings ...)
2015-03-05 16:46 ` [net-next 12/14] i40e: move IRQ tracking setup into MSIX setup Jeff Kirsher
@ 2015-03-05 16:46 ` Jeff Kirsher
2015-03-05 16:46 ` [net-next 14/14] i40e/i40evf: Version bump Jeff Kirsher
2015-03-05 20:54 ` [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-03-05 David Miller
14 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-03-05 16:46 UTC (permalink / raw)
To: davem; +Cc: Mitch A Williams, netdev, nhorman, sassmann, jogreene,
Jeff Kirsher
From: Mitch A Williams <mitch.a.williams@intel.com>
The PF driver spams the system log with messages about VF VSI when VFs
are created, as well as each time they are reset. This is annoying, and
the information isn't even useful most of the time.
Remove this message to reduce user annoyance.
Change-ID: I8de90d05380f54b038c9c8c3265150be87c9242c
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 910c45e..1d8b94d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -403,9 +403,6 @@ static int i40e_alloc_vsi_res(struct i40e_vf *vf, enum i40e_vsi_type type)
u8 brdcast[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
vf->lan_vsi_index = vsi->idx;
vf->lan_vsi_id = vsi->id;
- dev_info(&pf->pdev->dev,
- "VF %d assigned LAN VSI index %d, VSI id %d\n",
- vf->vf_id, vsi->idx, vsi->id);
/* If the port VLAN has been configured and then the
* VF driver was removed then the VSI port VLAN
* configuration was destroyed. Check if there is
--
1.9.3
^ permalink raw reply related [flat|nested] 20+ messages in thread* [net-next 14/14] i40e/i40evf: Version bump
2015-03-05 16:46 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-03-05 Jeff Kirsher
` (12 preceding siblings ...)
2015-03-05 16:46 ` [net-next 13/14] i40e: don't spam the system log Jeff Kirsher
@ 2015-03-05 16:46 ` Jeff Kirsher
2015-03-05 20:54 ` [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-03-05 David Miller
14 siblings, 0 replies; 20+ messages in thread
From: Jeff Kirsher @ 2015-03-05 16:46 UTC (permalink / raw)
To: davem; +Cc: Sravanthi Tangeda, netdev, nhorman, sassmann, jogreene,
Jeff Kirsher
From: Sravanthi Tangeda <sravanthi.tangeda@intel.com>
Bump i40e to 1.2.11 and i40evf to 1.2.5
Change-ID: Ie13375941606b0a027e5b5dbc235f5f5f03b75c8
Signed-off-by: Sravanthi Tangeda <sravanthi.tangeda@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index bca62c1..fb369f7 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[] =
#define DRV_VERSION_MAJOR 1
#define DRV_VERSION_MINOR 2
-#define DRV_VERSION_BUILD 10
+#define DRV_VERSION_BUILD 11
#define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \
__stringify(DRV_VERSION_MINOR) "." \
__stringify(DRV_VERSION_BUILD) DRV_KERN
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index a951358..3d53bb4 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -36,7 +36,7 @@ char i40evf_driver_name[] = "i40evf";
static const char i40evf_driver_string[] =
"Intel(R) XL710/X710 Virtual Function Network Driver";
-#define DRV_VERSION "1.2.4"
+#define DRV_VERSION "1.2.5"
const char i40evf_driver_version[] = DRV_VERSION;
static const char i40evf_copyright[] =
"Copyright (c) 2013 - 2014 Intel Corporation.";
--
1.9.3
^ permalink raw reply related [flat|nested] 20+ messages in thread* Re: [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-03-05
2015-03-05 16:46 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2015-03-05 Jeff Kirsher
` (13 preceding siblings ...)
2015-03-05 16:46 ` [net-next 14/14] i40e/i40evf: Version bump Jeff Kirsher
@ 2015-03-05 20:54 ` David Miller
14 siblings, 0 replies; 20+ messages in thread
From: David Miller @ 2015-03-05 20:54 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, nhorman, sassmann, jogreene
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu, 5 Mar 2015 08:46:18 -0800
> This series contains updates to i40e only.
...
Pulled, thanks Jeff.
^ permalink raw reply [flat|nested] 20+ messages in thread