All of lore.kernel.org
 help / color / mirror / Atom feed
* [net-next 00/14] Intel Wired LAN Driver Updates
@ 2014-02-14 22:57 Aaron Brown
  2014-02-14 22:57 ` [net-next 01/14] i40evf: request reset on tx hang Aaron Brown
                   ` (13 more replies)
  0 siblings, 14 replies; 19+ messages in thread
From: Aaron Brown @ 2014-02-14 22:57 UTC (permalink / raw)
  To: davem; +Cc: Aaron Brown, netdev, gospo, sassmann

This series contains updates to i40e and (mostly to) i40evf.

Mitch provides most the work for this series.  For the vf driver
he requests a reset on a tx hang, removes vlan filtes on close since
we already remove the MAC filters, fixes some crashes, gets rid of 
PCI DAC as it does not mean much on virtualized PCIe parts, skips
assigning the device name that just gets renamed anyway, stores the
descriptor ring size in a manner that allows the use of common tx
and rx code with the PF driver and makes a handful of cosmetic fixes.
For i40e he removes a delay left over from debugging and changes a 
do/while loop to a for loop to avoid hitting another delay each time.

Catherine fixes inconsistent MSI and MSI-X messages and bumps
the driver version.

Mitch Williams (12):
  i40evf: request reset on tx hang
  i40evf: remove VLAN filters on close
  i40evf: fix multiple crashes on remove
  i40evf: get rid of pci_using_dac
  i40evf: fix up strings in init task
  i40evf: remove bogus comment
  i40evf: don't guess device name
  i40evf: store ring size in ring structs
  i40evf: update version and copyright date
  i40evf: remove errant space
  i40e: remove unnecessary delay
  i40e: tighten up ring enable/disable flow

Catherine Sullivan (2):
  i40e: Change MSIX to MSI-X
  i40e and i40evf: Bump driver versions

 drivers/net/ethernet/intel/i40e/i40e_main.c        | 43 ++++++-----
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c |  1 -
 .../net/ethernet/intel/i40evf/i40e_adminq_cmd.h    |  2 +-
 drivers/net/ethernet/intel/i40evf/i40evf.h         |  3 +-
 drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c | 13 ++--
 drivers/net/ethernet/intel/i40evf/i40evf_main.c    | 85 +++++++++++-----------
 .../net/ethernet/intel/i40evf/i40evf_virtchnl.c    | 12 +++
 7 files changed, 85 insertions(+), 74 deletions(-)

-- 
1.8.5.GIT

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [net-next 01/14] i40evf: request reset on tx hang
  2014-02-14 22:57 [net-next 00/14] Intel Wired LAN Driver Updates Aaron Brown
@ 2014-02-14 22:57 ` Aaron Brown
  2014-02-14 22:57 ` [net-next 02/14] i40evf: remove VLAN filters on close Aaron Brown
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 19+ messages in thread
From: Aaron Brown @ 2014-02-14 22:57 UTC (permalink / raw)
  To: davem
  Cc: Mitch Williams, netdev, gospo, sassmann, Jesse Brandeburg, Aaron Brown

From: Mitch Williams <mitch.a.williams@intel.com>

If the kernel watchdog bites us, ask the PF to reset us and attempt to
reinit the driver.

Change-ID: Ic97665aeeed71ce712b9c4f057e78ff8372522b9
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
---
 drivers/net/ethernet/intel/i40evf/i40evf.h          |  1 +
 drivers/net/ethernet/intel/i40evf/i40evf_main.c     | 10 +++++++---
 drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c | 12 ++++++++++++
 3 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf.h b/drivers/net/ethernet/intel/i40evf/i40evf.h
index a30c4a9..ec54ebb 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf.h
+++ b/drivers/net/ethernet/intel/i40evf/i40evf.h
@@ -289,6 +289,7 @@ void i40evf_add_vlans(struct i40evf_adapter *adapter);
 void i40evf_del_vlans(struct i40evf_adapter *adapter);
 void i40evf_set_promiscuous(struct i40evf_adapter *adapter, int flags);
 void i40evf_request_stats(struct i40evf_adapter *adapter);
+void i40evf_request_reset(struct i40evf_adapter *adapter);
 void i40evf_virtchnl_completion(struct i40evf_adapter *adapter,
 				enum i40e_virtchnl_ops v_opcode,
 				i40e_status v_retval, u8 *msg, u16 msglen);
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index fe2271e..1629b73 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -167,9 +167,13 @@ static void i40evf_tx_timeout(struct net_device *netdev)
 	struct i40evf_adapter *adapter = netdev_priv(netdev);
 
 	adapter->tx_timeout_count++;
-
-	/* Do the reset outside of interrupt context */
-	schedule_work(&adapter->reset_task);
+	dev_info(&adapter->pdev->dev, "TX timeout detected.\n");
+	if (!(adapter->flags & I40EVF_FLAG_RESET_PENDING)) {
+		dev_info(&adapter->pdev->dev, "Requesting reset from PF\n");
+		i40evf_request_reset(adapter);
+		adapter->flags |= I40EVF_FLAG_RESET_PENDING;
+		schedule_work(&adapter->reset_task);
+	}
 }
 
 /**
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
index 93891a1..e294f01 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
@@ -654,6 +654,18 @@ void i40evf_request_stats(struct i40evf_adapter *adapter)
 		/* if the request failed, don't lock out others */
 		adapter->current_op = I40E_VIRTCHNL_OP_UNKNOWN;
 }
