LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] PCI: modify SB700 SATA MSI quirk
@ 2008-01-25  6:33 Shane Huang
  2008-01-25  6:46 ` Tejun Heo
  0 siblings, 1 reply; 10+ messages in thread
From: Shane Huang @ 2008-01-25  6:33 UTC (permalink / raw)
  To: gregkh, Tejun Heo; +Cc: linux-kernel, linux-pci, Shane Huang

[-- Attachment #1: Type: text/plain, Size: 2266 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.
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 |= 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);
@@ -1729,17 +1746,15 @@
 			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);
-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
Shane

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

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 |= 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);
@@ -1729,17 +1746,15 @@
 			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);
-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);

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] PCI: modify SB700 SATA MSI quirk
  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
  0 siblings, 2 replies; 10+ messages in thread
From: Tejun Heo @ 2008-01-25  6:46 UTC (permalink / raw)
  To: Shane Huang; +Cc: gregkh, linux-kernel, linux-pci

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);
+			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);
-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);

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH] PCI: modify SB700 SATA MSI quirk
  2008-01-25  6:46 ` Tejun Heo
@ 2008-01-25  6:52   ` Shane Huang
  2008-02-01 17:19   ` Jeff Garzik
  1 sibling, 0 replies; 10+ messages in thread
From: Shane Huang @ 2008-01-25  6:52 UTC (permalink / raw)
  To: Tejun Heo; +Cc: gregkh, linux-kernel, linux-pci, Shane Huang


 Hi Tejun:


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


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



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] PCI: modify SB700 SATA MSI quirk
  2008-01-25  6:46 ` Tejun Heo
  2008-01-25  6:52   ` Shane Huang
@ 2008-02-01 17:19   ` Jeff Garzik
  1 sibling, 0 replies; 10+ messages in thread
From: Jeff Garzik @ 2008-02-01 17:19 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Shane Huang, gregkh, linux-kernel, linux-pci

Tejun Heo wrote:
> 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(-)

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.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [patch] PCI: modify SB700 SATA MSI quirk
  2008-01-25  3:48         ` Shane Huang
@ 2008-01-25  4:33           ` Greg KH
  0 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2008-01-25  4:33 UTC (permalink / raw)
  To: Shane Huang; +Cc: Tejun Heo, linux-kernel, linux-pci

On Fri, Jan 25, 2008 at 11:48:29AM +0800, Shane Huang wrote:
> Hi Tejun:
> 
> 
> > You need to merge the above two messages into one patch description.
> > 
> > After S-O-B, you can put --- and between it and the patch 
> > body, you can say things which you wanna mention but don't 
> > think should be included in commit message.
> 
> OK, I'll have to submit another update patch later.

I recommend running the scripts/checkpatch.pl script on any proposed
patches like this before you send them.  It will find a lot of these
problems for you :)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [patch] PCI: modify SB700 SATA MSI quirk
  2008-01-25  3:35       ` Tejun Heo
@ 2008-01-25  3:48         ` Shane Huang
  2008-01-25  4:33           ` Greg KH
  0 siblings, 1 reply; 10+ messages in thread
From: Shane Huang @ 2008-01-25  3:48 UTC (permalink / raw)
  To: Tejun Heo; +Cc: gregkh, linux-kernel, linux-pci, Shane Huang

Hi Tejun:


> You need to merge the above two messages into one patch description.
> 
> After S-O-B, you can put --- and between it and the patch 
> body, you can say things which you wanna mention but don't 
> think should be included in commit message.

OK, I'll have to submit another update patch later.




