Skip to contentSkip to conversation

VIA VT610 IDE support for 2.4.28 (trivial)

PATCH Applied Mathias Kretschmer 5 participants 9 messages Nov 23, 2004 – Aug 17, 2005 PCI

lore
Share & tools
lore
#0 lore raw

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 ?

-Mathias

drivers/ide/pci/generic.c +4 -0
diff -u -r -N linux-2.4.28/drivers/ide/pci/generic.c linux-2.4.28-vt610/drivers/ide/pci/generic.c
@@ -66,6 +66,9 @@
 	hwif->mwdma_mask = 0x07;
 	hwif->swdma_mask = 0x07;
 
+	if (hwif->pci_dev->device == PCI_DEVICE_ID_VIA_610) 
+   		hwif->udma_four = 1; /* mj */
+
 	if (!noautodma)
 		hwif->autodma = 1;
 	hwif->drives[0].autodma = hwif->autodma;
@@ -143,6 +146,7 @@
 	{ PCI_VENDOR_ID_TOSHIBA, PCI_DEVICE_ID_TOSHIBA_PICCOLO,	   PCI_ANY_ID, PCI_ANY_ID, 0, 0, 9},
 	{ PCI_VENDOR_ID_TOSHIBA, PCI_DEVICE_ID_TOSHIBA_PICCOLO_1,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 10},
 	{ PCI_VENDOR_ID_TOSHIBA, PCI_DEVICE_ID_TOSHIBA_PICCOLO_2,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 11},
+	{ PCI_VENDOR_ID_VIA,    PCI_DEVICE_ID_VIA_610,             PCI_ANY_ID, PCI_ANY_ID, 0, 0, 12},
 	{ 0, },
 };
 
drivers/ide/pci/generic.h +13 -0
diff -u -r -N linux-2.4.28/drivers/ide/pci/generic.h linux-2.4.28-vt610/drivers/ide/pci/generic.h
@@ -157,6 +157,19 @@
 		.channels	= 2,
 		.autodma	= NOAUTODMA,
 		.bootable	= ON_BOARD,
+	},{	/* 12 */
+	        .vendor         = PCI_VENDOR_ID_VIA,
+	        .device         = PCI_DEVICE_ID_VIA_610,
+	        .name           = "VIA_610",
+	        .init_chipset   = init_chipset_generic,
+	        .init_iops      = NULL,
+	        .init_hwif      = init_hwif_generic,
+	        .init_dma       = init_dma_generic,
+	        .channels       = 2,
+	        .autodma        = AUTODMA,
+	        .enablebits     = {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
+	        .bootable       = ON_BOARD,
+	        .extra          = 0,
 	},{
 		.vendor		= 0,
 		.device		= 0,
include/linux/pci_ids.h +1 -0
diff -u -r -N linux-2.4.28/include/linux/pci_ids.h linux-2.4.28-vt610/include/linux/pci_ids.h
@@ -1123,6 +1123,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_610		0x3164
 #define PCI_DEVICE_ID_VIA_P4X333	0x3168
 #define PCI_DEVICE_ID_VIA_8235		0x3177
 #define PCI_DEVICE_ID_VIA_8377_0	0x3189
#1 lore raw
Quoted 5 lines · Mathias Kretschmer

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?

Jeff

#2 lore raw
Quoted 10 lines · Jeff Garzik
Quoted 5 lines · Mathias Kretschmer

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?

I only have that one ASUS board and there's data on the disks that I do not want to loose. The current patch worked well for me (performance is pretty decent), so I went with it.

I can modify the VIA driver code, but looking at the various exceptions/quirks for the various VIA chip sets, I'm a bit hesitant to test it on my box.

-Mathias

#3 lore raw

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

Quoted 6 lines · Mathias Kretschmer
Quoted 4 lines · Jeff Garzik
Quoted 2 lines · Mathias Kretschmer

hi,

Quoted 7 lines
Quoted 7 lines
Quoted 3 lines

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

drivers/ide/pci/via82cxxx.c +2 -0
diff -aurN linux-2.4.29/drivers/ide/pci/via82cxxx.c linux-2.4.29-vanilla/drivers/ide/pci/via82cxxx.c
@@ -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, },
 };
 
drivers/ide/pci/via82cxxx.h +13 -0
diff -aurN linux-2.4.29/drivers/ide/pci/via82cxxx.h linux-2.4.29-vanilla/drivers/ide/pci/via82cxxx.h
@@ -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,
include/linux/pci_ids.h +1 -0
diff -aurN linux-2.4.29/include/linux/pci_ids.h linux-2.4.29-vanilla/include/linux/pci_ids.h
@@ -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
#4 lore raw

VIA VT6410 IDE support for 2.6.11-rc3/via82cxxx

Quoted 18 lines · Mathias Kretschmer
Quoted 6 lines · Mathias Kretschmer
Quoted 4 lines · Jeff Garzik
Quoted 2 lines · Mathias Kretschmer

hi,

Quoted 8 lines
Quoted 8 lines
Quoted 3 lines

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?

Quoted 6 lines

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

as above, but for 2.6.11-rc3

drivers/ide/pci/via82cxxx.c +21 -9
diff -ruaN linux-2.6.10/drivers/ide/pci/via82cxxx.c linux-2.6.10-vt6410/drivers/ide/pci/via82cxxx.c
@@ -79,6 +79,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 },
@@ -619,24 +620,35 @@
 	hwif->drives[1].autodma = hwif->autodma;
 }
 