+/**
+ * i40evf_request_reset
+ * @adapter: adapter structure
+ *
+ * Request that the PF reset this VF. No response is expected.
+ **/
+void i40evf_request_reset(struct i40evf_adapter *adapter)
+{
+	/* Don't check CURRENT_OP - this is always higher priority */
+	i40evf_send_pf_msg(adapter, I40E_VIRTCHNL_OP_RESET_VF, NULL, 0);
+	adapter->current_op = I40E_VIRTCHNL_OP_UNKNOWN;
+}
 
 /**
  * i40evf_virtchnl_completion
-- 
1.8.5.GIT

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 02/14] i40evf: remove VLAN filters on close
  2014-02-14 22:57 [net-next 00/14] Intel Wired LAN Driver Updates Aaron Brown
  2014-02-14 22:57 ` [net-next 01/14] i40evf: request reset on tx hang Aaron Brown
@ 2014-02-14 22:57 ` Aaron Brown
  2014-02-14 22:57 ` [net-next 03/14] i40evf: fix multiple crashes on remove Aaron Brown
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 19+ messages in thread
From: Aaron Brown @ 2014-02-14 22:57 UTC (permalink / raw)
  To: davem
  Cc: Mitch Williams, netdev, gospo, sassmann, Jesse Brandeburg, Aaron Brown

From: Mitch Williams <mitch.a.williams@intel.com>

We remove all the MAC filters, so remove the VLAN filters, too.

Change-ID: I4f7559acdf005dc3f359bf6460ce32d183c8878b
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 1629b73..75a2c6f 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -972,9 +972,14 @@ void i40evf_down(struct i40evf_adapter *adapter)
 	list_for_each_entry(f, &adapter->mac_filter_list, list) {
 		f->remove = true;
 	}
+	/* remove all VLAN filters */
+	list_for_each_entry(f, &adapter->vlan_filter_list, list) {
+		f->remove = true;
+	}
 	if (!(adapter->flags & I40EVF_FLAG_PF_COMMS_FAILED) &&
 	    adapter->state != __I40EVF_RESETTING) {
 		adapter->aq_required |= I40EVF_FLAG_AQ_DEL_MAC_FILTER;
+		adapter->aq_required |= I40EVF_FLAG_AQ_DEL_VLAN_FILTER;
 		/* disable receives */
 		adapter->aq_required |= I40EVF_FLAG_AQ_DISABLE_QUEUES;
 		mod_timer_pending(&adapter->watchdog_timer, jiffies + 1);
-- 
1.8.5.GIT

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 03/14] i40evf: fix multiple crashes on remove
  2014-02-14 22:57 [net-next 00/14] Intel Wired LAN Driver Updates Aaron Brown
  2014-02-14 22:57 ` [net-next 01/14] i40evf: request reset on tx hang Aaron Brown
  2014-02-14 22:57 ` [net-next 02/14] i40evf: remove VLAN filters on close Aaron Brown
@ 2014-02-14 22:57 ` Aaron Brown
  2014-02-14 22:57 ` [net-next 04/14] i40evf: get rid of pci_using_dac Aaron Brown
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 19+ messages in thread
From: Aaron Brown @ 2014-02-14 22:57 UTC (permalink / raw)
  To: davem
  Cc: Mitch Williams, netdev, gospo, sassmann, Jesse Brandeburg, Aaron Brown

From: Mitch Williams <mitch.a.williams@intel.com>

Depending upon the state of the driver, there are several potential
pitfalls on remove. Kill the watchdog task so rmmod doesn't hang.
Check the adapter->msix_entries field, not the num_msix_vectors field,
which is never cleared.

Change-ID: I0546048477f09fc19e481bd37efa30daae4faa88
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 75a2c6f..e0eb27d 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -215,6 +215,9 @@ static void i40evf_irq_disable(struct i40evf_adapter *adapter)
 	int i;
 	struct i40e_hw *hw = &adapter->hw;
 
+	if (!adapter->msix_entries)
+		return;
+
 	for (i = 1; i < adapter->num_msix_vectors; i++) {
 		wr32(hw, I40E_VFINT_DYN_CTLN1(i - 1), 0);
 		synchronize_irq(adapter->msix_entries[i].vector);
@@ -2372,17 +2375,15 @@ static void i40evf_remove(struct pci_dev *pdev)
 	}
 	adapter->state = __I40EVF_REMOVE;
 
-	if (adapter->num_msix_vectors) {
+	if (adapter->msix_entries) {
 		i40evf_misc_irq_disable(adapter);
-		del_timer_sync(&adapter->watchdog_timer);
-
-		flush_scheduled_work();
-
 		i40evf_free_misc_irq(adapter);
-
 		i40evf_reset_interrupt_capability(adapter);
 	}
 
+	del_timer_sync(&adapter->watchdog_timer);
+	flush_scheduled_work();
+
 	if (hw->aq.asq.count)
 		i40evf_shutdown_adminq(hw);
 
-- 
1.8.5.GIT

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 04/14] i40evf: get rid of pci_using_dac
  2014-02-14 22:57 [net-next 00/14] Intel Wired LAN Driver Updates Aaron Brown
                   ` (2 preceding siblings ...)
  2014-02-14 22:57 ` [net-next 03/14] i40evf: fix multiple crashes on remove Aaron Brown
@ 2014-02-14 22:57 ` Aaron Brown
  2014-02-14 22:57 ` [net-next 05/14] i40evf: fix up strings in init task Aaron Brown
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 19+ messages in thread
From: Aaron Brown @ 2014-02-14 22:57 UTC (permalink / raw)
  To: davem
  Cc: Mitch Williams, netdev, gospo, sassmann, Jesse Brandeburg, Aaron Brown

From: Mitch Williams <mitch.a.williams@intel.com>

PCI DAC doesn't really mean much on a virtualized PCI Express part, so
get rid of that check and just always set the HIGHDMA flag in the net
device.

Change-ID: I2040272be0e7934323f470c2bc73fbdd4f93e2b6
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index e0eb27d..e9da5d5 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -2034,8 +2034,8 @@ static void i40evf_init_task(struct work_struct *work)
 	netdev->netdev_ops = &i40evf_netdev_ops;
 	i40evf_set_ethtool_ops(netdev);
 	netdev->watchdog_timeo = 5 * HZ;
-
-	netdev->features |= NETIF_F_SG |
+	netdev->features |= NETIF_F_HIGHDMA |
+			    NETIF_F_SG |
 			    NETIF_F_IP_CSUM |
 			    NETIF_F_SCTP_CSUM |
 			    NETIF_F_IPV6_CSUM |
@@ -2180,20 +2180,18 @@ static int i40evf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	struct net_device *netdev;
 	struct i40evf_adapter *adapter = NULL;
 	struct i40e_hw *hw = NULL;
