Skip to contentSkip to conversation

2.4.20: Broken AGP initialization for i845G chipset [patch]

DISCUSSION Michael Milligan 3 participants 4 messages Dec 19, 2002 – Dec 20, 2002

lore
Share & tools
lore
#0 lore raw

Chipset detection for the new Intel i845G chipset was added into the AGPGART driver, but it appears to call the wrong initialization routine. Stock compile causes some bad interaction that messes up the PCI bus such that, in my case, the follow on initialization of the Adaptec SCSI card (PCI) hangs the box. Needless to say, that's very bad since that's where all the hard drives live. SCSI driver initialization happens right after the AGP initialization... from dmesg (after my patch):
(without the patch, it would hang before "scsi0: Adaptec ..." or before finding
any drives)
....
Linux video capture interface: v1.00
Linux agpgart interface v0.99 (c) Jeff Hartmann
agpgart: Maximum main memory to use for agp memory: 203M
agpgart: Detected Intel i845G chipset
agpgart: AGP aperture is 256M @ 0xe0000000
SCSI subsystem driver Revision: 1.00
PCI: Found IRQ 9 for device 02:0a.0
PCI: Sharing IRQ 9 with 02:0a.1
PCI: Found IRQ 9 for device 02:0a.1
PCI: Sharing IRQ 9 with 02:0a.0
scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.8
<Adaptec 3950B Ultra2 SCSI adapter>
aic7896/97: Ultra2 Wide Channel A, SCSI Id=7, 32/253 SCBs

scsi1 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.8
<Adaptec 3950B Ultra2 SCSI adapter>
aic7896/97: Ultra2 Wide Channel B, SCSI Id=7, 32/253 SCBs

Vendor: IBM Model: DNES-309170Y Rev: SAH0
Type: Direct-Access ANSI SCSI revision: 03
(scsi0:A:0): 80.000MB/s transfers (40.000MHz, offset 30, 16bit)
....

Patch below. Calls the 845 initialization function instead of the 830MP, and a small formatting cleanup. This is verified working.

$ diff -u kernel-source-2.4.20/drivers/char/agp/agpgart_be.c.org kernel-source-2.4.20/drivers/char/agp/agpgart_be.c
--- kernel-source-2.4.20/drivers/char/agp/agpgart_be.c.org 2002-11-28 16:53:12.000000000 -0700
+++ kernel-source-2.4.20/drivers/char/agp/agpgart_be.c  2002-12-08 20:39:57.000000000 -0700
@@ -4551,12 +4551,12 @@
                "Intel",
                "i830M",
                intel_830mp_setup },
-    { PCI_DEVICE_ID_INTEL_845_G_0,
+       { PCI_DEVICE_ID_INTEL_845_G_0,
                 PCI_VENDOR_ID_INTEL,
                 INTEL_I845_G,
                 "Intel",
                 "i845G",
-                intel_830mp_setup },
+                intel_845_setup },
        { PCI_DEVICE_ID_INTEL_840_0,
                PCI_VENDOR_ID_INTEL,
                INTEL_I840,

Please note... kernel version below is that of my development box (where kernel was compiled)

-- System Information
Debian Release: testing/unstable
Kernel Version: Linux shadow 2.4.19 #3 SMP Mon Nov 25 20:48:02 MST 2002 i686 Pentium III (Coppermine) GenuineIntel GNU/Linux

Versions of the packages kernel-source-2.4.20 depends on:

ii  binutils       2.13.90.0.10-1 The GNU assembler, linker and binary utiliti
ii  bzip2          1.0.2-1        A high-quality block-sorting file compressor
ii  coreutils      4.5.2-1        The GNU core utilities
ii  fileutils      4.5.2-1        GNU file management utilities

Regards,
Mike

Signature · 1 line
Michael Milligan  --  Free Agent  --  [email protected]
#1 lore raw
Quoted 3 lines · Michael Milligan

Chipset detection for the new Intel i845G chipset was added into the AGPGART driver, but it appears to call the wrong initialization routine. Stock compile

Ok I sent one of those to Marcelo for 2.4.21pre2. I'm not sure if I got both

#2 lore raw
In reply to Michael Milligan
Quoted 3 lines · Michael Milligan

Patch below. Calls the 845 initialization function instead of the 830MP, and a small formatting cleanup. This is verified working.

With testgart/some other AGP using app ?

It looks totally logical. I'm just wondering if it was a cut-n-paste accident, or someone had a genuine reason for doing that in the first place.

Dave

Signature · 2 lines
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs
#3 lore raw
Quoted 6 lines · Dave Jones
Quoted 3 lines · Michael Milligan

Patch below. Calls the 845 initialization function instead of the 830MP, and a small formatting cleanup. This is verified working.

With testgart/some other AGP using app ?

Patched, It boots on my shiny new ASUS P4B533-VM motherboard with GeForce 4 TI 4200 AGP card. Identifies the chipset properly and proceeds to boot fine. X works (nvidia driver), OpenGL works. Without patch, it hangs (the PCI bus I think) after AGP initialization.

Quoted 3 lines

It looks totally logical. I'm just wondering if it was a cut-n-paste accident, or someone had a genuine reason for doing that in the first place.

I have no idea if the 830MP initialization is supposedly more compatible with the 845G chipset than the 845 initialization. I just know it didn't work and took a guess as to what it should be.

Regards,
Mike

Signature · 1 line
Michael Milligan  --  Free Agent  --  [email protected]