[PATCH] PCI: modify SB700 SATA MSI quirk

Previous thread: none

Next thread: [GIT PATCH] driver core patches against 2.6.24 by Greg KH on Friday, January 25, 2008 - 3:11 am. (272 messages)
To: <gregkh@...>, Tejun Heo <htejun@...>
Cc: <linux-kernel@...>, <linux-pci@...>, Shane Huang <Shane.Huang@...>
Date: Friday, January 25, 2008 - 2:33 am

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.
The patch also removes quirk to 0x4395 because 0x4395 is SB800 device
ID.

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

diff -ruN linux-2.6.24-rc7_org/drivers/pci/quirks.c
linux-2.6.24-rc7_new/drivers/pci/quirks.c
--- linux-2.6.24-rc7_org/drivers/pci/quirks.c 2008-01-23
14:44:53.000000000 +0800
+++ linux-2.6.24-rc7_new/drivers/pci/quirks.c 2008-01-25
12:55:05.000000000 +0800
@@ -1709,6 +1709,23 @@
{
dev->dev_flags |=3D PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG;
}
+static void __devinit quirk_msi_intx_disable_ati_bug(struct pci_dev
*dev)
+{
+ struct pci_dev *p;
+
+ /* 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 =3D pci_get_device(PCI_VENDOR_ID_ATI,
PCI_DEVICE_ID_ATI_SBX00_SMBUS,
+ NULL);
+ if (!p)
+ return;
+
+ if ((p->revision < 0x3B) && (p->revision >=3D 0x30))
+ dev->dev_flags |=3D PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG;
+ pci_dev_put(p);
+}
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
PCI_DEVICE_ID_TIGON3_5780,
quirk_msi_intx_disable_bug);
@@ -1729,17 +1746,15 @@
quirk_msi_intx_disable_bug);
=20
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_...

To: Shane Huang <Shane.Huang@...>
Cc: <gregkh@...>, <linux-kernel@...>, <linux-pci@...>
Date: Friday, January 25, 2008 - 2:46 am

From: Shane Huang <shane.huang@amd.com>

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.
The patch also removes quirk to 0x4395 because 0x4395 is SB800 device
ID.

Signed-off-by: Shane Huang <shane.huang@amd.com>
Signed-off-by: Tejun Heo <htejun@gmail.com>
---
Okay, here's reformatted in-line version. Shane, please invest some
time into setting up email environment. Sending patches via email is
an important part of the linux kernel development process and if
you're gonna submit patches, you're just gonna have to do it.

drivers/pci/quirks.c | 29 ++++++++++++++++++++++-------
1 file changed, 22 insertions(+), 7 deletions(-)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 72e0bd5..a45c177 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1715,6 +1715,23 @@ static void __devinit quirk_msi_intx_disable_bug(struct pci_dev *dev)
{
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;
+
+ /* 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)
+ return;
+
+ if ((p->revision < 0x3B) && (p->revision >= 0x30))
+ dev->dev_flags |= PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG;
+ pci_dev_put(p);
+}
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
PCI_DEVICE_ID_TIGON3_5780,
quirk_msi_intx_disable_bug);
@@ -1735,17 +1752,15 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
quirk_msi_intx_disable_bug);

DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4390,
- quirk_msi_intx_disable_bug);
+ qu...

To: Tejun Heo <htejun@...>
Cc: Shane Huang <Shane.Huang@...>, <gregkh@...>, <linux-kernel@...>, <linux-pci@...>
Date: Friday, February 1, 2008 - 1:19 pm

FWIW, I'm happy with whatever this thread results in... it sounds like
Tejun and Shane are iterating towards a satisfactory final result.

Just let me know if I need to merge something, since I'm assuming that
GregKH will push this through the PCI tree.

--

To: Tejun Heo <htejun@...>
Cc: <gregkh@...>, <linux-kernel@...>, <linux-pci@...>, Shane Huang <Shane.Huang@...>
Date: Friday, January 25, 2008 - 2:52 am

Right. In fact, I tried to modify some settings before I sent my mail,
but it seems that it does not take effect. I will check it again. Sorry
for that
and thank you for your help~~

Thanks
Shane

--

Previous thread: none

Next thread: [GIT PATCH] driver core patches against 2.6.24 by Greg KH on Friday, January 25, 2008 - 3:11 am. (272 messages)