LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [patch] PCI: disable MSI on more ATI NorthBridges
@ 2007-10-18  9:14 Shane Huang
  2007-10-18 10:19 ` David Miller
  2008-01-24 10:59 ` [patch] PCI: disable the MSI of AMD RS690 Shane Huang
  0 siblings, 2 replies; 19+ messages in thread
From: Shane Huang @ 2007-10-18  9:14 UTC (permalink / raw)
  To: gregkh, htejun
  Cc: linux-kernel, linux-pci, Su, Henry, Yang, Libin, Shane Huang

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

More ATI North Bridges like RS780 can't do MSI like its predecessors
in linux. Disable MSIs on them.

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

Since there is some word wrapping problem with my mail client MS outlook
if I copy the patch into the text, so I'll have to attach the patch as
an attachment. Please check it.


Thanks
Best Regards
Shane


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

diff -ruN linux-2.6.23_orig/drivers/pci/quirks.c linux-2.6.23/drivers/pci/quirks.c
--- linux-2.6.23_orig/drivers/pci/quirks.c	2007-10-10 04:31:38.000000000 +0800
+++ linux-2.6.23/drivers/pci/quirks.c	2007-10-18 16:51:30.000000000 +0800
@@ -1662,8 +1662,18 @@
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS400_200, quirk_disable_all_msi);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480, quirk_disable_all_msi);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RD580, quirk_disable_all_msi);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RD790, quirk_disable_all_msi);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RX790, quirk_disable_all_msi);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS690, quirk_disable_all_msi);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS690_ALT, quirk_disable_all_msi);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS740, quirk_disable_all_msi);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS740_ALT, quirk_disable_all_msi);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS780, quirk_disable_all_msi);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS780_ALT, quirk_disable_all_msi);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RD890S, quirk_disable_all_msi);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RD890, quirk_disable_all_msi);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RD870S, quirk_disable_all_msi);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RX880, quirk_disable_all_msi);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3351, quirk_disable_all_msi);
 
 /* Disable MSI on chipsets that are known to not support it */
diff -ruN linux-2.6.23_orig/include/linux/pci_ids.h linux-2.6.23/include/linux/pci_ids.h
--- linux-2.6.23_orig/include/linux/pci_ids.h	2007-10-10 04:31:38.000000000 +0800
+++ linux-2.6.23/include/linux/pci_ids.h	2007-10-18 16:41:57.000000000 +0800
@@ -361,8 +361,18 @@
 #define PCI_DEVICE_ID_ATI_RS400_200     0x5a33
 #define PCI_DEVICE_ID_ATI_RS480         0x5950
 #define PCI_DEVICE_ID_ATI_RD580		0x5952
+#define PCI_DEVICE_ID_ATI_RD790		0x5956
 #define PCI_DEVICE_ID_ATI_RX790		0x5957
 #define PCI_DEVICE_ID_ATI_RS690		0x7910
+#define PCI_DEVICE_ID_ATI_RS690_ALT	0x7911
+#define PCI_DEVICE_ID_ATI_RS740		0x7960
+#define PCI_DEVICE_ID_ATI_RS740_ALT	0x7961
+#define PCI_DEVICE_ID_ATI_RS780		0x9600
+#define PCI_DEVICE_ID_ATI_RS780_ALT	0x9601
+#define PCI_DEVICE_ID_ATI_RD890S	0x5a10
+#define PCI_DEVICE_ID_ATI_RD890		0x5a11
+#define PCI_DEVICE_ID_ATI_RD870S	0x5a12
+#define PCI_DEVICE_ID_ATI_RX880		0x5a13
 /* ATI IXP Chipset */
 #define PCI_DEVICE_ID_ATI_IXP200_IDE	0x4349
 #define PCI_DEVICE_ID_ATI_IXP200_SMBUS	0x4353

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

