OSDN Git Service

[PATCH] IDE: enable PATA UDMA support for ICH7
authorivaylo@bglans.net <ivaylo@bglans.net>
Fri, 10 Aug 2007 21:31:30 +0000 (00:31 +0300)
committerWilly Tarreau <w@1wt.eu>
Sun, 11 Nov 2007 18:02:39 +0000 (19:02 +0100)
Hello,

I have ASUS P5LD2-VM mobo with Intel ICH7 PATA IDE. It works only
in PIO mode, so I changed piix driver in 2.4.35 to support UDMA modes -
patch is bellow.

I'm a little bit confused about the specifications of ICH7 PATA, from ASUS
say it is UDMA 100, but from Intel and in 2.6.XX kernel tree it is as UDMA
133. My confusion became stronger and from bios ide SATA/PATA options of
my mobo.

Anyway, the patch works for me and it should work for all mobos with 945
chipset, but need to be tested. If there are any volunteers to apply patch
and test it will be good.

Please report the results and play around with mobo bios SATA/PATA IDE
setings.

Best Regards,
Ivaylo Josifov

drivers/ide/pci/piix.c
drivers/ide/pci/piix.h
include/linux/pci_ids.h

index 45c04e0..e413f07 100644 (file)
@@ -155,6 +155,7 @@ static int piix_get_info (char *buffer, char **addr, off_t offset, int count)
                        case PCI_DEVICE_ID_INTEL_82801E_11:
                        case PCI_DEVICE_ID_INTEL_ESB_2:
                        case PCI_DEVICE_ID_INTEL_ICH6_2:
+                       case PCI_DEVICE_ID_INTEL_ICH7_21:
                                p += sprintf(p, "PIIX4 Ultra 100 ");
                                break;
                        case PCI_DEVICE_ID_INTEL_82372FB_1:
@@ -294,6 +295,7 @@ static u8 piix_ratemask (ide_drive_t *drive)
                case PCI_DEVICE_ID_INTEL_82801EB_11:
                case PCI_DEVICE_ID_INTEL_ESB_2:
                case PCI_DEVICE_ID_INTEL_ICH6_2:
+               case PCI_DEVICE_ID_INTEL_ICH7_21:
                        mode = 3;
                        break;
                /* UDMA 66 capable */
@@ -683,6 +685,7 @@ static unsigned int __devinit init_chipset_piix (struct pci_dev *dev, const char
                case PCI_DEVICE_ID_INTEL_82801E_11:
                case PCI_DEVICE_ID_INTEL_ESB_2:
                case PCI_DEVICE_ID_INTEL_ICH6_2:
+               case PCI_DEVICE_ID_INTEL_ICH7_21:
                {
                        unsigned int extra = 0;
                        pci_read_config_dword(dev, 0x54, &extra);
@@ -882,6 +885,7 @@ static struct pci_device_id piix_pci_tbl[] __devinitdata = {
 #endif
        { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB_2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 19},
        { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 20},
+       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_21, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 21},
        { 0, },
 };
 
index 7524b86..635acb0 100644 (file)
@@ -333,6 +333,20 @@ static ide_pci_device_t piix_pci_info[] __devinitdata = {
                .enablebits     = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
                .bootable       = ON_BOARD,
                .extra          = 0,
+       },{     /* 21 */
+               .vendor         = PCI_VENDOR_ID_INTEL,
+               .device         = PCI_DEVICE_ID_INTEL_ICH7_21,
+               .name           = "ICH7",
+               .init_setup     = init_setup_piix,
+               .init_chipset   = init_chipset_piix,
+               .init_iops      = NULL,
+               .init_hwif      = init_hwif_piix,
+               .init_dma       = init_dma_piix,
+               .channels       = 1,
+               .autodma        = AUTODMA,
+               .enablebits     = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
+               .bootable       = ON_BOARD,
+               .extra          = 0,
        },{
                .vendor         = 0,
                .device         = 0,
index c60134f..ef07d5f 100644 (file)
 #define PCI_DEVICE_ID_INTEL_ICH6_1     0x2641
 #define PCI_DEVICE_ID_INTEL_ICH6_2     0x266f
 #define PCI_DEVICE_ID_INTEL_ICH6_18    0x266e
+#define PCI_DEVICE_ID_INTEL_ICH7_21    0x27df
 #define PCI_DEVICE_ID_INTEL_82850_HB   0x2530
 #define PCI_DEVICE_ID_INTEL_82845G_HB  0x2560
 #define PCI_DEVICE_ID_INTEL_SMCH       0x3590