public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tim Hockin <thockin@sun.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	torvalds@transmeta.com, jgarzik@mandrakesoft.com, mj@ucw.cz,
	alan@redhat.com
Subject: [PATCH] PCI probe status cleanup
Date: Mon, 13 Aug 2001 19:10:27 -0700	[thread overview]
Message-ID: <3B788893.43799E78@sun.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 402 bytes --]

All,

Attached is a very small patch against 2.4.8, which I have been sending for
a while.  It merely clears the Master Abort bit on a PCI bridge when a
failed probe occurs.

If there is any reason this can't go into the next 2.4.x release, please
let me know.  It has been in use here for months.

Tim
-- 
Tim Hockin
Systems Software Engineer
Sun Microsystems, Cobalt Server Appliances
thockin@sun.com

[-- Attachment #2: pci_bridge_cleanup.diff --]
[-- Type: text/plain, Size: 883 bytes --]

diff -ruN dist+patches-2.4.8/drivers/pci/pci.c cobalt-2.4.8/drivers/pci/pci.c
--- dist+patches-2.4.8/drivers/pci/pci.c	Wed Jul  4 09:41:34 2001
+++ cobalt-2.4.8/drivers/pci/pci.c	Mon Aug 13 16:42:12 2001
@@ -1232,8 +1236,19 @@
 		return NULL;
 
 	/* some broken boards return 0 or ~0 if a slot is empty: */
-	if (l == 0xffffffff || l == 0x00000000 || l == 0x0000ffff || l == 0xffff0000)
+	if (l == 0xffffffff || l == 0x00000000 
+	 || l == 0x0000ffff || l == 0xffff0000) {
+		/*
+		 * host/pci and pci/pci bridges will set Received Master Abort
+		 * (bit 13) on failed configuration access (happens when
+		 * searching for devices).  To be safe, clear the status
+		 * register.
+		 */
+		unsigned short st;
+		pci_read_config_word(temp, PCI_STATUS, &st);
+		pci_write_config_word(temp, PCI_STATUS, st);
 		return NULL;
+	}
 
 	dev = kmalloc(sizeof(*dev), GFP_KERNEL);
 	if (!dev)

                 reply	other threads:[~2001-08-14  2:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=3B788893.43799E78@sun.com \
    --to=thockin@sun.com \
    --cc=alan@redhat.com \
    --cc=jgarzik@mandrakesoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mj@ucw.cz \
    --cc=torvalds@transmeta.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