Thanks
Shane



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [patch] PCI: modify SB700 SATA MSI quirk
  2008-01-25  3:26     ` Shane Huang
@ 2008-01-25  3:35       ` Tejun Heo
  2008-01-25  3:48         ` Shane Huang
  0 siblings, 1 reply; 10+ messages in thread
From: Tejun Heo @ 2008-01-25  3:35 UTC (permalink / raw)
  To: Shane Huang; +Cc: gregkh, linux-kernel, linux-pci

Shane Huang wrote:
> I did some modification to this patch and send it again, Please check
> it.
> The quirk to 0x4395 has been removed because 0x4395 only belongs to
> SB800.
> 
>> 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.

You need to merge the above two messages into one patch description.

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

After S-O-B, you can put --- and between it and the patch body, you can
say things which you wanna mention but don't think should be included in
commit message.

> +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) {
> +		pci_read_config_byte(p, PCI_CLASS_REVISION, &rev);

Please drop unnecessary braces and you can you p->revision.

> +	}
> +	if ((rev < 0x3B) && (rev >= 0x30)) {
> +		dev->dev_flags |= PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG;
> +	}

Hmm... So, if there's no SMBUS device the quirk applies.  Is this
intended?  If that can't happen, just do if (!p) return;

Also, pci_get_device() requires matching pci_dev_put().

> +}
>  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
>  			PCI_DEVICE_ID_TIGON3_5780,
>  			quirk_msi_intx_disable_bug);
> @@ -1729,17 +1747,15 @@
>  			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);
> -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4395,
> -			quirk_msi_intx_disable_bug);
> +			quirk_msi_intx_disable_ati_bug);

You tested this, right?

-- 
tejun

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [patch] PCI: modify SB700 SATA MSI quirk
  2008-01-24 11:12   ` [patch] PCI: modify SB700 SATA MSI quirk Shane Huang
  2008-01-25  0:19     ` Tejun Heo
@ 2008-01-25  3:26     ` Shane Huang
  2008-01-25  3:35       ` Tejun Heo
  1 sibling, 1 reply; 10+ messages in thread
From: Shane Huang @ 2008-01-25  3:26 UTC (permalink / raw)
  To: gregkh, htejun; +Cc: linux-kernel, linux-pci, Shane Huang

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

I did some modification to this patch and send it again, Please check
it.
The quirk to 0x4395 has been removed because 0x4395 only belongs to
SB800.


Thanks
Shane


> -----Original Message-----
> From: Shane Huang 
> 
> 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>


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
10:55:21.000000000 +0800
@@ -1709,6 +1709,24 @@
 {
 	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) {
+		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 +1747,15 @@
 			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);
-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);

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

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 10:55:21.000000000 +0800
@@ -1709,6 +1709,24 @@
 {
 	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) {
+		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 +1747,15 @@
 			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);
-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);

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [patch] PCI: modify SB700 SATA MSI quirk
  2008-01-24 11:12   ` [patch] PCI: modify SB700 SATA MSI quirk Shane Huang
@ 2008-01-25  0:19     ` Tejun Heo
  2008-01-25  3:26     ` Shane Huang
  1 sibling, 0 replies; 10+ messages in thread
From: Tejun Heo @ 2008-01-25  0:19 UTC (permalink / raw)
  To: Shane Huang; +Cc: gregkh, linux-kernel, linux-pci

Shane Huang wrote:
> 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.

Can you please get a decent email client?  Thunderbird + toggle word
wrap + external editor combination works fine.

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

It would be nice if things stay under 80col limit although we don't
follow that too well in quirks.c.

> +	if (p!=NULL) {

We usually write 'if (p)' and don't use unless necessary.

> +		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);

-- 
tejun

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [patch] PCI: modify SB700 SATA MSI quirk
  2008-01-24 10:59 ` [patch] PCI: disable the MSI of AMD RS690 Shane Huang
@ 2008-01-24 11:12   ` Shane Huang
  2008-01-25  0:19     ` Tejun Heo
  2008-01-25  3:26     ` Shane Huang
  0 siblings, 2 replies; 10+ messages in thread
From: Shane Huang @ 2008-01-24 11:12 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, linux-pci, htejun, Shane Huang

[-- 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);

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-02-01 17:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
  -- strict thread matches above, loose matches on Subject: below --
2007-10-18  9:14 [patch] PCI: disable MSI on more ATI NorthBridges Shane Huang
2008-01-24 10:59 ` [patch] PCI: disable the MSI of AMD RS690 Shane Huang
2008-01-24 11:12   ` [patch] PCI: modify SB700 SATA MSI quirk Shane Huang
2008-01-25  0:19     ` 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

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