-	int err, pci_using_dac;
+	int err;
 
 	err = pci_enable_device(pdev);
 	if (err)
 		return err;
 
 	if (!dma_set_mask(&pdev->dev, DMA_BIT_MASK(64))) {
-		pci_using_dac = true;
 		/* coherent mask for the same size will always succeed if
 		 * dma_set_mask does
 		 */
 		dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64));
 	} else if (!dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) {
-		pci_using_dac = false;
 		dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
 	} else {
 		dev_err(&pdev->dev, "%s: DMA configuration failed: %d\n",
@@ -2224,8 +2222,6 @@ static int i40evf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	pci_set_drvdata(pdev, netdev);
 	adapter = netdev_priv(netdev);
-	if (pci_using_dac)
-		netdev->features |= NETIF_F_HIGHDMA;
 
 	adapter->netdev = netdev;
 	adapter->pdev = pdev;
-- 
1.8.5.GIT

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 05/14] i40evf: fix up strings in init task
  2014-02-14 22:57 [net-next 00/14] Intel Wired LAN Driver Updates Aaron Brown
                   ` (3 preceding siblings ...)
  2014-02-14 22:57 ` [net-next 04/14] i40evf: get rid of pci_using_dac Aaron Brown
@ 2014-02-14 22:57 ` Aaron Brown
  2014-02-14 23:43   ` Joe Perches
  2014-02-14 22:58 ` [net-next 06/14] i40evf: remove bogus comment Aaron Brown
                   ` (8 subsequent siblings)
  13 siblings, 1 reply; 19+ messages in thread
From: Aaron Brown @ 2014-02-14 22:57 UTC (permalink / raw)
  To: davem
  Cc: Mitch Williams, netdev, gospo, sassmann, Jesse Brandeburg, Aaron Brown

From: Mitch Williams <mitch.a.williams@intel.com>

Make sure errors are reported at the correct log level, quit printing
the function name every time, and make the messages more consistent in
format.

Change-ID: I50e443467519ad3850def131d84626c50612c611
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 34 ++++++++++++-------------
 1 file changed, 16 insertions(+), 18 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index e9da5d5..682c341 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -1939,14 +1939,14 @@ static void i40evf_init_task(struct work_struct *work)
 		adapter->flags &= ~I40EVF_FLAG_RESET_PENDING;
 		err = i40e_set_mac_type(hw);
 		if (err) {
-			dev_info(&pdev->dev, "%s: set_mac_type failed: %d\n",
-				__func__, err);
+			dev_err(&pdev->dev, "Failed to set MAC type (%d)\n",
+				err);
 		goto err;
 		}
 		err = i40evf_check_reset_complete(hw);
 		if (err) {
-			dev_info(&pdev->dev, "%s: device is still in reset (%d).\n",
-				__func__, err);
+			dev_err(&pdev->dev, "Device is still in reset (%d).\n",
+				err);
 			goto err;
 		}
 		hw->aq.num_arq_entries = I40EVF_AQ_LEN;
@@ -1956,14 +1956,14 @@ static void i40evf_init_task(struct work_struct *work)
 
 		err = i40evf_init_adminq(hw);
 		if (err) {
-			dev_info(&pdev->dev, "%s: init_adminq failed: %d\n",
-				__func__, err);
+			dev_err(&pdev->dev, "Failed to init Admin Queue (%d)\n",
+				err);
 			goto err;
 		}
 		err = i40evf_send_api_ver(adapter);
 		if (err) {
-			dev_info(&pdev->dev, "%s: unable to send to PF (%d)\n",
-				__func__, err);
+			dev_err(&pdev->dev, "Unable to send to PF (%d)\n",
+				err);
 			i40evf_shutdown_adminq(hw);
 			goto err;
 		}
@@ -1977,13 +1977,13 @@ static void i40evf_init_task(struct work_struct *work)
 		/* aq msg sent, awaiting reply */
 		err = i40evf_verify_api_ver(adapter);
 		if (err) {
-			dev_err(&pdev->dev, "Unable to verify API version, error %d\n",
+			dev_err(&pdev->dev, "Unable to verify API version (%d)\n",
 				err);
 			goto err;
 		}
 		err = i40evf_send_vf_config_msg(adapter);
 		if (err) {
-			dev_err(&pdev->dev, "Unable send config request, error %d\n",
+			dev_err(&pdev->dev, "Unable send config request (%d)\n",
 				err);
 			goto err;
 		}
@@ -1998,8 +1998,7 @@ static void i40evf_init_task(struct work_struct *work)
 				 sizeof(struct i40e_virtchnl_vsi_resource));
 			adapter->vf_res = kzalloc(bufsz, GFP_KERNEL);
 			if (!adapter->vf_res) {
-				dev_err(&pdev->dev, "%s: unable to allocate memory\n",
-					__func__);
+				dev_err(&pdev->dev, "Unable to allocate memory for vf resources.\n");
 				goto err;
 			}
 		}
@@ -2007,8 +2006,8 @@ static void i40evf_init_task(struct work_struct *work)
 		if (err == I40E_ERR_ADMIN_QUEUE_NO_WORK)
 			goto restart;
 		if (err) {
-			dev_info(&pdev->dev, "%s: unable to get VF config (%d)\n",
-				__func__, err);
+			dev_err(&pdev->dev, "Unable to get VF config (%d)\n",
+				err);
 			goto err_alloc;
 		}
 		adapter->state = __I40EVF_INIT_SW;
@@ -2022,7 +2021,7 @@ static void i40evf_init_task(struct work_struct *work)
 			adapter->vsi_res = &adapter->vf_res->vsi_res[i];
 	}
 	if (!adapter->vsi_res) {
-		dev_info(&pdev->dev, "%s: no LAN VSI found\n", __func__);
+		dev_err(&pdev->dev, "No LAN VSI found.\n");
 		goto err_alloc;
 	}
 
@@ -2053,9 +2052,8 @@ static void i40evf_init_task(struct work_struct *work)
 
 	/* The HW MAC address was set and/or determined in sw_init */
 	if (!is_valid_ether_addr(adapter->hw.mac.addr)) {
-		dev_info(&pdev->dev,
-			"Invalid MAC address %pMAC, using random\n",
-			adapter->hw.mac.addr);
+		dev_info(&pdev->dev, "Invalid MAC address %pMAC, using random.\n",
+			 adapter->hw.mac.addr);
 		random_ether_addr(adapter->hw.mac.addr);
 	}
 	memcpy(netdev->dev_addr, adapter->hw.mac.addr, netdev->addr_len);
-- 
1.8.5.GIT

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 06/14] i40evf: remove bogus comment
  2014-02-14 22:57 [net-next 00/14] Intel Wired LAN Driver Updates Aaron Brown
                   ` (4 preceding siblings ...)
  2014-02-14 22:57 ` [net-next 05/14] i40evf: fix up strings in init task Aaron Brown
@ 2014-02-14 22:58 ` Aaron Brown
  2014-02-14 22:58 ` [net-next 07/14] i40evf: don't guess device name Aaron Brown
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 19+ messages in thread
From: Aaron Brown @ 2014-02-14 22:58 UTC (permalink / raw)
  To: davem
  Cc: Mitch Williams, netdev, gospo, sassmann, Jesse Brandeburg, Aaron Brown

From: Mitch Williams <mitch.a.williams@intel.com>

This comment is simply not true.

Change-ID: If006b02b60984601a24257a951ae873dff568008
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 682c341..a64570e 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -2050,7 +2050,6 @@ static void i40evf_init_task(struct work_struct *work)
 				    NETIF_F_HW_VLAN_CTAG_FILTER;
 	}
 
