New kernels uploaded for testing
I've uploaded to ftp.suse.com/pub/people/aj/Kernel-AMD64 some *experimental* kernels. Those contain a number of fixes for ACPI issues that we encountered with various desktop boards. I hope these work everywhere and fix the problems we had with Nvidia NForce3 based boards and with VIA boards. Testers are welcome - and please report any problems (or success if you had problems before). Thanks, Andreas -- Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
Andreas Jaeger <aj@suse.de> writes:
I've uploaded to ftp.suse.com/pub/people/aj/Kernel-AMD64 some *experimental* kernels. Those contain a number of fixes for ACPI issues that we encountered with various desktop boards. I hope these work everywhere and fix the problems we had with Nvidia NForce3 based boards and with VIA boards.
Testers are welcome - and please report any problems (or success if you had problems before).
I just removed the kernel since it had some problems. I'll upload a new one in an hour or two, Andreas -- Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
I've uploaded the update new kernel (-85). Please report problems here, Andreas -- Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
Hi, Just a quick question before I mess up something: Have you guys fixed the UDMA bugs on nForce3 based mainboards? So far, I have not been able to set the DMA-flag when running SuSE 8.2 AMD64 on my Opteron. I've succeeded once but never ever again, using Kernel 2.4.18 IIRC. Also, my 32-bit Debian is running just fine (with UDMA enabled) with Kernel 2.4.18-1-k7 (a Debian kernel package) but not with anything other than that... kinda odd, isn't it? Martin On Wed, 2003-09-17 at 08:20, Andreas Jaeger wrote:
I've uploaded to ftp.suse.com/pub/people/aj/Kernel-AMD64 some *experimental* kernels. Those contain a number of fixes for ACPI issues that we encountered with various desktop boards. I hope these work everywhere and fix the problems we had with Nvidia NForce3 based boards and with VIA boards.
Testers are welcome - and please report any problems (or success if you had problems before).
Thanks, Andreas
On Sat, Sep 20, 2003 at 12:51:52AM +0200, Martin Jungowski wrote:
Hi,
Just a quick question before I mess up something: Have you guys fixed the UDMA bugs on nForce3 based mainboards? So far, I have not been able to set the DMA-flag when running SuSE 8.2 AMD64 on my Opteron. I've succeeded once but never ever again, using Kernel 2.4.18 IIRC. Also, my 32-bit Debian is running just fine (with UDMA enabled) with Kernel 2.4.18-1-k7 (a Debian kernel package) but not with anything other than that... kinda odd, isn't it?
Nforce3 needs some entries in an table in the IDE driver. There is a patch on Linux-Kernel for this. It's in the latest SuSE kernel, but I haven't integrated it into x86-64.org CVS yet. -Andi
Hi, Thanks for that information, I'll give it a shot right away Martin On Sat, 2003-09-20 at 02:50, Andi Kleen wrote:
On Sat, Sep 20, 2003 at 12:51:52AM +0200, Martin Jungowski wrote:
Hi,
Just a quick question before I mess up something: Have you guys fixed the UDMA bugs on nForce3 based mainboards? So far, I have not been able to set the DMA-flag when running SuSE 8.2 AMD64 on my Opteron. I've succeeded once but never ever again, using Kernel 2.4.18 IIRC. Also, my 32-bit Debian is running just fine (with UDMA enabled) with Kernel 2.4.18-1-k7 (a Debian kernel package) but not with anything other than that... kinda odd, isn't it?
Nforce3 needs some entries in an table in the IDE driver.
There is a patch on Linux-Kernel for this. It's in the latest SuSE kernel, but I haven't integrated it into x86-64.org CVS yet.
-Andi
Hi, Maybe I'm blind (or just too stupid ;)) but could you tell me where I can find that kernel-patch for nForce3 based mainboards? I'd love to have my own 2.4.2x kernel but seems that I can't find that patch. Martin On Sat, 2003-09-20 at 02:50, Andi Kleen wrote:
On Sat, Sep 20, 2003 at 12:51:52AM +0200, Martin Jungowski wrote:
Hi,
Just a quick question before I mess up something: Have you guys fixed the UDMA bugs on nForce3 based mainboards? So far, I have not been able to set the DMA-flag when running SuSE 8.2 AMD64 on my Opteron. I've succeeded once but never ever again, using Kernel 2.4.18 IIRC. Also, my 32-bit Debian is running just fine (with UDMA enabled) with Kernel 2.4.18-1-k7 (a Debian kernel package) but not with anything other than that... kinda odd, isn't it?
Nforce3 needs some entries in an table in the IDE driver.
There is a patch on Linux-Kernel for this. It's in the latest SuSE kernel, but I haven't integrated it into x86-64.org CVS yet.
-Andi
Martin Jungowski <jungowsk@in.tum.de> writes:
Hi,
Maybe I'm blind (or just too stupid ;)) but could you tell me where I can find that kernel-patch for nForce3 based mainboards? I'd love to have my own 2.4.2x kernel but seems that I can't find that patch.
It's part of the kernel-source SRC rpm, it's called ide-nforce3. I'm appending it below. It might not patch cleanly against your tree, Andreas diff -u linux-2.4.21/drivers/ide/pci/amd74xx.h-NFORCE3 linux-2.4.21/drivers/ide/pci/amd74xx.h --- linux-2.4.21/drivers/ide/pci/amd74xx.h-NFORCE3 2003-09-18 08:49:23.000000000 +0200 +++ linux-2.4.21/drivers/ide/pci/amd74xx.h 2003-09-18 08:59:01.000000000 +0200 @@ -124,6 +124,90 @@ .bootable = ON_BOARD, .extra = 0, }, + { /* 7 */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE, + .name = "NFORCE2", + .init_chipset = init_chipset_amd74xx, + .init_iops = NULL, + .init_hwif = init_hwif_amd74xx, + .init_dma = init_dma_amd74xx, + .channels = 2, + .autodma = AUTODMA, + .enablebits = {{0x50,0x02,0x02}, {0x50,0x01,0x01}}, + .bootable = ON_BOARD, + .extra = 0, + }, + { /* 8 */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA, + .name = "NFORCE2", + .init_chipset = init_chipset_amd74xx, + .init_iops = NULL, + .init_hwif = init_hwif_amd74xx, + .init_dma = init_dma_amd74xx, + .channels = 2, + .autodma = AUTODMA, + .enablebits = {{0x50,0x02,0x02}, {0x50,0x01,0x01}}, + .bootable = ON_BOARD, + .extra = 0, + }, + { /* 9 */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE, + .name = "NFORCE3", + .init_chipset = init_chipset_amd74xx, + .init_iops = NULL, + .init_hwif = init_hwif_amd74xx, + .init_dma = init_dma_amd74xx, + .channels = 2, + .autodma = AUTODMA, + .enablebits = {{0x50,0x02,0x02}, {0x50,0x01,0x01}}, + .bootable = ON_BOARD, + .extra = 0, + }, + { /* 10 */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE, + .name = "NFORCE3", + .init_chipset = init_chipset_amd74xx, + .init_iops = NULL, + .init_hwif = init_hwif_amd74xx, + .init_dma = init_dma_amd74xx, + .channels = 2, + .autodma = AUTODMA, + .enablebits = {{0x50,0x02,0x02}, {0x50,0x01,0x01}}, + .bootable = ON_BOARD, + .extra = 0, + }, + { /* 11 */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA, + .name = "NFORCE3", + .init_chipset = init_chipset_amd74xx, + .init_iops = NULL, + .init_hwif = init_hwif_amd74xx, + .init_dma = init_dma_amd74xx, + .channels = 2, + .autodma = AUTODMA, + .enablebits = {{0x50,0x02,0x02}, {0x50,0x01,0x01}}, + .bootable = ON_BOARD, + .extra = 0, + }, + { /* 12 */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2, + .name = "NFORCE3", + .init_chipset = init_chipset_amd74xx, + .init_iops = NULL, + .init_hwif = init_hwif_amd74xx, + .init_dma = init_dma_amd74xx, + .channels = 2, + .autodma = AUTODMA, + .enablebits = {{0x50,0x02,0x02}, {0x50,0x01,0x01}}, + .bootable = ON_BOARD, + .extra = 0, + }, { .vendor = 0, .device = 0, diff -u linux-2.4.21/drivers/ide/pci/amd74xx.c-NFORCE3 linux-2.4.21/drivers/ide/pci/amd74xx.c --- linux-2.4.21/drivers/ide/pci/amd74xx.c-NFORCE3 2003-09-18 08:49:23.000000000 +0200 +++ linux-2.4.21/drivers/ide/pci/amd74xx.c 2003-09-18 08:59:10.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Version 2.10 + * Version 2.11 * * AMD 755/756/766/8111 and nVidia nForce IDE driver for Linux. * @@ -40,9 +40,11 @@ #define AMD_UDMA_33 0x01 #define AMD_UDMA_66 0x02 #define AMD_UDMA_100 0x03 +#define AMD_UDMA_133 0x04 #define AMD_CHECK_SWDMA 0x08 #define AMD_BAD_SWDMA 0x10 #define AMD_BAD_FIFO 0x20 +#define AMD_CHECK_SERENADE 0x40 /* * AMD SouthBridge chips. @@ -58,9 +60,20 @@ { PCI_DEVICE_ID_AMD_VIPER_7409, 0x00, 0x40, AMD_UDMA_66 | AMD_CHECK_SWDMA }, /* AMD-756 Viper */ { PCI_DEVICE_ID_AMD_VIPER_7411, 0x00, 0x40, AMD_UDMA_100 | AMD_BAD_FIFO }, /* AMD-766 Viper */ { PCI_DEVICE_ID_AMD_OPUS_7441, 0x00, 0x40, AMD_UDMA_100 }, /* AMD-768 Opus */ - { PCI_DEVICE_ID_AMD_8111_IDE, 0x00, 0x40, AMD_UDMA_100 }, /* AMD-8111 */ - { PCI_DEVICE_ID_NVIDIA_NFORCE_IDE, 0x00, 0x50, AMD_UDMA_100 }, /* nVidia nForce */ - { PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE, 0x00, 0x50, AMD_UDMA_100 }, /* nVidia nForce */ + { PCI_DEVICE_ID_AMD_8111_IDE, 0x00, 0x40, AMD_UDMA_133 }, /* AMD-8111 */ + { PCI_DEVICE_ID_NVIDIA_NFORCE_IDE, 0x00, 0x50, AMD_UDMA_100 }, /* nVidia nForce */ + { PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE, 0x00, 0x50, AMD_UDMA_100 }, /* nVidia nForce2 */ + { PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE, 0x00, 0x50, AMD_UDMA_100 }, + /* nVidia nForce2s */ + { PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA, 0x00, 0x50, AMD_UDMA_100 }, + /* nVidia nForce2s SATA */ + { PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE, 0x00, 0x50, AMD_UDMA_133 }, /* nVidia nForce3 */ + { PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE, 0x00, 0x50, AMD_UDMA_100 }, + /* NVIDIA nForce3s */ + { PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA, 0x00, 0x50, AMD_UDMA_100 }, + /* NVIDIA nForce3s SATA */ + { PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2, 0x00, 0x50, AMD_UDMA_100 }, + /* NVIDIA nForce3s SATA2 */ { 0 } }; @@ -70,9 +83,9 @@ static unsigned int amd_80w; static unsigned int amd_clock; -static unsigned char amd_cyc2udma[] = { 6, 6, 5, 4, 0, 1, 1, 2, 2, 3, 3 }; -static unsigned char amd_udma2cyc[] = { 4, 6, 8, 10, 3, 2, 1, 1 }; -static char *amd_dma[] = { "MWDMA16", "UDMA33", "UDMA66", "UDMA100" }; +static unsigned char amd_cyc2udma[] = { 6, 6, 5, 4, 0, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 7 }; +static unsigned char amd_udma2cyc[] = { 4, 6, 8, 10, 3, 2, 1, 15 }; +static char *amd_dma[] = { "MWDMA16", "UDMA33", "UDMA66", "UDMA100", "UDMA133" }; /* * AMD /proc entry. @@ -104,7 +117,7 @@ amd_print("----------AMD BusMastering IDE Configuration----------------"); - amd_print("Driver Version: 2.10"); + amd_print("Driver Version: 2.11"); amd_print("South Bridge: %s", bmide_dev->name); pci_read_config_byte(dev, PCI_REVISION_ID, &t); @@ -129,7 +142,7 @@ amd_print("Cable Type: %10s%20s", (amd_80w & 1) ? "80w" : "40w", (amd_80w & 2) ? "80w" : "40w"); if (!amd_clock) - return p - buffer; + return p - buffer; amd_print("-------------------drive0----drive1----drive2----drive3-----"); @@ -155,6 +168,12 @@ continue; } + if (den[i] && uen[i] && udma[i] == 15) { + speed[i] = amd_clock * 4; + cycle[i] = 500000 / amd_clock; + continue; + } + speed[i] = 4 * amd_clock / ((den[i] && uen[i]) ? udma[i] : (active[i] + recover[i]) * 2); cycle[i] = 1000000 * ((den[i] && uen[i]) ? udma[i] : (active[i] + recover[i]) * 2) / amd_clock / 2; } @@ -200,6 +219,7 @@ case AMD_UDMA_33: t = timing->udma ? (0xc0 | (FIT(timing->udma, 2, 5) - 2)) : 0x03; break; case AMD_UDMA_66: t = timing->udma ? (0xc0 | amd_cyc2udma[FIT(timing->udma, 2, 10)]) : 0x03; break; case AMD_UDMA_100: t = timing->udma ? (0xc0 | amd_cyc2udma[FIT(timing->udma, 1, 10)]) : 0x03; break; + case AMD_UDMA_133: t = timing->udma ? (0xc0 | amd_cyc2udma[FIT(timing->udma, 1, 15)]) : 0x03; break; default: return; } @@ -234,6 +254,7 @@ } if (speed == XFER_UDMA_5 && amd_clock <= 33333) t.udma = 1; + if (speed == XFER_UDMA_6 && amd_clock <= 33333) t.udma = 15; amd_set_speed(HWIF(drive)->pci_dev, drive->dn, &t); @@ -276,7 +297,8 @@ XFER_PIO | XFER_EPIO | XFER_MWDMA | XFER_UDMA | ((amd_config->flags & AMD_BAD_SWDMA) ? 0 : XFER_SWDMA) | (w80 && (amd_config->flags & AMD_UDMA) >= AMD_UDMA_66 ? XFER_UDMA_66 : 0) | - (w80 && (amd_config->flags & AMD_UDMA) >= AMD_UDMA_100 ? XFER_UDMA_100 : 0)); + (w80 && (amd_config->flags & AMD_UDMA) >= AMD_UDMA_100 ? XFER_UDMA_100 : 0) | + (w80 && (amd_config->flags & AMD_UDMA) >= AMD_UDMA_133 ? XFER_UDMA_133 : 0)); amd_set_drive(drive, speed); @@ -312,6 +334,7 @@ switch (amd_config->flags & AMD_UDMA) { + case AMD_UDMA_133: case AMD_UDMA_100: pci_read_config_byte(dev, AMD_CABLE_DETECT, &t); pci_read_config_dword(dev, AMD_UDMA_TIMING, &u); @@ -343,6 +366,15 @@ (amd_config->flags & AMD_BAD_FIFO) ? (t & 0x0f) : (t | 0xf0)); /* + * Take care of incorrectly wired Serenade mainboards. + */ + + if ((amd_config->flags & AMD_CHECK_SERENADE) && + dev->subsystem_vendor == PCI_VENDOR_ID_AMD && + dev->subsystem_device == PCI_DEVICE_ID_AMD_SERENADE) + amd_config->flags = AMD_UDMA_100; + +/* * Determine the system bus clock. */ @@ -373,15 +405,14 @@ */ #if defined(DISPLAY_AMD_TIMINGS) && defined(CONFIG_PROC_FS) - if (!amd74xx_proc) { - amd_base = pci_resource_start(dev, 4); - bmide_dev = dev; - ide_pci_register_host_proc(&amd74xx_procs[0]); - amd74xx_proc = 1; - } + if (!amd74xx_proc) { + amd_base = pci_resource_start(dev, 4); + bmide_dev = dev; + ide_pci_register_host_proc(&amd74xx_procs[0]); + amd74xx_proc = 1; + } #endif /* DISPLAY_AMD_TIMINGS && CONFIG_PROC_FS */ - return dev->irq; } @@ -409,18 +440,18 @@ if (!hwif->dma_base) return; - hwif->atapi_dma = 1; - hwif->ultra_mask = 0x7f; - hwif->mwdma_mask = 0x07; - hwif->swdma_mask = 0x07; - - if (!(hwif->udma_four)) - hwif->udma_four = ((amd_enabled & amd_80w) >> hwif->channel) & 1; - hwif->ide_dma_check = &amd74xx_ide_dma_check; - if (!noautodma) - hwif->autodma = 1; - hwif->drives[0].autodma = hwif->autodma; - hwif->drives[1].autodma = hwif->autodma; + hwif->atapi_dma = 1; + hwif->ultra_mask = 0x7f; + hwif->mwdma_mask = 0x07; + hwif->swdma_mask = 0x07; + + if (!(hwif->udma_four)) + hwif->udma_four = ((amd_enabled & amd_80w) >> hwif->channel) & 1; + hwif->ide_dma_check = &amd74xx_ide_dma_check; + if (!noautodma) + hwif->autodma = 1; + hwif->drives[0].autodma = hwif->autodma; + hwif->drives[1].autodma = hwif->autodma; } /* @@ -454,6 +485,12 @@ { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8111_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4}, { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5}, { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 6}, + { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 7}, + { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8}, + { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 9}, + { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 10}, + { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 11}, + { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 12}, { 0, }, }; diff -u linux-2.4.21/drivers/ide/Config.in-NFORCE3 linux-2.4.21/drivers/ide/Config.in --- linux-2.4.21/drivers/ide/Config.in-NFORCE3 2003-09-18 08:49:23.000000000 +0200 +++ linux-2.4.21/drivers/ide/Config.in 2003-09-18 08:49:32.000000000 +0200 @@ -47,8 +47,7 @@ dep_tristate ' AEC62XX chipset support' CONFIG_BLK_DEV_AEC62XX $CONFIG_BLK_DEV_IDEDMA_PCI dep_tristate ' ALI M15x3 chipset support' CONFIG_BLK_DEV_ALI15X3 $CONFIG_BLK_DEV_IDEDMA_PCI dep_mbool ' ALI M15x3 WDC support (DANGEROUS)' CONFIG_WDC_ALI15X3 $CONFIG_BLK_DEV_ALI15X3 - dep_tristate ' AMD Viper support' CONFIG_BLK_DEV_AMD74XX $CONFIG_BLK_DEV_IDEDMA_PCI - dep_mbool ' AMD Viper ATA-66 Override' CONFIG_AMD74XX_OVERRIDE $CONFIG_BLK_DEV_AMD74XX + dep_tristate ' AMD and nVidia IDE support ' CONFIG_BLK_DEV_AMD74XX $CONFIG_BLK_DEV_IDEDMA_PCI dep_tristate ' CMD64{3|6|8|9} chipset support' CONFIG_BLK_DEV_CMD64X $CONFIG_BLK_DEV_IDEDMA_PCI dep_tristate ' Compaq Triflex IDE support' CONFIG_BLK_DEV_TRIFLEX $CONFIG_BLK_DEV_IDEDMA_PCI dep_tristate ' CY82C693 chipset support' CONFIG_BLK_DEV_CY82C693 $CONFIG_BLK_DEV_IDEDMA_PCI diff -u linux-2.4.21/include/linux/pci_ids.h-NFORCE3 linux-2.4.21/include/linux/pci_ids.h --- linux-2.4.21/include/linux/pci_ids.h-NFORCE3 2003-09-18 08:49:23.000000000 +0200 +++ linux-2.4.21/include/linux/pci_ids.h 2003-09-18 08:50:42.000000000 +0200 @@ -384,6 +384,7 @@ #define PCI_DEVICE_ID_AMD_LANCE 0x2000 #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 #define PCI_DEVICE_ID_AMD_SCSI 0x2020 +#define PCI_DEVICE_ID_AMD_SERENADE 0x36c0 #define PCI_DEVICE_ID_AMD_FE_GATE_7006 0x7006 #define PCI_DEVICE_ID_AMD_FE_GATE_7007 0x7007 #define PCI_DEVICE_ID_AMD_FE_GATE_700C 0x700C @@ -921,8 +922,14 @@ #define PCI_DEVICE_ID_NVIDIA_VTNT2 0x002C #define PCI_DEVICE_ID_NVIDIA_UVTNT2 0x002D #define PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE 0x0065 +#define PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE 0x0085 +#define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA 0x008e #define PCI_DEVICE_ID_NVIDIA_ITNT2 0x00A0 #define PCI_DEVICE_ID_NVIDIA_NFORCE3 0x00d1 +#define PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE 0x00d5 +#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA 0x00e3 +#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE 0x00e5 +#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2 0x00ee #define PCI_DEVICE_ID_NVIDIA_GEFORCE_SDR 0x0100 #define PCI_DEVICE_ID_NVIDIA_GEFORCE_DDR 0x0101 #define PCI_DEVICE_ID_NVIDIA_QUADRO 0x0103 -- Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
Hi, Thanks a million man. You were right, it did not patch cleanly with the 2.4.21 kernel from kernel.org. But what are geeks for, hu? ;) I rewrote all the necessary files and yup, it's working now. I'm gonna provide that generic kernel-patch now so others can use it too :) Martin On Sat, 2003-09-20 at 10:52, Andreas Jaeger wrote:
Martin Jungowski <jungowsk@in.tum.de> writes:
Hi,
Maybe I'm blind (or just too stupid ;)) but could you tell me where I can find that kernel-patch for nForce3 based mainboards? I'd love to have my own 2.4.2x kernel but seems that I can't find that patch.
It's part of the kernel-source SRC rpm, it's called ide-nforce3. I'm appending it below. It might not patch cleanly against your tree,
Andreas
diff -u linux-2.4.21/drivers/ide/pci/amd74xx.h-NFORCE3 linux-2.4.21/drivers/ide/pci/amd74xx.h --- linux-2.4.21/drivers/ide/pci/amd74xx.h-NFORCE3 2003-09-18 08:49:23.000000000 +0200 +++ linux-2.4.21/drivers/ide/pci/amd74xx.h 2003-09-18 08:59:01.000000000 +0200 @@ -124,6 +124,90 @@ .bootable = ON_BOARD, .extra = 0, }, + { /* 7 */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE, + .name = "NFORCE2", + .init_chipset = init_chipset_amd74xx, + .init_iops = NULL, + .init_hwif = init_hwif_amd74xx, + .init_dma = init_dma_amd74xx, + .channels = 2, + .autodma = AUTODMA, + .enablebits = {{0x50,0x02,0x02}, {0x50,0x01,0x01}}, + .bootable = ON_BOARD, + .extra = 0, + }, + { /* 8 */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA, + .name = "NFORCE2", + .init_chipset = init_chipset_amd74xx, + .init_iops = NULL, + .init_hwif = init_hwif_amd74xx, + .init_dma = init_dma_amd74xx, + .channels = 2, + .autodma = AUTODMA, + .enablebits = {{0x50,0x02,0x02}, {0x50,0x01,0x01}}, + .bootable = ON_BOARD, + .extra = 0, + }, + { /* 9 */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE, + .name = "NFORCE3", + .init_chipset = init_chipset_amd74xx, + .init_iops = NULL, + .init_hwif = init_hwif_amd74xx, + .init_dma = init_dma_amd74xx, + .channels = 2, + .autodma = AUTODMA, + .enablebits = {{0x50,0x02,0x02}, {0x50,0x01,0x01}}, + .bootable = ON_BOARD, + .extra = 0, + }, + { /* 10 */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE, + .name = "NFORCE3", + .init_chipset = init_chipset_amd74xx, + .init_iops = NULL, + .init_hwif = init_hwif_amd74xx, + .init_dma = init_dma_amd74xx, + .channels = 2, + .autodma = AUTODMA, + .enablebits = {{0x50,0x02,0x02}, {0x50,0x01,0x01}}, + .bootable = ON_BOARD, + .extra = 0, + }, + { /* 11 */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA, + .name = "NFORCE3", + .init_chipset = init_chipset_amd74xx, + .init_iops = NULL, + .init_hwif = init_hwif_amd74xx, + .init_dma = init_dma_amd74xx, + .channels = 2, + .autodma = AUTODMA, + .enablebits = {{0x50,0x02,0x02}, {0x50,0x01,0x01}}, + .bootable = ON_BOARD, + .extra = 0, + }, + { /* 12 */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2, + .name = "NFORCE3", + .init_chipset = init_chipset_amd74xx, + .init_iops = NULL, + .init_hwif = init_hwif_amd74xx, + .init_dma = init_dma_amd74xx, + .channels = 2, + .autodma = AUTODMA, + .enablebits = {{0x50,0x02,0x02}, {0x50,0x01,0x01}}, + .bootable = ON_BOARD, + .extra = 0, + }, { .vendor = 0, .device = 0, diff -u linux-2.4.21/drivers/ide/pci/amd74xx.c-NFORCE3 linux-2.4.21/drivers/ide/pci/amd74xx.c --- linux-2.4.21/drivers/ide/pci/amd74xx.c-NFORCE3 2003-09-18 08:49:23.000000000 +0200 +++ linux-2.4.21/drivers/ide/pci/amd74xx.c 2003-09-18 08:59:10.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Version 2.10 + * Version 2.11 * * AMD 755/756/766/8111 and nVidia nForce IDE driver for Linux. * @@ -40,9 +40,11 @@ #define AMD_UDMA_33 0x01 #define AMD_UDMA_66 0x02 #define AMD_UDMA_100 0x03 +#define AMD_UDMA_133 0x04 #define AMD_CHECK_SWDMA 0x08 #define AMD_BAD_SWDMA 0x10 #define AMD_BAD_FIFO 0x20 +#define AMD_CHECK_SERENADE 0x40
/* * AMD SouthBridge chips. @@ -58,9 +60,20 @@ { PCI_DEVICE_ID_AMD_VIPER_7409, 0x00, 0x40, AMD_UDMA_66 | AMD_CHECK_SWDMA }, /* AMD-756 Viper */ { PCI_DEVICE_ID_AMD_VIPER_7411, 0x00, 0x40, AMD_UDMA_100 | AMD_BAD_FIFO }, /* AMD-766 Viper */ { PCI_DEVICE_ID_AMD_OPUS_7441, 0x00, 0x40, AMD_UDMA_100 }, /* AMD-768 Opus */ - { PCI_DEVICE_ID_AMD_8111_IDE, 0x00, 0x40, AMD_UDMA_100 }, /* AMD-8111 */ - { PCI_DEVICE_ID_NVIDIA_NFORCE_IDE, 0x00, 0x50, AMD_UDMA_100 }, /* nVidia nForce */ - { PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE, 0x00, 0x50, AMD_UDMA_100 }, /* nVidia nForce */ + { PCI_DEVICE_ID_AMD_8111_IDE, 0x00, 0x40, AMD_UDMA_133 }, /* AMD-8111 */ + { PCI_DEVICE_ID_NVIDIA_NFORCE_IDE, 0x00, 0x50, AMD_UDMA_100 }, /* nVidia nForce */ + { PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE, 0x00, 0x50, AMD_UDMA_100 }, /* nVidia nForce2 */ + { PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE, 0x00, 0x50, AMD_UDMA_100 }, + /* nVidia nForce2s */ + { PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA, 0x00, 0x50, AMD_UDMA_100 }, + /* nVidia nForce2s SATA */ + { PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE, 0x00, 0x50, AMD_UDMA_133 }, /* nVidia nForce3 */ + { PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE, 0x00, 0x50, AMD_UDMA_100 }, + /* NVIDIA nForce3s */ + { PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA, 0x00, 0x50, AMD_UDMA_100 }, + /* NVIDIA nForce3s SATA */ + { PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2, 0x00, 0x50, AMD_UDMA_100 }, + /* NVIDIA nForce3s SATA2 */
{ 0 } }; @@ -70,9 +83,9 @@ static unsigned int amd_80w; static unsigned int amd_clock;
-static unsigned char amd_cyc2udma[] = { 6, 6, 5, 4, 0, 1, 1, 2, 2, 3, 3 }; -static unsigned char amd_udma2cyc[] = { 4, 6, 8, 10, 3, 2, 1, 1 }; -static char *amd_dma[] = { "MWDMA16", "UDMA33", "UDMA66", "UDMA100" }; +static unsigned char amd_cyc2udma[] = { 6, 6, 5, 4, 0, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 7 }; +static unsigned char amd_udma2cyc[] = { 4, 6, 8, 10, 3, 2, 1, 15 }; +static char *amd_dma[] = { "MWDMA16", "UDMA33", "UDMA66", "UDMA100", "UDMA133" };
/* * AMD /proc entry. @@ -104,7 +117,7 @@
amd_print("----------AMD BusMastering IDE Configuration----------------");
- amd_print("Driver Version: 2.10"); + amd_print("Driver Version: 2.11"); amd_print("South Bridge: %s", bmide_dev->name);
pci_read_config_byte(dev, PCI_REVISION_ID, &t); @@ -129,7 +142,7 @@ amd_print("Cable Type: %10s%20s", (amd_80w & 1) ? "80w" : "40w", (amd_80w & 2) ? "80w" : "40w");
if (!amd_clock) - return p - buffer; + return p - buffer;
amd_print("-------------------drive0----drive1----drive2----drive3-----");
@@ -155,6 +168,12 @@ continue; }
+ if (den[i] && uen[i] && udma[i] == 15) { + speed[i] = amd_clock * 4; + cycle[i] = 500000 / amd_clock; + continue; + } + speed[i] = 4 * amd_clock / ((den[i] && uen[i]) ? udma[i] : (active[i] + recover[i]) * 2); cycle[i] = 1000000 * ((den[i] && uen[i]) ? udma[i] : (active[i] + recover[i]) * 2) / amd_clock / 2; } @@ -200,6 +219,7 @@ case AMD_UDMA_33: t = timing->udma ? (0xc0 | (FIT(timing->udma, 2, 5) - 2)) : 0x03; break; case AMD_UDMA_66: t = timing->udma ? (0xc0 | amd_cyc2udma[FIT(timing->udma, 2, 10)]) : 0x03; break; case AMD_UDMA_100: t = timing->udma ? (0xc0 | amd_cyc2udma[FIT(timing->udma, 1, 10)]) : 0x03; break; + case AMD_UDMA_133: t = timing->udma ? (0xc0 | amd_cyc2udma[FIT(timing->udma, 1, 15)]) : 0x03; break; default: return; }
@@ -234,6 +254,7 @@ }
if (speed == XFER_UDMA_5 && amd_clock <= 33333) t.udma = 1; + if (speed == XFER_UDMA_6 && amd_clock <= 33333) t.udma = 15;
amd_set_speed(HWIF(drive)->pci_dev, drive->dn, &t);
@@ -276,7 +297,8 @@ XFER_PIO | XFER_EPIO | XFER_MWDMA | XFER_UDMA | ((amd_config->flags & AMD_BAD_SWDMA) ? 0 : XFER_SWDMA) | (w80 && (amd_config->flags & AMD_UDMA) >= AMD_UDMA_66 ? XFER_UDMA_66 : 0) | - (w80 && (amd_config->flags & AMD_UDMA) >= AMD_UDMA_100 ? XFER_UDMA_100 : 0)); + (w80 && (amd_config->flags & AMD_UDMA) >= AMD_UDMA_100 ? XFER_UDMA_100 : 0) | + (w80 && (amd_config->flags & AMD_UDMA) >= AMD_UDMA_133 ? XFER_UDMA_133 : 0));
amd_set_drive(drive, speed);
@@ -312,6 +334,7 @@
switch (amd_config->flags & AMD_UDMA) {
+ case AMD_UDMA_133: case AMD_UDMA_100: pci_read_config_byte(dev, AMD_CABLE_DETECT, &t); pci_read_config_dword(dev, AMD_UDMA_TIMING, &u); @@ -343,6 +366,15 @@ (amd_config->flags & AMD_BAD_FIFO) ? (t & 0x0f) : (t | 0xf0));
/* + * Take care of incorrectly wired Serenade mainboards. + */ + + if ((amd_config->flags & AMD_CHECK_SERENADE) && + dev->subsystem_vendor == PCI_VENDOR_ID_AMD && + dev->subsystem_device == PCI_DEVICE_ID_AMD_SERENADE) + amd_config->flags = AMD_UDMA_100; + +/* * Determine the system bus clock. */
@@ -373,15 +405,14 @@ */
#if defined(DISPLAY_AMD_TIMINGS) && defined(CONFIG_PROC_FS) - if (!amd74xx_proc) { - amd_base = pci_resource_start(dev, 4); - bmide_dev = dev; - ide_pci_register_host_proc(&amd74xx_procs[0]); - amd74xx_proc = 1; - } + if (!amd74xx_proc) { + amd_base = pci_resource_start(dev, 4); + bmide_dev = dev; + ide_pci_register_host_proc(&amd74xx_procs[0]); + amd74xx_proc = 1; + } #endif /* DISPLAY_AMD_TIMINGS && CONFIG_PROC_FS */
- return dev->irq; }
@@ -409,18 +440,18 @@ if (!hwif->dma_base) return;
- hwif->atapi_dma = 1; - hwif->ultra_mask = 0x7f; - hwif->mwdma_mask = 0x07; - hwif->swdma_mask = 0x07; - - if (!(hwif->udma_four)) - hwif->udma_four = ((amd_enabled & amd_80w) >> hwif->channel) & 1; - hwif->ide_dma_check = &amd74xx_ide_dma_check; - if (!noautodma) - hwif->autodma = 1; - hwif->drives[0].autodma = hwif->autodma; - hwif->drives[1].autodma = hwif->autodma; + hwif->atapi_dma = 1; + hwif->ultra_mask = 0x7f; + hwif->mwdma_mask = 0x07; + hwif->swdma_mask = 0x07; + + if (!(hwif->udma_four)) + hwif->udma_four = ((amd_enabled & amd_80w) >> hwif->channel) & 1; + hwif->ide_dma_check = &amd74xx_ide_dma_check; + if (!noautodma) + hwif->autodma = 1; + hwif->drives[0].autodma = hwif->autodma; + hwif->drives[1].autodma = hwif->autodma; }
/* @@ -454,6 +485,12 @@ { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8111_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4}, { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5}, { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 6}, + { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 7}, + { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8}, + { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 9}, + { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 10}, + { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 11}, + { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 12}, { 0, }, };
diff -u linux-2.4.21/drivers/ide/Config.in-NFORCE3 linux-2.4.21/drivers/ide/Config.in --- linux-2.4.21/drivers/ide/Config.in-NFORCE3 2003-09-18 08:49:23.000000000 +0200 +++ linux-2.4.21/drivers/ide/Config.in 2003-09-18 08:49:32.000000000 +0200 @@ -47,8 +47,7 @@ dep_tristate ' AEC62XX chipset support' CONFIG_BLK_DEV_AEC62XX $CONFIG_BLK_DEV_IDEDMA_PCI dep_tristate ' ALI M15x3 chipset support' CONFIG_BLK_DEV_ALI15X3 $CONFIG_BLK_DEV_IDEDMA_PCI dep_mbool ' ALI M15x3 WDC support (DANGEROUS)' CONFIG_WDC_ALI15X3 $CONFIG_BLK_DEV_ALI15X3 - dep_tristate ' AMD Viper support' CONFIG_BLK_DEV_AMD74XX $CONFIG_BLK_DEV_IDEDMA_PCI - dep_mbool ' AMD Viper ATA-66 Override' CONFIG_AMD74XX_OVERRIDE $CONFIG_BLK_DEV_AMD74XX + dep_tristate ' AMD and nVidia IDE support ' CONFIG_BLK_DEV_AMD74XX $CONFIG_BLK_DEV_IDEDMA_PCI dep_tristate ' CMD64{3|6|8|9} chipset support' CONFIG_BLK_DEV_CMD64X $CONFIG_BLK_DEV_IDEDMA_PCI dep_tristate ' Compaq Triflex IDE support' CONFIG_BLK_DEV_TRIFLEX $CONFIG_BLK_DEV_IDEDMA_PCI dep_tristate ' CY82C693 chipset support' CONFIG_BLK_DEV_CY82C693 $CONFIG_BLK_DEV_IDEDMA_PCI diff -u linux-2.4.21/include/linux/pci_ids.h-NFORCE3 linux-2.4.21/include/linux/pci_ids.h --- linux-2.4.21/include/linux/pci_ids.h-NFORCE3 2003-09-18 08:49:23.000000000 +0200 +++ linux-2.4.21/include/linux/pci_ids.h 2003-09-18 08:50:42.000000000 +0200 @@ -384,6 +384,7 @@ #define PCI_DEVICE_ID_AMD_LANCE 0x2000 #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 #define PCI_DEVICE_ID_AMD_SCSI 0x2020 +#define PCI_DEVICE_ID_AMD_SERENADE 0x36c0 #define PCI_DEVICE_ID_AMD_FE_GATE_7006 0x7006 #define PCI_DEVICE_ID_AMD_FE_GATE_7007 0x7007 #define PCI_DEVICE_ID_AMD_FE_GATE_700C 0x700C @@ -921,8 +922,14 @@ #define PCI_DEVICE_ID_NVIDIA_VTNT2 0x002C #define PCI_DEVICE_ID_NVIDIA_UVTNT2 0x002D #define PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE 0x0065 +#define PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE 0x0085 +#define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA 0x008e #define PCI_DEVICE_ID_NVIDIA_ITNT2 0x00A0 #define PCI_DEVICE_ID_NVIDIA_NFORCE3 0x00d1 +#define PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE 0x00d5 +#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA 0x00e3 +#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE 0x00e5 +#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2 0x00ee #define PCI_DEVICE_ID_NVIDIA_GEFORCE_SDR 0x0100 #define PCI_DEVICE_ID_NVIDIA_GEFORCE_DDR 0x0101 #define PCI_DEVICE_ID_NVIDIA_QUADRO 0x0103
On Sat, Sep 20, 2003 at 10:44:31AM +0200, Martin Jungowski wrote:
Maybe I'm blind (or just too stupid ;)) but could you tell me where I can find that kernel-patch for nForce3 based mainboards? I'd love to have my own 2.4.2x kernel but seems that I can't find that patch.
For your own kernels or own distributions you're not on the right mailing list here. discuss@x86-64.org is probably better suited then. -Andi
participants (3)
-
Andi Kleen
-
Andreas Jaeger
-
Martin Jungowski