* Re: [patch] PCI: disable MSI on more ATI NorthBridges
  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
  2008-01-24 10:59 ` [patch] PCI: disable the MSI of AMD RS690 Shane Huang
  1 sibling, 1 reply; 19+ messages in thread
From: David Miller @ 2007-10-18 10:19 UTC (permalink / raw)
  To: Shane.Huang; +Cc: gregkh, htejun, linux-kernel, linux-pci, Henry.Su, Libin.Yang

From: "Shane Huang" <Shane.Huang@amd.com>
Date: Thu, 18 Oct 2007 17:14:36 +0800

> More ATI North Bridges like RS780 can't do MSI like its predecessors
> in linux. Disable MSIs on them.
> 
> Signed-off-by: Shane Huang <shane.huang@amd.com>

Can we get some detail as to why these north bridges have to have MSI
disabled completely?  I can't believe that all 6 of these ATI
controllers which will now be listed in the quirk table cannot use MSI
at all.

I've discovered several cases where it was a buggy device or a driver
bug that caused someone to erroneously submit patches that disable MSI
completely for the bridge they were behind.

I don't want that to happen any more.  One way to prevent that is to
have a full detailed justification for the MSI disabling in the
changelog or in the comments for the MSI quirk.

Thank you.

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

* RE: [patch] PCI: disable MSI on more ATI NorthBridges
  2007-10-18 10:19 ` David Miller
@ 2007-10-18 10:37   ` Shane Huang
  2007-10-18 11:46     ` David Miller
  0 siblings, 1 reply; 19+ messages in thread
From: Shane Huang @ 2007-10-18 10:37 UTC (permalink / raw)
  To: David Miller
  Cc: gregkh, htejun, linux-kernel, linux-pci, Su, Henry, Yang, Libin,
	Shane Huang

Hi Miller:

Thank you for your response.

The reason why MSIs of these northbridges do not work is still under
further debug, we are NOT able to tell its hardware issue or software
issue at this  time. But enablement of them will lead to the OS
installation failure in many distributions like openSUSE, Ubuntu etc:
https://bugzilla.novell.com/show_bug.cgi?id=302016

So we have to disable them firstly before we find out the root cause,
maybe they are just workarounds.

If you guys know much more about this MSI problem, don't hesitate to
tell us, we can debug on some of the hardware platforms.

BTW, There already some disablements to some ATI NB MSIs in the kernel,
the reasons are similar.


Thanks
Shane


> -----Original Message-----
> From: David Miller [mailto:davem@davemloft.net]
> Sent: Thursday, October 18, 2007 6:20 PM
> To: Shane Huang
> Cc: gregkh@suse.de; htejun@gmail.com; linux-kernel@vger.kernel.org;
linux-pci@atrey.karlin.mff.cuni.cz; Su, Henry; Yang, Libin
> Subject: Re: [patch] PCI: disable MSI on more ATI NorthBridges
> 
> From: "Shane Huang" <Shane.Huang@amd.com>
> Date: Thu, 18 Oct 2007 17:14:36 +0800
> 
> > More ATI North Bridges like RS780 can't do MSI like its predecessors
> > in linux. Disable MSIs on them.
> >
> > Signed-off-by: Shane Huang <shane.huang@amd.com>
> 
> Can we get some detail as to why these north bridges have to have MSI
> disabled completely?  I can't believe that all 6 of these ATI
> controllers which will now be listed in the quirk table cannot use MSI
> at all.
> 
> I've discovered several cases where it was a buggy device or a driver
> bug that caused someone to erroneously submit patches that disable MSI
> completely for the bridge they were behind.
> 
> I don't want that to happen any more.  One way to prevent that is to
> have a full detailed justification for the MSI disabling in the
> changelog or in the comments for the MSI quirk.
> 
> Thank you.
> 




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

* Re: [patch] PCI: disable MSI on more ATI NorthBridges
  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
  0 siblings, 2 replies; 19+ messages in thread
From: David Miller @ 2007-10-18 11:46 UTC (permalink / raw)
  To: Shane.Huang; +Cc: gregkh, htejun, linux-kernel, linux-pci, Henry.Su, Libin.Yang

From: "Shane Huang" <Shane.Huang@amd.com>
Date: Thu, 18 Oct 2007 18:37:59 +0800

> Hi Miller:
> 
> Thank you for your response.
> 
> The reason why MSIs of these northbridges do not work is still under
> further debug, we are NOT able to tell its hardware issue or software
> issue at this  time. But enablement of them will lead to the OS
> installation failure in many distributions like openSUSE, Ubuntu etc:
> https://bugzilla.novell.com/show_bug.cgi?id=302016
> 
> So we have to disable them firstly before we find out the root cause,
> maybe they are just workarounds.

