aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-07-19 19:11:59 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-07-19 19:11:59 -0400
commit4099d14322149c7a467e4997b87be4ba8eb78697 (patch)
tree133a913d7f9c2dacaaaef5cfdf2ae6911dc21f4c
parent6a824c92db4d606c324272c4eed366fb71672440 (diff)
ide: add PIO masks
* Add ATA_PIO[0-6] defines to <linux/ata.h>. * Add ->pio_mask field to ide_pci_device_t and ide_hwif_t. * Add PIO masks to host drivers. <linux/ata.h> change ACK-ed by Jeff Garzik <jeff@garzik.org>. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r--drivers/ide/cris/ide-cris.c1
-rw-r--r--drivers/ide/ide.c2
-rw-r--r--drivers/ide/legacy/ali14xx.c2
-rw-r--r--drivers/ide/legacy/dtc2278.c1
-rw-r--r--drivers/ide/legacy/ht6560b.c2
-rw-r--r--drivers/ide/legacy/qd65xx.c1
-rw-r--r--drivers/ide/legacy/umc8672.c2
-rw-r--r--drivers/ide/mips/au1xxx-ide.c2
-rw-r--r--drivers/ide/pci/aec62xx.c5
-rw-r--r--drivers/ide/pci/alim15x3.c1
-rw-r--r--drivers/ide/pci/amd74xx.c2
-rw-r--r--drivers/ide/pci/atiixp.c2
-rw-r--r--drivers/ide/pci/cmd640.c2
-rw-r--r--drivers/ide/pci/cmd64x.c4
-rw-r--r--drivers/ide/pci/cs5520.c1
-rw-r--r--drivers/ide/pci/cs5530.c1
-rw-r--r--drivers/ide/pci/cs5535.c1
-rw-r--r--drivers/ide/pci/cy82c693.c1
-rw-r--r--drivers/ide/pci/hpt34x.c3
-rw-r--r--drivers/ide/pci/hpt366.c18
-rw-r--r--drivers/ide/pci/it8213.c1
-rw-r--r--drivers/ide/pci/it821x.c3
-rw-r--r--drivers/ide/pci/jmicron.c1
-rw-r--r--drivers/ide/pci/opti621.c2
-rw-r--r--drivers/ide/pci/pdc202xx_new.c7
-rw-r--r--drivers/ide/pci/pdc202xx_old.c5
-rw-r--r--drivers/ide/pci/piix.c2
-rw-r--r--drivers/ide/pci/sc1200.c1
-rw-r--r--drivers/ide/pci/scc_pata.c1
-rw-r--r--drivers/ide/pci/serverworks.c5
-rw-r--r--drivers/ide/pci/sgiioc4.c1
-rw-r--r--drivers/ide/pci/siimage.c1
-rw-r--r--drivers/ide/pci/sis5513.c1
-rw-r--r--drivers/ide/pci/sl82c105.c1
-rw-r--r--drivers/ide/pci/slc90e66.c1
-rw-r--r--drivers/ide/pci/tc86c001.c1
-rw-r--r--drivers/ide/pci/triflex.c1
-rw-r--r--drivers/ide/pci/via82cxxx.c2
-rw-r--r--drivers/ide/ppc/mpc8xx.c2
-rw-r--r--drivers/ide/ppc/pmac.c1
-rw-r--r--drivers/ide/setup-pci.c1
-rw-r--r--include/linux/ata.h9
-rw-r--r--include/linux/ide.h3
43 files changed, 99 insertions, 8 deletions
diff --git a/drivers/ide/cris/ide-cris.c b/drivers/ide/cris/ide-cris.c
index e8cd86e86433..9361154ba5c2 100644
--- a/drivers/ide/cris/ide-cris.c
+++ b/drivers/ide/cris/ide-cris.c
@@ -814,6 +814,7 @@ init_e100_ide (void)
814 hwif->dma_host_on = &cris_dma_on; 814 hwif->dma_host_on = &cris_dma_on;
815 hwif->dma_off_quietly = &cris_dma_off; 815 hwif->dma_off_quietly = &cris_dma_off;
816 hwif->cbl = ATA_CBL_PATA40; 816 hwif->cbl = ATA_CBL_PATA40;
817 hwif->pio_mask = ATA_PIO4,
817 hwif->ultra_mask = cris_ultra_mask; 818 hwif->ultra_mask = cris_ultra_mask;
818 hwif->mwdma_mask = 0x07; /* Multiword DMA 0-2 */ 819 hwif->mwdma_mask = 0x07; /* Multiword DMA 0-2 */
819 hwif->autodma = 1; 820 hwif->autodma = 1;
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index b442b341d52e..f3ea5ea41fd4 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -457,6 +457,8 @@ static void ide_hwif_restore(ide_hwif_t *hwif, ide_hwif_t *tmp_hwif)
457 457
458 hwif->host_flags = tmp_hwif->host_flags; 458 hwif->host_flags = tmp_hwif->host_flags;
459 459
460 hwif->pio_mask = tmp_hwif->pio_mask;
461
460 hwif->atapi_dma = tmp_hwif->atapi_dma; 462 hwif->atapi_dma = tmp_hwif->atapi_dma;
461 hwif->ultra_mask = tmp_hwif->ultra_mask; 463 hwif->ultra_mask = tmp_hwif->ultra_mask;
462 hwif->mwdma_mask = tmp_hwif->mwdma_mask; 464 hwif->mwdma_mask = tmp_hwif->mwdma_mask;
diff --git a/drivers/ide/legacy/ali14xx.c b/drivers/ide/legacy/ali14xx.c
index d5c7a57b71c1..9b9c4761cb7d 100644
--- a/drivers/ide/legacy/ali14xx.c
+++ b/drivers/ide/legacy/ali14xx.c
@@ -211,10 +211,12 @@ static int __init ali14xx_probe(void)
211 mate = &ide_hwifs[1]; 211 mate = &ide_hwifs[1];
212 212
213 hwif->chipset = ide_ali14xx; 213 hwif->chipset = ide_ali14xx;
214 hwif->pio_mask = ATA_PIO4;
214 hwif->tuneproc = &ali14xx_tune_drive; 215 hwif->tuneproc = &ali14xx_tune_drive;
215 hwif->mate = mate; 216 hwif->mate = mate;
216 217
217 mate->chipset = ide_ali14xx; 218 mate->chipset = ide_ali14xx;
219 mate->pio_mask = ATA_PIO4;
218 mate->tuneproc = &ali14xx_tune_drive; 220 mate->tuneproc = &ali14xx_tune_drive;
219 mate->mate = hwif; 221 mate->mate = hwif;
220 mate->channel = 1; 222 mate->channel = 1;
diff --git a/drivers/ide/legacy/dtc2278.c b/drivers/ide/legacy/dtc2278.c
index 8c4c27e5dc10..6c01d951d074 100644
--- a/drivers/ide/legacy/dtc2278.c
+++ b/drivers/ide/legacy/dtc2278.c
@@ -123,6 +123,7 @@ static int __init dtc2278_probe(void)
123 123
124 hwif->serialized = 1; 124 hwif->serialized = 1;
125 hwif->chipset = ide_dtc2278; 125 hwif->chipset = ide_dtc2278;
126 hwif->pio_mask = ATA_PIO4;
126 hwif->tuneproc = &tune_dtc2278; 127 hwif->tuneproc = &tune_dtc2278;
127 hwif->drives[0].no_unmask = 1; 128 hwif->drives[0].no_unmask = 1;
128 hwif->drives[1].no_unmask = 1; 129 hwif->drives[1].no_unmask = 1;
diff --git a/drivers/ide/legacy/ht6560b.c b/drivers/ide/legacy/ht6560b.c
index 82ed37df9566..bfaa2025173b 100644
--- a/drivers/ide/legacy/ht6560b.c
+++ b/drivers/ide/legacy/ht6560b.c
@@ -333,12 +333,14 @@ int __init ht6560b_init(void)
333 333
334 hwif->chipset = ide_ht6560b; 334 hwif->chipset = ide_ht6560b;
335 hwif->selectproc = &ht6560b_selectproc; 335 hwif->selectproc = &ht6560b_selectproc;
336 hwif->pio_mask = ATA_PIO5;
336 hwif->tuneproc = &tune_ht6560b; 337 hwif->tuneproc = &tune_ht6560b;
337 hwif->serialized = 1; /* is this needed? */ 338 hwif->serialized = 1; /* is this needed? */
338 hwif->mate = mate; 339 hwif->mate = mate;
339 340
340 mate->chipset = ide_ht6560b; 341 mate->chipset = ide_ht6560b;
341 mate->selectproc = &ht6560b_selectproc; 342 mate->selectproc = &ht6560b_selectproc;
343 mate->pio_mask = ATA_PIO5;
342 mate->tuneproc = &tune_ht6560b; 344 mate->tuneproc = &tune_ht6560b;
343 mate->serialized = 1; /* is this needed? */ 345 mate->serialized = 1; /* is this needed? */
344 mate->mate = hwif; 346 mate->mate = hwif;
diff --git a/drivers/ide/legacy/qd65xx.c b/drivers/ide/legacy/qd65xx.c
index 39145102b348..8b87a424094a 100644
--- a/drivers/ide/legacy/qd65xx.c
+++ b/drivers/ide/legacy/qd65xx.c
@@ -346,6 +346,7 @@ static void __init qd_setup(ide_hwif_t *hwif, int base, int config,
346 hwif->drives[1].drive_data = data1; 346 hwif->drives[1].drive_data = data1;
347 hwif->drives[0].io_32bit = 347 hwif->drives[0].io_32bit =
348 hwif->drives[1].io_32bit = 1; 348 hwif->drives[1].io_32bit = 1;
349 hwif->pio_mask = ATA_PIO4;
349 hwif->tuneproc = tuneproc; 350 hwif->tuneproc = tuneproc;
350 probe_hwif_init(hwif); 351 probe_hwif_init(hwif);
351} 352}
diff --git a/drivers/ide/legacy/umc8672.c b/drivers/ide/legacy/umc8672.c
index caeebd41081f..d2862e638bc5 100644
--- a/drivers/ide/legacy/umc8672.c
+++ b/drivers/ide/legacy/umc8672.c
@@ -149,10 +149,12 @@ static int __init umc8672_probe(void)
149 mate = &ide_hwifs[1]; 149 mate = &ide_hwifs[1];
150 150
151 hwif->chipset = ide_umc8672; 151 hwif->chipset = ide_umc8672;
152 hwif->pio_mask = ATA_PIO4;
152 hwif->tuneproc = &tune_umc; 153 hwif->tuneproc = &tune_umc;
153 hwif->mate = mate; 154 hwif->mate = mate;
154 155
155 mate->chipset = ide_umc8672; 156 mate->chipset = ide_umc8672;
157 mate->pio_mask = ATA_PIO4;
156 mate->tuneproc = &tune_umc; 158 mate->tuneproc = &tune_umc;
157 mate->mate = hwif; 159 mate->mate = hwif;
158 mate->channel = 1; 160 mate->channel = 1;
diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c
index b0d13c34d310..2ba6a054b861 100644
--- a/drivers/ide/mips/au1xxx-ide.c
+++ b/drivers/ide/mips/au1xxx-ide.c
@@ -692,6 +692,8 @@ static int au_ide_probe(struct device *dev)
692 hwif->swdma_mask = 0x0; 692 hwif->swdma_mask = 0x0;
693#endif 693#endif
694 694
695 hwif->pio_mask = ATA_PIO4;
696
695 hwif->noprobe = 0; 697 hwif->noprobe = 0;
696 hwif->drives[0].unmask = 1; 698 hwif->drives[0].unmask = 1;
697 hwif->drives[1].unmask = 1; 699 hwif->drives[1].unmask = 1;
diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c
index 8396d711f232..74432830abf7 100644
--- a/drivers/ide/pci/aec62xx.c
+++ b/drivers/ide/pci/aec62xx.c
@@ -268,6 +268,7 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
268 .autodma = AUTODMA, 268 .autodma = AUTODMA,
269 .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, 269 .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
270 .bootable = OFF_BOARD, 270 .bootable = OFF_BOARD,
271 .pio_mask = ATA_PIO4,
271 .udma_mask = 0x07, /* udma0-2 */ 272 .udma_mask = 0x07, /* udma0-2 */
272 },{ /* 1 */ 273 },{ /* 1 */
273 .name = "AEC6260", 274 .name = "AEC6260",
@@ -276,6 +277,7 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
276 .init_hwif = init_hwif_aec62xx, 277 .init_hwif = init_hwif_aec62xx,
277 .autodma = NOAUTODMA, 278 .autodma = NOAUTODMA,
278 .bootable = OFF_BOARD, 279 .bootable = OFF_BOARD,
280 .pio_mask = ATA_PIO4,
279 .udma_mask = 0x1f, /* udma0-4 */ 281 .udma_mask = 0x1f, /* udma0-4 */
280 },{ /* 2 */ 282 },{ /* 2 */
281 .name = "AEC6260R", 283 .name = "AEC6260R",
@@ -285,6 +287,7 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
285 .autodma = AUTODMA, 287 .autodma = AUTODMA,
286 .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, 288 .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
287 .bootable = NEVER_BOARD, 289 .bootable = NEVER_BOARD,
290 .pio_mask = ATA_PIO4,
288 .udma_mask = 0x1f, /* udma0-4 */ 291 .udma_mask = 0x1f, /* udma0-4 */
289 },{ /* 3 */ 292 },{ /* 3 */
290 .name = "AEC6280", 293 .name = "AEC6280",
@@ -293,6 +296,7 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
293 .init_hwif = init_hwif_aec62xx, 296 .init_hwif = init_hwif_aec62xx,
294 .autodma = AUTODMA, 297 .autodma = AUTODMA,
295 .bootable = OFF_BOARD, 298 .bootable = OFF_BOARD,
299 .pio_mask = ATA_PIO4,
296 .udma_mask = 0x3f, /* udma0-5 */ 300 .udma_mask = 0x3f, /* udma0-5 */
297 },{ /* 4 */ 301 },{ /* 4 */
298 .name = "AEC6280R", 302 .name = "AEC6280R",
@@ -302,6 +306,7 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
302 .autodma = AUTODMA, 306 .autodma = AUTODMA,
303 .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, 307 .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
304 .bootable = OFF_BOARD, 308 .bootable = OFF_BOARD,
309 .pio_mask = ATA_PIO4,
305 .udma_mask = 0x3f, /* udma0-5 */ 310 .udma_mask = 0x3f, /* udma0-5 */
306 } 311 }
307}; 312};
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c
index a0c43a91b0f3..5511c86733dc 100644
--- a/drivers/ide/pci/alim15x3.c
+++ b/drivers/ide/pci/alim15x3.c
@@ -818,6 +818,7 @@ static ide_pci_device_t ali15x3_chipset __devinitdata = {
818 .init_dma = init_dma_ali15x3, 818 .init_dma = init_dma_ali15x3,
819 .autodma = AUTODMA, 819 .autodma = AUTODMA,
820 .bootable = ON_BOARD, 820 .bootable = ON_BOARD,
821 .pio_mask = ATA_PIO5,
821}; 822};
822 823
823/** 824/**
diff --git a/drivers/ide/pci/amd74xx.c b/drivers/ide/pci/amd74xx.c
index 5ed1d485fc7e..06c15a6a3e7d 100644
--- a/drivers/ide/pci/amd74xx.c
+++ b/drivers/ide/pci/amd74xx.c
@@ -453,6 +453,7 @@ static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif)
453 .bootable = ON_BOARD, \ 453 .bootable = ON_BOARD, \
454 .host_flags = IDE_HFLAG_PIO_NO_BLACKLIST \ 454 .host_flags = IDE_HFLAG_PIO_NO_BLACKLIST \
455 | IDE_HFLAG_PIO_NO_DOWNGRADE, \ 455 | IDE_HFLAG_PIO_NO_DOWNGRADE, \
456 .pio_mask = ATA_PIO5, \
456 } 457 }
457 458
458#define DECLARE_NV_DEV(name_str) \ 459#define DECLARE_NV_DEV(name_str) \
@@ -465,6 +466,7 @@ static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif)
465 .bootable = ON_BOARD, \ 466 .bootable = ON_BOARD, \
466 .host_flags = IDE_HFLAG_PIO_NO_BLACKLIST \ 467 .host_flags = IDE_HFLAG_PIO_NO_BLACKLIST \
467 | IDE_HFLAG_PIO_NO_DOWNGRADE, \ 468 | IDE_HFLAG_PIO_NO_DOWNGRADE, \
469 .pio_mask = ATA_PIO5, \
468 } 470 }
469 471
470static ide_pci_device_t amd74xx_chipsets[] __devinitdata = { 472static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
diff --git a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c
index a4740e4776fd..1725aa402d98 100644
--- a/drivers/ide/pci/atiixp.c
+++ b/drivers/ide/pci/atiixp.c
@@ -294,6 +294,7 @@ static ide_pci_device_t atiixp_pci_info[] __devinitdata = {
294 .autodma = AUTODMA, 294 .autodma = AUTODMA,
295 .enablebits = {{0x48,0x01,0x00}, {0x48,0x08,0x00}}, 295 .enablebits = {{0x48,0x01,0x00}, {0x48,0x08,0x00}},
296 .bootable = ON_BOARD, 296 .bootable = ON_BOARD,
297 .pio_mask = ATA_PIO4,
297 },{ /* 1 */ 298 },{ /* 1 */
298 .name = "SB600_PATA", 299 .name = "SB600_PATA",
299 .init_hwif = init_hwif_atiixp, 300 .init_hwif = init_hwif_atiixp,
@@ -301,6 +302,7 @@ static ide_pci_device_t atiixp_pci_info[] __devinitdata = {
301 .enablebits = {{0x48,0x01,0x00}, {0x00,0x00,0x00}}, 302 .enablebits = {{0x48,0x01,0x00}, {0x00,0x00,0x00}},
302 .bootable = ON_BOARD, 303 .bootable = ON_BOARD,
303 .host_flags = IDE_HFLAG_SINGLE, 304 .host_flags = IDE_HFLAG_SINGLE,
305 .pio_mask = ATA_PIO4,
304 }, 306 },
305}; 307};
306 308
diff --git a/drivers/ide/pci/cmd640.c b/drivers/ide/pci/cmd640.c
index 335482981a92..9689494efa24 100644
--- a/drivers/ide/pci/cmd640.c
+++ b/drivers/ide/pci/cmd640.c
@@ -766,6 +766,7 @@ int __init ide_probe_for_cmd640x (void)
766 cmd_hwif0->name, 'a' + cmd640_chip_version - 1, bus_type, cfr); 766 cmd_hwif0->name, 'a' + cmd640_chip_version - 1, bus_type, cfr);
767 cmd_hwif0->chipset = ide_cmd640; 767 cmd_hwif0->chipset = ide_cmd640;
768#ifdef CONFIG_BLK_DEV_CMD640_ENHANCED 768#ifdef CONFIG_BLK_DEV_CMD640_ENHANCED
769 cmd_hwif0->pio_mask = ATA_PIO5;
769 cmd_hwif0->tuneproc = &cmd640_tune_drive; 770 cmd_hwif0->tuneproc = &cmd640_tune_drive;
770#endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */ 771#endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */
771 772
@@ -821,6 +822,7 @@ int __init ide_probe_for_cmd640x (void)
821 cmd_hwif1->mate = cmd_hwif0; 822 cmd_hwif1->mate = cmd_hwif0;
822 cmd_hwif1->channel = 1; 823 cmd_hwif1->channel = 1;
823#ifdef CONFIG_BLK_DEV_CMD640_ENHANCED 824#ifdef CONFIG_BLK_DEV_CMD640_ENHANCED
825 cmd_hwif1->pio_mask = ATA_PIO5;
824 cmd_hwif1->tuneproc = &cmd640_tune_drive; 826 cmd_hwif1->tuneproc = &cmd640_tune_drive;
825#endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */ 827#endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */
826 } 828 }
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c
index 9cf969b61bf2..19633c5aba15 100644
--- a/drivers/ide/pci/cmd64x.c
+++ b/drivers/ide/pci/cmd64x.c
@@ -622,6 +622,7 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
622 .autodma = AUTODMA, 622 .autodma = AUTODMA,
623 .enablebits = {{0x00,0x00,0x00}, {0x51,0x08,0x08}}, 623 .enablebits = {{0x00,0x00,0x00}, {0x51,0x08,0x08}},
624 .bootable = ON_BOARD, 624 .bootable = ON_BOARD,
625 .pio_mask = ATA_PIO5,
625 .udma_mask = 0x00, /* no udma */ 626 .udma_mask = 0x00, /* no udma */
626 },{ /* 1 */ 627 },{ /* 1 */
627 .name = "CMD646", 628 .name = "CMD646",
@@ -631,6 +632,7 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
631 .autodma = AUTODMA, 632 .autodma = AUTODMA,
632 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}}, 633 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
633 .bootable = ON_BOARD, 634 .bootable = ON_BOARD,
635 .pio_mask = ATA_PIO5,
634 .udma_mask = 0x07, /* udma0-2 */ 636 .udma_mask = 0x07, /* udma0-2 */
635 },{ /* 2 */ 637 },{ /* 2 */
636 .name = "CMD648", 638 .name = "CMD648",
@@ -640,6 +642,7 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
640 .autodma = AUTODMA, 642 .autodma = AUTODMA,
641 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}}, 643 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
642 .bootable = ON_BOARD, 644 .bootable = ON_BOARD,
645 .pio_mask = ATA_PIO5,
643 .udma_mask = 0x1f, /* udma0-4 */ 646 .udma_mask = 0x1f, /* udma0-4 */
644 },{ /* 3 */ 647 },{ /* 3 */
645 .name = "CMD649", 648 .name = "CMD649",
@@ -649,6 +652,7 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
649 .autodma = AUTODMA, 652 .autodma = AUTODMA,
650 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}}, 653 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
651 .bootable = ON_BOARD, 654 .bootable = ON_BOARD,
655 .pio_mask = ATA_PIO5,
652 .udma_mask = 0x3f, /* udma0-5 */ 656 .udma_mask = 0x3f, /* udma0-5 */
653 } 657 }
654}; 658};
diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c
index ee10e48d7cef..bccedf9b8b28 100644
--- a/drivers/ide/pci/cs5520.c
+++ b/drivers/ide/pci/cs5520.c
@@ -197,6 +197,7 @@ static void __devinit init_hwif_cs5520(ide_hwif_t *hwif)
197 .autodma = AUTODMA, \ 197 .autodma = AUTODMA, \
198 .bootable = ON_BOARD, \ 198 .bootable = ON_BOARD, \
199 .host_flags = IDE_HFLAG_ISA_PORTS, \ 199 .host_flags = IDE_HFLAG_ISA_PORTS, \
200 .pio_mask = ATA_PIO4, \
200 } 201 }
201 202
202static ide_pci_device_t cyrix_chipsets[] __devinitdata = { 203static ide_pci_device_t cyrix_chipsets[] __devinitdata = {
diff --git a/drivers/ide/pci/cs5530.c b/drivers/ide/pci/cs5530.c
index a75c14a93182..acaf71fd4c09 100644
--- a/drivers/ide/pci/cs5530.c
+++ b/drivers/ide/pci/cs5530.c
@@ -343,6 +343,7 @@ static ide_pci_device_t cs5530_chipset __devinitdata = {
343 .init_hwif = init_hwif_cs5530, 343 .init_hwif = init_hwif_cs5530,
344 .autodma = AUTODMA, 344 .autodma = AUTODMA,
345 .bootable = ON_BOARD, 345 .bootable = ON_BOARD,
346 .pio_mask = ATA_PIO4,
346}; 347};
347 348
348static int __devinit cs5530_init_one(struct pci_dev *dev, const struct pci_device_id *id) 349static int __devinit cs5530_init_one(struct pci_dev *dev, const struct pci_device_id *id)
diff --git a/drivers/ide/pci/cs5535.c b/drivers/ide/pci/cs5535.c
index 0bff4005292a..ce44e38390aa 100644
--- a/drivers/ide/pci/cs5535.c
+++ b/drivers/ide/pci/cs5535.c
@@ -231,6 +231,7 @@ static ide_pci_device_t cs5535_chipset __devinitdata = {
231 .autodma = AUTODMA, 231 .autodma = AUTODMA,
232 .bootable = ON_BOARD, 232 .bootable = ON_BOARD,
233 .host_flags = IDE_HFLAG_SINGLE, 233 .host_flags = IDE_HFLAG_SINGLE,
234 .pio_mask = ATA_PIO4,
234}; 235};
235 236
236static int __devinit cs5535_init_one(struct pci_dev *dev, 237static int __devinit cs5535_init_one(struct pci_dev *dev,
diff --git a/drivers/ide/pci/cy82c693.c b/drivers/ide/pci/cy82c693.c
index cb7c18187e3c..daa36fcbc8ef 100644
--- a/drivers/ide/pci/cy82c693.c
+++ b/drivers/ide/pci/cy82c693.c
@@ -486,6 +486,7 @@ static ide_pci_device_t cy82c693_chipset __devinitdata = {
486 .autodma = AUTODMA, 486 .autodma = AUTODMA,
487 .bootable = ON_BOARD, 487 .bootable = ON_BOARD,
488 .host_flags = IDE_HFLAG_SINGLE, 488 .host_flags = IDE_HFLAG_SINGLE,
489 .pio_mask = ATA_PIO4,
489}; 490};
490 491
491static int __devinit cy82c693_init_one(struct pci_dev *dev, const struct pci_device_id *id) 492static int __devinit cy82c693_init_one(struct pci_dev *dev, const struct pci_device_id *id)
diff --git a/drivers/ide/pci/hpt34x.c b/drivers/ide/pci/hpt34x.c
index 2e4591303f4f..19778c5fe711 100644
--- a/drivers/ide/pci/hpt34x.c
+++ b/drivers/ide/pci/hpt34x.c
@@ -177,7 +177,8 @@ static ide_pci_device_t hpt34x_chipset __devinitdata = {
177 .init_hwif = init_hwif_hpt34x, 177 .init_hwif = init_hwif_hpt34x,
178 .autodma = NOAUTODMA, 178 .autodma = NOAUTODMA,
179 .bootable = NEVER_BOARD, 179 .bootable = NEVER_BOARD,
180 .extra = 16 180 .extra = 16,
181 .pio_mask = ATA_PIO5,
181}; 182};
182 183
183static int __devinit hpt34x_init_one(struct pci_dev *dev, const struct pci_device_id *id) 184static int __devinit hpt34x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
index 0a3fe9471eb6..2cd74c345a6c 100644
--- a/drivers/ide/pci/hpt366.c
+++ b/drivers/ide/pci/hpt366.c
@@ -1549,7 +1549,8 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
1549 .autodma = AUTODMA, 1549 .autodma = AUTODMA,
1550 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1550 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1551 .bootable = OFF_BOARD, 1551 .bootable = OFF_BOARD,
1552 .extra = 240 1552 .extra = 240,
1553 .pio_mask = ATA_PIO4,
1553 },{ /* 1 */ 1554 },{ /* 1 */
1554 .name = "HPT372A", 1555 .name = "HPT372A",
1555 .init_setup = init_setup_hpt372a, 1556 .init_setup = init_setup_hpt372a,
@@ -1560,7 +1561,8 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
1560 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1561 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1561 .udma_mask = HPT372_ALLOW_ATA133_6 ? 0x7f : 0x3f, 1562 .udma_mask = HPT372_ALLOW_ATA133_6 ? 0x7f : 0x3f,
1562 .bootable = OFF_BOARD, 1563 .bootable = OFF_BOARD,
1563 .extra = 240 1564 .extra = 240,
1565 .pio_mask = ATA_PIO4,
1564 },{ /* 2 */ 1566 },{ /* 2 */
1565 .name = "HPT302", 1567 .name = "HPT302",
1566 .init_setup = init_setup_hpt302, 1568 .init_setup = init_setup_hpt302,
@@ -1571,7 +1573,8 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
1571 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1573 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1572 .udma_mask = HPT302_ALLOW_ATA133_6 ? 0x7f : 0x3f, 1574 .udma_mask = HPT302_ALLOW_ATA133_6 ? 0x7f : 0x3f,
1573 .bootable = OFF_BOARD, 1575 .bootable = OFF_BOARD,
1574 .extra = 240 1576 .extra = 240,
1577 .pio_mask = ATA_PIO4,
1575 },{ /* 3 */ 1578 },{ /* 3 */
1576 .name = "HPT371", 1579 .name = "HPT371",
1577 .init_setup = init_setup_hpt371, 1580 .init_setup = init_setup_hpt371,
@@ -1582,7 +1585,8 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
1582 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1585 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1583 .udma_mask = HPT371_ALLOW_ATA133_6 ? 0x7f : 0x3f, 1586 .udma_mask = HPT371_ALLOW_ATA133_6 ? 0x7f : 0x3f,
1584 .bootable = OFF_BOARD, 1587 .bootable = OFF_BOARD,
1585 .extra = 240 1588 .extra = 240,
1589 .pio_mask = ATA_PIO4,
1586 },{ /* 4 */ 1590 },{ /* 4 */
1587 .name = "HPT374", 1591 .name = "HPT374",
1588 .init_setup = init_setup_hpt374, 1592 .init_setup = init_setup_hpt374,
@@ -1593,7 +1597,8 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
1593 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1597 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1594 .udma_mask = 0x3f, 1598 .udma_mask = 0x3f,
1595 .bootable = OFF_BOARD, 1599 .bootable = OFF_BOARD,
1596 .extra = 240 1600 .extra = 240,
1601 .pio_mask = ATA_PIO4,
1597 },{ /* 5 */ 1602 },{ /* 5 */
1598 .name = "HPT372N", 1603 .name = "HPT372N",
1599 .init_setup = init_setup_hpt372n, 1604 .init_setup = init_setup_hpt372n,
@@ -1604,7 +1609,8 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
1604 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1609 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1605 .udma_mask = HPT372_ALLOW_ATA133_6 ? 0x7f : 0x3f, 1610 .udma_mask = HPT372_ALLOW_ATA133_6 ? 0x7f : 0x3f,
1606 .bootable = OFF_BOARD, 1611 .bootable = OFF_BOARD,
1607 .extra = 240 1612 .extra = 240,
1613 .pio_mask = ATA_PIO4,
1608 } 1614 }
1609}; 1615};
1610 1616
diff --git a/drivers/ide/pci/it8213.c b/drivers/ide/pci/it8213.c
index d8425a2499bf..95dbed7e6022 100644
--- a/drivers/ide/pci/it8213.c
+++ b/drivers/ide/pci/it8213.c
@@ -276,6 +276,7 @@ static void __devinit init_hwif_it8213(ide_hwif_t *hwif)
276 .enablebits = {{0x41,0x80,0x80}}, \ 276 .enablebits = {{0x41,0x80,0x80}}, \
277 .bootable = ON_BOARD, \ 277 .bootable = ON_BOARD, \
278 .host_flags = IDE_HFLAG_SINGLE, \ 278 .host_flags = IDE_HFLAG_SINGLE, \
279 .pio_mask = ATA_PIO4, \
279 } 280 }
280 281
281static ide_pci_device_t it8213_chipsets[] __devinitdata = { 282static ide_pci_device_t it8213_chipsets[] __devinitdata = {
diff --git a/drivers/ide/pci/it821x.c b/drivers/ide/pci/it821x.c
index 790233db017b..9286c99e2ff0 100644
--- a/drivers/ide/pci/it821x.c
+++ b/drivers/ide/pci/it821x.c
@@ -720,7 +720,8 @@ static unsigned int __devinit init_chipset_it821x(struct pci_dev *dev, const cha
720 .init_hwif = init_hwif_it821x, \ 720 .init_hwif = init_hwif_it821x, \
721 .autodma = AUTODMA, \ 721 .autodma = AUTODMA, \
722 .bootable = ON_BOARD, \ 722 .bootable = ON_BOARD, \
723 .fixup = it821x_fixups \ 723 .fixup = it821x_fixups, \
724 .pio_mask = ATA_PIO4, \
724 } 725 }
725 726
726static ide_pci_device_t it821x_chipsets[] __devinitdata = { 727static ide_pci_device_t it821x_chipsets[] __devinitdata = {
diff --git a/drivers/ide/pci/jmicron.c b/drivers/ide/pci/jmicron.c
index 57d3d4186b3f..d7ce9dd8de16 100644
--- a/drivers/ide/pci/jmicron.c
+++ b/drivers/ide/pci/jmicron.c
@@ -180,6 +180,7 @@ fallback:
180 .autodma = AUTODMA, \ 180 .autodma = AUTODMA, \
181 .bootable = ON_BOARD, \ 181 .bootable = ON_BOARD, \
182 .enablebits = { {0x40, 1, 1}, {0x40, 0x10, 0x10} }, \ 182 .enablebits = { {0x40, 1, 1}, {0x40, 0x10, 0x10} }, \
183 .pio_mask = ATA_PIO5, \
183 } 184 }
184 185
185static ide_pci_device_t jmicron_chipsets[] __devinitdata = { 186static ide_pci_device_t jmicron_chipsets[] __devinitdata = {
diff --git a/drivers/ide/pci/opti621.c b/drivers/ide/pci/opti621.c
index 1802ad0927eb..3a2bb2723515 100644
--- a/drivers/ide/pci/opti621.c
+++ b/drivers/ide/pci/opti621.c
@@ -353,12 +353,14 @@ static ide_pci_device_t opti621_chipsets[] __devinitdata = {
353 .autodma = AUTODMA, 353 .autodma = AUTODMA,
354 .enablebits = {{0x45,0x80,0x00}, {0x40,0x08,0x00}}, 354 .enablebits = {{0x45,0x80,0x00}, {0x40,0x08,0x00}},
355 .bootable = ON_BOARD, 355 .bootable = ON_BOARD,
356 .pio_mask = ATA_PIO3,
356 },{ /* 1 */ 357 },{ /* 1 */
357 .name = "OPTI621X", 358 .name = "OPTI621X",
358 .init_hwif = init_hwif_opti621, 359 .init_hwif = init_hwif_opti621,
359 .autodma = AUTODMA, 360 .autodma = AUTODMA,
360 .enablebits = {{0x45,0x80,0x00}, {0x40,0x08,0x00}}, 361 .enablebits = {{0x45,0x80,0x00}, {0x40,0x08,0x00}},
361 .bootable = ON_BOARD, 362 .bootable = ON_BOARD,
363 .pio_mask = ATA_PIO3,
362 } 364 }
363}; 365};
364 366
diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c
index a8a01b4ab607..8a66a2871b3a 100644
--- a/drivers/ide/pci/pdc202xx_new.c
+++ b/drivers/ide/pci/pdc202xx_new.c
@@ -568,6 +568,7 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
568 .init_hwif = init_hwif_pdc202new, 568 .init_hwif = init_hwif_pdc202new,
569 .autodma = AUTODMA, 569 .autodma = AUTODMA,
570 .bootable = OFF_BOARD, 570 .bootable = OFF_BOARD,
571 .pio_mask = ATA_PIO4,
571 .udma_mask = 0x3f, /* udma0-5 */ 572 .udma_mask = 0x3f, /* udma0-5 */
572 },{ /* 1 */ 573 },{ /* 1 */
573 .name = "PDC20269", 574 .name = "PDC20269",
@@ -576,6 +577,7 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
576 .init_hwif = init_hwif_pdc202new, 577 .init_hwif = init_hwif_pdc202new,
577 .autodma = AUTODMA, 578 .autodma = AUTODMA,
578 .bootable = OFF_BOARD, 579 .bootable = OFF_BOARD,
580 .pio_mask = ATA_PIO4,
579 .udma_mask = 0x7f, /* udma0-6*/ 581 .udma_mask = 0x7f, /* udma0-6*/
580 },{ /* 2 */ 582 },{ /* 2 */
581 .name = "PDC20270", 583 .name = "PDC20270",
@@ -584,6 +586,7 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
584 .init_hwif = init_hwif_pdc202new, 586 .init_hwif = init_hwif_pdc202new,
585 .autodma = AUTODMA, 587 .autodma = AUTODMA,
586 .bootable = OFF_BOARD, 588 .bootable = OFF_BOARD,
589 .pio_mask = ATA_PIO4,
587 .udma_mask = 0x3f, /* udma0-5 */ 590 .udma_mask = 0x3f, /* udma0-5 */
588 },{ /* 3 */ 591 },{ /* 3 */
589 .name = "PDC20271", 592 .name = "PDC20271",
@@ -592,6 +595,7 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
592 .init_hwif = init_hwif_pdc202new, 595 .init_hwif = init_hwif_pdc202new,
593 .autodma = AUTODMA, 596 .autodma = AUTODMA,
594 .bootable = OFF_BOARD, 597 .bootable = OFF_BOARD,
598 .pio_mask = ATA_PIO4,
595 .udma_mask = 0x7f, /* udma0-6*/ 599 .udma_mask = 0x7f, /* udma0-6*/
596 },{ /* 4 */ 600 },{ /* 4 */
597 .name = "PDC20275", 601 .name = "PDC20275",
@@ -600,6 +604,7 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
600 .init_hwif = init_hwif_pdc202new, 604 .init_hwif = init_hwif_pdc202new,
601 .autodma = AUTODMA, 605 .autodma = AUTODMA,
602 .bootable = OFF_BOARD, 606 .bootable = OFF_BOARD,
607 .pio_mask = ATA_PIO4,
603 .udma_mask = 0x7f, /* udma0-6*/ 608 .udma_mask = 0x7f, /* udma0-6*/
604 },{ /* 5 */ 609 },{ /* 5 */
605 .name = "PDC20276", 610 .name = "PDC20276",
@@ -608,6 +613,7 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
608 .init_hwif = init_hwif_pdc202new, 613 .init_hwif = init_hwif_pdc202new,
609 .autodma = AUTODMA, 614 .autodma = AUTODMA,
610 .bootable = OFF_BOARD, 615 .bootable = OFF_BOARD,
616 .pio_mask = ATA_PIO4,
611 .udma_mask = 0x7f, /* udma0-6*/ 617 .udma_mask = 0x7f, /* udma0-6*/
612 },{ /* 6 */ 618 },{ /* 6 */
613 .name = "PDC20277", 619 .name = "PDC20277",
@@ -616,6 +622,7 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
616 .init_hwif = init_hwif_pdc202new, 622 .init_hwif = init_hwif_pdc202new,
617 .autodma = AUTODMA, 623 .autodma = AUTODMA,
618 .bootable = OFF_BOARD, 624 .bootable = OFF_BOARD,
625 .pio_mask = ATA_PIO4,
619 .udma_mask = 0x7f, /* udma0-6*/ 626 .udma_mask = 0x7f, /* udma0-6*/
620 } 627 }
621}; 628};
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c
index 3a6882d4aa64..fbcb0bb9c956 100644
--- a/drivers/ide/pci/pdc202xx_old.c
+++ b/drivers/ide/pci/pdc202xx_old.c
@@ -444,6 +444,7 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
444 .autodma = AUTODMA, 444 .autodma = AUTODMA,
445 .bootable = OFF_BOARD, 445 .bootable = OFF_BOARD,
446 .extra = 16, 446 .extra = 16,
447 .pio_mask = ATA_PIO4,
447 .udma_mask = 0x07, /* udma0-2 */ 448 .udma_mask = 0x07, /* udma0-2 */
448 },{ /* 1 */ 449 },{ /* 1 */
449 .name = "PDC20262", 450 .name = "PDC20262",
@@ -454,6 +455,7 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
454 .autodma = AUTODMA, 455 .autodma = AUTODMA,
455 .bootable = OFF_BOARD, 456 .bootable = OFF_BOARD,
456 .extra = 48, 457 .extra = 48,
458 .pio_mask = ATA_PIO4,
457 .udma_mask = 0x1f, /* udma0-4 */ 459 .udma_mask = 0x1f, /* udma0-4 */
458 },{ /* 2 */ 460 },{ /* 2 */
459 .name = "PDC20263", 461 .name = "PDC20263",
@@ -464,6 +466,7 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
464 .autodma = AUTODMA, 466 .autodma = AUTODMA,
465 .bootable = OFF_BOARD, 467 .bootable = OFF_BOARD,
466 .extra = 48, 468 .extra = 48,
469 .pio_mask = ATA_PIO4,
467 .udma_mask = 0x1f, /* udma0-4 */ 470 .udma_mask = 0x1f, /* udma0-4 */
468 },{ /* 3 */ 471 },{ /* 3 */
469 .name = "PDC20265", 472 .name = "PDC20265",
@@ -474,6 +477,7 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
474 .autodma = AUTODMA, 477 .autodma = AUTODMA,
475 .bootable = OFF_BOARD, 478 .bootable = OFF_BOARD,
476 .extra = 48, 479 .extra = 48,
480 .pio_mask = ATA_PIO4,
477 .udma_mask = 0x3f, /* udma0-5 */ 481 .udma_mask = 0x3f, /* udma0-5 */
478 },{ /* 4 */ 482 },{ /* 4 */
479 .name = "PDC20267", 483 .name = "PDC20267",
@@ -484,6 +488,7 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
484 .autodma = AUTODMA, 488 .autodma = AUTODMA,
485 .bootable = OFF_BOARD, 489 .bootable = OFF_BOARD,
486 .extra = 48, 490 .extra = 48,
491 .pio_mask = ATA_PIO4,
487 .udma_mask = 0x3f, /* udma0-5 */ 492 .udma_mask = 0x3f, /* udma0-5 */
488 } 493 }
489}; 494};
diff --git a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c
index 41a3612c6107..4f69cd067e5e 100644
--- a/drivers/ide/pci/piix.c
+++ b/drivers/ide/pci/piix.c
@@ -498,6 +498,7 @@ static void __devinit init_hwif_piix(ide_hwif_t *hwif)
498 .autodma = AUTODMA, \ 498 .autodma = AUTODMA, \
499 .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, \ 499 .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, \
500 .bootable = ON_BOARD, \ 500 .bootable = ON_BOARD, \
501 .pio_mask = ATA_PIO4, \
501 .udma_mask = udma, \ 502 .udma_mask = udma, \
502 } 503 }
503 504
@@ -517,6 +518,7 @@ static ide_pci_device_t piix_pci_info[] __devinitdata = {
517 .enablebits = {{0x6d,0xc0,0x80}, {0x6d,0xc0,0xc0}}, 518 .enablebits = {{0x6d,0xc0,0x80}, {0x6d,0xc0,0xc0}},
518 .bootable = ON_BOARD, 519 .bootable = ON_BOARD,
519 .host_flags = IDE_HFLAG_ISA_PORTS, 520 .host_flags = IDE_HFLAG_ISA_PORTS,
521 .pio_mask = ATA_PIO4,
520 }, 522 },
521 523
522 /* 3 */ DECLARE_PIIX_DEV("PIIX3", 0x00), /* no udma */ 524 /* 3 */ DECLARE_PIIX_DEV("PIIX3", 0x00), /* no udma */
diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c
index 98e1a2bd9501..9bdc9694d50d 100644
--- a/drivers/ide/pci/sc1200.c
+++ b/drivers/ide/pci/sc1200.c
@@ -438,6 +438,7 @@ static ide_pci_device_t sc1200_chipset __devinitdata = {
438 .init_hwif = init_hwif_sc1200, 438 .init_hwif = init_hwif_sc1200,
439 .autodma = AUTODMA, 439 .autodma = AUTODMA,
440 .bootable = ON_BOARD, 440 .bootable = ON_BOARD,
441 .pio_mask = ATA_PIO4,
441}; 442};
442 443
443static int __devinit sc1200_init_one(struct pci_dev *dev, const struct pci_device_id *id) 444static int __devinit sc1200_init_one(struct pci_dev *dev, const struct pci_device_id *id)
diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c
index 2c76355b92e8..f668d235e6be 100644
--- a/drivers/ide/pci/scc_pata.c
+++ b/drivers/ide/pci/scc_pata.c
@@ -775,6 +775,7 @@ static void __devinit init_hwif_scc(ide_hwif_t *hwif)
775 .autodma = AUTODMA, \ 775 .autodma = AUTODMA, \
776 .bootable = ON_BOARD, \ 776 .bootable = ON_BOARD, \
777 .host_flags = IDE_HFLAG_SINGLE, \ 777 .host_flags = IDE_HFLAG_SINGLE, \
778 .pio_mask = ATA_PIO4, \
778 } 779 }
779 780
780static ide_pci_device_t scc_chipsets[] __devinitdata = { 781static ide_pci_device_t scc_chipsets[] __devinitdata = {
diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c
index 1fe29d9e68fa..9fead2e7d4c8 100644
--- a/drivers/ide/pci/serverworks.c
+++ b/drivers/ide/pci/serverworks.c
@@ -451,6 +451,7 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
451 .init_hwif = init_hwif_svwks, 451 .init_hwif = init_hwif_svwks,
452 .autodma = AUTODMA, 452 .autodma = AUTODMA,
453 .bootable = ON_BOARD, 453 .bootable = ON_BOARD,
454 .pio_mask = ATA_PIO4,
454 },{ /* 1 */ 455 },{ /* 1 */
455 .name = "SvrWks CSB5", 456 .name = "SvrWks CSB5",
456 .init_setup = init_setup_svwks, 457 .init_setup = init_setup_svwks,
@@ -458,6 +459,7 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
458 .init_hwif = init_hwif_svwks, 459 .init_hwif = init_hwif_svwks,
459 .autodma = AUTODMA, 460 .autodma = AUTODMA,
460 .bootable = ON_BOARD, 461 .bootable = ON_BOARD,
462 .pio_mask = ATA_PIO4,
461 },{ /* 2 */ 463 },{ /* 2 */
462 .name = "SvrWks CSB6", 464 .name = "SvrWks CSB6",
463 .init_setup = init_setup_csb6, 465 .init_setup = init_setup_csb6,
@@ -465,6 +467,7 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
465 .init_hwif = init_hwif_svwks, 467 .init_hwif = init_hwif_svwks,
466 .autodma = AUTODMA, 468 .autodma = AUTODMA,
467 .bootable = ON_BOARD, 469 .bootable = ON_BOARD,
470 .pio_mask = ATA_PIO4,
468 },{ /* 3 */ 471 },{ /* 3 */
469 .name = "SvrWks CSB6", 472 .name = "SvrWks CSB6",
470 .init_setup = init_setup_csb6, 473 .init_setup = init_setup_csb6,
@@ -473,6 +476,7 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
473 .autodma = AUTODMA, 476 .autodma = AUTODMA,
474 .bootable = ON_BOARD, 477 .bootable = ON_BOARD,
475 .host_flags = IDE_HFLAG_SINGLE, 478 .host_flags = IDE_HFLAG_SINGLE,
479 .pio_mask = ATA_PIO4,
476 },{ /* 4 */ 480 },{ /* 4 */
477 .name = "SvrWks HT1000", 481 .name = "SvrWks HT1000",
478 .init_setup = init_setup_svwks, 482 .init_setup = init_setup_svwks,
@@ -481,6 +485,7 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
481 .autodma = AUTODMA, 485 .autodma = AUTODMA,
482 .bootable = ON_BOARD, 486 .bootable = ON_BOARD,
483 .host_flags = IDE_HFLAG_SINGLE, 487 .host_flags = IDE_HFLAG_SINGLE,
488 .pio_mask = ATA_PIO4,
484 } 489 }
485}; 490};
486 491
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c
index ed983b56b4e2..57145767c3df 100644
--- a/drivers/ide/pci/sgiioc4.c
+++ b/drivers/ide/pci/sgiioc4.c
@@ -586,6 +586,7 @@ ide_init_sgiioc4(ide_hwif_t * hwif)
586 hwif->ultra_mask = 0x0; /* Disable Ultra DMA */ 586 hwif->ultra_mask = 0x0; /* Disable Ultra DMA */
587 hwif->mwdma_mask = 0x2; /* Multimode-2 DMA */ 587 hwif->mwdma_mask = 0x2; /* Multimode-2 DMA */
588 hwif->swdma_mask = 0x2; 588 hwif->swdma_mask = 0x2;
589 hwif->pio_mask = 0x00;
589 hwif->tuneproc = NULL; /* Sets timing for PIO mode */ 590 hwif->tuneproc = NULL; /* Sets timing for PIO mode */
590 hwif->speedproc = NULL; /* Sets timing for DMA &/or PIO modes */ 591 hwif->speedproc = NULL; /* Sets timing for DMA &/or PIO modes */
591 hwif->selectproc = NULL;/* Use the default routine to select drive */ 592 hwif->selectproc = NULL;/* Use the default routine to select drive */
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c
index 63a8a93d63d6..50f6d172ef77 100644
--- a/drivers/ide/pci/siimage.c
+++ b/drivers/ide/pci/siimage.c
@@ -959,6 +959,7 @@ static void __devinit init_hwif_siimage(ide_hwif_t *hwif)
959 .fixup = siimage_fixup, \ 959 .fixup = siimage_fixup, \
960 .autodma = AUTODMA, \ 960 .autodma = AUTODMA, \
961 .bootable = ON_BOARD, \ 961 .bootable = ON_BOARD, \
962 .pio_mask = ATA_PIO4, \
962 } 963 }
963 964
964static ide_pci_device_t siimage_chipsets[] __devinitdata = { 965static ide_pci_device_t siimage_chipsets[] __devinitdata = {
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c
index 3c4693695ca3..63fbb79e8178 100644
--- a/drivers/ide/pci/sis5513.c
+++ b/drivers/ide/pci/sis5513.c
@@ -881,6 +881,7 @@ static ide_pci_device_t sis5513_chipset __devinitdata = {
881 .autodma = NOAUTODMA, 881 .autodma = NOAUTODMA,
882 .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, 882 .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
883 .bootable = ON_BOARD, 883 .bootable = ON_BOARD,
884 .pio_mask = ATA_PIO4,
884}; 885};
885 886
886static int __devinit sis5513_init_one(struct pci_dev *dev, const struct pci_device_id *id) 887static int __devinit sis5513_init_one(struct pci_dev *dev, const struct pci_device_id *id)
diff --git a/drivers/ide/pci/sl82c105.c b/drivers/ide/pci/sl82c105.c
index 4e8f32e643a6..0947cab00595 100644
--- a/drivers/ide/pci/sl82c105.c
+++ b/drivers/ide/pci/sl82c105.c
@@ -456,6 +456,7 @@ static ide_pci_device_t sl82c105_chipset __devinitdata = {
456 .autodma = NOAUTODMA, 456 .autodma = NOAUTODMA,
457 .enablebits = {{0x40,0x01,0x01}, {0x40,0x10,0x10}}, 457 .enablebits = {{0x40,0x01,0x01}, {0x40,0x10,0x10}},
458 .bootable = ON_BOARD, 458 .bootable = ON_BOARD,
459 .pio_mask = ATA_PIO5,
459}; 460};
460 461
461static int __devinit sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id) 462static int __devinit sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id)
diff --git a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c
index 562747fbee39..8e655f2db5cb 100644
--- a/drivers/ide/pci/slc90e66.c
+++ b/drivers/ide/pci/slc90e66.c
@@ -217,6 +217,7 @@ static ide_pci_device_t slc90e66_chipset __devinitdata = {
217 .autodma = AUTODMA, 217 .autodma = AUTODMA,
218 .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, 218 .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
219 .bootable = ON_BOARD, 219 .bootable = ON_BOARD,
220 .pio_mask = ATA_PIO4,
220}; 221};
221 222
222static int __devinit slc90e66_init_one(struct pci_dev *dev, const struct pci_device_id *id) 223static int __devinit slc90e66_init_one(struct pci_dev *dev, const struct pci_device_id *id)
diff --git a/drivers/ide/pci/tc86c001.c b/drivers/ide/pci/tc86c001.c
index 2479a19f0094..ec79bacc30c2 100644
--- a/drivers/ide/pci/tc86c001.c
+++ b/drivers/ide/pci/tc86c001.c
@@ -251,6 +251,7 @@ static ide_pci_device_t tc86c001_chipset __devinitdata = {
251 .autodma = AUTODMA, 251 .autodma = AUTODMA,
252 .bootable = OFF_BOARD, 252 .bootable = OFF_BOARD,
253 .host_flags = IDE_HFLAG_SINGLE, 253 .host_flags = IDE_HFLAG_SINGLE,
254 .pio_mask = ATA_PIO4,
254}; 255};
255 256
256static int __devinit tc86c001_init_one(struct pci_dev *dev, 257static int __devinit tc86c001_init_one(struct pci_dev *dev,
diff --git a/drivers/ide/pci/triflex.c b/drivers/ide/pci/triflex.c
index f8fef905bacc..024bbfae0429 100644
--- a/drivers/ide/pci/triflex.c
+++ b/drivers/ide/pci/triflex.c
@@ -132,6 +132,7 @@ static ide_pci_device_t triflex_device __devinitdata = {
132 .autodma = AUTODMA, 132 .autodma = AUTODMA,
133 .enablebits = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}}, 133 .enablebits = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}},
134 .bootable = ON_BOARD, 134 .bootable = ON_BOARD,
135 .pio_mask = ATA_PIO4,
135}; 136};
136 137
137static int __devinit triflex_init_one(struct pci_dev *dev, 138static int __devinit triflex_init_one(struct pci_dev *dev,
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c
index b107ee3588f7..581316f9581d 100644
--- a/drivers/ide/pci/via82cxxx.c
+++ b/drivers/ide/pci/via82cxxx.c
@@ -503,6 +503,7 @@ static ide_pci_device_t via82cxxx_chipsets[] __devinitdata = {
503 .bootable = ON_BOARD, 503 .bootable = ON_BOARD,
504 .host_flags = IDE_HFLAG_PIO_NO_BLACKLIST 504 .host_flags = IDE_HFLAG_PIO_NO_BLACKLIST
505 | IDE_HFLAG_PIO_NO_DOWNGRADE, 505 | IDE_HFLAG_PIO_NO_DOWNGRADE,
506 .pio_mask = ATA_PIO5,
506 },{ /* 1 */ 507 },{ /* 1 */
507 .name = "VP_IDE", 508 .name = "VP_IDE",
508 .init_chipset = init_chipset_via82cxxx, 509 .init_chipset = init_chipset_via82cxxx,
@@ -512,6 +513,7 @@ static ide_pci_device_t via82cxxx_chipsets[] __devinitdata = {
512 .bootable = ON_BOARD, 513 .bootable = ON_BOARD,
513 .host_flags = IDE_HFLAG_PIO_NO_BLACKLIST 514 .host_flags = IDE_HFLAG_PIO_NO_BLACKLIST
514 | IDE_HFLAG_PIO_NO_DOWNGRADE, 515 | IDE_HFLAG_PIO_NO_DOWNGRADE,
516 .pio_mask = ATA_PIO5,
515 } 517 }
516}; 518};
517 519
diff --git a/drivers/ide/ppc/mpc8xx.c b/drivers/ide/ppc/mpc8xx.c
index f3789c0e6cc9..8859fe2f5ac2 100644
--- a/drivers/ide/ppc/mpc8xx.c
+++ b/drivers/ide/ppc/mpc8xx.c
@@ -316,6 +316,7 @@ m8xx_ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
316 } 316 }
317 317
318 /* register routine to tune PIO mode */ 318 /* register routine to tune PIO mode */
319 ide_hwifs[data_port].pio_mask = ATA_PIO4;
319 ide_hwifs[data_port].tuneproc = m8xx_ide_tuneproc; 320 ide_hwifs[data_port].tuneproc = m8xx_ide_tuneproc;
320 321
321 hw->ack_intr = (ide_ack_intr_t *) ide_interrupt_ack; 322 hw->ack_intr = (ide_ack_intr_t *) ide_interrupt_ack;
@@ -402,6 +403,7 @@ void m8xx_ide_init_hwif_ports (hw_regs_t *hw,
402 } 403 }
403 404
404 /* register routine to tune PIO mode */ 405 /* register routine to tune PIO mode */
406 ide_hwifs[data_port].pio_mask = ATA_PIO4;
405 ide_hwifs[data_port].tuneproc = m8xx_ide_tuneproc; 407 ide_hwifs[data_port].tuneproc = m8xx_ide_tuneproc;
406 408
407 hw->ack_intr = (ide_ack_intr_t *) ide_interrupt_ack; 409 hw->ack_intr = (ide_ack_intr_t *) ide_interrupt_ack;
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index debaa8823f51..33630ad3e794 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -1248,6 +1248,7 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
1248 hwif->cbl = pmif->cable_80 ? ATA_CBL_PATA80 : ATA_CBL_PATA40; 1248 hwif->cbl = pmif->cable_80 ? ATA_CBL_PATA80 : ATA_CBL_PATA40;
1249 hwif->drives[0].unmask = 1; 1249 hwif->drives[0].unmask = 1;
1250 hwif->drives[1].unmask = 1; 1250 hwif->drives[1].unmask = 1;
1251 hwif->pio_mask = ATA_PIO4;
1251 hwif->tuneproc = pmac_ide_tuneproc; 1252 hwif->tuneproc = pmac_ide_tuneproc;
1252 if (pmif->kind == controller_un_ata6 1253 if (pmif->kind == controller_un_ata6
1253 || pmif->kind == controller_k2_ata6 1254 || pmif->kind == controller_k2_ata6
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
index e9f3267456e2..f9e455cc8092 100644
--- a/drivers/ide/setup-pci.c
+++ b/drivers/ide/setup-pci.c
@@ -614,6 +614,7 @@ void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, a
614 ide_hwif_setup_dma(dev, d, hwif); 614 ide_hwif_setup_dma(dev, d, hwif);
615bypass_legacy_dma: 615bypass_legacy_dma:
616 hwif->host_flags = d->host_flags; 616 hwif->host_flags = d->host_flags;
617 hwif->pio_mask = d->pio_mask;
617 618
618 if (d->init_hwif) 619 if (d->init_hwif)
619 /* Call chipset-specific routine 620 /* Call chipset-specific routine
diff --git a/include/linux/ata.h b/include/linux/ata.h
index b5a20162af32..23a22df039d8 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -64,6 +64,15 @@ enum {
64 ATA_ID_PROD_LEN = 40, 64 ATA_ID_PROD_LEN = 40,
65 65
66 ATA_PCI_CTL_OFS = 2, 66 ATA_PCI_CTL_OFS = 2,
67
68 ATA_PIO0 = (1 << 0),
69 ATA_PIO1 = ATA_PIO0 | (1 << 1),
70 ATA_PIO2 = ATA_PIO1 | (1 << 2),
71 ATA_PIO3 = ATA_PIO2 | (1 << 3),
72 ATA_PIO4 = ATA_PIO3 | (1 << 4),
73 ATA_PIO5 = ATA_PIO4 | (1 << 5),
74 ATA_PIO6 = ATA_PIO5 | (1 << 6),
75
67 ATA_UDMA0 = (1 << 0), 76 ATA_UDMA0 = (1 << 0),
68 ATA_UDMA1 = ATA_UDMA0 | (1 << 1), 77 ATA_UDMA1 = ATA_UDMA0 | (1 << 1),
69 ATA_UDMA2 = ATA_UDMA1 | (1 << 2), 78 ATA_UDMA2 = ATA_UDMA1 | (1 << 2),
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 9f72f6e0c954..5f5daad8bc54 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -683,6 +683,8 @@ typedef struct hwif_s {
683 683
684 u8 host_flags; 684 u8 host_flags;
685 685
686 u8 pio_mask;
687
686 u8 atapi_dma; /* host supports atapi_dma */ 688 u8 atapi_dma; /* host supports atapi_dma */
687 u8 ultra_mask; 689 u8 ultra_mask;
688 u8 mwdma_mask; 690 u8 mwdma_mask;
@@ -1270,6 +1272,7 @@ typedef struct ide_pci_device_s {
1270 unsigned int extra; 1272 unsigned int extra;
1271 struct ide_pci_device_s *next; 1273 struct ide_pci_device_s *next;
1272 u8 host_flags; 1274 u8 host_flags;
1275 u8 pio_mask;
1273 u8 udma_mask; 1276 u8 udma_mask;
1274} ide_pci_device_t; 1277} ide_pci_device_t;
1275 1278