netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next 0/5][pull request] Intel Wired LAN Driver Updates 2015-03-20
@ 2015-03-21  0:57 Jeff Kirsher
  2015-03-21  0:57 ` [net-next 1/5] ixgb: call netif_carrier_off early on down Jeff Kirsher
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Jeff Kirsher @ 2015-03-21  0:57 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, nhorman, sassmann, jogreene

This series contains updates to ixgb, e1000e, igb and igbvf.

Eliezer and Todd provide patches to fix a potential issue found during code
inspection.  When bringing down an interface netif_carrier_off() should
be one of the first things we do, since this will prevent the stack from
queueing more packets to this interface.

Yanir provides a fix for e1000e that was found in validating i219,
where the call to e1000e_write_protect_nvm_ich8lan() is no longer
supported in newer hardware.  Access to these registers causes a
system freeze in early steppings and is ignored in later steppings.

The following are changes since commit f6877fcf229b4e3d396cbd5199e040b4ea1362eb:
  Merge branch 'ebpf-next'
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue master

master

Eliezer Tamir (2):
  ixgb: call netif_carrier_off early on down
  e1000e: call netif_carrier_off early on down

Todd Fujinaka (2):
  igb: use netif_carrier_off earlier when bringing if down
  igbvf: use netif_carrier_off earlier when bringing if down

Yanir Lubetkin (1):
  e1000e: NVM write protect access removed from SPT HW

 drivers/net/ethernet/intel/e1000e/netdev.c  | 7 ++++---
 drivers/net/ethernet/intel/igb/igb_main.c   | 4 +---
 drivers/net/ethernet/intel/igbvf/netdev.c   | 3 +--
 drivers/net/ethernet/intel/ixgb/ixgb_main.c | 3 ++-
 4 files changed, 8 insertions(+), 9 deletions(-)

-- 
1.9.3

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

* [net-next 1/5] ixgb: call netif_carrier_off early on down
  2015-03-21  0:57 [net-next 0/5][pull request] Intel Wired LAN Driver Updates 2015-03-20 Jeff Kirsher
@ 2015-03-21  0:57 ` Jeff Kirsher
  2015-03-21  0:57 ` [net-next 2/5] e1000e: " Jeff Kirsher
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Jeff Kirsher @ 2015-03-21  0:57 UTC (permalink / raw)
  To: davem; +Cc: Eliezer Tamir, netdev, nhorman, sassmann, jogreene, Jeff Kirsher

From: Eliezer Tamir <eliezer.tamir@linux.intel.com>

When bringing down an interface netif_carrier_off() should be
one the first things we do, since this will prevent the stack
from queuing more packets to this interface.
This operation is very fast, and should make the device behave
much nicer when trying to bring down an interface under load.

Also, this would Do The Right Thing (TM) if this device has some
sort of fail-over teaming and redirect traffic to the other IF.

Move netif_carrier_off as early as possible.

Signed-off-by: Eliezer Tamir <eliezer.tamir@linux.intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgb/ixgb_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ixgb/ixgb_main.c b/drivers/net/ethernet/intel/ixgb/ixgb_main.c
index 11a1bdb..31f9145 100644
--- a/drivers/net/ethernet/intel/ixgb/ixgb_main.c
+++ b/drivers/net/ethernet/intel/ixgb/ixgb_main.c
@@ -285,6 +285,8 @@ ixgb_down(struct ixgb_adapter *adapter, bool kill_watchdog)
 	/* prevent the interrupt handler from restarting watchdog */
 	set_bit(__IXGB_DOWN, &adapter->flags);
 
+	netif_carrier_off(netdev);
+
 	napi_disable(&adapter->napi);
 	/* waiting for NAPI to complete can re-enable interrupts */
 	ixgb_irq_disable(adapter);
@@ -298,7 +300,6 @@ ixgb_down(struct ixgb_adapter *adapter, bool kill_watchdog)
 
 	adapter->link_speed = 0;
 	adapter->link_duplex = 0;
-	netif_carrier_off(netdev);
 	netif_stop_queue(netdev);
 
 	ixgb_reset(adapter);
-- 
1.9.3

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

* [net-next 2/5] e1000e: call netif_carrier_off early on down
  2015-03-21  0:57 [net-next 0/5][pull request] Intel Wired LAN Driver Updates 2015-03-20 Jeff Kirsher
  2015-03-21  0:57 ` [net-next 1/5] ixgb: call netif_carrier_off early on down Jeff Kirsher
@ 2015-03-21  0:57 ` Jeff Kirsher
  2015-03-21  0:57 ` [net-next 3/5] e1000e: NVM write protect access removed from SPT HW Jeff Kirsher
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Jeff Kirsher @ 2015-03-21  0:57 UTC (permalink / raw)
  To: davem
  Cc: Eliezer Tamir, netdev, nhorman, sassmann, jogreene,
	Kristen Carlson Accardi, Jeff Kirsher

From: Eliezer Tamir <eliezer.tamir@linux.intel.com>