This logic seems backwards, to me.  "shoot first, ask questions later"
To me this it not how to approach this problem.

Once you turn MSI off, there is next to no incentive to fix the
problem because users aren't running into it any longer.

The only two devices in that bug report which should be using MSI
would be the SATA controller and the broadcom ethernet NIC.  And by
the failed bootup logs provided by the user the problem is clearly
with the SATA controller.

One common problem we're finding is that some devices have a hardware
bug where setting INTX_DISABLE in the PCI COMMAND register masks MSI
interrupts too.

I mention this because the user in that report mentions that the
kernel upgrade causes the failure, and one thing we started doing not
too long ago was to set the INTX_DISABLE bit when MSI is enabled for a
device.

So maybe this SATA controller has this problem too.  It is easy to
test, simply comment out all of the pci_intx() function calls in
drivers/pci/msi.c and perform a test boot with MSI enabled.

I would rather you approach analysis of these kinds of MSI bugs in
this manner, instead of disabling MSI wholesale.  Because with the
latter approach it is nearly guarenteed that the real reason will only
be discovered with an extremely low priority.

Thank you.

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

* Re: [patch] PCI: disable MSI on more ATI NorthBridges
  2007-10-18 11:46     ` David Miller
@ 2007-10-18 15:24       ` Greg KH
  2007-10-19 17:42       ` Daniel Barkalow
  1 sibling, 0 replies; 19+ messages in thread
From: Greg KH @ 2007-10-18 15:24 UTC (permalink / raw)
  To: David Miller
  Cc: Shane.Huang, htejun, linux-kernel, linux-pci, Henry.Su, Libin.Yang

On Thu, Oct 18, 2007 at 04:46:11AM -0700, David Miller wrote:
> From: "Shane Huang" <Shane.Huang@amd.com>
> Date: Thu, 18 Oct 2007 18:37:59 +0800
> 
> > Hi Miller:
> > 
> > Thank you for your response.
> > 
> > The reason why MSIs of these northbridges do not work is still under
> > further debug, we are NOT able to tell its hardware issue or software
> > issue at this  time. But enablement of them will lead to the OS
> > installation failure in many distributions like openSUSE, Ubuntu etc:
> > https://bugzilla.novell.com/show_bug.cgi?id=302016
> > 
> > So we have to disable them firstly before we find out the root cause,
> > maybe they are just workarounds.
> 
> This logic seems backwards, to me.  "shoot first, ask questions later"
> To me this it not how to approach this problem.
> 
> Once you turn MSI off, there is next to no incentive to fix the
> problem because users aren't running into it any longer.

I agree with David here.  Please work to find the root cause of this
problem.  If it turns out that all of these chipsets have broken MSI and
can't handle it at all (oops, that's a major bug...) then we will accept
this patch.

But for now, let's not take a band-aid that prevents others from working
to solve the real issues here.

thanks,

greg k-h

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

* Re: [patch] PCI: disable MSI on more ATI NorthBridges
  2007-10-18 11:46     ` David Miller
  2007-10-18 15:24       ` Greg KH
@ 2007-10-19 17:42       ` Daniel Barkalow
  1 sibling, 0 replies; 19+ messages in thread
From: Daniel Barkalow @ 2007-10-19 17:42 UTC (permalink / raw)
  To: David Miller
  Cc: Shane.Huang, gregkh, htejun, linux-kernel, linux-pci, Henry.Su,
	Libin.Yang

On Thu, 18 Oct 2007, David Miller wrote:

> From: "Shane Huang" <Shane.Huang@amd.com>
> Date: Thu, 18 Oct 2007 18:37:59 +0800
> 
> > Hi Miller:
> > 
> > Thank you for your response.
> > 
> > The reason why MSIs of these northbridges do not work is still under
> > further debug, we are NOT able to tell its hardware issue or software
> > issue at this  time. But enablement of them will lead to the OS
> > installation failure in many distributions like openSUSE, Ubuntu etc:
> > https://bugzilla.novell.com/show_bug.cgi?id=302016
> > 
> > So we have to disable them firstly before we find out the root cause,
> > maybe they are just workarounds.
> 
> This logic seems backwards, to me.  "shoot first, ask questions later"
> To me this it not how to approach this problem.
> 
> Once you turn MSI off, there is next to no incentive to fix the
> problem because users aren't running into it any longer.
> 
> The only two devices in that bug report which should be using MSI
> would be the SATA controller and the broadcom ethernet NIC.  And by
> the failed bootup logs provided by the user the problem is clearly
> with the SATA controller.

