diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-19 00:30:07 +0200 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-19 00:30:07 +0200 |
commit | 5f8b6c34854a966fe5eb7241fde0419d47d5d408 (patch) | |
tree | 052afd508d9cd314f503d938182db55355f1b392 /drivers/ide/pci/serverworks.c | |
parent | 9adf768a398745c539623210502b521e671c59d7 (diff) |
ide: add ->mwdma_mask and ->swdma_mask to ide_pci_device_t (take 2)
* Add ->mwdma_mask and ->swdma_mask to ide_pci_device_t.
* Set ide_hwif_t DMA masks using DMA masks from ide_pci_device_t in
setup-pci.c::ide_pci_setup_ports() (iff DMA base is valid and ->init_hwif
method may still override them).
* Convert IDE PCI host drivers to use ide_pci_device_t DMA masks.
While at it:
* Use ATA_{UDMA,MWDMA,SWDMA}* defines.
* hpt34x.c: add separate ide_pci_device_t instances for HPT343 and HPT345.
* serverworks.c: fix DMA masks being set before checking DMA base.
v2:
* Add missing masks to DECLARE_GENERIC_PCI_DEV() macro.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/serverworks.c')
-rw-r--r-- | drivers/ide/pci/serverworks.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c index 338eee81f02..760e0e3e118 100644 --- a/drivers/ide/pci/serverworks.c +++ b/drivers/ide/pci/serverworks.c @@ -367,11 +367,6 @@ static void __devinit init_hwif_svwks (ide_hwif_t *hwif) hwif->set_dma_mode = &svwks_set_dma_mode; hwif->udma_filter = &svwks_udma_filter; - if (hwif->pci_dev->device != PCI_DEVICE_ID_SERVERWORKS_OSB4IDE) - hwif->ultra_mask = 0x3f; - - hwif->mwdma_mask = 0x07; - hwif->drives[0].autotune = 1; hwif->drives[1].autotune = 1; @@ -416,6 +411,8 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = { .init_hwif = init_hwif_svwks, .host_flags = IDE_HFLAG_BOOTABLE, .pio_mask = ATA_PIO4, + .mwdma_mask = ATA_MWDMA2, + .udma_mask = 0x00, /* UDMA is problematic on OSB4 */ },{ /* 1 */ .name = "SvrWks CSB5", .init_setup = init_setup_svwks, @@ -423,6 +420,8 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = { .init_hwif = init_hwif_svwks, .host_flags = IDE_HFLAG_BOOTABLE, .pio_mask = ATA_PIO4, + .mwdma_mask = ATA_MWDMA2, + .udma_mask = ATA_UDMA5, },{ /* 2 */ .name = "SvrWks CSB6", .init_setup = init_setup_csb6, @@ -430,6 +429,8 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = { .init_hwif = init_hwif_svwks, .host_flags = IDE_HFLAG_BOOTABLE, .pio_mask = ATA_PIO4, + .mwdma_mask = ATA_MWDMA2, + .udma_mask = ATA_UDMA5, },{ /* 3 */ .name = "SvrWks CSB6", .init_setup = init_setup_csb6, @@ -437,6 +438,8 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = { .init_hwif = init_hwif_svwks, .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_BOOTABLE, .pio_mask = ATA_PIO4, + .mwdma_mask = ATA_MWDMA2, + .udma_mask = ATA_UDMA5, },{ /* 4 */ .name = "SvrWks HT1000", .init_setup = init_setup_svwks, @@ -444,6 +447,8 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = { .init_hwif = init_hwif_svwks, .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_BOOTABLE, .pio_mask = ATA_PIO4, + .mwdma_mask = ATA_MWDMA2, + .udma_mask = ATA_UDMA5, } }; |