public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI fixup for old NCR 53C810 SCSI chips, kernel 2.4.18
@ 2002-04-01  0:02 Graham Cobb
  2002-04-01 14:51 ` Geert Uytterhoeven
  0 siblings, 1 reply; 2+ messages in thread
From: Graham Cobb @ 2002-04-01  0:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: marcelo, mj

This patch fixes a problem which prevents any version of the 2.4 kernel 
running on DECpc XL systems (from c. 1993).  On that system, the NCR 
53C810 SCSI subsystem integrated on the motherboard does not have a PCI 
class code, which breaks PCI resource allocation in all 2.4 kernels. 
 The symptom is "resource collisions" reported for the SCSI device:

PCI: Device 00:01.0 not available because of resource collisions

These systems typically only have SCSI disks so the 2.4 kernel cannot be 
booted.

If you are running an earlier kernel and want to know if you will have 
this problem when upgrading, use lspci -vvv and look for output similar 
to this:

00:01.0 Non-VGA unclassified device: Symbios Logic Inc. (formerly NCR) 
53c810 (rev 01)
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B-
    Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- 
<TAbort- <MAbort- >SERR- <PERR-
    Latency: 4 set
    Interrupt: pin A routed to IRQ 11
    Region 0: I/O ports at d000

If the listing says "Non-VGA unclassified device" for the 53c810, it 
will not work with the 2.4 kernel.

The workround is to add fixup code for this device in 
arch/i386/kernel/pci-pc.c.  The patch is small and is included below.  I 
would appreciate anyone who uses NCR 53c810-based SCSI devices testing 
this patch to make sure it doesn't break any other configurations.
Graham Cobb

--- linux-2.4.18.orig/arch/i386/kernel/pci-pc.c    Mon Feb 25 19:37:53 2002
+++ linux-2.4.18/arch/i386/kernel/pci-pc.c    Sun Mar 31 23:29:30 2002
@@ -1058,6 +1058,18 @@
         d->resource[i].flags |= PCI_BASE_ADDRESS_SPACE_IO;
 }
 
+static void __devinit  pci_fixup_ncr53c810(struct pci_dev *d)
+{
+    /*
+     * NCR 53C810 returns class code 0 (at least on some systems).
+     * Fix class to be PCI_CLASS_STORAGE_SCSI
+     */
+    if (!d->class) {
+        printk("PCI: fixing NCR 53C810 class code for %s\n", d->slot_name);
+        d->class = PCI_CLASS_STORAGE_SCSI << 8;
+    }
+}
+
 static void __devinit pci_fixup_ide_bases(struct pci_dev *d)
 {
     int i;
@@ -1148,6 +1160,7 @@
     { PCI_FIXUP_HEADER,    PCI_VENDOR_ID_VIA,    
PCI_DEVICE_ID_VIA_8622,            pci_fixup_via_northbridge_bug },
     { PCI_FIXUP_HEADER,    PCI_VENDOR_ID_VIA,    
PCI_DEVICE_ID_VIA_8361,            pci_fixup_via_northbridge_bug },
     { PCI_FIXUP_HEADER,    PCI_VENDOR_ID_VIA,    
PCI_DEVICE_ID_VIA_8367_0,    pci_fixup_via_northbridge_bug },
+    { PCI_FIXUP_HEADER,    PCI_VENDOR_ID_NCR,    
PCI_DEVICE_ID_NCR_53C810,    pci_fixup_ncr53c810 },
     { 0 }
 };
 



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

* Re: [PATCH] PCI fixup for old NCR 53C810 SCSI chips, kernel 2.4.18
  2002-04-01  0:02 [PATCH] PCI fixup for old NCR 53C810 SCSI chips, kernel 2.4.18 Graham Cobb
@ 2002-04-01 14:51 ` Geert Uytterhoeven
  0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2002-04-01 14:51 UTC (permalink / raw)
  To: Graham Cobb; +Cc: Linux Kernel Development, Marcelo Tosatti, mj

On Mon, 1 Apr 2002, Graham Cobb wrote:
> This patch fixes a problem which prevents any version of the 2.4 kernel 
> running on DECpc XL systems (from c. 1993).  On that system, the NCR 
> 53C810 SCSI subsystem integrated on the motherboard does not have a PCI 
> class code, which breaks PCI resource allocation in all 2.4 kernels. 
>  The symptom is "resource collisions" reported for the SCSI device:
> 
> PCI: Device 00:01.0 not available because of resource collisions
> 
> These systems typically only have SCSI disks so the 2.4 kernel cannot be 
> booted.
> 
> If you are running an earlier kernel and want to know if you will have 
> this problem when upgrading, use lspci -vvv and look for output similar 
> to this:
> 
> 00:01.0 Non-VGA unclassified device: Symbios Logic Inc. (formerly NCR) 
> 53c810 (rev 01)
>     Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
> Stepping- SERR- FastB2B-
>     Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- 
> <TAbort- <MAbort- >SERR- <PERR-
>     Latency: 4 set
>     Interrupt: pin A routed to IRQ 11
>     Region 0: I/O ports at d000
> 
> If the listing says "Non-VGA unclassified device" for the 53c810, it 
> will not work with the 2.4 kernel.
> 
> The workround is to add fixup code for this device in 
> arch/i386/kernel/pci-pc.c.  The patch is small and is included below.  I 
> would appreciate anyone who uses NCR 53c810-based SCSI devices testing 
> this patch to make sure it doesn't break any other configurations.
> Graham Cobb

This problem seems not to be limited to ia32: on my DEC UDB AXP-box (on which I
never tried 2.4.x so far), lspci shows:

| 00:06.0 Non-VGA unclassified device: Symbios Logic Inc. (formerly NCR) 53c810 (rev 01)
|	Flags: bus master, medium devsel, latency 255, IRQ 11
|	I/O ports at 8000
|	Memory at 0000000004200000 (32-bit, non-prefetchable)

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


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

end of thread, other threads:[~2002-04-01 14:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-01  0:02 [PATCH] PCI fixup for old NCR 53C810 SCSI chips, kernel 2.4.18 Graham Cobb
2002-04-01 14:51 ` Geert Uytterhoeven

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