And the same SATA controller could show up behind a different northbridge. 
It would be unfortunate to hit the same device bug independantly on each 
system and work around it by doing something that won't help the next 
user.

> One common problem we're finding is that some devices have a hardware
> bug where setting INTX_DISABLE in the PCI COMMAND register masks MSI
> interrupts too.
> 
> I mention this because the user in that report mentions that the
> kernel upgrade causes the failure, and one thing we started doing not
> too long ago was to set the INTX_DISABLE bit when MSI is enabled for a
> device.
> 
> So maybe this SATA controller has this problem too.  It is easy to
> test, simply comment out all of the pci_intx() function calls in
> drivers/pci/msi.c and perform a test boot with MSI enabled.

Have we gotten around to having a device quirk for this? I bet it won't be 
too long before we see a system where the SATA controller doesn't work 
with INTX disabled and the ethernet controller doesn't work with it 
enabled, since we've seen devices with each of these bugs.

	-Daniel
*This .sig left intentionally blank*

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

* [patch] PCI: disable the MSI of AMD RS690
  2007-10-18  9:14 [patch] PCI: disable MSI on more ATI NorthBridges Shane Huang
  2007-10-18 10:19 ` David Miller
@ 2008-01-24 10:59 ` Shane Huang
  2008-01-24 11:12   ` [patch] PCI: modify SB700 SATA MSI quirk Shane Huang
  2008-01-24 11:15   ` [patch] PCI: disable the MSI of AMD RS690 Brice Goglin
  1 sibling, 2 replies; 19+ messages in thread
From: Shane Huang @ 2008-01-24 10:59 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, linux-pci, htejun, Shane Huang

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

This patch recover Tejun's commit
4be8f906435a6af241821ab5b94b2b12cb7d57d8
 because there is one MSI bug on RS690+SB600 board which will lead to
boot failure. This bug is NOT same as the one in SB700 SATA controller,
quirk_msi_intx_disable_bug does not work to SB600. Disablement the MSI
of RS690 is the workaround.

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


Since there is some word wrapping problem with my mail client MS outlook
if I copy the patch into the text, so I'll 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:02:00.000000000 +0800
@@ -1623,6 +1623,7 @@
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS,
PCI_DEVICE_ID_SERVERWORKS_GCNB_LE, quirk_disable_all_msi);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS400_200,
quirk_disable_all_msi);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480,
quirk_disable_all_msi);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS690,
quirk_disable_all_msi);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3351,
quirk_disable_all_msi);
 
 /* Disable MSI on chipsets that are known to not support it */
diff -ruN old/include/linux/pci_ids.h new/include/linux/pci_ids.h
--- old/include/linux/pci_ids.h	2008-01-07 05:45:38.000000000 +0800
+++ new/include/linux/pci_ids.h	2008-01-22 11:01:55.000000000 +0800
@@ -360,6 +360,7 @@
 #define PCI_DEVICE_ID_ATI_RS400_166     0x5a32
 #define PCI_DEVICE_ID_ATI_RS400_200     0x5a33
 #define PCI_DEVICE_ID_ATI_RS480         0x5950
+#define PCI_DEVICE_ID_ATI_RS690         0x7910
 /* ATI IXP Chipset */
 #define PCI_DEVICE_ID_ATI_IXP200_IDE	0x4349
 #define PCI_DEVICE_ID_ATI_IXP200_SMBUS	0x4353



Thanks
Best Regards
Shane


[-- Attachment #2: disable_RS690_MSI.patch --]
[-- Type: application/octet-stream, Size: 1295 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:02:00.000000000 +0800
@@ -1623,6 +1623,7 @@
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_GCNB_LE, quirk_disable_all_msi);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS400_200, quirk_disable_all_msi);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480, quirk_disable_all_msi);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS690, quirk_disable_all_msi);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3351, quirk_disable_all_msi);
 
 /* Disable MSI on chipsets that are known to not support it */