-	/* The HW MAC address was set and/or determined in sw_init */
 	if (!is_valid_ether_addr(adapter->hw.mac.addr)) {
 		dev_info(&pdev->dev, "Invalid MAC address %pMAC, using random.\n",
 			 adapter->hw.mac.addr);
-- 
1.8.5.GIT

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 07/14] i40evf: don't guess device name
  2014-02-14 22:57 [net-next 00/14] Intel Wired LAN Driver Updates Aaron Brown
                   ` (5 preceding siblings ...)
  2014-02-14 22:58 ` [net-next 06/14] i40evf: remove bogus comment Aaron Brown
@ 2014-02-14 22:58 ` Aaron Brown
  2014-02-14 22:58 ` [net-next 08/14] i40evf: store ring size in ring structs Aaron Brown
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 19+ messages in thread
From: Aaron Brown @ 2014-02-14 22:58 UTC (permalink / raw)
  To: davem
  Cc: Mitch Williams, netdev, gospo, sassmann, Jesse Brandeburg, Aaron Brown

From: Mitch Williams <mitch.a.williams@intel.com>

We don't need to set an interface name here; the net core will do
that, and then it will get renamed by udev anyway.

Change-ID: I839a17837d19bedd1f490bff32ac5b85b4bfd97f
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index a64570e..4a75e84 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -2086,8 +2086,6 @@ static void i40evf_init_task(struct work_struct *work)
 
 	netif_carrier_off(netdev);
 
-	strcpy(netdev->name, "eth%d");
-
 	adapter->vsi.id = adapter->vsi_res->vsi_id;
 	adapter->vsi.seid = adapter->vsi_res->vsi_id; /* dummy */
 	adapter->vsi.back = adapter;
-- 
1.8.5.GIT

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 08/14] i40evf: store ring size in ring structs
  2014-02-14 22:57 [net-next 00/14] Intel Wired LAN Driver Updates Aaron Brown
                   ` (6 preceding siblings ...)
  2014-02-14 22:58 ` [net-next 07/14] i40evf: don't guess device name Aaron Brown
@ 2014-02-14 22:58 ` Aaron Brown
  2014-02-16  9:13   ` Govindarajulu Varadarajan
  2014-02-14 22:58 ` [net-next 09/14] i40evf: update version and copyright date Aaron Brown
                   ` (5 subsequent siblings)
  13 siblings, 1 reply; 19+ messages in thread
From: Aaron Brown @ 2014-02-14 22:58 UTC (permalink / raw)
  To: davem
  Cc: Mitch Williams, netdev, gospo, sassmann, Jesse Brandeburg, Aaron Brown

From: Mitch Williams <mitch.a.williams@intel.com>

Keep the descriptor ring size in the actual ring structs instead of in
the adapter struct. This enables us to use common tx and rx code with
the i40e PF driver.

Also update copyrights.

Change-ID: I2861e599b2b4c76441c062ea14400f4750f54d0e
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
---
 drivers/net/ethernet/intel/i40evf/i40evf.h         |  2 --
 drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c | 13 ++++++++-----
 drivers/net/ethernet/intel/i40evf/i40evf_main.c    |  3 ---
 3 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf.h b/drivers/net/ethernet/intel/i40evf/i40evf.h
index ec54ebb..827b79f 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf.h
+++ b/drivers/net/ethernet/intel/i40evf/i40evf.h
@@ -198,8 +198,6 @@ struct i40evf_adapter {
 
 	/* RX */
 	struct i40e_ring *rx_rings[I40E_MAX_VSI_QP];
-	int txd_count;
-	int rxd_count;
 	u64 hw_csum_rx_error;
 	int num_msix_vectors;
 	struct msix_entry *msix_entries;
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c b/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c
index b0b1f4b..8b0db1c 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Intel Ethernet Controller XL710 Family Linux Virtual Function Driver
- * Copyright(c) 2013 Intel Corporation.
+ * Copyright(c) 2013 - 2014 Intel Corporation.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -241,6 +241,7 @@ static int i40evf_set_ringparam(struct net_device *netdev,
 {
 	struct i40evf_adapter *adapter = netdev_priv(netdev);
 	u32 new_rx_count, new_tx_count;
+	int i;
 
 	if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending))
 		return -EINVAL;
@@ -256,12 +257,14 @@ static int i40evf_set_ringparam(struct net_device *netdev,
 	new_rx_count = ALIGN(new_rx_count, I40EVF_REQ_DESCRIPTOR_MULTIPLE);
 
 	/* if nothing to do return success */
-	if ((new_tx_count == adapter->txd_count) &&
-	    (new_rx_count == adapter->rxd_count))
+	if ((new_tx_count == adapter->tx_rings[0]->count) &&
+	    (new_rx_count == adapter->rx_rings[0]->count))
 		return 0;
 
-	adapter->txd_count = new_tx_count;
-	adapter->rxd_count = new_rx_count;
+	for (i = 0; i < adapter->vsi_res->num_queue_pairs; i++) {
+		adapter->tx_rings[0]->count = new_tx_count;
+		adapter->rx_rings[0]->count = new_rx_count;
+	}
 
 	if (netif_running(netdev))
 		i40evf_reinit_locked(adapter);
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 4a75e84..6b844af 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -2027,9 +2027,6 @@ static void i40evf_init_task(struct work_struct *work)
 
 	adapter->flags |= I40EVF_FLAG_RX_CSUM_ENABLED;
 
-	adapter->txd_count = I40EVF_DEFAULT_TXD;
-	adapter->rxd_count = I40EVF_DEFAULT_RXD;
-
 	netdev->netdev_ops = &i40evf_netdev_ops;
 	i40evf_set_ethtool_ops(netdev);
 	netdev->watchdog_timeo = 5 * HZ;
-- 
1.8.5.GIT

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 09/14] i40evf: update version and copyright date
  2014-02-14 22:57 [net-next 00/14] Intel Wired LAN Driver Updates Aaron Brown
                   ` (7 preceding siblings ...)
  2014-02-14 22:58 ` [net-next 08/14] i40evf: store ring size in ring structs Aaron Brown
@ 2014-02-14 22:58 ` Aaron Brown
  2014-02-14 22:58 ` [net-next 10/14] i40evf: remove errant space Aaron Brown
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 19+ messages in thread
From: Aaron Brown @ 2014-02-14 22:58 UTC (permalink / raw)
  To: davem
  Cc: Mitch Williams, netdev, gospo, sassmann, Jesse Brandeburg, Aaron Brown

From: Mitch Williams <mitch.a.williams@intel.com>

A bunch of changes merit a new version number, and since these were
made in the new year, update the copyright date.

Change-ID: Ic3f282bf0c20679b9fb06860211afa7c78055bc2
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 6b844af..5bcbdcc 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -31,10 +31,10 @@ char i40evf_driver_name[] = "i40evf";
 static const char i40evf_driver_string[] =
 	"Intel(R) XL710 X710 Virtual Function Network Driver";
 
-#define DRV_VERSION "0.9.11"
+#define DRV_VERSION "0.9.12"
 const char i40evf_driver_version[] = DRV_VERSION;
 static const char i40evf_copyright[] =
-	"Copyright (c) 2013 Intel Corporation.";
+	"Copyright (c) 2013 - 2014 Intel Corporation.";
 
 /* i40evf_pci_tbl - PCI Device ID Table
  *
-- 
1.8.5.GIT

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 10/14] i40evf: remove errant space
  2014-02-14 22:57 [net-next 00/14] Intel Wired LAN Driver Updates Aaron Brown
                   ` (8 preceding siblings ...)
  2014-02-14 22:58 ` [net-next 09/14] i40evf: update version and copyright date Aaron Brown
@ 2014-02-14 22:58 ` Aaron Brown
  2014-02-14 22:58 ` [net-next 11/14] i40e: remove unnecessary delay Aaron Brown
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 19+ messages in thread
From: Aaron Brown @ 2014-02-14 22:58 UTC (permalink / raw)
  To: davem; +Cc: Mitch A Williams, netdev, gospo, sassmann, Aaron Brown

From: Mitch A Williams <mitch.a.williams@intel.com>

Remove a bogus space.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
---
 drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
index f7cea1b..97662b6 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
@@ -1229,7 +1229,7 @@ struct i40e_aqc_add_remove_cloud_filters_element_data {
 #define I40E_AQC_ADD_CLOUD_TNL_TYPE_NGE                 2
 #define I40E_AQC_ADD_CLOUD_TNL_TYPE_IP                  3
 
-	__le32 tenant_id ;
+	__le32 tenant_id;
 	u8     reserved[4];
 	__le16 queue_number;
 #define I40E_AQC_ADD_CLOUD_QUEUE_SHIFT                  0
-- 
1.8.5.GIT

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 11/14] i40e: remove unnecessary delay
  2014-02-14 22:57 [net-next 00/14] Intel Wired LAN Driver Updates Aaron Brown
                   ` (9 preceding siblings ...)
  2014-02-14 22:58 ` [net-next 10/14] i40evf: remove errant space Aaron Brown
@ 2014-02-14 22:58 ` Aaron Brown
  2014-02-14 22:58 ` [net-next 12/14] i40e: tighten up ring enable/disable flow Aaron Brown
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 19+ messages in thread
From: Aaron Brown @ 2014-02-14 22:58 UTC (permalink / raw)
  To: davem
  Cc: Mitch Williams, netdev, gospo, sassmann, Jesse Brandeburg, Aaron Brown

From: Mitch Williams <mitch.a.williams@intel.com>

Ain't nothing gonna break my stride, nobody's gonna slow me down,
oh no. I got to keep on moving.

This was originally put in for debugging just-in-case purposes
and never removed.

Change-ID: Ic12c2e179c3923f54e6ba0a9e4ab05d25c3bab29
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 7d133fa..189e250 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -671,7 +671,6 @@ void i40e_reset_vf(struct i40e_vf *vf, bool flr)
 complete_reset:
 	/* reallocate vf resources to reset the VSI state */
 	i40e_free_vf_res(vf);
-	mdelay(10);
 	i40e_alloc_vf_res(vf);
 	i40e_enable_vf_mappings(vf);
 	set_bit(I40E_VF_STAT_ACTIVE, &vf->vf_states);
-- 
1.8.5.GIT

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 12/14] i40e: tighten up ring enable/disable flow
  2014-02-14 22:57 [net-next 00/14] Intel Wired LAN Driver Updates Aaron Brown
                   ` (10 preceding siblings ...)
  2014-02-14 22:58 ` [net-next 11/14] i40e: remove unnecessary delay Aaron Brown