-static ide_pci_device_t via82cxxx_chipset __devinitdata = {
-	.name		= "VP_IDE",
-	.init_chipset	= init_chipset_via82cxxx,
-	.init_hwif	= init_hwif_via82cxxx,
-	.channels	= 2,
-	.autodma	= NOAUTODMA,
-	.enablebits	= {{0x40,0x02,0x02}, {0x40,0x01,0x01}},
-	.bootable	= ON_BOARD,
+static ide_pci_device_t via82cxxx_chipsets[] __devinitdata = {
+	{ /* 0 */
+		.name		= "VP_IDE",
+		.init_chipset	= init_chipset_via82cxxx,
+		.init_hwif	= init_hwif_via82cxxx,
+		.channels	= 2,
+		.autodma	= NOAUTODMA,
+		.enablebits	= {{0x40,0x02,0x02}, {0x40,0x01,0x01}},
+		.bootable	= ON_BOARD
+	},{ /* 1 */
+                .name           = "VP_IDE",
+                .init_chipset   = init_chipset_via82cxxx,
+                .init_hwif      = init_hwif_via82cxxx,
+                .channels       = 2,
+                .autodma        = AUTODMA,
+                .enablebits     = {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
+                .bootable       = ON_BOARD,
+	}
 };
 
 static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-	return ide_setup_pci_device(dev, &via82cxxx_chipset);
+	return ide_setup_pci_device(dev, &via82cxxx_chipsets[id->driver_data]);
 }
 
 static struct pci_device_id via_pci_tbl[] = {
 	{ 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, 0},
+	{ PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_6410,     PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
 	{ 0, },
 };
 MODULE_DEVICE_TABLE(pci, via_pci_tbl);
include/linux/pci_ids.h +1 -0
diff -ruaN linux-2.6.10/include/linux/pci_ids.h linux-2.6.10-vt6410/include/linux/pci_ids.h
@@ -1280,6 +1280,7 @@
 #define PCI_DEVICE_ID_VIA_8703_51_0	0x3148
 #define PCI_DEVICE_ID_VIA_8237_SATA	0x3149
 #define PCI_DEVICE_ID_VIA_XN266		0x3156
+#define PCI_DEVICE_ID_VIA_6410          0x3164
 #define PCI_DEVICE_ID_VIA_8754C_0	0x3168
 #define PCI_DEVICE_ID_VIA_8235		0x3177
 #define PCI_DEVICE_ID_VIA_P4N333	0x3178
#5 lore raw

Re: VIA VT6410 IDE support for 2.6.11-rc3/via82cxxx

Quoted 25 lines · Mathias Kretschmer
Quoted 23 lines · Mathias Kretschmer
Quoted 8 lines · Mathias Kretschmer
Quoted 6 lines · Jeff Garzik
Quoted 4 lines · Mathias Kretschmer

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.

Quoted 7 lines
Quoted 7 lines
Quoted 1 line

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.

Quoted 6 lines
Quoted 3 lines

Cheers,

Mathias

as above, but for 2.6.11-rc3

Bart, got this one?

Jeff

#6 lore raw

Re: VIA VT6410 IDE support for 2.6.11-rc3/via82cxxx

Quoted 32 lines · Jeff Garzik
Quoted 31 lines · Mathias Kretschmer
Quoted 29 lines · Mathias Kretschmer
Quoted 18 lines · Mathias Kretschmer
Quoted 16 lines · Jeff Garzik
Quoted 9 lines · Mathias Kretschmer

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 ?

Quoted 2 lines
Quoted 2 lines

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.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

Cheers,

Mathias

as above, but for 2.6.11-rc3

Bart, got this one?

I applied it (after whitespace cleanup) to ide-dev-2.6.

Thanks,
Bartlomiej

#7 lore raw

Re: VIA VT6410 IDE support for 2.6.11-rc3/via82cxxx

Quoted 23 lines · Bartlomiej Zolnierkiewicz
Quoted 22 lines · Jeff Garzik
Quoted 21 lines · Mathias Kretschmer
Quoted 19 lines · Mathias Kretschmer
Quoted 9 lines · Mathias Kretschmer
Quoted 8 lines · Jeff Garzik
Quoted 7 lines · Mathias Kretschmer

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.

Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

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.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

as above, but for 2.6.11-rc3

Bart, got this one?

I applied it (after whitespace cleanup) to ide-dev-2.6.

Sorry to bother you, but what's the status of this patch? Since that time, 2.6.11 and 2.6.12 kernels were released, now 2.6.13 is almost ready, and the VT6410 support does not seem to appear even in -mm. Has the patch been lost, or is it broken?

#8 lore raw

Re: VIA VT6410 IDE support for 2.6.11-rc3/via82cxxx

In reply to Bartlomiej Zolnierkiewicz

(sending this again, because did not see the message in linux-kernel for 2 days and suspect that it has been lost; sorry if someone receives a duplicate)

Quoted 23 lines · Bartlomiej Zolnierkiewicz
Quoted 22 lines · Jeff Garzik
Quoted 21 lines · Mathias Kretschmer
Quoted 19 lines · Mathias Kretschmer
Quoted 9 lines · Mathias Kretschmer
Quoted 8 lines · Jeff Garzik
Quoted 7 lines · Mathias Kretschmer

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.

Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

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.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

as above, but for 2.6.11-rc3

Bart, got this one?

I applied it (after whitespace cleanup) to ide-dev-2.6.

Sorry to bother you, but what's the status of this patch? Since that time, 2.6.11 and 2.6.12 kernels were released, now 2.6.13 is almost ready, and the VT6410 support does not seem to appear even in -mm. Has the patch been lost, or is it broken?