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>
This commit is contained in:
Bartlomiej Zolnierkiewicz
2007-10-19 00:30:07 +02:00
parent 9adf768a39
commit 5f8b6c3485
32 changed files with 186 additions and 178 deletions

View File

@ -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,
}
};