Re: VIA VT610 IDE support for 2.4.28 (trivial) - now for 2.4.29/via82cxxx

From: Mathias Kretschmer
Date: Sun Feb 06 2005 - 18:03:52 EST


Mathias Kretschmer wrote:
Jeff Garzik wrote:

Mathias Kretschmer wrote:

hi,

I found an older version of this patch (against 2.4.22) on some website. After a little bit of editing it applied cleanly to 2.4.27 (and now 2.4.28). It works fine for me on a ASUS P4P800-Deluxe with 4x 300GB disks.

Maybe someone finds this patch helpful. Any reason why the original patch did not make it into the kernel ?



Why not add it to the existing via82cxxx driver, and get better performance and device tuning?

OK, the attached patch adds support for the VIA 6410 chip to the via82cxxx driver (instead of the generic driver).
I've tested it on the board mentioned above. Works fine for me.

Cheers,

Mathias diff -aurN linux-2.4.29/drivers/ide/pci/via82cxxx.c linux-2.4.29-vanilla/drivers/ide/pci/via82cxxx.c
--- linux-2.4.29/drivers/ide/pci/via82cxxx.c 2003-08-25 04:44:41.000000000 -0700
+++ linux-2.4.29-vanilla/drivers/ide/pci/via82cxxx.c 2005-02-06 14:45:20.000000000 -0800
@@ -74,6 +74,7 @@
u8 rev_max;
u16 flags;
} via_isa_bridges[] = {
+ { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
{ "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
{ "vt8235", PCI_DEVICE_ID_VIA_8235, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
{ "vt8233a", PCI_DEVICE_ID_VIA_8233A, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
@@ -641,6 +642,7 @@
static struct pci_device_id via_pci_tbl[] __devinitdata = {
{ PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C576_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
+ { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_6410, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2},
{ 0, },
};

diff -aurN linux-2.4.29/drivers/ide/pci/via82cxxx.h linux-2.4.29-vanilla/drivers/ide/pci/via82cxxx.h
--- linux-2.4.29/drivers/ide/pci/via82cxxx.h 2003-06-13 07:51:33.000000000 -0700
+++ linux-2.4.29-vanilla/drivers/ide/pci/via82cxxx.h 2005-02-06 14:45:16.000000000 -0800
@@ -56,6 +56,19 @@
.enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}},
.bootable = ON_BOARD,
.extra = 0,
+ },{ /* 2 */
+ .vendor = PCI_VENDOR_ID_VIA,
+ .device = PCI_DEVICE_ID_VIA_6410,
+ .name = "VP_IDE",
+ .init_chipset = init_chipset_via82cxxx,
+ .init_iops = NULL,
+ .init_hwif = init_hwif_via82cxxx,
+ .init_dma = init_dma_via82cxxx,
+ .channels = 2,
+ .autodma = AUTODMA,
+ .enablebits = {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
+ .bootable = ON_BOARD,
+ .extra = 0,
},{
.vendor = 0,
.device = 0,
diff -aurN linux-2.4.29/include/linux/pci_ids.h linux-2.4.29-vanilla/include/linux/pci_ids.h
--- linux-2.4.29/include/linux/pci_ids.h 2005-01-19 06:10:12.000000000 -0800
+++ linux-2.4.29-vanilla/include/linux/pci_ids.h 2005-02-06 14:46:48.000000000 -0800
@@ -1136,6 +1136,7 @@
#define PCI_DEVICE_ID_VIA_8233A 0x3147
#define PCI_DEVICE_ID_VIA_P4M266 0x3148
#define PCI_DEVICE_ID_VIA_8237_SATA 0x3149
+#define PCI_DEVICE_ID_VIA_6410 0x3164
#define PCI_DEVICE_ID_VIA_P4X333 0x3168
#define PCI_DEVICE_ID_VIA_8235 0x3177
#define PCI_DEVICE_ID_VIA_8377_0 0x3189