When bringing down an interface netif_carrier_off() should be
one the first things we do, since this will prevent the stack
from queuing more packets to this interface.
This operation is very fast, and should make the device behave
much nicer when trying to bring down an interface under load.

Also, this would Do The Right Thing (TM) if this device has some
sort of fail-over teaming and redirect traffic to the other IF.

Move netif_carrier_off as early as possible.

CC: Kristen Carlson Accardi <kristen@linux.intel.com>
Signed-off-by: Eliezer Tamir <eliezer.tamir@linux.intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/e1000e/netdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 4be4576..8c95fb8 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -4084,6 +4084,8 @@ void e1000e_down(struct e1000_adapter *adapter, bool reset)
 	 */
 	set_bit(__E1000_DOWN, &adapter->state);
 
+	netif_carrier_off(netdev);
+
 	/* disable receives in the hardware */
 	rctl = er32(RCTL);
 	if (!(adapter->flags2 & FLAG2_NO_DISABLE_RX))
@@ -4108,8 +4110,6 @@ void e1000e_down(struct e1000_adapter *adapter, bool reset)
 	del_timer_sync(&adapter->watchdog_timer);
 	del_timer_sync(&adapter->phy_info_timer);
 
-	netif_carrier_off(netdev);
-
 	spin_lock(&adapter->stats64_lock);
 	e1000e_update_stats(adapter);
 	spin_unlock(&adapter->stats64_lock);
-- 
1.9.3

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

* [net-next 3/5] e1000e: NVM write protect access removed from SPT HW
  2015-03-21  0:57 [net-next 0/5][pull request] Intel Wired LAN Driver Updates 2015-03-20 Jeff Kirsher
  2015-03-21  0:57 ` [net-next 1/5] ixgb: call netif_carrier_off early on down Jeff Kirsher
  2015-03-21  0:57 ` [net-next 2/5] e1000e: " Jeff Kirsher
@ 2015-03-21  0:57 ` Jeff Kirsher
  2015-03-21  0:57 ` [net-next 4/5] igb: use netif_carrier_off earlier when bringing if down Jeff Kirsher
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Jeff Kirsher @ 2015-03-21  0:57 UTC (permalink / raw)
  To: davem
  Cc: Yanir Lubetkin, netdev, nhorman, sassmann, jogreene,
	Kristen Carlson Accardi, Jeff Kirsher

From: Yanir Lubetkin <yanirx.lubetkin@intel.com>

The call to e1000e_write_protect_nvm_ich8lan() is no longer supported by HW.
Access to these registers causes a system freeze in A step hardware and is
ignored in B step hardware. This function must not be called in hardware
newer than LPT.

CC: Kristen Carlson Accardi <kristen@linux.intel.com>
Signed-off-by: Yanir Lubetkin <yanirx.lubetkin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/e1000e/netdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 8c95fb8..4e56c31 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -6874,7 +6874,8 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		goto err_hw_init;
 
 	if ((adapter->flags & FLAG_IS_ICH) &&
-	    (adapter->flags & FLAG_READ_ONLY_NVM))
+	    (adapter->flags & FLAG_READ_ONLY_NVM) &&
+	    (hw->mac.type < e1000_pch_spt))
 		e1000e_write_protect_nvm_ich8lan(&adapter->hw);
 
 	hw->mac.ops.get_bus_info(&adapter->hw);
-- 
1.9.3

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

* [net-next 4/5] igb: use netif_carrier_off earlier when bringing if down
  2015-03-21  0:57 [net-next 0/5][pull request] Intel Wired LAN Driver Updates 2015-03-20 Jeff Kirsher
                   ` (2 preceding siblings ...)
  2015-03-21  0:57 ` [net-next 3/5] e1000e: NVM write protect access removed from SPT HW Jeff Kirsher