@ 2014-02-14 22:58 ` Aaron Brown
  2014-02-14 22:58 ` [net-next 13/14] i40e: Change MSIX to MSI-X Aaron Brown
  2014-02-14 22:58 ` [net-next 14/14] i40e and i40evf: Bump driver versions Aaron Brown
  13 siblings, 0 replies; 19+ messages in thread
From: Aaron Brown @ 2014-02-14 22:58 UTC (permalink / raw)
  To: davem
  Cc: Mitch Williams, netdev, gospo, sassmann, Jesse Brandeburg, Aaron Brown

From: Mitch Williams <mitch.a.williams@intel.com>

Change the do/while to a for loop, so we don't hit the delay each
time, even when the register is ready for action.
Don't bother to set or clear the QENA_STAT bit as it is
read-only.

Change-ID: Ie464718804dd79f6d726f291caa9b0c872b49978
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 32 ++++++++++++++---------------
 1 file changed, 15 insertions(+), 17 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 628e917..4a19073 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -3108,13 +3108,13 @@ static int i40e_vsi_control_tx(struct i40e_vsi *vsi, bool enable)
 
 	pf_q = vsi->base_queue;
 	for (i = 0; i < vsi->num_queue_pairs; i++, pf_q++) {
-		j = 1000;
-		do {
-			usleep_range(1000, 2000);
+		for (j = 0; j < 50; j++) {
 			tx_reg = rd32(hw, I40E_QTX_ENA(pf_q));
-		} while (j-- && ((tx_reg >> I40E_QTX_ENA_QENA_REQ_SHIFT)
-			       ^ (tx_reg >> I40E_QTX_ENA_QENA_STAT_SHIFT)) & 1);
-
+			if (((tx_reg >> I40E_QTX_ENA_QENA_REQ_SHIFT) & 1) ==
+			    ((tx_reg >> I40E_QTX_ENA_QENA_STAT_SHIFT) & 1))
+				break;
+			usleep_range(1000, 2000);
+		}
 		/* Skip if the queue is already in the requested state */
 		if (enable && (tx_reg & I40E_QTX_ENA_QENA_STAT_MASK))
 			continue;
@@ -3124,8 +3124,7 @@ static int i40e_vsi_control_tx(struct i40e_vsi *vsi, bool enable)
 		/* turn on/off the queue */
 		if (enable) {
 			wr32(hw, I40E_QTX_HEAD(pf_q), 0);
-			tx_reg |= I40E_QTX_ENA_QENA_REQ_MASK |
-				  I40E_QTX_ENA_QENA_STAT_MASK;
+			tx_reg |= I40E_QTX_ENA_QENA_REQ_MASK;
 		} else {
 			tx_reg &= ~I40E_QTX_ENA_QENA_REQ_MASK;
 		}
@@ -3172,12 +3171,13 @@ static int i40e_vsi_control_rx(struct i40e_vsi *vsi, bool enable)
 
 	pf_q = vsi->base_queue;
 	for (i = 0; i < vsi->num_queue_pairs; i++, pf_q++) {
-		j = 1000;
-		do {
-			usleep_range(1000, 2000);
+		for (j = 0; j < 50; j++) {
 			rx_reg = rd32(hw, I40E_QRX_ENA(pf_q));
-		} while (j-- && ((rx_reg >> I40E_QRX_ENA_QENA_REQ_SHIFT)
-			       ^ (rx_reg >> I40E_QRX_ENA_QENA_STAT_SHIFT)) & 1);
+			if (((rx_reg >> I40E_QRX_ENA_QENA_REQ_SHIFT) & 1) ==
+			    ((rx_reg >> I40E_QRX_ENA_QENA_STAT_SHIFT) & 1))
+				break;
+			usleep_range(1000, 2000);
+		}
 
 		if (enable) {
 			/* is STAT set ? */
@@ -3191,11 +3191,9 @@ static int i40e_vsi_control_rx(struct i40e_vsi *vsi, bool enable)
 
 		/* turn on/off the queue */
 		if (enable)
-			rx_reg |= I40E_QRX_ENA_QENA_REQ_MASK |
-				  I40E_QRX_ENA_QENA_STAT_MASK;
+			rx_reg |= I40E_QRX_ENA_QENA_REQ_MASK;
 		else
-			rx_reg &= ~(I40E_QRX_ENA_QENA_REQ_MASK |
-				  I40E_QRX_ENA_QENA_STAT_MASK);
+			rx_reg &= ~I40E_QRX_ENA_QENA_REQ_MASK;
 		wr32(hw, I40E_QRX_ENA(pf_q), rx_reg);
 
 		/* wait for the change to finish */
-- 
1.8.5.GIT

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 13/14] i40e: Change MSIX to MSI-X
  2014-02-14 22:57 [net-next 00/14] Intel Wired LAN Driver Updates Aaron Brown
                   ` (11 preceding siblings ...)
  2014-02-14 22:58 ` [net-next 12/14] i40e: tighten up ring enable/disable flow Aaron Brown
@ 2014-02-14 22:58 ` Aaron Brown
  2014-02-14 22:58 ` [net-next 14/14] i40e and i40evf: Bump driver versions Aaron Brown
  13 siblings, 0 replies; 19+ messages in thread
From: Aaron Brown @ 2014-02-14 22:58 UTC (permalink / raw)
  To: davem
  Cc: Catherine Sullivan, netdev, gospo, sassmann, Jesse Brandeburg,
	Aaron Brown

From: Catherine Sullivan <catherine.sullivan@intel.com>

Fix inconsistent use of MSIX and MSI-X in messages.

Change-ID: Iae9ffb42819677c34544719044ed77632e06147d
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c     | 9 +++++----
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 3 ++-
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 4a19073..7562af7 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -5946,7 +5946,7 @@ static int i40e_init_msix(struct i40e_pf *pf)
 
 	} else if (vec == I40E_MIN_MSIX) {
 		/* Adjust for minimal MSIX use */
-		dev_info(&pf->pdev->dev, "Features disabled, not enough MSIX vectors\n");
+		dev_info(&pf->pdev->dev, "Features disabled, not enough MSI-X vectors\n");
 		pf->flags &= ~I40E_FLAG_VMDQ_ENABLED;
 		pf->num_vmdq_vsis = 0;
 		pf->num_vmdq_qps = 0;
@@ -6075,7 +6075,7 @@ 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, "MSIX not available, trying MSI\n");
+		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);
@@ -6084,7 +6084,7 @@ static void i40e_init_interrupt_scheme(struct i40e_pf *pf)
 	}
 
 	if (!(pf->flags & (I40E_FLAG_MSIX_ENABLED | I40E_FLAG_MSI_ENABLED)))
-		dev_info(&pf->pdev->dev, "MSIX and MSI not available, falling back to Legacy IRQ\n");
+		dev_info(&pf->pdev->dev, "MSI-X and MSI not available, falling back to Legacy IRQ\n");
 
 	/* track first vector for misc interrupts */
 	err = i40e_get_lump(pf, pf->irq_pile, 1, I40E_PILE_VALID_BIT-1);
@@ -6111,7 +6111,8 @@ static int i40e_setup_misc_vector(struct i40e_pf *pf)
 				  i40e_intr, 0, pf->misc_int_name, pf);
 		if (err) {
 			dev_info(&pf->pdev->dev,
-				 "request_irq for msix_misc failed: %d\n", err);
+				 "request_irq for %s failed: %d\n",
+				 pf->misc_int_name, err);
 			return -EFAULT;
 		}
 	}
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 5bcbdcc..e0d2799 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -524,7 +524,8 @@ static int i40evf_request_misc_irq(struct i40evf_adapter *adapter)
 			  adapter->misc_vector_name, netdev);
 	if (err) {
 		dev_err(&adapter->pdev->dev,
-			"request_irq for msix_aq failed: %d\n", err);
+			"request_irq for %s failed: %d\n",
+			adapter->misc_vector_name, err);
 		free_irq(adapter->msix_entries[0].vector, netdev);
 	}
 	return err;
-- 
1.8.5.GIT

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [net-next 14/14] i40e and i40evf: Bump driver versions
  2014-02-14 22:57 [net-next 00/14] Intel Wired LAN Driver Updates Aaron Brown
                   ` (12 preceding siblings ...)
  2014-02-14 22:58 ` [net-next 13/14] i40e: Change MSIX to MSI-X Aaron Brown
@ 2014-02-14 22:58 ` Aaron Brown
  13 siblings, 0 replies; 19+ messages in thread
