public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: linas@austin.ibm.com (Linas Vepstas)
To: gregkh@suse.de, akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz
Subject: [PATCH 2/2]: Use newly defined PCI channel offline routine
Date: Tue, 12 Dec 2006 18:29:15 -0600	[thread overview]
Message-ID: <20061213002915.GA27870@austin.ibm.com> (raw)
In-Reply-To: <20061212225559.GL4329@austin.ibm.com>


Use newly minted routine to access the PCI channel state.

Signed-off-by: Linas Vepstas <linas@linas.org>

----
 drivers/net/e1000/e1000_main.c |    2 +-
 drivers/net/ixgb/ixgb_main.c   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6.19-git7/drivers/net/e1000/e1000_main.c
===================================================================
--- linux-2.6.19-git7.orig/drivers/net/e1000/e1000_main.c	2006-12-12 16:38:34.000000000 -0600
+++ linux-2.6.19-git7/drivers/net/e1000/e1000_main.c	2006-12-12 16:40:51.000000000 -0600
@@ -3449,7 +3449,7 @@ e1000_update_stats(struct e1000_adapter 
 	 */
 	if (adapter->link_speed == 0)
 		return;
-	if (pdev->error_state && pdev->error_state != pci_channel_io_normal)
+	if (pci_channel_offline(pdev))
 		return;
 
 	spin_lock_irqsave(&adapter->stats_lock, flags);
Index: linux-2.6.19-git7/drivers/net/ixgb/ixgb_main.c
===================================================================
--- linux-2.6.19-git7.orig/drivers/net/ixgb/ixgb_main.c	2006-12-12 16:38:34.000000000 -0600
+++ linux-2.6.19-git7/drivers/net/ixgb/ixgb_main.c	2006-12-12 16:41:00.000000000 -0600
@@ -1564,7 +1564,7 @@ ixgb_update_stats(struct ixgb_adapter *a
 	struct pci_dev *pdev = adapter->pdev;
 
 	/* Prevent stats update while adapter is being reset */
-	if (pdev->error_state && pdev->error_state != pci_channel_io_normal)
+	if (pci_channel_offline(pdev))
 		return;
 
 	if((netdev->flags & IFF_PROMISC) || (netdev->flags & IFF_ALLMULTI) ||

  parent reply	other threads:[~2006-12-13  0:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-12 22:55 Revised [PATCH 1/2]: define inline for test of channel error state Linas Vepstas
2006-12-12 23:46 ` Greg KH
2006-12-13  0:29 ` Linas Vepstas [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-12-12 19:55 [PATCH 1/2]: Renumber PCI error enums to start at zero Linas Vepstas
2006-12-12 20:01 ` [PATCH 2/2]: Use newly defined PCI channel offline routine Linas Vepstas
2006-12-12 21:27   ` Auke Kok
2006-11-01 23:54 [PATCH 1/2]: Renumber PCI error enums to start at zero Linas Vepstas
2006-11-02  0:00 ` [PATCH 2/2]: Use newly defined PCI channel offline routine Linas Vepstas
2006-11-02  0:20   ` Auke Kok
2006-11-02  0:40     ` Linas Vepstas

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=20061213002915.GA27870@austin.ibm.com \
    --to=linas@austin.ibm.com \
    --cc=akpm@osdl.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    /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