public inbox for linux-kernel@vger.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; 39+ 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] 39+ messages in thread
* RE: [patch] PCI: disable MSI on more ATI NorthBridges
@ 2007-10-19 13:17 Shane Huang
  2007-10-19 19:57 ` Linas Vepstas
  0 siblings, 1 reply; 39+ messages in thread
From: Shane Huang @ 2007-10-19 13:17 UTC (permalink / raw)
  To: davem, gregkh, htejun, brice.goglin, david.gaarenstroom
  Cc: linux-kernel, linux-pci, shane.huang, chunhao.huang


Hi Guys:

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

Yes, you are right, to find out the root cause is better. Thank you
for all your suggestion and information to us.
Since we have little experience on PCI and MSI here, we had to try to
disable MSI  before we find a better solution. But as you are giving
us help now on this case, it's great! Then let's go...

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

I'm using kernel 2.6.23-rc5 to debug this MSI problem, which can NOT
boot on our Trevally board(RS690+SB700) without any kernel modification.

But if I comment out all the pci_intx() function calls in
drivers/pci/msi.c, it can boot now with MSI enabled as you expected!

# cat /proc/interrupts 
           CPU0       CPU1       
  0:        318     174060   IO-APIC-edge      timer
  8:          0          1   IO-APIC-edge      rtc
  9:          0          0   IO-APIC-fasteoi   acpi
 16:          0        204   IO-APIC-fasteoi   HDA Intel
 17:          0        479   IO-APIC-fasteoi   ohci_hcd:usb1, ohci_hcd:usb2, ehci_hcd:usb6
 18:          1          2   IO-APIC-fasteoi   ohci_hcd:usb3, ohci_hcd:usb4, ohci_hcd:usb5
 19:          0          0   IO-APIC-fasteoi   ehci_hcd:usb7
 22:          4          1   IO-APIC-fasteoi   yenta
8412:          0       1315   PCI-MSI-edge      eth0
8413:        381       4858   PCI-MSI-edge      ahci
NMI:          0          0 
LOC:     174285     174210 
ERR:          0

Also if I keep the pci_intx() calls in drivers/pci/msi.c and ONLY
comment out the pci_intx() call in drivers/ata/ahci.c
My system can boot up too with MSI enabled!

So does it mean that the root cause is our SB700 SATA controller
has a hardware bug where setting INTX_DISABLE in the PCI COMMAND
register masks MSI interrupts too? 
And what is the software solution or workaround?

I will continue debug this MSI problem next week. Any suggestions,
please don't hesitate to tell us.


Thanks
Best Regards

Shane

_________________________________________________________________
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx

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

end of thread, other threads:[~2008-01-25 10:40 UTC | newest]

Thread overview: 39+ 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
  -- strict thread matches above, loose matches on Subject: below --
2007-10-19 13:17 [patch] PCI: disable MSI on more ATI NorthBridges Shane Huang
2007-10-19 19:57 ` Linas Vepstas
2007-10-19 20:21   ` Jeff Garzik
2007-10-20 22:03     ` Benjamin Herrenschmidt
2007-10-22 20:26     ` Daniel Barkalow
2007-10-22 20:41       ` Jeff Garzik
2007-10-22 21:31         ` Daniel Barkalow
2007-10-22 23:48           ` Krzysztof Halasa
2007-10-23  0:13           ` David Miller
2007-10-23  5:52             ` Daniel Barkalow
2007-10-23  9:39             ` Shane Huang
2007-10-23 10:01             ` Jeff Garzik
2007-10-23 10:06               ` David Miller
2007-10-24  2:46                 ` David Miller
2007-10-23 10:15           ` Jeff Garzik
2007-10-22 23:40         ` Krzysztof Halasa
2007-10-22 23:58           ` David Miller
2007-10-23 10:13           ` Jeff Garzik
2007-10-20 14:50   ` Shane Huang
2007-10-20 20:52     ` David Gaarenstroom
2007-10-21  6:00       ` Shane Huang
2007-10-23 10:56       ` Shane Huang
2007-10-24  2:41         ` David Miller
2007-10-24  6:53           ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox