diff options
Diffstat (limited to 'drivers/ide/pci/generic.c')
-rw-r--r-- | drivers/ide/pci/generic.c | 57 |
1 files changed, 35 insertions, 22 deletions
diff --git a/drivers/ide/pci/generic.c b/drivers/ide/pci/generic.c index 48caa468b76..cce6311b02d 100644 --- a/drivers/ide/pci/generic.c +++ b/drivers/ide/pci/generic.c @@ -73,11 +73,6 @@ static void __devinit init_hwif_generic (ide_hwif_t *hwif) hwif->ultra_mask = 0x7f; hwif->mwdma_mask = 0x07; hwif->swdma_mask = 0x07; - - if (!noautodma) - hwif->autodma = 1; - hwif->drives[0].autodma = hwif->autodma; - hwif->drives[1].autodma = hwif->autodma; } #if 0 @@ -97,77 +92,92 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = { .init_hwif = init_hwif_generic, .autodma = AUTODMA, .bootable = ON_BOARD, + .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, },{ /* 1 */ .name = "NS87410", .init_hwif = init_hwif_generic, .autodma = AUTODMA, .enablebits = {{0x43,0x08,0x08}, {0x47,0x08,0x08}}, .bootable = ON_BOARD, + .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, },{ /* 2 */ .name = "SAMURAI", .init_hwif = init_hwif_generic, .autodma = AUTODMA, .bootable = ON_BOARD, + .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, },{ /* 3 */ .name = "HT6565", .init_hwif = init_hwif_generic, .autodma = AUTODMA, .bootable = ON_BOARD, + .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, },{ /* 4 */ .name = "UM8673F", .init_hwif = init_hwif_generic, .autodma = NODMA, .bootable = ON_BOARD, + .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, },{ /* 5 */ .name = "UM8886A", .init_hwif = init_hwif_generic, .autodma = NODMA, .bootable = ON_BOARD, + .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, },{ /* 6 */ .name = "UM8886BF", .init_hwif = init_hwif_generic, .autodma = NODMA, .bootable = ON_BOARD, + .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, },{ /* 7 */ .name = "HINT_IDE", .init_hwif = init_hwif_generic, .autodma = AUTODMA, .bootable = ON_BOARD, + .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, },{ /* 8 */ .name = "VIA_IDE", .init_hwif = init_hwif_generic, .autodma = NOAUTODMA, .bootable = ON_BOARD, + .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, },{ /* 9 */ .name = "OPTI621V", .init_hwif = init_hwif_generic, .autodma = NOAUTODMA, .bootable = ON_BOARD, + .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, },{ /* 10 */ .name = "VIA8237SATA", .init_hwif = init_hwif_generic, .autodma = AUTODMA, .bootable = OFF_BOARD, + .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, },{ /* 11 */ .name = "Piccolo0102", .init_hwif = init_hwif_generic, .autodma = NOAUTODMA, .bootable = ON_BOARD, + .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, },{ /* 12 */ .name = "Piccolo0103", .init_hwif = init_hwif_generic, .autodma = NOAUTODMA, .bootable = ON_BOARD, + .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, },{ /* 13 */ .name = "Piccolo0105", .init_hwif = init_hwif_generic, .autodma = NOAUTODMA, .bootable = ON_BOARD, + .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, },{ /* 14 */ .name = "Revolution", .init_hwif = init_hwif_generic, .autodma = AUTODMA, .bootable = OFF_BOARD, + .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, } }; @@ -226,25 +236,28 @@ out: return ret; } -static struct pci_device_id generic_pci_tbl[] = { - { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87410, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, - { PCI_VENDOR_ID_PCTECH, PCI_DEVICE_ID_PCTECH_SAMURAI_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2}, - { PCI_VENDOR_ID_HOLTEK, PCI_DEVICE_ID_HOLTEK_6565, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3}, - { PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8673F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4}, - { PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8886A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5}, - { PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8886BF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 6}, - { PCI_VENDOR_ID_HINT, PCI_DEVICE_ID_HINT_VXPROII_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 7}, - { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C561, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8}, - { PCI_VENDOR_ID_OPTI, PCI_DEVICE_ID_OPTI_82C558, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 9}, +static const struct pci_device_id generic_pci_tbl[] = { + { PCI_VDEVICE(NS, PCI_DEVICE_ID_NS_87410), 1 }, + { PCI_VDEVICE(PCTECH, PCI_DEVICE_ID_PCTECH_SAMURAI_IDE), 2 }, + { PCI_VDEVICE(HOLTEK, PCI_DEVICE_ID_HOLTEK_6565), 3 }, + { PCI_VDEVICE(UMC, PCI_DEVICE_ID_UMC_UM8673F), 4 }, + { PCI_VDEVICE(UMC, PCI_DEVICE_ID_UMC_UM8886A), 5 }, + { PCI_VDEVICE(UMC, PCI_DEVICE_ID_UMC_UM8886BF), 6 }, + { PCI_VDEVICE(HINT, PCI_DEVICE_ID_HINT_VXPROII_IDE), 7 }, + { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C561), 8 }, + { PCI_VDEVICE(OPTI, PCI_DEVICE_ID_OPTI_82C558), 9 }, #ifdef CONFIG_BLK_DEV_IDE_SATA - { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237_SATA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 10}, + { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_8237_SATA), 10 }, #endif - { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 11}, - { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 12}, - { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 13}, - { PCI_VENDOR_ID_NETCELL,PCI_DEVICE_ID_REVOLUTION, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 14}, - /* Must come last. If you add entries adjust this table appropriately and the init_one code */ - { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xFFFFFF00UL, 0}, + { PCI_VDEVICE(TOSHIBA, PCI_DEVICE_ID_TOSHIBA_PICCOLO), 11 }, + { PCI_VDEVICE(TOSHIBA, PCI_DEVICE_ID_TOSHIBA_PICCOLO_1), 12 }, + { PCI_VDEVICE(TOSHIBA, PCI_DEVICE_ID_TOSHIBA_PICCOLO_2), 13 }, + { PCI_VDEVICE(NETCELL, PCI_DEVICE_ID_REVOLUTION), 14 }, + /* + * Must come last. If you add entries adjust + * this table and generic_chipsets[] appropriately. + */ + { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xFFFFFF00UL, 0 }, { 0, }, }; MODULE_DEVICE_TABLE(pci, generic_pci_tbl); |