@ 2015-03-21  0:57 ` Jeff Kirsher
  2015-03-21  0:57 ` [net-next 5/5] igbvf: " Jeff Kirsher
  2015-03-21  1:41 ` [net-next 0/5][pull request] Intel Wired LAN Driver Updates 2015-03-20 David Miller
  5 siblings, 0 replies; 7+ messages in thread
From: Jeff Kirsher @ 2015-03-21  0:57 UTC (permalink / raw)
  To: davem; +Cc: Todd Fujinaka, netdev, nhorman, sassmann, jogreene, Jeff Kirsher

From: Todd Fujinaka <todd.fujinaka@intel.com>

Use netif_carrier_off() first, since that will prevent the stack from
queuing more packets to this IF. This operation is fast, and should
behave much nicer when trying to bring down an interface under load.

Reported-by: Eliezer Tamir <eliezer.tamir@linux.intel.com>
Signed-off-by: Todd Fujinaka <todd.fujinaka@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/igb/igb_main.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index f366b3b..0e07545 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -1776,6 +1776,7 @@ void igb_down(struct igb_adapter *adapter)
 	wr32(E1000_RCTL, rctl & ~E1000_RCTL_EN);
 	/* flush and sleep below */
 
+	netif_carrier_off(netdev);
 	netif_tx_stop_all_queues(netdev);
 
 	/* disable transmits in the hardware */
@@ -1797,12 +1798,9 @@ void igb_down(struct igb_adapter *adapter)
 		}
 	}
 
-
 	del_timer_sync(&adapter->watchdog_timer);
 	del_timer_sync(&adapter->phy_info_timer);
 
-	netif_carrier_off(netdev);
-
 	/* record the stats before reset*/
 	spin_lock(&adapter->stats64_lock);
 	igb_update_stats(adapter, &adapter->stats64);
-- 
1.9.3

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

* [net-next 5/5] igbvf: use netif_carrier_off earlier when bringing if down
  2015-03-21  0:57 [net-next 0/5][pull request] Intel Wired LAN Driver Updates 2015-03-20 Jeff Kirsher
                   ` (3 preceding siblings ...)
  2015-03-21  0:57 ` [net-next 4/5] igb: use netif_carrier_off earlier when bringing if down Jeff Kirsher
@ 2015-03-21  0:57 ` Jeff Kirsher
  2015-03-21  1:41 ` [net-next 0/5][pull request] Intel Wired LAN Driver Updates 2015-03-20 David Miller
  5 siblings, 0 replies; 7+ messages in thread
From: Jeff Kirsher @ 2015-03-21  0:57 UTC (permalink / raw)
  To: davem; +Cc: Todd Fujinaka, netdev, nhorman, sassmann, jogreene, Jeff Kirsher

From: Todd Fujinaka <todd.fujinaka@intel.com>

Use netif_carrier_off() first, since that will prevent the stack from
queuing more packets to this IF. This operation is fast, and should
behave much nicer when trying to bring down an interface under load.

Reported-by: Eliezer Tamir <eliezer.tamir@linux.intel.com>
Signed-off-by: Todd Fujinaka <todd.fujinaka@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/igbvf/netdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c
index c17ea4b..95af14e 100644
--- a/drivers/net/ethernet/intel/igbvf/netdev.c
+++ b/drivers/net/ethernet/intel/igbvf/netdev.c
@@ -1519,6 +1519,7 @@ void igbvf_down(struct igbvf_adapter *adapter)
 	rxdctl = er32(RXDCTL(0));
 	ew32(RXDCTL(0), rxdctl & ~E1000_RXDCTL_QUEUE_ENABLE);
 
+	netif_carrier_off(netdev);
 	netif_stop_queue(netdev);
 
 	/* disable transmits in the hardware */
@@ -1535,8 +1536,6 @@ void igbvf_down(struct igbvf_adapter *adapter)
 
 	del_timer_sync(&adapter->watchdog_timer);
 
-	netif_carrier_off(netdev);
-
 	/* record the stats before reset*/
 	igbvf_update_stats(adapter);
 
-- 
1.9.3

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

* Re: [net-next 0/5][pull request] Intel Wired LAN Driver Updates 2015-03-20
  2015-03-21  0:57 [net-next 0/5][pull request] Intel Wired LAN Driver Updates 2015-03-20 Jeff Kirsher
                   ` (4 preceding siblings ...)
  2015-03-21  0:57 ` [net-next 5/5] igbvf: " Jeff Kirsher
@ 2015-03-21  1:41 ` David Miller
  5 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2015-03-21  1:41 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, nhorman, sassmann, jogreene

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Fri, 20 Mar 2015 17:57:40 -0700

> This series contains updates to ixgb, e1000e, igb and igbvf.
> 
> Eliezer and Todd provide patches to fix a potential issue found during code
> inspection.  When bringing down an interface netif_carrier_off() should
> be one of the first things we do, since this will prevent the stack from
> queueing more packets to this interface.
> 
> Yanir provides a fix for e1000e that was found in validating i219,
> where the call to e1000e_write_protect_nvm_ich8lan() is no longer
> supported in newer hardware.  Access to these registers causes a
> system freeze in early steppings and is ignored in later steppings.

Looks good, pulled, thanks Jeff.

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

end of thread, other threads:[~2015-03-21  1:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-21  0:57 [net-next 0/5][pull request] Intel Wired LAN Driver Updates 2015-03-20 Jeff Kirsher
2015-03-21  0:57 ` [net-next 1/5] ixgb: call netif_carrier_off early on down Jeff Kirsher
2015-03-21  0:57 ` [net-next 2/5] e1000e: " Jeff Kirsher
2015-03-21  0:57 ` [net-next 3/5] e1000e: NVM write protect access removed from SPT HW Jeff Kirsher
2015-03-21  0:57 ` [net-next 4/5] igb: use netif_carrier_off earlier when bringing if down Jeff Kirsher
2015-03-21  0:57 ` [net-next 5/5] igbvf: " Jeff Kirsher
2015-03-21  1:41 ` [net-next 0/5][pull request] Intel Wired LAN Driver Updates 2015-03-20 David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).