From: Aaron Brown @ 2014-02-14 22:58 UTC (permalink / raw)
  To: davem
  Cc: Catherine Sullivan, netdev, gospo, sassmann, Jesse Brandeburg,
	Aaron Brown

From: Catherine Sullivan <catherine.sullivan@intel.com>

Update the driver versions.

Change-ID: I3fe23024d17da0e614ce126edb365bb2c428d482
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@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 7562af7..2d9168e 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -38,7 +38,7 @@ static const char i40e_driver_string[] =
 
 #define DRV_VERSION_MAJOR 0
 #define DRV_VERSION_MINOR 3
-#define DRV_VERSION_BUILD 31
+#define DRV_VERSION_BUILD 32
 #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 e0d2799..a1bfff9 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -31,7 +31,7 @@ char i40evf_driver_name[] = "i40evf";
 static const char i40evf_driver_string[] =
 	"Intel(R) XL710 X710 Virtual Function Network Driver";
 
-#define DRV_VERSION "0.9.12"
+#define DRV_VERSION "0.9.13"
 const char i40evf_driver_version[] = DRV_VERSION;
 static const char i40evf_copyright[] =
 	"Copyright (c) 2013 - 2014 Intel Corporation.";
-- 
1.8.5.GIT

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [net-next 05/14] i40evf: fix up strings in init task
  2014-02-14 22:57 ` [net-next 05/14] i40evf: fix up strings in init task Aaron Brown
@ 2014-02-14 23:43   ` Joe Perches
  2014-02-14 23:53     ` Williams, Mitch A
  0 siblings, 1 reply; 19+ messages in thread
From: Joe Perches @ 2014-02-14 23:43 UTC (permalink / raw)
  To: Aaron Brown
  Cc: davem, Mitch Williams, netdev, gospo, sassmann, Jesse Brandeburg

On Fri, 2014-02-14 at 14:57 -0800, Aaron Brown wrote:
> From: Mitch Williams <mitch.a.williams@intel.com>

Hello.

> Make sure errors are reported at the correct log level, quit printing
> the function name every time, and make the messages more consistent in
> format.

> diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
[]
> @@ -1939,14 +1939,14 @@ static void i40evf_init_task(struct work_struct *work)
>  		adapter->flags &= ~I40EVF_FLAG_RESET_PENDING;
>  		err = i40e_set_mac_type(hw);
>  		if (err) {
> -			dev_info(&pdev->dev, "%s: set_mac_type failed: %d\n",
> -				__func__, err);
> +			dev_err(&pdev->dev, "Failed to set MAC type (%d)\n",
> +				err);
>  		goto err;
>  		}
>  		err = i40evf_check_reset_complete(hw);
>  		if (err) {
> -			dev_info(&pdev->dev, "%s: device is still in reset (%d).\n",
> -				__func__, err);
> +			dev_err(&pdev->dev, "Device is still in reset (%d).\n",
> +				err);


Look at the lines above and below here.

If you're going to be consistent, can you please
remove the unnecessary period before the newline.

>  			goto err;
>  		}
>  		hw->aq.num_arq_entries = I40EVF_AQ_LEN;
> @@ -1956,14 +1956,14 @@ static void i40evf_init_task(struct work_struct *work)
>  
>  		err = i40evf_init_adminq(hw);
>  		if (err) {
> -			dev_info(&pdev->dev, "%s: init_adminq failed: %d\n",
> -				__func__, err);
> +			dev_err(&pdev->dev, "Failed to init Admin Queue (%d)\n",
> +				err);
>  			goto err;
>  		}
>  		err = i40evf_send_api_ver(adapter);
>  		if (err) {
> -			dev_info(&pdev->dev, "%s: unable to send to PF (%d)\n",
> -				__func__, err);
> +			dev_err(&pdev->dev, "Unable to send to PF (%d)\n",
> +				err);
>  			i40evf_shutdown_adminq(hw);
>  			goto err;
>  		}

[]

> @@ -1998,8 +1998,7 @@ static void i40evf_init_task(struct work_struct *work)
>  				 sizeof(struct i40e_virtchnl_vsi_resource));
>  			adapter->vf_res = kzalloc(bufsz, GFP_KERNEL);
>  			if (!adapter->vf_res) {
> -				dev_err(&pdev->dev, "%s: unable to allocate memory\n",
> -					__func__);
> +				dev_err(&pdev->dev, "Unable to allocate memory for vf resources.\n");

Unnecessary OOM.
Allocs failures already have one and a dump_stack().

> @@ -2022,7 +2021,7 @@ static void i40evf_init_task(struct work_struct *work)
>  			adapter->vsi_res = &adapter->vf_res->vsi_res[i];
>  	}
>  	if (!adapter->vsi_res) {
> -		dev_info(&pdev->dev, "%s: no LAN VSI found\n", __func__);
> +		dev_err(&pdev->dev, "No LAN VSI found.\n");

Adding unnecessary periods.

> @@ -2053,9 +2052,8 @@ static void i40evf_init_task(struct work_struct *work)
>  
>  	/* The HW MAC address was set and/or determined in sw_init */
>  	if (!is_valid_ether_addr(adapter->hw.mac.addr)) {
> -		dev_info(&pdev->dev,
> -			"Invalid MAC address %pMAC, using random\n",
> -			adapter->hw.mac.addr);
> +		dev_info(&pdev->dev, "Invalid MAC address %pMAC, using random.\n",

And here too.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: [net-next 05/14] i40evf: fix up strings in init task
  2014-02-14 23:43   ` Joe Perches