diff -ruN old/include/linux/pci_ids.h new/include/linux/pci_ids.h
--- old/include/linux/pci_ids.h	2008-01-07 05:45:38.000000000 +0800
+++ new/include/linux/pci_ids.h	2008-01-22 11:01:55.000000000 +0800
@@ -360,6 +360,7 @@
 #define PCI_DEVICE_ID_ATI_RS400_166     0x5a32
 #define PCI_DEVICE_ID_ATI_RS400_200     0x5a33
 #define PCI_DEVICE_ID_ATI_RS480         0x5950
+#define PCI_DEVICE_ID_ATI_RS690         0x7910
 /* ATI IXP Chipset */
 #define PCI_DEVICE_ID_ATI_IXP200_IDE	0x4349
 #define PCI_DEVICE_ID_ATI_IXP200_SMBUS	0x4353

^ permalink raw reply	[flat|nested] 19+ 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
  2008-01-24 11:15   ` [patch] PCI: disable the MSI of AMD RS690 Brice Goglin
  1 sibling, 2 replies; 19+ 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] 19+ messages in thread

* Re: [patch] PCI: disable the MSI of AMD RS690
  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-24 11:15   ` Brice Goglin
  2008-01-25 10:39     ` Shane Huang
  1 sibling, 1 reply; 19+ messages in thread
From: Brice Goglin @ 2008-01-24 11:15 UTC (permalink / raw)
  To: Shane Huang; +Cc: gregkh, linux-kernel, linux-pci, htejun

Shane Huang wrote:
> This patch recover Tejun's commit
> 4be8f906435a6af241821ab5b94b2b12cb7d57d8
>  because there is one MSI bug on RS690+SB600 board which will lead to
> boot failure. This bug is NOT same as the one in SB700 SATA controller,
> quirk_msi_intx_disable_bug does not work to SB600. Disablement the MSI
> of RS690 is the workaround.
> 
> 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:02:00.000000000 +0800
> @@ -1623,6 +1623,7 @@
>  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS,
> PCI_DEVICE_ID_SERVERWORKS_GCNB_LE, quirk_disable_all_msi);
>  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS400_200,
> quirk_disable_all_msi);
>  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480,
> quirk_disable_all_msi);
> +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS690,
> quirk_disable_all_msi);

This patch disable MSI for the _whole_ system, not only behind the
RS690. Is this on purpose? Is MSI really going to be broken on any
bus that's _not_ behind RS690. If not, you might want to use 
quirk_disable_msi() instead (as we do for AMD8131).

Brice

^ permalink raw reply	[flat|nested] 19+ 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; 19+ 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] 19+ 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; 19+ 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] 19+ 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; 19+ 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] 19+ 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; 19+ 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] 19+ 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; 19+ 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] 19+ messages in thread

* RE: [patch] PCI: disable the MSI of AMD RS690
  2008-01-24 11:15   ` [patch] PCI: disable the MSI of AMD RS690 Brice Goglin
@ 2008-01-25 10:39     ` Shane Huang
  0 siblings, 0 replies; 19+ messages in thread
From: Shane Huang @ 2008-01-25 10:39 UTC (permalink / raw)
  To: Brice Goglin, gregkh; +Cc: linux-kernel, linux-pci, htejun, Shane Huang

Hi Brice:


> > +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS690,
> > quirk_disable_all_msi);
> 
> This patch disable MSI for the _whole_ system, not only behind the
> RS690. Is this on purpose? Is MSI really going to be broken on any
> bus that's _not_ behind RS690. If not, you might want to use 
> quirk_disable_msi() instead (as we do for AMD8131).


quirk_disable_msi() can not fix the issue in my debug, 
quirk_msi_intx_disable_bug() which can fix SB700 SATA MSI bug does not
work either.
quirk_disable_all_msi is the only workaround I found.

If there is any other guy who also has one SB600+RS690 board, and can
help
to  verify this RS690 MSI disablement patch with a new kernel version
such as
2.6.24-rc7,  that's great.


BTW:
RS690 MSI disablement should NOT affect SB700 MSI, because as I know, 
there will not be the combination of RS690+SB700 on the market.


Thanks
Shane



^ permalink raw reply	[flat|nested] 19+ 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; 19+ 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] 19+ 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; 19+ 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] 19+ 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; 19+ 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] 19+ messages in thread

* [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; 19+ 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] 19+ messages in thread

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

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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   ` [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
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

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