aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/hpt34x.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-25 16:17:18 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-25 16:17:18 -0500
commit4db90a145292327b95b03f6dcd3352327235cc36 (patch)
treec48ba5fc31e27d6fbdb8883151bdf237e7eb1920 /drivers/ide/pci/hpt34x.c
parent428c6440ef933a3d9df5adfeb2cbb3ea7ebb6a68 (diff)
ide: add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag
* Add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag and use it to decide what to do with transfer modes < XFER_PIO_0 in ide_set_xfer_rate(). * Set IDE_HFLAG_ABUSE_SET_DMA_MODE in host drivers that need it (aec62xx, amd74xx, cs5520, cs5535, hpt34x, hpt366, pdc202xx_old, serverworks, tc86c001 and via82cxxx) and cleanup ->set_dma_mode methods in host drivers that don't (IDE core code guarantees that ->set_dma_mode will be called only for modes which are present in SWDMA/MWDMA/UDMA masks). While at it: * Add IDE_HFLAGS_HPT34X/HPT3XX/PDC202XX/SVWKS define in hpt34x/hpt366/pdc202xx_old/serverworks host driver. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/hpt34x.c')
-rw-r--r--drivers/ide/pci/hpt34x.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/ide/pci/hpt34x.c b/drivers/ide/pci/hpt34x.c
index ae6307fae4f9..dfba0d13fcd3 100644
--- a/drivers/ide/pci/hpt34x.c
+++ b/drivers/ide/pci/hpt34x.c
@@ -129,14 +129,18 @@ static void __devinit init_hwif_hpt34x(ide_hwif_t *hwif)
129 hwif->set_dma_mode = &hpt34x_set_mode; 129 hwif->set_dma_mode = &hpt34x_set_mode;
130} 130}
131 131
132#define IDE_HFLAGS_HPT34X \
133 (IDE_HFLAG_NO_ATAPI_DMA | \
134 IDE_HFLAG_ABUSE_SET_DMA_MODE | \
135 IDE_HFLAG_NO_AUTODMA)
136
132static const struct ide_port_info hpt34x_chipsets[] __devinitdata = { 137static const struct ide_port_info hpt34x_chipsets[] __devinitdata = {
133 { /* 0 */ 138 { /* 0 */
134 .name = "HPT343", 139 .name = "HPT343",
135 .init_chipset = init_chipset_hpt34x, 140 .init_chipset = init_chipset_hpt34x,
136 .init_hwif = init_hwif_hpt34x, 141 .init_hwif = init_hwif_hpt34x,
137 .extra = 16, 142 .extra = 16,
138 .host_flags = IDE_HFLAG_NO_ATAPI_DMA | 143 .host_flags = IDE_HFLAGS_HPT34X,
139 IDE_HFLAG_NO_AUTODMA,
140 .pio_mask = ATA_PIO5, 144 .pio_mask = ATA_PIO5,
141 }, 145 },
142 { /* 1 */ 146 { /* 1 */
@@ -144,9 +148,7 @@ static const struct ide_port_info hpt34x_chipsets[] __devinitdata = {
144 .init_chipset = init_chipset_hpt34x, 148 .init_chipset = init_chipset_hpt34x,
145 .init_hwif = init_hwif_hpt34x, 149 .init_hwif = init_hwif_hpt34x,
146 .extra = 16, 150 .extra = 16,
147 .host_flags = IDE_HFLAG_NO_ATAPI_DMA | 151 .host_flags = IDE_HFLAGS_HPT34X | IDE_HFLAG_OFF_BOARD,
148 IDE_HFLAG_NO_AUTODMA |
149 IDE_HFLAG_OFF_BOARD,
150 .pio_mask = ATA_PIO5, 152 .pio_mask = ATA_PIO5,
151#ifdef CONFIG_HPT34X_AUTODMA 153#ifdef CONFIG_HPT34X_AUTODMA
152 .swdma_mask = ATA_SWDMA2, 154 .swdma_mask = ATA_SWDMA2,