@ 2014-02-14 23:53     ` Williams, Mitch A
  2014-02-15  0:05       ` Joe Perches
  0 siblings, 1 reply; 19+ messages in thread
From: Williams, Mitch A @ 2014-02-14 23:53 UTC (permalink / raw)
  To: Joe Perches, Brown, Aaron F
  Cc: davem, netdev, gospo, sassmann, Brandeburg, Jesse



> -----Original Message-----
> From: Joe Perches [mailto:joe@perches.com]
> Sent: Friday, February 14, 2014 3:43 PM
> To: Brown, Aaron F
> Cc: davem@davemloft.net; Williams, Mitch A; netdev@vger.kernel.org;
> gospo@redhat.com; sassmann@redhat.com; Brandeburg, Jesse
> Subject: Re: [net-next 05/14] i40evf: fix up strings in init task
> 
> On Fri, 2014-02-14 at 14:57 -0800, Aaron Brown wrote:
> > From: Mitch Williams <mitch.a.williams@intel.com>
> 
> Hello.
> 
> > Make sure errors are reported at the correct log level, quit printing
> > the function name every time, and make the messages more consistent in
> > format.
> 
> > diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
> b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
> []
> > @@ -1939,14 +1939,14 @@ static void i40evf_init_task(struct work_struct
> *work)
> >  		adapter->flags &= ~I40EVF_FLAG_RESET_PENDING;
> >  		err = i40e_set_mac_type(hw);
> >  		if (err) {
> > -			dev_info(&pdev->dev, "%s: set_mac_type failed: %d\n",
> > -				__func__, err);
> > +			dev_err(&pdev->dev, "Failed to set MAC type (%d)\n",
> > +				err);
> >  		goto err;
> >  		}
> >  		err = i40evf_check_reset_complete(hw);
> >  		if (err) {
> > -			dev_info(&pdev->dev, "%s: device is still in reset (%d).\n",
> > -				__func__, err);
> > +			dev_err(&pdev->dev, "Device is still in reset (%d).\n",
> > +				err);
> 
> 
> Look at the lines above and below here.
> 
> If you're going to be consistent, can you please
> remove the unnecessary period before the newline.
> 
> >  			goto err;
> >  		}
> >  		hw->aq.num_arq_entries = I40EVF_AQ_LEN;
> > @@ -1956,14 +1956,14 @@ static void i40evf_init_task(struct work_struct
> *work)
> >
> >  		err = i40evf_init_adminq(hw);
> >  		if (err) {
> > -			dev_info(&pdev->dev, "%s: init_adminq failed: %d\n",
> > -				__func__, err);
> > +			dev_err(&pdev->dev, "Failed to init Admin Queue (%d)\n",
> > +				err);
> >  			goto err;
> >  		}
> >  		err = i40evf_send_api_ver(adapter);
> >  		if (err) {
> > -			dev_info(&pdev->dev, "%s: unable to send to PF (%d)\n",
> > -				__func__, err);
> > +			dev_err(&pdev->dev, "Unable to send to PF (%d)\n",
> > +				err);
> >  			i40evf_shutdown_adminq(hw);
> >  			goto err;
> >  		}
> 
> []
> 
> > @@ -1998,8 +1998,7 @@ static void i40evf_init_task(struct work_struct
> *work)
> >  				 sizeof(struct i40e_virtchnl_vsi_resource));
> >  			adapter->vf_res = kzalloc(bufsz, GFP_KERNEL);
> >  			if (!adapter->vf_res) {
> > -				dev_err(&pdev->dev, "%s: unable to allocate memory\n",
> > -					__func__);
> > +				dev_err(&pdev->dev, "Unable to allocate memory for vf
> resources.\n");
> 
> Unnecessary OOM.
> Allocs failures already have one and a dump_stack().
> 
> > @@ -2022,7 +2021,7 @@ static void i40evf_init_task(struct work_struct
> *work)
> >  			adapter->vsi_res = &adapter->vf_res->vsi_res[i];
> >  	}
> >  	if (!adapter->vsi_res) {
> > -		dev_info(&pdev->dev, "%s: no LAN VSI found\n", __func__);
> > +		dev_err(&pdev->dev, "No LAN VSI found.\n");
> 
> Adding unnecessary periods.
> 
> > @@ -2053,9 +2052,8 @@ static void i40evf_init_task(struct work_struct
> *work)
> >
> >  	/* The HW MAC address was set and/or determined in sw_init */
> >  	if (!is_valid_ether_addr(adapter->hw.mac.addr)) {
> > -		dev_info(&pdev->dev,
> > -			"Invalid MAC address %pMAC, using random\n",
> > -			adapter->hw.mac.addr);
> > +		dev_info(&pdev->dev, "Invalid MAC address %pMAC, using
> random.\n",
> 
> And here too.
> 
Joe, thanks for your review. We'll ditch the OOM message and I'll add a reminder to myself to scrub the rest of the driver for more of these.

With regard to periods on the end of log messages, is this a hard rule? The grammar pedant in me likes to see periods on the end of sentences, so I tend to add them. However, I see that CodingStyle says, "Kernel messages do not have to be terminated with a period." Perhaps we should change that to say "should not" if it is considered a rule.

Either way, we'll respin the patch.

-Mitch

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [net-next 05/14] i40evf: fix up strings in init task
  2014-02-14 23:53     ` Williams, Mitch A
@ 2014-02-15  0:05       ` Joe Perches
  0 siblings, 0 replies; 19+ messages in thread
From: Joe Perches @ 2014-02-15  0:05 UTC (permalink / raw)
  To: Williams, Mitch A
  Cc: Brown, Aaron F, davem, netdev, gospo, sassmann, Brandeburg, Jesse

On Fri, 2014-02-14 at 23:53 +0000, Williams, Mitch A wrote:
> With regard to periods on the end of log messages,
> is this a hard rule?

No.

>  The grammar pedant in me likes to see periods on the end of sentences,

Opinions vary.

I think kernel logging output lines aren't sentences
and are just notifications that don't need periods.

If you look at a normal log, there are relatively few
entries with periods.

For instance, my current dmesg:

$ dmesg | wc -l
1568
$ dmesg | grep "[^\.]\.$" | wc -l
84

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [net-next 08/14] i40evf: store ring size in ring structs
  2014-02-14 22:58 ` [net-next 08/14] i40evf: store ring size in ring structs Aaron Brown
@ 2014-02-16  9:13   ` Govindarajulu Varadarajan
  0 siblings, 0 replies; 19+ messages in thread
From: Govindarajulu Varadarajan @ 2014-02-16  9:13 UTC (permalink / raw)
  To: Aaron Brown
  Cc: davem, Mitch Williams, netdev, gospo, sassmann, Jesse Brandeburg



On Fri, 14 Feb 2014, Aaron Brown wrote:

> From: Mitch Williams <mitch.a.williams@intel.com>
>
> Also update copyrights.
[.]
>  * Intel Ethernet Controller XL710 Family Linux Virtual Function Driver
> - * Copyright(c) 2013 Intel Corporation.
> + * Copyright(c) 2013 - 2014 Intel Corporation.

Since you have a separate patch for this (patch 09/14), may be you can
move this change to 09/14?

thanks
//govind

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2014-02-16  9:22 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-14 22:57 [net-next 00/14] Intel Wired LAN Driver Updates Aaron Brown
2014-02-14 22:57 ` [net-next 01/14] i40evf: request reset on tx hang Aaron Brown
2014-02-14 22:57 ` [net-next 02/14] i40evf: remove VLAN filters on close Aaron Brown
2014-02-14 22:57 ` [net-next 03/14] i40evf: fix multiple crashes on remove Aaron Brown
2014-02-14 22:57 ` [net-next 04/14] i40evf: get rid of pci_using_dac Aaron Brown
2014-02-14 22:57 ` [net-next 05/14] i40evf: fix up strings in init task Aaron Brown
2014-02-14 23:43   ` Joe Perches
2014-02-14 23:53     ` Williams, Mitch A
2014-02-15  0:05       ` Joe Perches
2014-02-14 22:58 ` [net-next 06/14] i40evf: remove bogus comment Aaron Brown
2014-02-14 22:58 ` [net-next 07/14] i40evf: don't guess device name Aaron Brown
2014-02-14 22:58 ` [net-next 08/14] i40evf: store ring size in ring structs Aaron Brown
2014-02-16  9:13   ` Govindarajulu Varadarajan
2014-02-14 22:58 ` [net-next 09/14] i40evf: update version and copyright date Aaron Brown
2014-02-14 22:58 ` [net-next 10/14] i40evf: remove errant space Aaron Brown
2014-02-14 22:58 ` [net-next 11/14] i40e: remove unnecessary delay Aaron Brown
2014-02-14 22:58 ` [net-next 12/14] i40e: tighten up ring enable/disable flow Aaron Brown
2014-02-14 22:58 ` [net-next 13/14] i40e: Change MSIX to MSI-X Aaron Brown
2014-02-14 22:58 ` [net-next 14/14] i40e and i40evf: Bump driver versions Aaron Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.