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: Revised [PATCH 1/2]: define inline for test of channel error state
Date: Tue, 12 Dec 2006 16:55:59 -0600	[thread overview]
Message-ID: <20061212225559.GL4329@austin.ibm.com> (raw)

Greg,

Per discussion, a revised patch. Silly me, the value was already
initialized in drivers/pci/probe.c and I'd been dragging along
a prehistoric version of the if checks.

--linas

[PATCH 1/2]: define inline for test of pci channel error state

Add very simple routine to indicate the pci channel error state.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>

----
 include/linux/pci.h |    5 +++++
 1 file changed, 5 insertions(+)

Index: linux-2.6.19-git7/include/linux/pci.h
===================================================================
--- linux-2.6.19-git7.orig/include/linux/pci.h	2006-12-06 15:53:30.000000000 -0600
+++ linux-2.6.19-git7/include/linux/pci.h	2006-12-12 15:48:04.000000000 -0600
@@ -181,6 +181,11 @@ struct pci_dev {
 #define	to_pci_dev(n) container_of(n, struct pci_dev, dev)
 #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL)
 
+static inline int pci_channel_offline(struct pci_dev *pdev)
+{
+	return (pdev->error_state != pci_channel_io_normal);
+}
+
 static inline struct pci_cap_saved_state *pci_find_saved_cap(
 	struct pci_dev *pci_dev,char cap)
 {

             reply	other threads:[~2006-12-12 22:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-12 22:55 Linas Vepstas [this message]
2006-12-12 23:46 ` Revised [PATCH 1/2]: define inline for test of channel error state Greg KH
2006-12-13  0:29 ` [PATCH 2/2]: Use newly defined PCI channel offline routine 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=20061212225559.GL4329@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