LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Shane Huang" <Shane.Huang@amd.com>
To: gregkh@suse.de
Cc: linux-kernel@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz,
	htejun@gmail.com, "Shane Huang" <Shane.Huang@amd.com>
Subject: [patch] PCI: modify SB700 SATA MSI quirk
Date: Thu, 24 Jan 2008 19:12:49 +0800	[thread overview]
Message-ID: <B90463BC30D2E446BA423D888DC85E501BF796@sshaexmb1.amd.com> (raw)
In-Reply-To: <B90463BC30D2E446BA423D888DC85E501BF78E@sshaexmb1.amd.com>

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

SB700 SATA MSI bug will be fixed in SB700 revision A21 at hardware
level,
but the SB700 revision older than A21 will also be found in the market.
This patch modify the original quirk commit
bc38b411fe696fad32b261f492cb4afbf1835256 instead of withdrawing it.


Signed-off-by: Shane Huang <shane.huang@amd.com>


Since there is some word wrapping problem with my mail client MS
outlook, I also attach the patch as an attachment. Please check it.



diff -ruN old/drivers/pci/quirks.c new/drivers/pci/quirks.c
--- old/drivers/pci/quirks.c	2008-01-07 05:45:38.000000000 +0800
+++ new/drivers/pci/quirks.c	2008-01-22 11:31:09.000000000 +0800
@@ -1709,6 +1709,22 @@
 {
 	dev->dev_flags |= PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG;
 }
+static void __devinit quirk_msi_intx_disable_ati_bug(struct pci_dev
*dev)
+{
+	struct pci_dev *p;
+	u8 rev = 0;
+
+	/* SB700 MSI issue will be fixed at HW level from revision A21,
+	 * we need check PCI REVISION ID of SMBus controller to get
SB700 revision.
+	 */
+	p = pci_get_device(PCI_VENDOR_ID_ATI,
PCI_DEVICE_ID_ATI_SBX00_SMBUS, NULL);
+	if (p!=NULL) {
+		pci_read_config_byte(p, PCI_CLASS_REVISION, &rev);
+	}
+	if ((rev < 0x3B) && (rev >= 0x30)) {
+		dev->dev_flags |= PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG;
+	}
+}
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
 			PCI_DEVICE_ID_TIGON3_5780,
 			quirk_msi_intx_disable_bug);
@@ -1729,17 +1745,17 @@
 			quirk_msi_intx_disable_bug);
 
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4390,
-			quirk_msi_intx_disable_bug);
+			quirk_msi_intx_disable_ati_bug);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4391,
-			quirk_msi_intx_disable_bug);
+			quirk_msi_intx_disable_ati_bug);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4392,
-			quirk_msi_intx_disable_bug);
+			quirk_msi_intx_disable_ati_bug);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4393,
-			quirk_msi_intx_disable_bug);
+			quirk_msi_intx_disable_ati_bug);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4394,
-			quirk_msi_intx_disable_bug);
+			quirk_msi_intx_disable_ati_bug);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4395,
-			quirk_msi_intx_disable_bug);
+			quirk_msi_intx_disable_ati_bug);
 
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4373,
 			quirk_msi_intx_disable_bug);


Thanks
Best Regards
Shane


[-- Attachment #2: modify_SB700_MSI_issue.patch --]
[-- Type: application/octet-stream, Size: 1787 bytes --]

diff -ruN old/drivers/pci/quirks.c new/drivers/pci/quirks.c
--- old/drivers/pci/quirks.c	2008-01-07 05:45:38.000000000 +0800
+++ new/drivers/pci/quirks.c	2008-01-22 11:31:09.000000000 +0800
@@ -1709,6 +1709,22 @@
 {
 	dev->dev_flags |= PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG;
 }
+static void __devinit quirk_msi_intx_disable_ati_bug(struct pci_dev *dev)
+{
+	struct pci_dev *p;
+	u8 rev = 0;
+
+	/* SB700 MSI issue will be fixed at HW level from revision A21,
+	 * we need check PCI REVISION ID of SMBus controller to get SB700 revision.
+	 */
+	p = pci_get_device(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS, NULL);
+	if (p!=NULL) {
+		pci_read_config_byte(p, PCI_CLASS_REVISION, &rev);
+	}
+	if ((rev < 0x3B) && (rev >= 0x30)) {
+		dev->dev_flags |= PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG;
+	}
+}
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
 			PCI_DEVICE_ID_TIGON3_5780,
 			quirk_msi_intx_disable_bug);
@@ -1729,17 +1745,17 @@
 			quirk_msi_intx_disable_bug);
 
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4390,
-			quirk_msi_intx_disable_bug);
+			quirk_msi_intx_disable_ati_bug);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4391,
-			quirk_msi_intx_disable_bug);
+			quirk_msi_intx_disable_ati_bug);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4392,
-			quirk_msi_intx_disable_bug);
+			quirk_msi_intx_disable_ati_bug);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4393,
-			quirk_msi_intx_disable_bug);
+			quirk_msi_intx_disable_ati_bug);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4394,
-			quirk_msi_intx_disable_bug);
+			quirk_msi_intx_disable_ati_bug);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4395,
-			quirk_msi_intx_disable_bug);
+			quirk_msi_intx_disable_ati_bug);
 
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4373,
 			quirk_msi_intx_disable_bug);

  reply	other threads:[~2008-01-24 11:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-18  9:14 [patch] PCI: disable MSI on more ATI NorthBridges Shane Huang
2007-10-18 10:19 ` David Miller
2007-10-18 10:37   ` Shane Huang
2007-10-18 11:46     ` David Miller
2007-10-18 15:24       ` Greg KH
2007-10-19 17:42       ` Daniel Barkalow
2008-01-24 10:59 ` [patch] PCI: disable the MSI of AMD RS690 Shane Huang
2008-01-24 11:12   ` Shane Huang [this message]
2008-01-25  0:19     ` [patch] PCI: modify SB700 SATA MSI quirk Tejun Heo
2008-01-25  3:26     ` Shane Huang
2008-01-25  3:35       ` Tejun Heo
2008-01-25  3:48         ` Shane Huang
2008-01-25  4:33           ` Greg KH
2008-01-24 11:15   ` [patch] PCI: disable the MSI of AMD RS690 Brice Goglin
2008-01-25 10:39     ` Shane Huang
2008-01-25  6:33 [PATCH] PCI: modify SB700 SATA MSI quirk Shane Huang
2008-01-25  6:46 ` Tejun Heo
2008-01-25  6:52   ` Shane Huang
2008-02-01 17:19   ` Jeff Garzik

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=B90463BC30D2E446BA423D888DC85E501BF796@sshaexmb1.amd.com \
    --to=shane.huang@amd.com \
    --cc=gregkh@suse.de \
    --cc=htejun@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --subject='Re: [patch] PCI: modify SB700 SATA MSI quirk' \
    /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

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).