netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, gospo@redhat.com,
	Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next PATCH 09/11] ixgbe: Two small fixes for 82599 when bringing the device down and for WoL
Date: Sat, 14 Mar 2009 01:15:10 -0700	[thread overview]
Message-ID: <20090314081510.4687.80930.stgit@lost.foo-projects.org> (raw)
In-Reply-To: <20090314081229.4687.40245.stgit@lost.foo-projects.org>

From: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>

The Tx DMA unit should be disabled when bringing the device down.  Also,
the KX4 device with 82599 supports WoL, so we should clear the Wake Up
Status (WUS) after a PCIe slot reset.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/ixgbe/ixgbe_main.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 8821c5f..ef0b99a 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -2558,6 +2558,11 @@ void ixgbe_down(struct ixgbe_adapter *adapter)
 		IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(j),
 		                (txdctl & ~IXGBE_TXDCTL_ENABLE));
 	}
+	/* Disable the Tx DMA engine on 82599 */
+	if (hw->mac.type == ixgbe_mac_82599EB)
+		IXGBE_WRITE_REG(hw, IXGBE_DMATXCTL,
+		                (IXGBE_READ_REG(hw, IXGBE_DMATXCTL) &
+		                 ~IXGBE_DMATXCTL_TE));
 
 	netif_carrier_off(netdev);
 
@@ -4795,7 +4800,7 @@ static pci_ers_result_t ixgbe_io_slot_reset(struct pci_dev *pdev)
 		pci_enable_wake(pdev, PCI_D3cold, 0);
 
 		ixgbe_reset(adapter);
-
+		IXGBE_WRITE_REG(&adapter->hw, IXGBE_WUS, ~0);
 		result = PCI_ERS_RESULT_RECOVERED;
 	}
 


  parent reply	other threads:[~2009-03-14  8:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-14  8:12 [net-next PATCH 01/11] ixgbe: Fix get_supported_physical_layer() due to new 82599 PHY types Jeff Kirsher
2009-03-14  8:12 ` [net-next PATCH 02/11] ixgbe: Fix an accounting problem when the Rx FIFO is full Jeff Kirsher
2009-03-14  8:13 ` [net-next PATCH 03/11] ixgbe: Disable DROP_EN for Rx queues Jeff Kirsher
2009-03-14  8:13 ` [net-next PATCH 04/11] ixgbe: Fix interrupt configuration for 82599 Jeff Kirsher
2009-03-14  8:13 ` [net-next PATCH 05/11] ixgbe: fix bug with napi add before request_irq Jeff Kirsher
2009-03-14  8:14 ` [net-next PATCH 06/11] ixgbe: Fix the Tx clean logic to return proper status Jeff Kirsher
2009-03-14  8:14 ` [net-next PATCH 07/11] ixgbe: Cleanup on the Rx init path Jeff Kirsher
2009-03-14  8:14 ` [net-next PATCH 08/11] ixgbe: Add a few safety nets for register writes and descriptor cleanups Jeff Kirsher
2009-03-14  8:15 ` Jeff Kirsher [this message]
2009-03-14  8:15 ` [net-next PATCH 10/11] ixgbe: Cleanup some whitespace issues, fixup and add some comments Jeff Kirsher
2009-03-14  8:15 ` [net-next PATCH 11/11] ixgbe: Add documentation for the driver Jeff Kirsher
2009-03-15 19:25   ` Ben Hutchings
2009-03-14 19:51 ` [net-next PATCH 01/11] ixgbe: Fix get_supported_physical_layer() due to new 82599 PHY types David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090314081510.4687.80930.stgit@lost.foo-projects.org \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=mallikarjuna.chilakala@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=peter.p.waskiewicz.jr@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).