aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/ahci.c16
-rw-r--r--drivers/ata/ata_generic.c4
-rw-r--r--drivers/ata/ata_piix.c60
-rw-r--r--drivers/ata/pata_acpi.c6
-rw-r--r--drivers/ata/pata_ali.c28
-rw-r--r--drivers/ata/pata_amd.c70
-rw-r--r--drivers/ata/pata_artop.c16
-rw-r--r--drivers/ata/pata_at32.c4
-rw-r--r--drivers/ata/pata_atiixp.c6
-rw-r--r--drivers/ata/pata_bf54x.c2
-rw-r--r--drivers/ata/pata_cmd640.c2
-rw-r--r--drivers/ata/pata_cmd64x.c24
-rw-r--r--drivers/ata/pata_cs5520.c2
-rw-r--r--drivers/ata/pata_cs5530.c8
-rw-r--r--drivers/ata/pata_cs5535.c4
-rw-r--r--drivers/ata/pata_cs5536.c4
-rw-r--r--drivers/ata/pata_cypress.c4
-rw-r--r--drivers/ata/pata_efar.c6
-rw-r--r--drivers/ata/pata_hpt366.c4
-rw-r--r--drivers/ata/pata_hpt37x.c28
-rw-r--r--drivers/ata/pata_hpt3x2n.c4
-rw-r--r--drivers/ata/pata_hpt3x3.c6
-rw-r--r--drivers/ata/pata_icside.c4
-rw-r--r--drivers/ata/pata_isapnp.c2
-rw-r--r--drivers/ata/pata_it8213.c4
-rw-r--r--drivers/ata/pata_it821x.c16
-rw-r--r--drivers/ata/pata_ixp4xx_cf.c2
-rw-r--r--drivers/ata/pata_jmicron.c4
-rw-r--r--drivers/ata/pata_legacy.c2
-rw-r--r--drivers/ata/pata_marvell.c8
-rw-r--r--drivers/ata/pata_mpc52xx.c4
-rw-r--r--drivers/ata/pata_mpiix.c2
-rw-r--r--drivers/ata/pata_netcell.c4
-rw-r--r--drivers/ata/pata_ninja32.c2
-rw-r--r--drivers/ata/pata_ns87410.c2
-rw-r--r--drivers/ata/pata_ns87415.c8
-rw-r--r--drivers/ata/pata_octeon_cf.c4
-rw-r--r--drivers/ata/pata_oldpiix.c4
-rw-r--r--drivers/ata/pata_opti.c2
-rw-r--r--drivers/ata/pata_optidma.c10
-rw-r--r--drivers/ata/pata_pcmcia.c2
-rw-r--r--drivers/ata/pata_pdc2027x.c12
-rw-r--r--drivers/ata/pata_pdc202xx_old.c12
-rw-r--r--drivers/ata/pata_qdi.c4
-rw-r--r--drivers/ata/pata_radisys.c6
-rw-r--r--drivers/ata/pata_rb532_cf.c2
-rw-r--r--drivers/ata/pata_rz1000.c2
-rw-r--r--drivers/ata/pata_sc1200.c6
-rw-r--r--drivers/ata/pata_scc.c4
-rw-r--r--drivers/ata/pata_sch.c6
-rw-r--r--drivers/ata/pata_serverworks.c20
-rw-r--r--drivers/ata/pata_sil680.c8
-rw-r--r--drivers/ata/pata_sis.c32
-rw-r--r--drivers/ata/pata_sl82c105.c6
-rw-r--r--drivers/ata/pata_triflex.c4
-rw-r--r--drivers/ata/pata_via.c24
-rw-r--r--drivers/ata/pata_winbond.c2
-rw-r--r--drivers/ata/pdc_adma.c2
-rw-r--r--drivers/ata/sata_fsl.c4
-rw-r--r--drivers/ata/sata_inic162x.c4
-rw-r--r--drivers/ata/sata_nv.c6
-rw-r--r--drivers/ata/sata_promise.c28
-rw-r--r--drivers/ata/sata_qstor.c2
-rw-r--r--drivers/ata/sata_sil.c16
-rw-r--r--drivers/ata/sata_sil24.c18
-rw-r--r--drivers/ata/sata_sis.c4
-rw-r--r--drivers/ata/sata_svw.c16
-rw-r--r--drivers/ata/sata_sx4.c4
-rw-r--r--drivers/ata/sata_uli.c2
-rw-r--r--drivers/ata/sata_via.c16
-rw-r--r--drivers/ata/sata_vsc.c4
71 files changed, 339 insertions, 331 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 699789bc9ea6..ec2922ad2dc0 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -404,7 +404,7 @@ static const struct ata_port_info ahci_port_info[] = {
404 /* board_ahci */ 404 /* board_ahci */
405 { 405 {
406 .flags = AHCI_FLAG_COMMON, 406 .flags = AHCI_FLAG_COMMON,
407 .pio_mask = 0x1f, /* pio0-4 */ 407 .pio_mask = ATA_PIO4,
408 .udma_mask = ATA_UDMA6, 408 .udma_mask = ATA_UDMA6,
409 .port_ops = &ahci_ops, 409 .port_ops = &ahci_ops,
410 }, 410 },
@@ -412,7 +412,7 @@ static const struct ata_port_info ahci_port_info[] = {
412 { 412 {
413 AHCI_HFLAGS (AHCI_HFLAG_NO_NCQ | AHCI_HFLAG_NO_PMP), 413 AHCI_HFLAGS (AHCI_HFLAG_NO_NCQ | AHCI_HFLAG_NO_PMP),
414 .flags = AHCI_FLAG_COMMON, 414 .flags = AHCI_FLAG_COMMON,
415 .pio_mask = 0x1f, /* pio0-4 */ 415 .pio_mask = ATA_PIO4,
416 .udma_mask = ATA_UDMA6, 416 .udma_mask = ATA_UDMA6,
417 .port_ops = &ahci_vt8251_ops, 417 .port_ops = &ahci_vt8251_ops,
418 }, 418 },
@@ -420,7 +420,7 @@ static const struct ata_port_info ahci_port_info[] = {
420 { 420 {
421 AHCI_HFLAGS (AHCI_HFLAG_IGN_IRQ_IF_ERR), 421 AHCI_HFLAGS (AHCI_HFLAG_IGN_IRQ_IF_ERR),
422 .flags = AHCI_FLAG_COMMON, 422 .flags = AHCI_FLAG_COMMON,
423 .pio_mask = 0x1f, /* pio0-4 */ 423 .pio_mask = ATA_PIO4,
424 .udma_mask = ATA_UDMA6, 424 .udma_mask = ATA_UDMA6,
425 .port_ops = &ahci_ops, 425 .port_ops = &ahci_ops,
426 }, 426 },
@@ -430,7 +430,7 @@ static const struct ata_port_info ahci_port_info[] = {
430 AHCI_HFLAG_32BIT_ONLY | AHCI_HFLAG_NO_MSI | 430 AHCI_HFLAG_32BIT_ONLY | AHCI_HFLAG_NO_MSI |
431 AHCI_HFLAG_SECT255), 431 AHCI_HFLAG_SECT255),
432 .flags = AHCI_FLAG_COMMON, 432 .flags = AHCI_FLAG_COMMON,
433 .pio_mask = 0x1f, /* pio0-4 */ 433 .pio_mask = ATA_PIO4,
434 .udma_mask = ATA_UDMA6, 434 .udma_mask = ATA_UDMA6,
435 .port_ops = &ahci_sb600_ops, 435 .port_ops = &ahci_sb600_ops,
436 }, 436 },
@@ -440,7 +440,7 @@ static const struct ata_port_info ahci_port_info[] = {
440 AHCI_HFLAG_MV_PATA | AHCI_HFLAG_NO_PMP), 440 AHCI_HFLAG_MV_PATA | AHCI_HFLAG_NO_PMP),
441 .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | 441 .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
442 ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA, 442 ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA,
443 .pio_mask = 0x1f, /* pio0-4 */ 443 .pio_mask = ATA_PIO4,
444 .udma_mask = ATA_UDMA6, 444 .udma_mask = ATA_UDMA6,
445 .port_ops = &ahci_ops, 445 .port_ops = &ahci_ops,
446 }, 446 },
@@ -448,7 +448,7 @@ static const struct ata_port_info ahci_port_info[] = {
448 { 448 {
449 AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL), 449 AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL),
450 .flags = AHCI_FLAG_COMMON, 450 .flags = AHCI_FLAG_COMMON,
451 .pio_mask = 0x1f, /* pio0-4 */ 451 .pio_mask = ATA_PIO4,
452 .udma_mask = ATA_UDMA6, 452 .udma_mask = ATA_UDMA6,
453 .port_ops = &ahci_sb600_ops, 453 .port_ops = &ahci_sb600_ops,
454 }, 454 },
@@ -456,7 +456,7 @@ static const struct ata_port_info ahci_port_info[] = {
456 { 456 {
457 AHCI_HFLAGS (AHCI_HFLAG_YES_NCQ), 457 AHCI_HFLAGS (AHCI_HFLAG_YES_NCQ),
458 .flags = AHCI_FLAG_COMMON, 458 .flags = AHCI_FLAG_COMMON,
459 .pio_mask = 0x1f, /* pio0-4 */ 459 .pio_mask = ATA_PIO4,
460 .udma_mask = ATA_UDMA6, 460 .udma_mask = ATA_UDMA6,
461 .port_ops = &ahci_ops, 461 .port_ops = &ahci_ops,
462 }, 462 },
@@ -464,7 +464,7 @@ static const struct ata_port_info ahci_port_info[] = {
464 { 464 {
465 AHCI_HFLAGS (AHCI_HFLAG_NO_PMP), 465 AHCI_HFLAGS (AHCI_HFLAG_NO_PMP),
466 .flags = AHCI_FLAG_COMMON, 466 .flags = AHCI_FLAG_COMMON,
467 .pio_mask = 0x1f, /* pio0-4 */ 467 .pio_mask = ATA_PIO4,
468 .udma_mask = ATA_UDMA6, 468 .udma_mask = ATA_UDMA6,
469 .port_ops = &ahci_ops, 469 .port_ops = &ahci_ops,
470 }, 470 },
diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c
index dc48a6398abe..ecfd22b4f1ce 100644
--- a/drivers/ata/ata_generic.c
+++ b/drivers/ata/ata_generic.c
@@ -118,8 +118,8 @@ static int ata_generic_init_one(struct pci_dev *dev, const struct pci_device_id
118 u16 command; 118 u16 command;
119 static const struct ata_port_info info = { 119 static const struct ata_port_info info = {
120 .flags = ATA_FLAG_SLAVE_POSS, 120 .flags = ATA_FLAG_SLAVE_POSS,
121 .pio_mask = 0x1f, 121 .pio_mask = ATA_PIO4,
122 .mwdma_mask = 0x07, 122 .mwdma_mask = ATA_MWDMA2,
123 .udma_mask = ATA_UDMA5, 123 .udma_mask = ATA_UDMA5,
124 .port_ops = &generic_port_ops 124 .port_ops = &generic_port_ops
125 }; 125 };
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index ef8b30d577bd..e5cbe80ce172 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -446,34 +446,34 @@ static struct ata_port_info piix_port_info[] = {
446 [piix_pata_mwdma] = /* PIIX3 MWDMA only */ 446 [piix_pata_mwdma] = /* PIIX3 MWDMA only */
447 { 447 {
448 .flags = PIIX_PATA_FLAGS, 448 .flags = PIIX_PATA_FLAGS,
449 .pio_mask = 0x1f, /* pio0-4 */ 449 .pio_mask = ATA_PIO4,
450 .mwdma_mask = 0x06, /* mwdma1-2 ?? CHECK 0 should be ok but slow */ 450 .mwdma_mask = ATA_MWDMA12_ONLY, /* mwdma1-2 ?? CHECK 0 should be ok but slow */
451 .port_ops = &piix_pata_ops, 451 .port_ops = &piix_pata_ops,
452 }, 452 },
453 453
454 [piix_pata_33] = /* PIIX4 at 33MHz */ 454 [piix_pata_33] = /* PIIX4 at 33MHz */
455 { 455 {
456 .flags = PIIX_PATA_FLAGS, 456 .flags = PIIX_PATA_FLAGS,
457 .pio_mask = 0x1f, /* pio0-4 */ 457 .pio_mask = ATA_PIO4,
458 .mwdma_mask = 0x06, /* mwdma1-2 ?? CHECK 0 should be ok but slow */ 458 .mwdma_mask = ATA_MWDMA12_ONLY, /* mwdma1-2 ?? CHECK 0 should be ok but slow */
459 .udma_mask = ATA_UDMA_MASK_40C, 459 .udma_mask = ATA_UDMA2,
460 .port_ops = &piix_pata_ops, 460 .port_ops = &piix_pata_ops,
461 }, 461 },
462 462
463 [ich_pata_33] = /* ICH0 - ICH at 33Mhz*/ 463 [ich_pata_33] = /* ICH0 - ICH at 33Mhz*/
464 { 464 {
465 .flags = PIIX_PATA_FLAGS, 465 .flags = PIIX_PATA_FLAGS,
466 .pio_mask = 0x1f, /* pio 0-4 */ 466 .pio_mask = ATA_PIO4,
467 .mwdma_mask = 0x06, /* Check: maybe 0x07 */ 467 .mwdma_mask = ATA_MWDMA12_ONLY, /* Check: maybe MWDMA0 is ok */
468 .udma_mask = ATA_UDMA2, /* UDMA33 */ 468 .udma_mask = ATA_UDMA2,
469 .port_ops = &ich_pata_ops, 469 .port_ops = &ich_pata_ops,
470 }, 470 },
471 471
472 [ich_pata_66] = /* ICH controllers up to 66MHz */ 472 [ich_pata_66] = /* ICH controllers up to 66MHz */
473 { 473 {
474 .flags = PIIX_PATA_FLAGS, 474 .flags = PIIX_PATA_FLAGS,
475 .pio_mask = 0x1f, /* pio 0-4 */ 475 .pio_mask = ATA_PIO4,
476 .mwdma_mask = 0x06, /* MWDMA0 is broken on chip */ 476 .mwdma_mask = ATA_MWDMA12_ONLY, /* MWDMA0 is broken on chip */
477 .udma_mask = ATA_UDMA4, 477 .udma_mask = ATA_UDMA4,
478 .port_ops = &ich_pata_ops, 478 .port_ops = &ich_pata_ops,
479 }, 479 },
@@ -481,17 +481,17 @@ static struct ata_port_info piix_port_info[] = {
481 [ich_pata_100] = 481 [ich_pata_100] =
482 { 482 {
483 .flags = PIIX_PATA_FLAGS | PIIX_FLAG_CHECKINTR, 483 .flags = PIIX_PATA_FLAGS | PIIX_FLAG_CHECKINTR,
484 .pio_mask = 0x1f, /* pio0-4 */ 484 .pio_mask = ATA_PIO4,
485 .mwdma_mask = 0x06, /* mwdma1-2 */ 485 .mwdma_mask = ATA_MWDMA12_ONLY,
486 .udma_mask = ATA_UDMA5, /* udma0-5 */ 486 .udma_mask = ATA_UDMA5,
487 .port_ops = &ich_pata_ops, 487 .port_ops = &ich_pata_ops,
488 }, 488 },
489 489
490 [ich5_sata] = 490 [ich5_sata] =
491 { 491 {
492 .flags = PIIX_SATA_FLAGS, 492 .flags = PIIX_SATA_FLAGS,
493 .pio_mask = 0x1f, /* pio0-4 */ 493 .pio_mask = ATA_PIO4,
494 .mwdma_mask = 0x07, /* mwdma0-2 */ 494 .mwdma_mask = ATA_MWDMA2,
495 .udma_mask = ATA_UDMA6, 495 .udma_mask = ATA_UDMA6,
496 .port_ops = &piix_sata_ops, 496 .port_ops = &piix_sata_ops,
497 }, 497 },
@@ -499,8 +499,8 @@ static struct ata_port_info piix_port_info[] = {
499 [ich6_sata] = 499 [ich6_sata] =
500 { 500 {
501 .flags = PIIX_SATA_FLAGS, 501 .flags = PIIX_SATA_FLAGS,
502 .pio_mask = 0x1f, /* pio0-4 */ 502 .pio_mask = ATA_PIO4,
503 .mwdma_mask = 0x07, /* mwdma0-2 */ 503 .mwdma_mask = ATA_MWDMA2,
504 .udma_mask = ATA_UDMA6, 504 .udma_mask = ATA_UDMA6,
505 .port_ops = &piix_sata_ops, 505 .port_ops = &piix_sata_ops,
506 }, 506 },
@@ -508,8 +508,8 @@ static struct ata_port_info piix_port_info[] = {
508 [ich6m_sata] = 508 [ich6m_sata] =
509 { 509 {
510 .flags = PIIX_SATA_FLAGS, 510 .flags = PIIX_SATA_FLAGS,
511 .pio_mask = 0x1f, /* pio0-4 */ 511 .pio_mask = ATA_PIO4,
512 .mwdma_mask = 0x07, /* mwdma0-2 */ 512 .mwdma_mask = ATA_MWDMA2,
513 .udma_mask = ATA_UDMA6, 513 .udma_mask = ATA_UDMA6,
514 .port_ops = &piix_sata_ops, 514 .port_ops = &piix_sata_ops,
515 }, 515 },
@@ -517,8 +517,8 @@ static struct ata_port_info piix_port_info[] = {
517 [ich8_sata] = 517 [ich8_sata] =
518 { 518 {
519 .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SIDPR, 519 .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SIDPR,
520 .pio_mask = 0x1f, /* pio0-4 */ 520 .pio_mask = ATA_PIO4,
521 .mwdma_mask = 0x07, /* mwdma0-2 */ 521 .mwdma_mask = ATA_MWDMA2,
522 .udma_mask = ATA_UDMA6, 522 .udma_mask = ATA_UDMA6,
523 .port_ops = &piix_sata_ops, 523 .port_ops = &piix_sata_ops,
524 }, 524 },
@@ -526,8 +526,8 @@ static struct ata_port_info piix_port_info[] = {
526 [ich8_2port_sata] = 526 [ich8_2port_sata] =
527 { 527 {
528 .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SIDPR, 528 .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SIDPR,
529 .pio_mask = 0x1f, /* pio0-4 */ 529 .pio_mask = ATA_PIO4,
530 .mwdma_mask = 0x07, /* mwdma0-2 */ 530 .mwdma_mask = ATA_MWDMA2,
531 .udma_mask = ATA_UDMA6, 531 .udma_mask = ATA_UDMA6,
532 .port_ops = &piix_sata_ops, 532 .port_ops = &piix_sata_ops,
533 }, 533 },
@@ -535,8 +535,8 @@ static struct ata_port_info piix_port_info[] = {
535 [tolapai_sata] = 535 [tolapai_sata] =
536 { 536 {
537 .flags = PIIX_SATA_FLAGS, 537 .flags = PIIX_SATA_FLAGS,
538 .pio_mask = 0x1f, /* pio0-4 */ 538 .pio_mask = ATA_PIO4,
539 .mwdma_mask = 0x07, /* mwdma0-2 */ 539 .mwdma_mask = ATA_MWDMA2,
540 .udma_mask = ATA_UDMA6, 540 .udma_mask = ATA_UDMA6,
541 .port_ops = &piix_sata_ops, 541 .port_ops = &piix_sata_ops,
542 }, 542 },
@@ -544,8 +544,8 @@ static struct ata_port_info piix_port_info[] = {
544 [ich8m_apple_sata] = 544 [ich8m_apple_sata] =
545 { 545 {
546 .flags = PIIX_SATA_FLAGS, 546 .flags = PIIX_SATA_FLAGS,
547 .pio_mask = 0x1f, /* pio0-4 */ 547 .pio_mask = ATA_PIO4,
548 .mwdma_mask = 0x07, /* mwdma0-2 */ 548 .mwdma_mask = ATA_MWDMA2,
549 .udma_mask = ATA_UDMA6, 549 .udma_mask = ATA_UDMA6,
550 .port_ops = &piix_sata_ops, 550 .port_ops = &piix_sata_ops,
551 }, 551 },
@@ -553,9 +553,9 @@ static struct ata_port_info piix_port_info[] = {
553 [piix_pata_vmw] = 553 [piix_pata_vmw] =
554 { 554 {
555 .flags = PIIX_PATA_FLAGS, 555 .flags = PIIX_PATA_FLAGS,
556 .pio_mask = 0x1f, /* pio0-4 */ 556 .pio_mask = ATA_PIO4,
557 .mwdma_mask = 0x06, /* mwdma1-2 ?? CHECK 0 should be ok but slow */ 557 .mwdma_mask = ATA_MWDMA12_ONLY, /* mwdma1-2 ?? CHECK 0 should be ok but slow */
558 .udma_mask = ATA_UDMA_MASK_40C, 558 .udma_mask = ATA_UDMA2,
559 .port_ops = &piix_vmw_ops, 559 .port_ops = &piix_vmw_ops,
560 }, 560 },
561 561
diff --git a/drivers/ata/pata_acpi.c b/drivers/ata/pata_acpi.c
index 8b77a9802df1..d8f35fe44421 100644
--- a/drivers/ata/pata_acpi.c
+++ b/drivers/ata/pata_acpi.c
@@ -246,9 +246,9 @@ static int pacpi_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
246 static const struct ata_port_info info = { 246 static const struct ata_port_info info = {
247 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, 247 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
248 248
249 .pio_mask = 0x1f, 249 .pio_mask = ATA_PIO4,
250 .mwdma_mask = 0x07, 250 .mwdma_mask = ATA_MWDMA2,
251 .udma_mask = 0x7f, 251 .udma_mask = ATA_UDMA6,
252 252
253 .port_ops = &pacpi_ops, 253 .port_ops = &pacpi_ops,
254 }; 254 };
diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c
index eb99dbe78081..751b7ea4816c 100644
--- a/drivers/ata/pata_ali.c
+++ b/drivers/ata/pata_ali.c
@@ -492,53 +492,53 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
492{ 492{
493 static const struct ata_port_info info_early = { 493 static const struct ata_port_info info_early = {
494 .flags = ATA_FLAG_SLAVE_POSS, 494 .flags = ATA_FLAG_SLAVE_POSS,
495 .pio_mask = 0x1f, 495 .pio_mask = ATA_PIO4,
496 .port_ops = &ali_early_port_ops 496 .port_ops = &ali_early_port_ops
497 }; 497 };
498 /* Revision 0x20 added DMA */ 498 /* Revision 0x20 added DMA */
499 static const struct ata_port_info info_20 = { 499 static const struct ata_port_info info_20 = {
500 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48, 500 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48,
501 .pio_mask = 0x1f, 501 .pio_mask = ATA_PIO4,
502 .mwdma_mask = 0x07, 502 .mwdma_mask = ATA_MWDMA2,
503 .port_ops = &ali_20_port_ops 503 .port_ops = &ali_20_port_ops
504 }; 504 };
505 /* Revision 0x20 with support logic added UDMA */ 505 /* Revision 0x20 with support logic added UDMA */
506 static const struct ata_port_info info_20_udma = { 506 static const struct ata_port_info info_20_udma = {
507 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48, 507 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48,
508 .pio_mask = 0x1f, 508 .pio_mask = ATA_PIO4,
509 .mwdma_mask = 0x07, 509 .mwdma_mask = ATA_MWDMA2,
510 .udma_mask = 0x07, /* UDMA33 */ 510 .udma_mask = ATA_UDMA2,
511 .port_ops = &ali_20_port_ops 511 .port_ops = &ali_20_port_ops
512 }; 512 };
513 /* Revision 0xC2 adds UDMA66 */ 513 /* Revision 0xC2 adds UDMA66 */
514 static const struct ata_port_info info_c2 = { 514 static const struct ata_port_info info_c2 = {
515 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48, 515 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48,
516 .pio_mask = 0x1f, 516 .pio_mask = ATA_PIO4,
517 .mwdma_mask = 0x07, 517 .mwdma_mask = ATA_MWDMA2,
518 .udma_mask = ATA_UDMA4, 518 .udma_mask = ATA_UDMA4,
519 .port_ops = &ali_c2_port_ops 519 .port_ops = &ali_c2_port_ops
520 }; 520 };
521 /* Revision 0xC3 is UDMA66 for now */ 521 /* Revision 0xC3 is UDMA66 for now */
522 static const struct ata_port_info info_c3 = { 522 static const struct ata_port_info info_c3 = {
523 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48, 523 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48,
524 .pio_mask = 0x1f, 524 .pio_mask = ATA_PIO4,
525 .mwdma_mask = 0x07, 525 .mwdma_mask = ATA_MWDMA2,
526 .udma_mask = ATA_UDMA4, 526 .udma_mask = ATA_UDMA4,
527 .port_ops = &ali_c2_port_ops 527 .port_ops = &ali_c2_port_ops
528 }; 528 };
529 /* Revision 0xC4 is UDMA100 */ 529 /* Revision 0xC4 is UDMA100 */
530 static const struct ata_port_info info_c4 = { 530 static const struct ata_port_info info_c4 = {
531 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48, 531 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48,
532 .pio_mask = 0x1f, 532 .pio_mask = ATA_PIO4,
533 .mwdma_mask = 0x07, 533 .mwdma_mask = ATA_MWDMA2,
534 .udma_mask = ATA_UDMA5, 534 .udma_mask = ATA_UDMA5,
535 .port_ops = &ali_c4_port_ops 535 .port_ops = &ali_c4_port_ops
536 }; 536 };
537 /* Revision 0xC5 is UDMA133 with LBA48 DMA */ 537 /* Revision 0xC5 is UDMA133 with LBA48 DMA */
538 static const struct ata_port_info info_c5 = { 538 static const struct ata_port_info info_c5 = {
539 .flags = ATA_FLAG_SLAVE_POSS, 539 .flags = ATA_FLAG_SLAVE_POSS,
540 .pio_mask = 0x1f, 540 .pio_mask = ATA_PIO4,
541 .mwdma_mask = 0x07, 541 .mwdma_mask = ATA_MWDMA2,
542 .udma_mask = ATA_UDMA6, 542 .udma_mask = ATA_UDMA6,
543 .port_ops = &ali_c5_port_ops 543 .port_ops = &ali_c5_port_ops
544 }; 544 };
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c
index 115b1cd6dcf5..33a74f11171c 100644
--- a/drivers/ata/pata_amd.c
+++ b/drivers/ata/pata_amd.c
@@ -455,74 +455,74 @@ static void amd_clear_fifo(struct pci_dev *pdev)
455static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id) 455static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
456{ 456{
457 static const struct ata_port_info info[10] = { 457 static const struct ata_port_info info[10] = {
458 { /* 0: AMD 7401 */ 458 { /* 0: AMD 7401 - no swdma */
459 .flags = ATA_FLAG_SLAVE_POSS, 459 .flags = ATA_FLAG_SLAVE_POSS,
460 .pio_mask = 0x1f, 460 .pio_mask = ATA_PIO4,
461 .mwdma_mask = 0x07, /* No SWDMA */ 461 .mwdma_mask = ATA_MWDMA2,
462 .udma_mask = 0x07, /* UDMA 33 */ 462 .udma_mask = ATA_UDMA2,
463 .port_ops = &amd33_port_ops 463 .port_ops = &amd33_port_ops
464 }, 464 },
465 { /* 1: Early AMD7409 - no swdma */ 465 { /* 1: Early AMD7409 - no swdma */
466 .flags = ATA_FLAG_SLAVE_POSS, 466 .flags = ATA_FLAG_SLAVE_POSS,
467 .pio_mask = 0x1f, 467 .pio_mask = ATA_PIO4,
468 .mwdma_mask = 0x07, 468 .mwdma_mask = ATA_MWDMA2,
469 .udma_mask = ATA_UDMA4, /* UDMA 66 */ 469 .udma_mask = ATA_UDMA4,
470 .port_ops = &amd66_port_ops 470 .port_ops = &amd66_port_ops
471 }, 471 },
472 { /* 2: AMD 7409, no swdma errata */ 472 { /* 2: AMD 7409 */
473 .flags = ATA_FLAG_SLAVE_POSS, 473 .flags = ATA_FLAG_SLAVE_POSS,
474 .pio_mask = 0x1f, 474 .pio_mask = ATA_PIO4,
475 .mwdma_mask = 0x07, 475 .mwdma_mask = ATA_MWDMA2,
476 .udma_mask = ATA_UDMA4, /* UDMA 66 */ 476 .udma_mask = ATA_UDMA4,
477 .port_ops = &amd66_port_ops 477 .port_ops = &amd66_port_ops
478 }, 478 },
479 { /* 3: AMD 7411 */ 479 { /* 3: AMD 7411 */
480 .flags = ATA_FLAG_SLAVE_POSS, 480 .flags = ATA_FLAG_SLAVE_POSS,
481 .pio_mask = 0x1f, 481 .pio_mask = ATA_PIO4,
482 .mwdma_mask = 0x07, 482 .mwdma_mask = ATA_MWDMA2,
483 .udma_mask = ATA_UDMA5, /* UDMA 100 */ 483 .udma_mask = ATA_UDMA5,
484 .port_ops = &amd100_port_ops 484 .port_ops = &amd100_port_ops
485 }, 485 },
486 { /* 4: AMD 7441 */ 486 { /* 4: AMD 7441 */
487 .flags = ATA_FLAG_SLAVE_POSS, 487 .flags = ATA_FLAG_SLAVE_POSS,
488 .pio_mask = 0x1f, 488 .pio_mask = ATA_PIO4,
489 .mwdma_mask = 0x07, 489 .mwdma_mask = ATA_MWDMA2,
490 .udma_mask = ATA_UDMA5, /* UDMA 100 */ 490 .udma_mask = ATA_UDMA5,
491 .port_ops = &amd100_port_ops 491 .port_ops = &amd100_port_ops
492 }, 492 },
493 { /* 5: AMD 8111*/ 493 { /* 5: AMD 8111 - no swdma */
494 .flags = ATA_FLAG_SLAVE_POSS, 494 .flags = ATA_FLAG_SLAVE_POSS,
495 .pio_mask = 0x1f, 495 .pio_mask = ATA_PIO4,
496 .mwdma_mask = 0x07, 496 .mwdma_mask = ATA_MWDMA2,
497 .udma_mask = ATA_UDMA6, /* UDMA 133, no swdma */ 497 .udma_mask = ATA_UDMA6,
498 .port_ops = &amd133_port_ops 498 .port_ops = &amd133_port_ops
499 }, 499 },
500 { /* 6: AMD 8111 UDMA 100 (Serenade) */ 500 { /* 6: AMD 8111 UDMA 100 (Serenade) - no swdma */
501 .flags = ATA_FLAG_SLAVE_POSS, 501 .flags = ATA_FLAG_SLAVE_POSS,
502 .pio_mask = 0x1f, 502 .pio_mask = ATA_PIO4,
503 .mwdma_mask = 0x07, 503 .mwdma_mask = ATA_MWDMA2,
504 .udma_mask = ATA_UDMA5, /* UDMA 100, no swdma */ 504 .udma_mask = ATA_UDMA5,
505 .port_ops = &amd133_port_ops 505 .port_ops = &amd133_port_ops
506 }, 506 },
507 { /* 7: Nvidia Nforce */ 507 { /* 7: Nvidia Nforce */
508 .flags = ATA_FLAG_SLAVE_POSS, 508 .flags = ATA_FLAG_SLAVE_POSS,
509 .pio_mask = 0x1f, 509 .pio_mask = ATA_PIO4,
510 .mwdma_mask = 0x07, 510 .mwdma_mask = ATA_MWDMA2,
511 .udma_mask = ATA_UDMA5, /* UDMA 100 */ 511 .udma_mask = ATA_UDMA5,
512 .port_ops = &nv100_port_ops 512 .port_ops = &nv100_port_ops
513 }, 513 },
514 { /* 8: Nvidia Nforce2 and later */ 514 { /* 8: Nvidia Nforce2 and later - no swdma */
515 .flags = ATA_FLAG_SLAVE_POSS, 515 .flags = ATA_FLAG_SLAVE_POSS,
516 .pio_mask = 0x1f, 516 .pio_mask = ATA_PIO4,
517 .mwdma_mask = 0x07, 517 .mwdma_mask = ATA_MWDMA2,
518 .udma_mask = ATA_UDMA6, /* UDMA 133, no swdma */ 518 .udma_mask = ATA_UDMA6,
519 .port_ops = &nv133_port_ops 519 .port_ops = &nv133_port_ops
520 }, 520 },
521 { /* 9: AMD CS5536 (Geode companion) */ 521 { /* 9: AMD CS5536 (Geode companion) */
522 .flags = ATA_FLAG_SLAVE_POSS, 522 .flags = ATA_FLAG_SLAVE_POSS,
523 .pio_mask = 0x1f, 523 .pio_mask = ATA_PIO4,
524 .mwdma_mask = 0x07, 524 .mwdma_mask = ATA_MWDMA2,
525 .udma_mask = ATA_UDMA5, /* UDMA 100 */ 525 .udma_mask = ATA_UDMA5,
526 .port_ops = &amd100_port_ops 526 .port_ops = &amd100_port_ops
527 } 527 }
528 }; 528 };
diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c
index 6b3092c75ffe..07c7fae6da13 100644
--- a/drivers/ata/pata_artop.c
+++ b/drivers/ata/pata_artop.c
@@ -323,29 +323,29 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
323 static int printed_version; 323 static int printed_version;
324 static const struct ata_port_info info_6210 = { 324 static const struct ata_port_info info_6210 = {
325 .flags = ATA_FLAG_SLAVE_POSS, 325 .flags = ATA_FLAG_SLAVE_POSS,
326 .pio_mask = 0x1f, /* pio0-4 */ 326 .pio_mask = ATA_PIO4,
327 .mwdma_mask = 0x07, /* mwdma0-2 */ 327 .mwdma_mask = ATA_MWDMA2,
328 .udma_mask = ATA_UDMA2, 328 .udma_mask = ATA_UDMA2,
329 .port_ops = &artop6210_ops, 329 .port_ops = &artop6210_ops,
330 }; 330 };
331 static const struct ata_port_info info_626x = { 331 static const struct ata_port_info info_626x = {
332 .flags = ATA_FLAG_SLAVE_POSS, 332 .flags = ATA_FLAG_SLAVE_POSS,
333 .pio_mask = 0x1f, /* pio0-4 */ 333 .pio_mask = ATA_PIO4,
334 .mwdma_mask = 0x07, /* mwdma0-2 */ 334 .mwdma_mask = ATA_MWDMA2,
335 .udma_mask = ATA_UDMA4, 335 .udma_mask = ATA_UDMA4,
336 .port_ops = &artop6260_ops, 336 .port_ops = &artop6260_ops,
337 }; 337 };
338 static const struct ata_port_info info_628x = { 338 static const struct ata_port_info info_628x = {
339 .flags = ATA_FLAG_SLAVE_POSS, 339 .flags = ATA_FLAG_SLAVE_POSS,
340 .pio_mask = 0x1f, /* pio0-4 */ 340 .pio_mask = ATA_PIO4,
341 .mwdma_mask = 0x07, /* mwdma0-2 */ 341 .mwdma_mask = ATA_MWDMA2,
342 .udma_mask = ATA_UDMA5, 342 .udma_mask = ATA_UDMA5,
343 .port_ops = &artop6260_ops, 343 .port_ops = &artop6260_ops,
344 }; 344 };
345 static const struct ata_port_info info_628x_fast = { 345 static const struct ata_port_info info_628x_fast = {
346 .flags = ATA_FLAG_SLAVE_POSS, 346 .flags = ATA_FLAG_SLAVE_POSS,
347 .pio_mask = 0x1f, /* pio0-4 */ 347 .pio_mask = ATA_PIO4,
348 .mwdma_mask = 0x07, /* mwdma0-2 */ 348 .mwdma_mask = ATA_MWDMA2,
349 .udma_mask = ATA_UDMA6, 349 .udma_mask = ATA_UDMA6,
350 .port_ops = &artop6260_ops, 350 .port_ops = &artop6260_ops,
351 }; 351 };
diff --git a/drivers/ata/pata_at32.c b/drivers/ata/pata_at32.c
index ab61095093b9..5c129f99a7e3 100644
--- a/drivers/ata/pata_at32.c
+++ b/drivers/ata/pata_at32.c
@@ -67,7 +67,9 @@
67 * 67 *
68 * Alter PIO_MASK below according to table to set maximal PIO mode. 68 * Alter PIO_MASK below according to table to set maximal PIO mode.
69 */ 69 */
70#define PIO_MASK (0x1f) 70enum {
71 PIO_MASK = ATA_PIO4,
72};
71 73
72/* 74/*
73 * Struct containing private information about device. 75 * Struct containing private information about device.
diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c
index 506adde8ebb3..bec0b8ade66d 100644
--- a/drivers/ata/pata_atiixp.c
+++ b/drivers/ata/pata_atiixp.c
@@ -220,9 +220,9 @@ static int atiixp_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
220{ 220{
221 static const struct ata_port_info info = { 221 static const struct ata_port_info info = {
222 .flags = ATA_FLAG_SLAVE_POSS, 222 .flags = ATA_FLAG_SLAVE_POSS,
223 .pio_mask = 0x1f, 223 .pio_mask = ATA_PIO4,
224 .mwdma_mask = 0x06, /* No MWDMA0 support */ 224 .mwdma_mask = ATA_MWDMA12_ONLY,
225 .udma_mask = 0x3F, 225 .udma_mask = ATA_UDMA5,
226 .port_ops = &atiixp_port_ops 226 .port_ops = &atiixp_port_ops
227 }; 227 };
228 static const struct pci_bits atiixp_enable_bits[] = { 228 static const struct pci_bits atiixp_enable_bits[] = {
diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c
index 1050fed96b2b..c4b47a3e5446 100644
--- a/drivers/ata/pata_bf54x.c
+++ b/drivers/ata/pata_bf54x.c
@@ -1502,7 +1502,7 @@ static struct ata_port_info bfin_port_info[] = {
1502 .flags = ATA_FLAG_SLAVE_POSS 1502 .flags = ATA_FLAG_SLAVE_POSS
1503 | ATA_FLAG_MMIO 1503 | ATA_FLAG_MMIO
1504 | ATA_FLAG_NO_LEGACY, 1504 | ATA_FLAG_NO_LEGACY,
1505 .pio_mask = 0x1f, /* pio0-4 */ 1505 .pio_mask = ATA_PIO4,
1506 .mwdma_mask = 0, 1506 .mwdma_mask = 0,
1507 .udma_mask = 0, 1507 .udma_mask = 0,
1508 .port_ops = &bfin_pata_ops, 1508 .port_ops = &bfin_pata_ops,
diff --git a/drivers/ata/pata_cmd640.c b/drivers/ata/pata_cmd640.c
index 34a394264c3d..5acf9fa9b39f 100644
--- a/drivers/ata/pata_cmd640.c
+++ b/drivers/ata/pata_cmd640.c
@@ -211,7 +211,7 @@ static int cmd640_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
211{ 211{
212 static const struct ata_port_info info = { 212 static const struct ata_port_info info = {
213 .flags = ATA_FLAG_SLAVE_POSS, 213 .flags = ATA_FLAG_SLAVE_POSS,
214 .pio_mask = 0x1f, 214 .pio_mask = ATA_PIO4,
215 .port_ops = &cmd640_port_ops 215 .port_ops = &cmd640_port_ops
216 }; 216 };
217 const struct ata_port_info *ppi[] = { &info, NULL }; 217 const struct ata_port_info *ppi[] = { &info, NULL };
diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c
index 3167d8fed2f2..f98dffedf4bc 100644
--- a/drivers/ata/pata_cmd64x.c
+++ b/drivers/ata/pata_cmd64x.c
@@ -299,40 +299,40 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
299 static const struct ata_port_info cmd_info[6] = { 299 static const struct ata_port_info cmd_info[6] = {
300 { /* CMD 643 - no UDMA */ 300 { /* CMD 643 - no UDMA */
301 .flags = ATA_FLAG_SLAVE_POSS, 301 .flags = ATA_FLAG_SLAVE_POSS,
302 .pio_mask = 0x1f, 302 .pio_mask = ATA_PIO4,
303 .mwdma_mask = 0x07, 303 .mwdma_mask = ATA_MWDMA2,
304 .port_ops = &cmd64x_port_ops 304 .port_ops = &cmd64x_port_ops
305 }, 305 },
306 { /* CMD 646 with broken UDMA */ 306 { /* CMD 646 with broken UDMA */
307 .flags = ATA_FLAG_SLAVE_POSS, 307 .flags = ATA_FLAG_SLAVE_POSS,
308 .pio_mask = 0x1f, 308 .pio_mask = ATA_PIO4,
309 .mwdma_mask = 0x07, 309 .mwdma_mask = ATA_MWDMA2,
310 .port_ops = &cmd64x_port_ops 310 .port_ops = &cmd64x_port_ops
311 }, 311 },
312 { /* CMD 646 with working UDMA */ 312 { /* CMD 646 with working UDMA */
313 .flags = ATA_FLAG_SLAVE_POSS, 313 .flags = ATA_FLAG_SLAVE_POSS,
314 .pio_mask = 0x1f, 314 .pio_mask = ATA_PIO4,
315 .mwdma_mask = 0x07, 315 .mwdma_mask = ATA_MWDMA2,
316 .udma_mask = ATA_UDMA2, 316 .udma_mask = ATA_UDMA2,
317 .port_ops = &cmd64x_port_ops 317 .port_ops = &cmd64x_port_ops
318 }, 318 },
319 { /* CMD 646 rev 1 */ 319 { /* CMD 646 rev 1 */
320 .flags = ATA_FLAG_SLAVE_POSS, 320 .flags = ATA_FLAG_SLAVE_POSS,
321 .pio_mask = 0x1f, 321 .pio_mask = ATA_PIO4,
322 .mwdma_mask = 0x07, 322 .mwdma_mask = ATA_MWDMA2,
323 .port_ops = &cmd646r1_port_ops 323 .port_ops = &cmd646r1_port_ops
324 }, 324 },
325 { /* CMD 648 */ 325 { /* CMD 648 */
326 .flags = ATA_FLAG_SLAVE_POSS, 326 .flags = ATA_FLAG_SLAVE_POSS,
327 .pio_mask = 0x1f, 327 .pio_mask = ATA_PIO4,
328 .mwdma_mask = 0x07, 328 .mwdma_mask = ATA_MWDMA2,
329 .udma_mask = ATA_UDMA4, 329 .udma_mask = ATA_UDMA4,
330 .port_ops = &cmd648_port_ops 330 .port_ops = &cmd648_port_ops
331 }, 331 },
332 { /* CMD 649 */ 332 { /* CMD 649 */
333 .flags = ATA_FLAG_SLAVE_POSS, 333 .flags = ATA_FLAG_SLAVE_POSS,
334 .pio_mask = 0x1f, 334 .pio_mask = ATA_PIO4,
335 .mwdma_mask = 0x07, 335 .mwdma_mask = ATA_MWDMA2,
336 .udma_mask = ATA_UDMA5, 336 .udma_mask = ATA_UDMA5,
337 .port_ops = &cmd648_port_ops 337 .port_ops = &cmd648_port_ops
338 } 338 }
diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c
index 1186bcd2781c..db6a96984f3f 100644
--- a/drivers/ata/pata_cs5520.c
+++ b/drivers/ata/pata_cs5520.c
@@ -158,7 +158,7 @@ static int __devinit cs5520_init_one(struct pci_dev *pdev, const struct pci_devi
158 static const unsigned int ctl_port[] = { 0x3F6, 0x376 }; 158 static const unsigned int ctl_port[] = { 0x3F6, 0x376 };
159 struct ata_port_info pi = { 159 struct ata_port_info pi = {
160 .flags = ATA_FLAG_SLAVE_POSS, 160 .flags = ATA_FLAG_SLAVE_POSS,
161 .pio_mask = 0x1f, 161 .pio_mask = ATA_PIO4,
162 .port_ops = &cs5520_port_ops, 162 .port_ops = &cs5520_port_ops,
163 }; 163 };
164 const struct ata_port_info *ppi[2]; 164 const struct ata_port_info *ppi[2];
diff --git a/drivers/ata/pata_cs5530.c b/drivers/ata/pata_cs5530.c
index bba453381f44..c974b05e4129 100644
--- a/drivers/ata/pata_cs5530.c
+++ b/drivers/ata/pata_cs5530.c
@@ -298,15 +298,15 @@ static int cs5530_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
298{ 298{
299 static const struct ata_port_info info = { 299 static const struct ata_port_info info = {
300 .flags = ATA_FLAG_SLAVE_POSS, 300 .flags = ATA_FLAG_SLAVE_POSS,
301 .pio_mask = 0x1f, 301 .pio_mask = ATA_PIO4,
302 .mwdma_mask = 0x07, 302 .mwdma_mask = ATA_MWDMA2,
303 .udma_mask = 0x07, 303 .udma_mask = ATA_UDMA2,
304 .port_ops = &cs5530_port_ops 304 .port_ops = &cs5530_port_ops
305 }; 305 };
306 /* The docking connector doesn't do UDMA, and it seems not MWDMA */ 306 /* The docking connector doesn't do UDMA, and it seems not MWDMA */
307 static const struct ata_port_info info_palmax_secondary = { 307 static const struct ata_port_info info_palmax_secondary = {
308 .flags = ATA_FLAG_SLAVE_POSS, 308 .flags = ATA_FLAG_SLAVE_POSS,
309 .pio_mask = 0x1f, 309 .pio_mask = ATA_PIO4,
310 .port_ops = &cs5530_port_ops 310 .port_ops = &cs5530_port_ops
311 }; 311 };
312 const struct ata_port_info *ppi[] = { &info, NULL }; 312 const struct ata_port_info *ppi[] = { &info, NULL };
diff --git a/drivers/ata/pata_cs5535.c b/drivers/ata/pata_cs5535.c
index 8b236af84c2e..d33aa28239a9 100644
--- a/drivers/ata/pata_cs5535.c
+++ b/drivers/ata/pata_cs5535.c
@@ -181,8 +181,8 @@ static int cs5535_init_one(struct pci_dev *dev, const struct pci_device_id *id)
181{ 181{
182 static const struct ata_port_info info = { 182 static const struct ata_port_info info = {
183 .flags = ATA_FLAG_SLAVE_POSS, 183 .flags = ATA_FLAG_SLAVE_POSS,
184 .pio_mask = 0x1f, 184 .pio_mask = ATA_PIO4,
185 .mwdma_mask = 0x07, 185 .mwdma_mask = ATA_MWDMA2,
186 .udma_mask = ATA_UDMA4, 186 .udma_mask = ATA_UDMA4,
187 .port_ops = &cs5535_port_ops 187 .port_ops = &cs5535_port_ops
188 }; 188 };
diff --git a/drivers/ata/pata_cs5536.c b/drivers/ata/pata_cs5536.c
index afed92976198..6da4cb486c8d 100644
--- a/drivers/ata/pata_cs5536.c
+++ b/drivers/ata/pata_cs5536.c
@@ -241,8 +241,8 @@ static int cs5536_init_one(struct pci_dev *dev, const struct pci_device_id *id)
241{ 241{
242 static const struct ata_port_info info = { 242 static const struct ata_port_info info = {
243 .flags = ATA_FLAG_SLAVE_POSS, 243 .flags = ATA_FLAG_SLAVE_POSS,
244 .pio_mask = 0x1f, 244 .pio_mask = ATA_PIO4,
245 .mwdma_mask = 0x07, 245 .mwdma_mask = ATA_MWDMA2,
246 .udma_mask = ATA_UDMA5, 246 .udma_mask = ATA_UDMA5,
247 .port_ops = &cs5536_port_ops, 247 .port_ops = &cs5536_port_ops,
248 }; 248 };
diff --git a/drivers/ata/pata_cypress.c b/drivers/ata/pata_cypress.c
index d546425cd380..8fb040bf7361 100644
--- a/drivers/ata/pata_cypress.c
+++ b/drivers/ata/pata_cypress.c
@@ -124,8 +124,8 @@ static int cy82c693_init_one(struct pci_dev *pdev, const struct pci_device_id *i
124{ 124{
125 static const struct ata_port_info info = { 125 static const struct ata_port_info info = {
126 .flags = ATA_FLAG_SLAVE_POSS, 126 .flags = ATA_FLAG_SLAVE_POSS,
127 .pio_mask = 0x1f, 127 .pio_mask = ATA_PIO4,
128 .mwdma_mask = 0x07, 128 .mwdma_mask = ATA_MWDMA2,
129 .port_ops = &cy82c693_port_ops 129 .port_ops = &cy82c693_port_ops
130 }; 130 };
131 const struct ata_port_info *ppi[] = { &info, &ata_dummy_port_info }; 131 const struct ata_port_info *ppi[] = { &info, &ata_dummy_port_info };
diff --git a/drivers/ata/pata_efar.c b/drivers/ata/pata_efar.c
index ac6392ea35b0..bd498cc3920e 100644
--- a/drivers/ata/pata_efar.c
+++ b/drivers/ata/pata_efar.c
@@ -251,9 +251,9 @@ static int efar_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
251 static int printed_version; 251 static int printed_version;
252 static const struct ata_port_info info = { 252 static const struct ata_port_info info = {
253 .flags = ATA_FLAG_SLAVE_POSS, 253 .flags = ATA_FLAG_SLAVE_POSS,
254 .pio_mask = 0x1f, /* pio0-4 */ 254 .pio_mask = ATA_PIO4,
255 .mwdma_mask = 0x07, /* mwdma1-2 */ 255 .mwdma_mask = ATA_MWDMA2, /* mwdma1-2 */
256 .udma_mask = 0x0f, /* UDMA 66 */ 256 .udma_mask = ATA_UDMA3, /* UDMA 66 */
257 .port_ops = &efar_ops, 257 .port_ops = &efar_ops,
258 }; 258 };
259 const struct ata_port_info *ppi[] = { &info, NULL }; 259 const struct ata_port_info *ppi[] = { &info, NULL };
diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c
index 65c28e5a6cd7..d7f2da127d13 100644
--- a/drivers/ata/pata_hpt366.c
+++ b/drivers/ata/pata_hpt366.c
@@ -336,8 +336,8 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
336{ 336{
337 static const struct ata_port_info info_hpt366 = { 337 static const struct ata_port_info info_hpt366 = {
338 .flags = ATA_FLAG_SLAVE_POSS, 338 .flags = ATA_FLAG_SLAVE_POSS,
339 .pio_mask = 0x1f, 339 .pio_mask = ATA_PIO4,
340 .mwdma_mask = 0x07, 340 .mwdma_mask = ATA_MWDMA2,
341 .udma_mask = ATA_UDMA4, 341 .udma_mask = ATA_UDMA4,
342 .port_ops = &hpt366_port_ops 342 .port_ops = &hpt366_port_ops
343 }; 343 };
diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c
index 42163998de9a..81ab57003aba 100644
--- a/drivers/ata/pata_hpt37x.c
+++ b/drivers/ata/pata_hpt37x.c
@@ -753,55 +753,55 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
753 /* HPT370 - UDMA100 */ 753 /* HPT370 - UDMA100 */
754 static const struct ata_port_info info_hpt370 = { 754 static const struct ata_port_info info_hpt370 = {
755 .flags = ATA_FLAG_SLAVE_POSS, 755 .flags = ATA_FLAG_SLAVE_POSS,
756 .pio_mask = 0x1f, 756 .pio_mask = ATA_PIO4,
757 .mwdma_mask = 0x07, 757 .mwdma_mask = ATA_MWDMA2,
758 .udma_mask = ATA_UDMA5, 758 .udma_mask = ATA_UDMA5,
759 .port_ops = &hpt370_port_ops 759 .port_ops = &hpt370_port_ops
760 }; 760 };
761 /* HPT370A - UDMA100 */ 761 /* HPT370A - UDMA100 */
762 static const struct ata_port_info info_hpt370a = { 762 static const struct ata_port_info info_hpt370a = {
763 .flags = ATA_FLAG_SLAVE_POSS, 763 .flags = ATA_FLAG_SLAVE_POSS,
764 .pio_mask = 0x1f, 764 .pio_mask = ATA_PIO4,
765 .mwdma_mask = 0x07, 765 .mwdma_mask = ATA_MWDMA2,
766 .udma_mask = ATA_UDMA5, 766 .udma_mask = ATA_UDMA5,
767 .port_ops = &hpt370a_port_ops 767 .port_ops = &hpt370a_port_ops
768 }; 768 };
769 /* HPT370 - UDMA100 */ 769 /* HPT370 - UDMA100 */
770 static const struct ata_port_info info_hpt370_33 = { 770 static const struct ata_port_info info_hpt370_33 = {
771 .flags = ATA_FLAG_SLAVE_POSS, 771 .flags = ATA_FLAG_SLAVE_POSS,
772 .pio_mask = 0x1f, 772 .pio_mask = ATA_PIO4,
773 .mwdma_mask = 0x07, 773 .mwdma_mask = ATA_MWDMA2,
774 .udma_mask = ATA_UDMA5, 774 .udma_mask = ATA_UDMA5,
775 .port_ops = &hpt370_port_ops 775 .port_ops = &hpt370_port_ops
776 }; 776 };
777 /* HPT370A - UDMA100 */ 777 /* HPT370A - UDMA100 */
778 static const struct ata_port_info info_hpt370a_33 = { 778 static const struct ata_port_info info_hpt370a_33 = {
779 .flags = ATA_FLAG_SLAVE_POSS, 779 .flags = ATA_FLAG_SLAVE_POSS,
780 .pio_mask = 0x1f, 780 .pio_mask = ATA_PIO4,
781 .mwdma_mask = 0x07, 781 .mwdma_mask = ATA_MWDMA2,
782 .udma_mask = ATA_UDMA5, 782 .udma_mask = ATA_UDMA5,
783 .port_ops = &hpt370a_port_ops 783 .port_ops = &hpt370a_port_ops
784 }; 784 };
785 /* HPT371, 372 and friends - UDMA133 */ 785 /* HPT371, 372 and friends - UDMA133 */
786 static const struct ata_port_info info_hpt372 = { 786 static const struct ata_port_info info_hpt372 = {
787 .flags = ATA_FLAG_SLAVE_POSS, 787 .flags = ATA_FLAG_SLAVE_POSS,
788 .pio_mask = 0x1f, 788 .pio_mask = ATA_PIO4,
789 .mwdma_mask = 0x07, 789 .mwdma_mask = ATA_MWDMA2,
790 .udma_mask = ATA_UDMA6, 790 .udma_mask = ATA_UDMA6,
791 .port_ops = &hpt372_port_ops 791 .port_ops = &hpt372_port_ops
792 }; 792 };
793 /* HPT374 - UDMA100, function 1 uses different prereset method */ 793 /* HPT374 - UDMA100, function 1 uses different prereset method */
794 static const struct ata_port_info info_hpt374_fn0 = { 794 static const struct ata_port_info info_hpt374_fn0 = {
795 .flags = ATA_FLAG_SLAVE_POSS, 795 .flags = ATA_FLAG_SLAVE_POSS,
796 .pio_mask = 0x1f, 796 .pio_mask = ATA_PIO4,
797 .mwdma_mask = 0x07, 797 .mwdma_mask = ATA_MWDMA2,
798 .udma_mask = ATA_UDMA5, 798 .udma_mask = ATA_UDMA5,
799 .port_ops = &hpt372_port_ops 799 .port_ops = &hpt372_port_ops
800 }; 800 };
801 static const struct ata_port_info info_hpt374_fn1 = { 801 static const struct ata_port_info info_hpt374_fn1 = {
802 .flags = ATA_FLAG_SLAVE_POSS, 802 .flags = ATA_FLAG_SLAVE_POSS,
803 .pio_mask = 0x1f, 803 .pio_mask = ATA_PIO4,
804 .mwdma_mask = 0x07, 804 .mwdma_mask = ATA_MWDMA2,
805 .udma_mask = ATA_UDMA5, 805 .udma_mask = ATA_UDMA5,
806 .port_ops = &hpt374_fn1_port_ops 806 .port_ops = &hpt374_fn1_port_ops
807 }; 807 };
diff --git a/drivers/ata/pata_hpt3x2n.c b/drivers/ata/pata_hpt3x2n.c
index d5c9fd7b82bb..3d59fe0a408d 100644
--- a/drivers/ata/pata_hpt3x2n.c
+++ b/drivers/ata/pata_hpt3x2n.c
@@ -441,8 +441,8 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id)
441 /* HPT372N and friends - UDMA133 */ 441 /* HPT372N and friends - UDMA133 */
442 static const struct ata_port_info info = { 442 static const struct ata_port_info info = {
443 .flags = ATA_FLAG_SLAVE_POSS, 443 .flags = ATA_FLAG_SLAVE_POSS,
444 .pio_mask = 0x1f, 444 .pio_mask = ATA_PIO4,
445 .mwdma_mask = 0x07, 445 .mwdma_mask = ATA_MWDMA2,
446 .udma_mask = ATA_UDMA6, 446 .udma_mask = ATA_UDMA6,
447 .port_ops = &hpt3x2n_port_ops 447 .port_ops = &hpt3x2n_port_ops
448 }; 448 };
diff --git a/drivers/ata/pata_hpt3x3.c b/drivers/ata/pata_hpt3x3.c
index f19cc645881a..7e310253b36b 100644
--- a/drivers/ata/pata_hpt3x3.c
+++ b/drivers/ata/pata_hpt3x3.c
@@ -188,11 +188,11 @@ static int hpt3x3_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
188 static int printed_version; 188 static int printed_version;
189 static const struct ata_port_info info = { 189 static const struct ata_port_info info = {
190 .flags = ATA_FLAG_SLAVE_POSS, 190 .flags = ATA_FLAG_SLAVE_POSS,
191 .pio_mask = 0x1f, 191 .pio_mask = ATA_PIO4,
192#if defined(CONFIG_PATA_HPT3X3_DMA) 192#if defined(CONFIG_PATA_HPT3X3_DMA)
193 /* Further debug needed */ 193 /* Further debug needed */
194 .mwdma_mask = 0x07, 194 .mwdma_mask = ATA_MWDMA2,
195 .udma_mask = 0x07, 195 .udma_mask = ATA_UDMA2,
196#endif 196#endif
197 .port_ops = &hpt3x3_port_ops 197 .port_ops = &hpt3x3_port_ops
198 }; 198 };
diff --git a/drivers/ata/pata_icside.c b/drivers/ata/pata_icside.c
index cf9e9848f8b5..e7347db5b6c4 100644
--- a/drivers/ata/pata_icside.c
+++ b/drivers/ata/pata_icside.c
@@ -297,7 +297,7 @@ static int icside_dma_init(struct pata_icside_info *info)
297 297
298 if (ec->dma != NO_DMA && !request_dma(ec->dma, DRV_NAME)) { 298 if (ec->dma != NO_DMA && !request_dma(ec->dma, DRV_NAME)) {
299 state->dma = ec->dma; 299 state->dma = ec->dma;
300 info->mwdma_mask = 0x07; /* MW0..2 */ 300 info->mwdma_mask = ATA_MWDMA2;
301 } 301 }
302 302
303 return 0; 303 return 0;
@@ -473,7 +473,7 @@ static int __devinit pata_icside_add_ports(struct pata_icside_info *info)
473 for (i = 0; i < info->nr_ports; i++) { 473 for (i = 0; i < info->nr_ports; i++) {
474 struct ata_port *ap = host->ports[i]; 474 struct ata_port *ap = host->ports[i];
475 475
476 ap->pio_mask = 0x1f; 476 ap->pio_mask = ATA_PIO4;
477 ap->mwdma_mask = info->mwdma_mask; 477 ap->mwdma_mask = info->mwdma_mask;
478 ap->flags |= ATA_FLAG_SLAVE_POSS; 478 ap->flags |= ATA_FLAG_SLAVE_POSS;
479 ap->ops = &pata_icside_port_ops; 479 ap->ops = &pata_icside_port_ops;
diff --git a/drivers/ata/pata_isapnp.c b/drivers/ata/pata_isapnp.c
index 15cdb9148aab..afa8f704271e 100644
--- a/drivers/ata/pata_isapnp.c
+++ b/drivers/ata/pata_isapnp.c
@@ -66,7 +66,7 @@ static int isapnp_init_one(struct pnp_dev *idev, const struct pnp_device_id *dev
66 ap = host->ports[0]; 66 ap = host->ports[0];
67 67
68 ap->ops = &isapnp_port_ops; 68 ap->ops = &isapnp_port_ops;
69 ap->pio_mask = 1; 69 ap->pio_mask = ATA_PIO0;
70 ap->flags |= ATA_FLAG_SLAVE_POSS; 70 ap->flags |= ATA_FLAG_SLAVE_POSS;
71 71
72 ap->ioaddr.cmd_addr = cmd_addr; 72 ap->ioaddr.cmd_addr = cmd_addr;
diff --git a/drivers/ata/pata_it8213.c b/drivers/ata/pata_it8213.c
index c113d7c079c8..f156da8076f7 100644
--- a/drivers/ata/pata_it8213.c
+++ b/drivers/ata/pata_it8213.c
@@ -262,8 +262,8 @@ static int it8213_init_one (struct pci_dev *pdev, const struct pci_device_id *en
262 static int printed_version; 262 static int printed_version;
263 static const struct ata_port_info info = { 263 static const struct ata_port_info info = {
264 .flags = ATA_FLAG_SLAVE_POSS, 264 .flags = ATA_FLAG_SLAVE_POSS,
265 .pio_mask = 0x1f, /* pio0-4 */ 265 .pio_mask = ATA_PIO4,
266 .mwdma_mask = 0x07, /* mwdma0-2 */ 266 .mwdma_mask = ATA_MWDMA2,
267 .udma_mask = ATA_UDMA4, /* FIXME: want UDMA 100? */ 267 .udma_mask = ATA_UDMA4, /* FIXME: want UDMA 100? */
268 .port_ops = &it8213_ops, 268 .port_ops = &it8213_ops,
269 }; 269 };
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c
index b05b86a912c5..188bc2fcd22c 100644
--- a/drivers/ata/pata_it821x.c
+++ b/drivers/ata/pata_it821x.c
@@ -875,29 +875,29 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
875 875
876 static const struct ata_port_info info_smart = { 876 static const struct ata_port_info info_smart = {
877 .flags = ATA_FLAG_SLAVE_POSS, 877 .flags = ATA_FLAG_SLAVE_POSS,
878 .pio_mask = 0x1f, 878 .pio_mask = ATA_PIO4,
879 .mwdma_mask = 0x07, 879 .mwdma_mask = ATA_MWDMA2,
880 .udma_mask = ATA_UDMA6, 880 .udma_mask = ATA_UDMA6,
881 .port_ops = &it821x_smart_port_ops 881 .port_ops = &it821x_smart_port_ops
882 }; 882 };
883 static const struct ata_port_info info_passthru = { 883 static const struct ata_port_info info_passthru = {
884 .flags = ATA_FLAG_SLAVE_POSS, 884 .flags = ATA_FLAG_SLAVE_POSS,
885 .pio_mask = 0x1f, 885 .pio_mask = ATA_PIO4,
886 .mwdma_mask = 0x07, 886 .mwdma_mask = ATA_MWDMA2,
887 .udma_mask = ATA_UDMA6, 887 .udma_mask = ATA_UDMA6,
888 .port_ops = &it821x_passthru_port_ops 888 .port_ops = &it821x_passthru_port_ops
889 }; 889 };
890 static const struct ata_port_info info_rdc = { 890 static const struct ata_port_info info_rdc = {
891 .flags = ATA_FLAG_SLAVE_POSS, 891 .flags = ATA_FLAG_SLAVE_POSS,
892 .pio_mask = 0x1f, 892 .pio_mask = ATA_PIO4,
893 .mwdma_mask = 0x07, 893 .mwdma_mask = ATA_MWDMA2,
894 .udma_mask = ATA_UDMA6, 894 .udma_mask = ATA_UDMA6,
895 .port_ops = &it821x_rdc_port_ops 895 .port_ops = &it821x_rdc_port_ops
896 }; 896 };
897 static const struct ata_port_info info_rdc_11 = { 897 static const struct ata_port_info info_rdc_11 = {
898 .flags = ATA_FLAG_SLAVE_POSS, 898 .flags = ATA_FLAG_SLAVE_POSS,
899 .pio_mask = 0x1f, 899 .pio_mask = ATA_PIO4,
900 .mwdma_mask = 0x07, 900 .mwdma_mask = ATA_MWDMA2,
901 /* No UDMA */ 901 /* No UDMA */
902 .port_ops = &it821x_rdc_port_ops 902 .port_ops = &it821x_rdc_port_ops
903 }; 903 };
diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c
index b173c157ab00..19fdecf319a6 100644
--- a/drivers/ata/pata_ixp4xx_cf.c
+++ b/drivers/ata/pata_ixp4xx_cf.c
@@ -176,7 +176,7 @@ static __devinit int ixp4xx_pata_probe(struct platform_device *pdev)
176 ap = host->ports[0]; 176 ap = host->ports[0];
177 177
178 ap->ops = &ixp4xx_port_ops; 178 ap->ops = &ixp4xx_port_ops;
179 ap->pio_mask = 0x1f; /* PIO4 */ 179 ap->pio_mask = ATA_PIO4;
180 ap->flags |= ATA_FLAG_MMIO | ATA_FLAG_NO_LEGACY | ATA_FLAG_NO_ATAPI; 180 ap->flags |= ATA_FLAG_MMIO | ATA_FLAG_NO_LEGACY | ATA_FLAG_NO_ATAPI;
181 181
182 ixp4xx_setup_port(ap, data, cs0->start, cs1->start); 182 ixp4xx_setup_port(ap, data, cs0->start, cs1->start);
diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c
index 38cf1ab2d289..3a1474ac8838 100644
--- a/drivers/ata/pata_jmicron.c
+++ b/drivers/ata/pata_jmicron.c
@@ -136,8 +136,8 @@ static int jmicron_init_one (struct pci_dev *pdev, const struct pci_device_id *i
136 static const struct ata_port_info info = { 136 static const struct ata_port_info info = {
137 .flags = ATA_FLAG_SLAVE_POSS, 137 .flags = ATA_FLAG_SLAVE_POSS,
138 138
139 .pio_mask = 0x1f, 139 .pio_mask = ATA_PIO4,
140 .mwdma_mask = 0x07, 140 .mwdma_mask = ATA_MWDMA2,
141 .udma_mask = ATA_UDMA5, 141 .udma_mask = ATA_UDMA5,
142 142
143 .port_ops = &jmicron_ops, 143 .port_ops = &jmicron_ops,
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
index e3bc1b436284..3f830f0fe2cc 100644
--- a/drivers/ata/pata_legacy.c
+++ b/drivers/ata/pata_legacy.c
@@ -129,7 +129,7 @@ static int qdi; /* Set to probe QDI controllers */
129static int winbond; /* Set to probe Winbond controllers, 129static int winbond; /* Set to probe Winbond controllers,
130 give I/O port if non standard */ 130 give I/O port if non standard */
131static int autospeed; /* Chip present which snoops speed changes */ 131static int autospeed; /* Chip present which snoops speed changes */
132static int pio_mask = 0x1F; /* PIO range for autospeed devices */ 132static int pio_mask = ATA_PIO4; /* PIO range for autospeed devices */
133static int iordy_mask = 0xFFFFFFFF; /* Use iordy if available */ 133static int iordy_mask = 0xFFFFFFFF; /* Use iordy if available */
134 134
135/** 135/**
diff --git a/drivers/ata/pata_marvell.c b/drivers/ata/pata_marvell.c
index 76e399bf8c1b..2096fb737f82 100644
--- a/drivers/ata/pata_marvell.c
+++ b/drivers/ata/pata_marvell.c
@@ -126,8 +126,8 @@ static int marvell_init_one (struct pci_dev *pdev, const struct pci_device_id *i
126 static const struct ata_port_info info = { 126 static const struct ata_port_info info = {
127 .flags = ATA_FLAG_SLAVE_POSS, 127 .flags = ATA_FLAG_SLAVE_POSS,
128 128
129 .pio_mask = 0x1f, 129 .pio_mask = ATA_PIO4,
130 .mwdma_mask = 0x07, 130 .mwdma_mask = ATA_MWDMA2,
131 .udma_mask = ATA_UDMA5, 131 .udma_mask = ATA_UDMA5,
132 132
133 .port_ops = &marvell_ops, 133 .port_ops = &marvell_ops,
@@ -136,8 +136,8 @@ static int marvell_init_one (struct pci_dev *pdev, const struct pci_device_id *i
136 /* Slave possible as its magically mapped not real */ 136 /* Slave possible as its magically mapped not real */
137 .flags = ATA_FLAG_SLAVE_POSS, 137 .flags = ATA_FLAG_SLAVE_POSS,
138 138
139 .pio_mask = 0x1f, 139 .pio_mask = ATA_PIO4,
140 .mwdma_mask = 0x07, 140 .mwdma_mask = ATA_MWDMA2,
141 .udma_mask = ATA_UDMA6, 141 .udma_mask = ATA_UDMA6,
142 142
143 .port_ops = &marvell_ops, 143 .port_ops = &marvell_ops,
diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c
index 50ae6d13078a..68d27bc70d06 100644
--- a/drivers/ata/pata_mpc52xx.c
+++ b/drivers/ata/pata_mpc52xx.c
@@ -737,10 +737,10 @@ mpc52xx_ata_probe(struct of_device *op, const struct of_device_id *match)
737 */ 737 */
738 prop = of_get_property(op->node, "mwdma-mode", &proplen); 738 prop = of_get_property(op->node, "mwdma-mode", &proplen);
739 if ((prop) && (proplen >= 4)) 739 if ((prop) && (proplen >= 4))
740 mwdma_mask = 0x7 & ((1 << (*prop + 1)) - 1); 740 mwdma_mask = ATA_MWDMA2 & ((1 << (*prop + 1)) - 1);
741 prop = of_get_property(op->node, "udma-mode", &proplen); 741 prop = of_get_property(op->node, "udma-mode", &proplen);
742 if ((prop) && (proplen >= 4)) 742 if ((prop) && (proplen >= 4))
743 udma_mask = 0x7 & ((1 << (*prop + 1)) - 1); 743 udma_mask = ATA_UDMA2 & ((1 << (*prop + 1)) - 1);
744 744
745 ata_irq = irq_of_parse_and_map(op->node, 0); 745 ata_irq = irq_of_parse_and_map(op->node, 0);
746 if (ata_irq == NO_IRQ) { 746 if (ata_irq == NO_IRQ) {
diff --git a/drivers/ata/pata_mpiix.c b/drivers/ata/pata_mpiix.c
index aa576cac4d17..b21f0021f54a 100644
--- a/drivers/ata/pata_mpiix.c
+++ b/drivers/ata/pata_mpiix.c
@@ -200,7 +200,7 @@ static int mpiix_init_one(struct pci_dev *dev, const struct pci_device_id *id)
200 the MPIIX your box goes castors up */ 200 the MPIIX your box goes castors up */
201 201
202 ap->ops = &mpiix_port_ops; 202 ap->ops = &mpiix_port_ops;
203 ap->pio_mask = 0x1F; 203 ap->pio_mask = ATA_PIO4;
204 ap->flags |= ATA_FLAG_SLAVE_POSS; 204 ap->flags |= ATA_FLAG_SLAVE_POSS;
205 205
206 ap->ioaddr.cmd_addr = cmd_addr; 206 ap->ioaddr.cmd_addr = cmd_addr;
diff --git a/drivers/ata/pata_netcell.c b/drivers/ata/pata_netcell.c
index 9dc05e1656a8..bdb236957cb9 100644
--- a/drivers/ata/pata_netcell.c
+++ b/drivers/ata/pata_netcell.c
@@ -51,8 +51,8 @@ static int netcell_init_one (struct pci_dev *pdev, const struct pci_device_id *e
51 .flags = ATA_FLAG_SLAVE_POSS, 51 .flags = ATA_FLAG_SLAVE_POSS,
52 /* Actually we don't really care about these as the 52 /* Actually we don't really care about these as the
53 firmware deals with it */ 53 firmware deals with it */
54 .pio_mask = 0x1f, /* pio0-4 */ 54 .pio_mask = ATA_PIO4,
55 .mwdma_mask = 0x07, /* mwdma0-2 */ 55 .mwdma_mask = ATA_MWDMA2,
56 .udma_mask = ATA_UDMA5, /* UDMA 133 */ 56 .udma_mask = ATA_UDMA5, /* UDMA 133 */
57 .port_ops = &netcell_ops, 57 .port_ops = &netcell_ops,
58 }; 58 };
diff --git a/drivers/ata/pata_ninja32.c b/drivers/ata/pata_ninja32.c
index 4dd9a3b031e4..0fb6b1b1e634 100644
--- a/drivers/ata/pata_ninja32.c
+++ b/drivers/ata/pata_ninja32.c
@@ -136,7 +136,7 @@ static int ninja32_init_one(struct pci_dev *dev, const struct pci_device_id *id)
136 if (!base) 136 if (!base)
137 return -ENOMEM; 137 return -ENOMEM;
138 ap->ops = &ninja32_port_ops; 138 ap->ops = &ninja32_port_ops;
139 ap->pio_mask = 0x1F; 139 ap->pio_mask = ATA_PIO4;
140 ap->flags |= ATA_FLAG_SLAVE_POSS; 140 ap->flags |= ATA_FLAG_SLAVE_POSS;
141 141
142 ap->ioaddr.cmd_addr = base + 0x10; 142 ap->ioaddr.cmd_addr = base + 0x10;
diff --git a/drivers/ata/pata_ns87410.c b/drivers/ata/pata_ns87410.c
index 40d411c460de..ca53fac06717 100644
--- a/drivers/ata/pata_ns87410.c
+++ b/drivers/ata/pata_ns87410.c
@@ -144,7 +144,7 @@ static int ns87410_init_one(struct pci_dev *dev, const struct pci_device_id *id)
144{ 144{
145 static const struct ata_port_info info = { 145 static const struct ata_port_info info = {
146 .flags = ATA_FLAG_SLAVE_POSS, 146 .flags = ATA_FLAG_SLAVE_POSS,
147 .pio_mask = 0x0F, 147 .pio_mask = ATA_PIO3,
148 .port_ops = &ns87410_port_ops 148 .port_ops = &ns87410_port_ops
149 }; 149 };
150 const struct ata_port_info *ppi[] = { &info, NULL }; 150 const struct ata_port_info *ppi[] = { &info, NULL };
diff --git a/drivers/ata/pata_ns87415.c b/drivers/ata/pata_ns87415.c
index 89bf5f865d6a..773b1590b492 100644
--- a/drivers/ata/pata_ns87415.c
+++ b/drivers/ata/pata_ns87415.c
@@ -346,8 +346,8 @@ static int ns87415_init_one (struct pci_dev *pdev, const struct pci_device_id *e
346 static int printed_version; 346 static int printed_version;
347 static const struct ata_port_info info = { 347 static const struct ata_port_info info = {
348 .flags = ATA_FLAG_SLAVE_POSS, 348 .flags = ATA_FLAG_SLAVE_POSS,
349 .pio_mask = 0x1f, /* pio0-4 */ 349 .pio_mask = ATA_PIO4,
350 .mwdma_mask = 0x07, /* mwdma0-2 */ 350 .mwdma_mask = ATA_MWDMA2,
351 .port_ops = &ns87415_pata_ops, 351 .port_ops = &ns87415_pata_ops,
352 }; 352 };
353 const struct ata_port_info *ppi[] = { &info, NULL }; 353 const struct ata_port_info *ppi[] = { &info, NULL };
@@ -355,8 +355,8 @@ static int ns87415_init_one (struct pci_dev *pdev, const struct pci_device_id *e
355#if defined(CONFIG_SUPERIO) 355#if defined(CONFIG_SUPERIO)
356 static const struct ata_port_info info87560 = { 356 static const struct ata_port_info info87560 = {
357 .flags = ATA_FLAG_SLAVE_POSS, 357 .flags = ATA_FLAG_SLAVE_POSS,
358 .pio_mask = 0x1f, /* pio0-4 */ 358 .pio_mask = ATA_PIO4,
359 .mwdma_mask = 0x07, /* mwdma0-2 */ 359 .mwdma_mask = ATA_MWDMA2,
360 .port_ops = &ns87560_pata_ops, 360 .port_ops = &ns87560_pata_ops,
361 }; 361 };
362 362
diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c
index 0fe4ef309c62..efe2c1985af3 100644
--- a/drivers/ata/pata_octeon_cf.c
+++ b/drivers/ata/pata_octeon_cf.c
@@ -871,7 +871,7 @@ static int __devinit octeon_cf_probe(struct platform_device *pdev)
871 ap->private_data = cf_port; 871 ap->private_data = cf_port;
872 cf_port->ap = ap; 872 cf_port->ap = ap;
873 ap->ops = &octeon_cf_ops; 873 ap->ops = &octeon_cf_ops;
874 ap->pio_mask = 0x7f; /* Support PIO 0-6 */ 874 ap->pio_mask = ATA_PIO6;
875 ap->flags |= ATA_FLAG_MMIO | ATA_FLAG_NO_LEGACY 875 ap->flags |= ATA_FLAG_MMIO | ATA_FLAG_NO_LEGACY
876 | ATA_FLAG_NO_ATAPI | ATA_FLAG_PIO_POLLING; 876 | ATA_FLAG_NO_ATAPI | ATA_FLAG_PIO_POLLING;
877 877
@@ -900,7 +900,7 @@ static int __devinit octeon_cf_probe(struct platform_device *pdev)
900 ap->ioaddr.ctl_addr = cs1 + (6 << 1) + 1; 900 ap->ioaddr.ctl_addr = cs1 + (6 << 1) + 1;
901 octeon_cf_ops.sff_data_xfer = octeon_cf_data_xfer16; 901 octeon_cf_ops.sff_data_xfer = octeon_cf_data_xfer16;
902 902
903 ap->mwdma_mask = 0x1f; /* Support MWDMA 0-4 */ 903 ap->mwdma_mask = ATA_MWDMA4;
904 irq = platform_get_irq(pdev, 0); 904 irq = platform_get_irq(pdev, 0);
905 irq_handler = octeon_cf_interrupt; 905 irq_handler = octeon_cf_interrupt;
906 906
diff --git a/drivers/ata/pata_oldpiix.c b/drivers/ata/pata_oldpiix.c
index 2c1a91c40c1a..84ac5033ac89 100644
--- a/drivers/ata/pata_oldpiix.c
+++ b/drivers/ata/pata_oldpiix.c
@@ -238,8 +238,8 @@ static int oldpiix_init_one (struct pci_dev *pdev, const struct pci_device_id *e
238 static int printed_version; 238 static int printed_version;
239 static const struct ata_port_info info = { 239 static const struct ata_port_info info = {
240 .flags = ATA_FLAG_SLAVE_POSS, 240 .flags = ATA_FLAG_SLAVE_POSS,
241 .pio_mask = 0x1f, /* pio0-4 */ 241 .pio_mask = ATA_PIO4,
242 .mwdma_mask = 0x07, /* mwdma1-2 */ 242 .mwdma_mask = ATA_MWDMA2,
243 .port_ops = &oldpiix_pata_ops, 243 .port_ops = &oldpiix_pata_ops,
244 }; 244 };
245 const struct ata_port_info *ppi[] = { &info, NULL }; 245 const struct ata_port_info *ppi[] = { &info, NULL };
diff --git a/drivers/ata/pata_opti.c b/drivers/ata/pata_opti.c
index e4fa4d565e96..99eddda2d2e5 100644
--- a/drivers/ata/pata_opti.c
+++ b/drivers/ata/pata_opti.c
@@ -163,7 +163,7 @@ static int opti_init_one(struct pci_dev *dev, const struct pci_device_id *id)
163{ 163{
164 static const struct ata_port_info info = { 164 static const struct ata_port_info info = {
165 .flags = ATA_FLAG_SLAVE_POSS, 165 .flags = ATA_FLAG_SLAVE_POSS,
166 .pio_mask = 0x1f, 166 .pio_mask = ATA_PIO4,
167 .port_ops = &opti_port_ops 167 .port_ops = &opti_port_ops
168 }; 168 };
169 const struct ata_port_info *ppi[] = { &info, NULL }; 169 const struct ata_port_info *ppi[] = { &info, NULL };
diff --git a/drivers/ata/pata_optidma.c b/drivers/ata/pata_optidma.c
index 93bb6e91973f..86885a445f97 100644
--- a/drivers/ata/pata_optidma.c
+++ b/drivers/ata/pata_optidma.c
@@ -399,15 +399,15 @@ static int optidma_init_one(struct pci_dev *dev, const struct pci_device_id *id)
399{ 399{
400 static const struct ata_port_info info_82c700 = { 400 static const struct ata_port_info info_82c700 = {
401 .flags = ATA_FLAG_SLAVE_POSS, 401 .flags = ATA_FLAG_SLAVE_POSS,
402 .pio_mask = 0x1f, 402 .pio_mask = ATA_PIO4,
403 .mwdma_mask = 0x07, 403 .mwdma_mask = ATA_MWDMA2,
404 .port_ops = &optidma_port_ops 404 .port_ops = &optidma_port_ops
405 }; 405 };
406 static const struct ata_port_info info_82c700_udma = { 406 static const struct ata_port_info info_82c700_udma = {
407 .flags = ATA_FLAG_SLAVE_POSS, 407 .flags = ATA_FLAG_SLAVE_POSS,
408 .pio_mask = 0x1f, 408 .pio_mask = ATA_PIO4,
409 .mwdma_mask = 0x07, 409 .mwdma_mask = ATA_MWDMA2,
410 .udma_mask = 0x07, 410 .udma_mask = ATA_UDMA2,
411 .port_ops = &optiplus_port_ops 411 .port_ops = &optiplus_port_ops
412 }; 412 };
413 const struct ata_port_info *ppi[] = { &info_82c700, NULL }; 413 const struct ata_port_info *ppi[] = { &info_82c700, NULL };
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c
index 64b2e2281ee7..a5cbcc280b23 100644
--- a/drivers/ata/pata_pcmcia.c
+++ b/drivers/ata/pata_pcmcia.c
@@ -299,7 +299,7 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
299 ap = host->ports[p]; 299 ap = host->ports[p];
300 300
301 ap->ops = ops; 301 ap->ops = ops;
302 ap->pio_mask = 1; /* ISA so PIO 0 cycles */ 302 ap->pio_mask = ATA_PIO0; /* ISA so PIO 0 cycles */
303 ap->flags |= ATA_FLAG_SLAVE_POSS; 303 ap->flags |= ATA_FLAG_SLAVE_POSS;
304 ap->ioaddr.cmd_addr = io_addr + 0x10 * p; 304 ap->ioaddr.cmd_addr = io_addr + 0x10 * p;
305 ap->ioaddr.altstatus_addr = ctl_addr + 0x10 * p; 305 ap->ioaddr.altstatus_addr = ctl_addr + 0x10 * p;
diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c
index e94efccaa482..ca5cad0fd80b 100644
--- a/drivers/ata/pata_pdc2027x.c
+++ b/drivers/ata/pata_pdc2027x.c
@@ -152,18 +152,18 @@ static struct ata_port_info pdc2027x_port_info[] = {
152 { 152 {
153 .flags = ATA_FLAG_NO_LEGACY | ATA_FLAG_SLAVE_POSS | 153 .flags = ATA_FLAG_NO_LEGACY | ATA_FLAG_SLAVE_POSS |
154 ATA_FLAG_MMIO, 154 ATA_FLAG_MMIO,
155 .pio_mask = 0x1f, /* pio0-4 */ 155 .pio_mask = ATA_PIO4,
156 .mwdma_mask = 0x07, /* mwdma0-2 */ 156 .mwdma_mask = ATA_MWDMA2,
157 .udma_mask = ATA_UDMA5, /* udma0-5 */ 157 .udma_mask = ATA_UDMA5,
158 .port_ops = &pdc2027x_pata100_ops, 158 .port_ops = &pdc2027x_pata100_ops,
159 }, 159 },
160 /* PDC_UDMA_133 */ 160 /* PDC_UDMA_133 */
161 { 161 {
162 .flags = ATA_FLAG_NO_LEGACY | ATA_FLAG_SLAVE_POSS | 162 .flags = ATA_FLAG_NO_LEGACY | ATA_FLAG_SLAVE_POSS |
163 ATA_FLAG_MMIO, 163 ATA_FLAG_MMIO,
164 .pio_mask = 0x1f, /* pio0-4 */ 164 .pio_mask = ATA_PIO4,
165 .mwdma_mask = 0x07, /* mwdma0-2 */ 165 .mwdma_mask = ATA_MWDMA2,
166 .udma_mask = ATA_UDMA6, /* udma0-6 */ 166 .udma_mask = ATA_UDMA6,
167 .port_ops = &pdc2027x_pata133_ops, 167 .port_ops = &pdc2027x_pata133_ops,
168 }, 168 },
169}; 169};
diff --git a/drivers/ata/pata_pdc202xx_old.c b/drivers/ata/pata_pdc202xx_old.c
index 799a6a098712..5fedb3d4032b 100644
--- a/drivers/ata/pata_pdc202xx_old.c
+++ b/drivers/ata/pata_pdc202xx_old.c
@@ -291,22 +291,22 @@ static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id
291 static const struct ata_port_info info[3] = { 291 static const struct ata_port_info info[3] = {
292 { 292 {
293 .flags = ATA_FLAG_SLAVE_POSS, 293 .flags = ATA_FLAG_SLAVE_POSS,
294 .pio_mask = 0x1f, 294 .pio_mask = ATA_PIO4,
295 .mwdma_mask = 0x07, 295 .mwdma_mask = ATA_MWDMA2,
296 .udma_mask = ATA_UDMA2, 296 .udma_mask = ATA_UDMA2,
297 .port_ops = &pdc2024x_port_ops 297 .port_ops = &pdc2024x_port_ops
298 }, 298 },
299 { 299 {
300 .flags = ATA_FLAG_SLAVE_POSS, 300 .flags = ATA_FLAG_SLAVE_POSS,
301 .pio_mask = 0x1f, 301 .pio_mask = ATA_PIO4,
302 .mwdma_mask = 0x07, 302 .mwdma_mask = ATA_MWDMA2,
303 .udma_mask = ATA_UDMA4, 303 .udma_mask = ATA_UDMA4,
304 .port_ops = &pdc2026x_port_ops 304 .port_ops = &pdc2026x_port_ops
305 }, 305 },
306 { 306 {
307 .flags = ATA_FLAG_SLAVE_POSS, 307 .flags = ATA_FLAG_SLAVE_POSS,
308 .pio_mask = 0x1f, 308 .pio_mask = ATA_PIO4,
309 .mwdma_mask = 0x07, 309 .mwdma_mask = ATA_MWDMA2,
310 .udma_mask = ATA_UDMA5, 310 .udma_mask = ATA_UDMA5,
311 .port_ops = &pdc2026x_port_ops 311 .port_ops = &pdc2026x_port_ops
312 } 312 }
diff --git a/drivers/ata/pata_qdi.c b/drivers/ata/pata_qdi.c
index f1b26f7c8e4d..45879dc6fa41 100644
--- a/drivers/ata/pata_qdi.c
+++ b/drivers/ata/pata_qdi.c
@@ -212,11 +212,11 @@ static __init int qdi_init_one(unsigned long port, int type, unsigned long io, i
212 212
213 if (type == 6580) { 213 if (type == 6580) {
214 ap->ops = &qdi6580_port_ops; 214 ap->ops = &qdi6580_port_ops;
215 ap->pio_mask = 0x1F; 215 ap->pio_mask = ATA_PIO4;
216 ap->flags |= ATA_FLAG_SLAVE_POSS; 216 ap->flags |= ATA_FLAG_SLAVE_POSS;
217 } else { 217 } else {
218 ap->ops = &qdi6500_port_ops; 218 ap->ops = &qdi6500_port_ops;
219 ap->pio_mask = 0x07; /* Actually PIO3 !IORDY is possible */ 219 ap->pio_mask = ATA_PIO2; /* Actually PIO3 !IORDY is possible */
220 ap->flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_NO_IORDY; 220 ap->flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_NO_IORDY;
221 } 221 }
222 222
diff --git a/drivers/ata/pata_radisys.c b/drivers/ata/pata_radisys.c
index 695d44ae52c6..1956d5c03a7f 100644
--- a/drivers/ata/pata_radisys.c
+++ b/drivers/ata/pata_radisys.c
@@ -216,9 +216,9 @@ static int radisys_init_one (struct pci_dev *pdev, const struct pci_device_id *e
216 static int printed_version; 216 static int printed_version;
217 static const struct ata_port_info info = { 217 static const struct ata_port_info info = {
218 .flags = ATA_FLAG_SLAVE_POSS, 218 .flags = ATA_FLAG_SLAVE_POSS,
219 .pio_mask = 0x1f, /* pio0-4 */ 219 .pio_mask = ATA_PIO4,
220 .mwdma_mask = 0x07, /* mwdma1-2 */ 220 .mwdma_mask = ATA_MWDMA2, /* mwdma1-2 */
221 .udma_mask = 0x14, /* UDMA33/66 only */ 221 .udma_mask = ATA_UDMA24_ONLY,
222 .port_ops = &radisys_pata_ops, 222 .port_ops = &radisys_pata_ops,
223 }; 223 };
224 const struct ata_port_info *ppi[] = { &info, NULL }; 224 const struct ata_port_info *ppi[] = { &info, NULL };
diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c
index fbfee1bd85ff..2f3b49cc4970 100644
--- a/drivers/ata/pata_rb532_cf.c
+++ b/drivers/ata/pata_rb532_cf.c
@@ -89,7 +89,7 @@ static void rb532_pata_setup_ports(struct ata_host *ah)
89 ap = ah->ports[0]; 89 ap = ah->ports[0];
90 90
91 ap->ops = &rb532_pata_port_ops; 91 ap->ops = &rb532_pata_port_ops;
92 ap->pio_mask = 0x1f; /* PIO4 */ 92 ap->pio_mask = ATA_PIO4;
93 ap->flags = ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO; 93 ap->flags = ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO;
94 94
95 ap->ioaddr.cmd_addr = info->iobase + RB500_CF_REG_BASE; 95 ap->ioaddr.cmd_addr = info->iobase + RB500_CF_REG_BASE;
diff --git a/drivers/ata/pata_rz1000.c b/drivers/ata/pata_rz1000.c
index 46d6bc1bf1e9..0c574c065c62 100644
--- a/drivers/ata/pata_rz1000.c
+++ b/drivers/ata/pata_rz1000.c
@@ -88,7 +88,7 @@ static int rz1000_init_one (struct pci_dev *pdev, const struct pci_device_id *en
88 static int printed_version; 88 static int printed_version;
89 static const struct ata_port_info info = { 89 static const struct ata_port_info info = {
90 .flags = ATA_FLAG_SLAVE_POSS, 90 .flags = ATA_FLAG_SLAVE_POSS,
91 .pio_mask = 0x1f, 91 .pio_mask = ATA_PIO4,
92 .port_ops = &rz1000_port_ops 92 .port_ops = &rz1000_port_ops
93 }; 93 };
94 const struct ata_port_info *ppi[] = { &info, NULL }; 94 const struct ata_port_info *ppi[] = { &info, NULL };
diff --git a/drivers/ata/pata_sc1200.c b/drivers/ata/pata_sc1200.c
index 9a4bdca54616..36a0c3593297 100644
--- a/drivers/ata/pata_sc1200.c
+++ b/drivers/ata/pata_sc1200.c
@@ -205,9 +205,9 @@ static int sc1200_init_one(struct pci_dev *dev, const struct pci_device_id *id)
205{ 205{
206 static const struct ata_port_info info = { 206 static const struct ata_port_info info = {
207 .flags = ATA_FLAG_SLAVE_POSS, 207 .flags = ATA_FLAG_SLAVE_POSS,
208 .pio_mask = 0x1f, 208 .pio_mask = ATA_PIO4,
209 .mwdma_mask = 0x07, 209 .mwdma_mask = ATA_MWDMA2,
210 .udma_mask = 0x07, 210 .udma_mask = ATA_UDMA2,
211 .port_ops = &sc1200_port_ops 211 .port_ops = &sc1200_port_ops
212 }; 212 };
213 /* Can't enable port 2 yet, see top comments */ 213 /* Can't enable port 2 yet, see top comments */
diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c
index d447f1cb46ec..4257d6b40af4 100644
--- a/drivers/ata/pata_scc.c
+++ b/drivers/ata/pata_scc.c
@@ -1001,8 +1001,8 @@ static struct ata_port_operations scc_pata_ops = {
1001static struct ata_port_info scc_port_info[] = { 1001static struct ata_port_info scc_port_info[] = {
1002 { 1002 {
1003 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_MMIO | ATA_FLAG_NO_LEGACY, 1003 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_MMIO | ATA_FLAG_NO_LEGACY,
1004 .pio_mask = 0x1f, /* pio0-4 */ 1004 .pio_mask = ATA_PIO4,
1005 .mwdma_mask = 0x00, 1005 /* No MWDMA */
1006 .udma_mask = ATA_UDMA6, 1006 .udma_mask = ATA_UDMA6,
1007 .port_ops = &scc_pata_ops, 1007 .port_ops = &scc_pata_ops,
1008 }, 1008 },
diff --git a/drivers/ata/pata_sch.c b/drivers/ata/pata_sch.c
index 6aeeeeb34124..99cceb458e2a 100644
--- a/drivers/ata/pata_sch.c
+++ b/drivers/ata/pata_sch.c
@@ -84,9 +84,9 @@ static struct ata_port_operations sch_pata_ops = {
84 84
85static struct ata_port_info sch_port_info = { 85static struct ata_port_info sch_port_info = {
86 .flags = ATA_FLAG_SLAVE_POSS, 86 .flags = ATA_FLAG_SLAVE_POSS,
87 .pio_mask = ATA_PIO4, /* pio0-4 */ 87 .pio_mask = ATA_PIO4,
88 .mwdma_mask = ATA_MWDMA2, /* mwdma0-2 */ 88 .mwdma_mask = ATA_MWDMA2,
89 .udma_mask = ATA_UDMA5, /* udma0-5 */ 89 .udma_mask = ATA_UDMA5,
90 .port_ops = &sch_pata_ops, 90 .port_ops = &sch_pata_ops,
91}; 91};
92 92
diff --git a/drivers/ata/pata_serverworks.c b/drivers/ata/pata_serverworks.c
index 8d2fd9dd40c7..beaed12d50e4 100644
--- a/drivers/ata/pata_serverworks.c
+++ b/drivers/ata/pata_serverworks.c
@@ -398,26 +398,26 @@ static int serverworks_init_one(struct pci_dev *pdev, const struct pci_device_id
398 static const struct ata_port_info info[4] = { 398 static const struct ata_port_info info[4] = {
399 { /* OSB4 */ 399 { /* OSB4 */
400 .flags = ATA_FLAG_SLAVE_POSS, 400 .flags = ATA_FLAG_SLAVE_POSS,
401 .pio_mask = 0x1f, 401 .pio_mask = ATA_PIO4,
402 .mwdma_mask = 0x07, 402 .mwdma_mask = ATA_MWDMA2,
403 .udma_mask = 0x07, 403 .udma_mask = ATA_UDMA2,
404 .port_ops = &serverworks_osb4_port_ops 404 .port_ops = &serverworks_osb4_port_ops
405 }, { /* OSB4 no UDMA */ 405 }, { /* OSB4 no UDMA */
406 .flags = ATA_FLAG_SLAVE_POSS, 406 .flags = ATA_FLAG_SLAVE_POSS,
407 .pio_mask = 0x1f, 407 .pio_mask = ATA_PIO4,
408 .mwdma_mask = 0x07, 408 .mwdma_mask = ATA_MWDMA2,
409 .udma_mask = 0x00, 409 /* No UDMA */
410 .port_ops = &serverworks_osb4_port_ops 410 .port_ops = &serverworks_osb4_port_ops
411 }, { /* CSB5 */ 411 }, { /* CSB5 */
412 .flags = ATA_FLAG_SLAVE_POSS, 412 .flags = ATA_FLAG_SLAVE_POSS,
413 .pio_mask = 0x1f, 413 .pio_mask = ATA_PIO4,
414 .mwdma_mask = 0x07, 414 .mwdma_mask = ATA_MWDMA2,
415 .udma_mask = ATA_UDMA4, 415 .udma_mask = ATA_UDMA4,
416 .port_ops = &serverworks_csb_port_ops 416 .port_ops = &serverworks_csb_port_ops
417 }, { /* CSB5 - later revisions*/ 417 }, { /* CSB5 - later revisions*/
418 .flags = ATA_FLAG_SLAVE_POSS, 418 .flags = ATA_FLAG_SLAVE_POSS,
419 .pio_mask = 0x1f, 419 .pio_mask = ATA_PIO4,
420 .mwdma_mask = 0x07, 420 .mwdma_mask = ATA_MWDMA2,
421 .udma_mask = ATA_UDMA5, 421 .udma_mask = ATA_UDMA5,
422 .port_ops = &serverworks_csb_port_ops 422 .port_ops = &serverworks_csb_port_ops
423 } 423 }
diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c
index 9e764e5747e6..4cb649d8d38c 100644
--- a/drivers/ata/pata_sil680.c
+++ b/drivers/ata/pata_sil680.c
@@ -282,15 +282,15 @@ static int __devinit sil680_init_one(struct pci_dev *pdev,
282{ 282{
283 static const struct ata_port_info info = { 283 static const struct ata_port_info info = {
284 .flags = ATA_FLAG_SLAVE_POSS, 284 .flags = ATA_FLAG_SLAVE_POSS,
285 .pio_mask = 0x1f, 285 .pio_mask = ATA_PIO4,
286 .mwdma_mask = 0x07, 286 .mwdma_mask = ATA_MWDMA2,
287 .udma_mask = ATA_UDMA6, 287 .udma_mask = ATA_UDMA6,
288 .port_ops = &sil680_port_ops 288 .port_ops = &sil680_port_ops
289 }; 289 };
290 static const struct ata_port_info info_slow = { 290 static const struct ata_port_info info_slow = {
291 .flags = ATA_FLAG_SLAVE_POSS, 291 .flags = ATA_FLAG_SLAVE_POSS,
292 .pio_mask = 0x1f, 292 .pio_mask = ATA_PIO4,
293 .mwdma_mask = 0x07, 293 .mwdma_mask = ATA_MWDMA2,
294 .udma_mask = ATA_UDMA5, 294 .udma_mask = ATA_UDMA5,
295 .port_ops = &sil680_port_ops 295 .port_ops = &sil680_port_ops
296 }; 296 };
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c
index 27ceb42a774b..488e77bcd22b 100644
--- a/drivers/ata/pata_sis.c
+++ b/drivers/ata/pata_sis.c
@@ -552,51 +552,57 @@ static struct ata_port_operations sis_old_ops = {
552 552
553static const struct ata_port_info sis_info = { 553static const struct ata_port_info sis_info = {
554 .flags = ATA_FLAG_SLAVE_POSS, 554 .flags = ATA_FLAG_SLAVE_POSS,
555 .pio_mask = 0x1f, /* pio0-4 */ 555 .pio_mask = ATA_PIO4,
556 .mwdma_mask = 0x07, 556 .mwdma_mask = ATA_MWDMA2,
557 .udma_mask = 0, 557 /* No UDMA */
558 .port_ops = &sis_old_ops, 558 .port_ops = &sis_old_ops,
559}; 559};
560static const struct ata_port_info sis_info33 = { 560static const struct ata_port_info sis_info33 = {
561 .flags = ATA_FLAG_SLAVE_POSS, 561 .flags = ATA_FLAG_SLAVE_POSS,
562 .pio_mask = 0x1f, /* pio0-4 */ 562 .pio_mask = ATA_PIO4,
563 .mwdma_mask = 0x07, 563 .mwdma_mask = ATA_MWDMA2,
564 .udma_mask = ATA_UDMA2, /* UDMA 33 */ 564 .udma_mask = ATA_UDMA2,
565 .port_ops = &sis_old_ops, 565 .port_ops = &sis_old_ops,
566}; 566};
567static const struct ata_port_info sis_info66 = { 567static const struct ata_port_info sis_info66 = {
568 .flags = ATA_FLAG_SLAVE_POSS, 568 .flags = ATA_FLAG_SLAVE_POSS,
569 .pio_mask = 0x1f, /* pio0-4 */ 569 .pio_mask = ATA_PIO4,
570 .udma_mask = ATA_UDMA4, /* UDMA 66 */ 570 /* No MWDMA */
571 .udma_mask = ATA_UDMA4,
571 .port_ops = &sis_66_ops, 572 .port_ops = &sis_66_ops,
572}; 573};
573static const struct ata_port_info sis_info100 = { 574static const struct ata_port_info sis_info100 = {
574 .flags = ATA_FLAG_SLAVE_POSS, 575 .flags = ATA_FLAG_SLAVE_POSS,
575 .pio_mask = 0x1f, /* pio0-4 */ 576 .pio_mask = ATA_PIO4,
577 /* No MWDMA */
576 .udma_mask = ATA_UDMA5, 578 .udma_mask = ATA_UDMA5,
577 .port_ops = &sis_100_ops, 579 .port_ops = &sis_100_ops,
578}; 580};
579static const struct ata_port_info sis_info100_early = { 581static const struct ata_port_info sis_info100_early = {
580 .flags = ATA_FLAG_SLAVE_POSS, 582 .flags = ATA_FLAG_SLAVE_POSS,
583 .pio_mask = ATA_PIO4,
584 /* No MWDMA */
581 .udma_mask = ATA_UDMA5, 585 .udma_mask = ATA_UDMA5,
582 .pio_mask = 0x1f, /* pio0-4 */
583 .port_ops = &sis_66_ops, 586 .port_ops = &sis_66_ops,
584}; 587};
585static const struct ata_port_info sis_info133 = { 588static const struct ata_port_info sis_info133 = {
586 .flags = ATA_FLAG_SLAVE_POSS, 589 .flags = ATA_FLAG_SLAVE_POSS,
587 .pio_mask = 0x1f, /* pio0-4 */ 590 .pio_mask = ATA_PIO4,
591 /* No MWDMA */
588 .udma_mask = ATA_UDMA6, 592 .udma_mask = ATA_UDMA6,
589 .port_ops = &sis_133_ops, 593 .port_ops = &sis_133_ops,
590}; 594};
591const struct ata_port_info sis_info133_for_sata = { 595const struct ata_port_info sis_info133_for_sata = {
592 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, 596 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
593 .pio_mask = 0x1f, /* pio0-4 */ 597 .pio_mask = ATA_PIO4,
598 /* No MWDMA */
594 .udma_mask = ATA_UDMA6, 599 .udma_mask = ATA_UDMA6,
595 .port_ops = &sis_133_for_sata_ops, 600 .port_ops = &sis_133_for_sata_ops,
596}; 601};
597static const struct ata_port_info sis_info133_early = { 602static const struct ata_port_info sis_info133_early = {
598 .flags = ATA_FLAG_SLAVE_POSS, 603 .flags = ATA_FLAG_SLAVE_POSS,
599 .pio_mask = 0x1f, /* pio0-4 */ 604 .pio_mask = ATA_PIO4,
605 /* No MWDMA */
600 .udma_mask = ATA_UDMA6, 606 .udma_mask = ATA_UDMA6,
601 .port_ops = &sis_133_early_ops, 607 .port_ops = &sis_133_early_ops,
602}; 608};
diff --git a/drivers/ata/pata_sl82c105.c b/drivers/ata/pata_sl82c105.c
index 1b0e7b6d8ef5..29f733c32066 100644
--- a/drivers/ata/pata_sl82c105.c
+++ b/drivers/ata/pata_sl82c105.c
@@ -283,13 +283,13 @@ static int sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id
283{ 283{
284 static const struct ata_port_info info_dma = { 284 static const struct ata_port_info info_dma = {
285 .flags = ATA_FLAG_SLAVE_POSS, 285 .flags = ATA_FLAG_SLAVE_POSS,
286 .pio_mask = 0x1f, 286 .pio_mask = ATA_PIO4,
287 .mwdma_mask = 0x07, 287 .mwdma_mask = ATA_MWDMA2,
288 .port_ops = &sl82c105_port_ops 288 .port_ops = &sl82c105_port_ops
289 }; 289 };
290 static const struct ata_port_info info_early = { 290 static const struct ata_port_info info_early = {
291 .flags = ATA_FLAG_SLAVE_POSS, 291 .flags = ATA_FLAG_SLAVE_POSS,
292 .pio_mask = 0x1f, 292 .pio_mask = ATA_PIO4,
293 .port_ops = &sl82c105_port_ops 293 .port_ops = &sl82c105_port_ops
294 }; 294 };
295 /* for now use only the first port */ 295 /* for now use only the first port */
diff --git a/drivers/ata/pata_triflex.c b/drivers/ata/pata_triflex.c
index ef9597517cdd..f1f13ff222fd 100644
--- a/drivers/ata/pata_triflex.c
+++ b/drivers/ata/pata_triflex.c
@@ -191,8 +191,8 @@ static int triflex_init_one(struct pci_dev *dev, const struct pci_device_id *id)
191{ 191{
192 static const struct ata_port_info info = { 192 static const struct ata_port_info info = {
193 .flags = ATA_FLAG_SLAVE_POSS, 193 .flags = ATA_FLAG_SLAVE_POSS,
194 .pio_mask = 0x1f, 194 .pio_mask = ATA_PIO4,
195 .mwdma_mask = 0x07, 195 .mwdma_mask = ATA_MWDMA2,
196 .port_ops = &triflex_port_ops 196 .port_ops = &triflex_port_ops
197 }; 197 };
198 const struct ata_port_info *ppi[] = { &info, NULL }; 198 const struct ata_port_info *ppi[] = { &info, NULL };
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index ba556d3e6963..b08e6e0f82b6 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -422,46 +422,46 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
422 /* Early VIA without UDMA support */ 422 /* Early VIA without UDMA support */
423 static const struct ata_port_info via_mwdma_info = { 423 static const struct ata_port_info via_mwdma_info = {
424 .flags = ATA_FLAG_SLAVE_POSS, 424 .flags = ATA_FLAG_SLAVE_POSS,
425 .pio_mask = 0x1f, 425 .pio_mask = ATA_PIO4,
426 .mwdma_mask = 0x07, 426 .mwdma_mask = ATA_MWDMA2,
427 .port_ops = &via_port_ops 427 .port_ops = &via_port_ops
428 }; 428 };
429 /* Ditto with IRQ masking required */ 429 /* Ditto with IRQ masking required */
430 static const struct ata_port_info via_mwdma_info_borked = { 430 static const struct ata_port_info via_mwdma_info_borked = {
431 .flags = ATA_FLAG_SLAVE_POSS, 431 .flags = ATA_FLAG_SLAVE_POSS,
432 .pio_mask = 0x1f, 432 .pio_mask = ATA_PIO4,
433 .mwdma_mask = 0x07, 433 .mwdma_mask = ATA_MWDMA2,
434 .port_ops = &via_port_ops_noirq, 434 .port_ops = &via_port_ops_noirq,
435 }; 435 };
436 /* VIA UDMA 33 devices (and borked 66) */ 436 /* VIA UDMA 33 devices (and borked 66) */
437 static const struct ata_port_info via_udma33_info = { 437 static const struct ata_port_info via_udma33_info = {
438 .flags = ATA_FLAG_SLAVE_POSS, 438 .flags = ATA_FLAG_SLAVE_POSS,
439 .pio_mask = 0x1f, 439 .pio_mask = ATA_PIO4,
440 .mwdma_mask = 0x07, 440 .mwdma_mask = ATA_MWDMA2,
441 .udma_mask = ATA_UDMA2, 441 .udma_mask = ATA_UDMA2,
442 .port_ops = &via_port_ops 442 .port_ops = &via_port_ops
443 }; 443 };
444 /* VIA UDMA 66 devices */ 444 /* VIA UDMA 66 devices */
445 static const struct ata_port_info via_udma66_info = { 445 static const struct ata_port_info via_udma66_info = {
446 .flags = ATA_FLAG_SLAVE_POSS, 446 .flags = ATA_FLAG_SLAVE_POSS,
447 .pio_mask = 0x1f, 447 .pio_mask = ATA_PIO4,
448 .mwdma_mask = 0x07, 448 .mwdma_mask = ATA_MWDMA2,
449 .udma_mask = ATA_UDMA4, 449 .udma_mask = ATA_UDMA4,
450 .port_ops = &via_port_ops 450 .port_ops = &via_port_ops
451 }; 451 };
452 /* VIA UDMA 100 devices */ 452 /* VIA UDMA 100 devices */
453 static const struct ata_port_info via_udma100_info = { 453 static const struct ata_port_info via_udma100_info = {
454 .flags = ATA_FLAG_SLAVE_POSS, 454 .flags = ATA_FLAG_SLAVE_POSS,
455 .pio_mask = 0x1f, 455 .pio_mask = ATA_PIO4,
456 .mwdma_mask = 0x07, 456 .mwdma_mask = ATA_MWDMA2,
457 .udma_mask = ATA_UDMA5, 457 .udma_mask = ATA_UDMA5,
458 .port_ops = &via_port_ops 458 .port_ops = &via_port_ops
459 }; 459 };
460 /* UDMA133 with bad AST (All current 133) */ 460 /* UDMA133 with bad AST (All current 133) */
461 static const struct ata_port_info via_udma133_info = { 461 static const struct ata_port_info via_udma133_info = {
462 .flags = ATA_FLAG_SLAVE_POSS, 462 .flags = ATA_FLAG_SLAVE_POSS,
463 .pio_mask = 0x1f, 463 .pio_mask = ATA_PIO4,
464 .mwdma_mask = 0x07, 464 .mwdma_mask = ATA_MWDMA2,
465 .udma_mask = ATA_UDMA6, /* FIXME: should check north bridge */ 465 .udma_mask = ATA_UDMA6, /* FIXME: should check north bridge */
466 .port_ops = &via_port_ops 466 .port_ops = &via_port_ops
467 }; 467 };
diff --git a/drivers/ata/pata_winbond.c b/drivers/ata/pata_winbond.c
index 319e164a3d74..6d8619b6f670 100644
--- a/drivers/ata/pata_winbond.c
+++ b/drivers/ata/pata_winbond.c
@@ -193,7 +193,7 @@ static __init int winbond_init_one(unsigned long port)
193 ata_port_desc(ap, "cmd 0x%lx ctl 0x%lx", cmd_port, ctl_port); 193 ata_port_desc(ap, "cmd 0x%lx ctl 0x%lx", cmd_port, ctl_port);
194 194
195 ap->ops = &winbond_port_ops; 195 ap->ops = &winbond_port_ops;
196 ap->pio_mask = 0x1F; 196 ap->pio_mask = ATA_PIO4;
197 ap->flags |= ATA_FLAG_SLAVE_POSS; 197 ap->flags |= ATA_FLAG_SLAVE_POSS;
198 ap->ioaddr.cmd_addr = cmd_addr; 198 ap->ioaddr.cmd_addr = cmd_addr;
199 ap->ioaddr.altstatus_addr = ctl_addr; 199 ap->ioaddr.altstatus_addr = ctl_addr;
diff --git a/drivers/ata/pdc_adma.c b/drivers/ata/pdc_adma.c
index be53545c9f64..c509c206a459 100644
--- a/drivers/ata/pdc_adma.c
+++ b/drivers/ata/pdc_adma.c
@@ -166,7 +166,7 @@ static struct ata_port_info adma_port_info[] = {
166 .flags = ATA_FLAG_SLAVE_POSS | 166 .flags = ATA_FLAG_SLAVE_POSS |
167 ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO | 167 ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO |
168 ATA_FLAG_PIO_POLLING, 168 ATA_FLAG_PIO_POLLING,
169 .pio_mask = 0x10, /* pio4 */ 169 .pio_mask = ATA_PIO4_ONLY,
170 .udma_mask = ATA_UDMA4, 170 .udma_mask = ATA_UDMA4,
171 .port_ops = &adma_ata_ops, 171 .port_ops = &adma_ata_ops,
172 }, 172 },
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 55bc88c1707b..c2e90e1fece0 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -1279,8 +1279,8 @@ static struct ata_port_operations sata_fsl_ops = {
1279static const struct ata_port_info sata_fsl_port_info[] = { 1279static const struct ata_port_info sata_fsl_port_info[] = {
1280 { 1280 {
1281 .flags = SATA_FSL_HOST_FLAGS, 1281 .flags = SATA_FSL_HOST_FLAGS,
1282 .pio_mask = 0x1f, /* pio 0-4 */ 1282 .pio_mask = ATA_PIO4,
1283 .udma_mask = 0x7f, /* udma 0-6 */ 1283 .udma_mask = ATA_UDMA6,
1284 .port_ops = &sata_fsl_ops, 1284 .port_ops = &sata_fsl_ops,
1285 }, 1285 },
1286}; 1286};
diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c
index fbbd87c96f10..305a4f825f53 100644
--- a/drivers/ata/sata_inic162x.c
+++ b/drivers/ata/sata_inic162x.c
@@ -744,8 +744,8 @@ static struct ata_port_operations inic_port_ops = {
744 744
745static struct ata_port_info inic_port_info = { 745static struct ata_port_info inic_port_info = {
746 .flags = ATA_FLAG_SATA | ATA_FLAG_PIO_DMA, 746 .flags = ATA_FLAG_SATA | ATA_FLAG_PIO_DMA,
747 .pio_mask = 0x1f, /* pio0-4 */ 747 .pio_mask = ATA_PIO4,
748 .mwdma_mask = 0x07, /* mwdma0-2 */ 748 .mwdma_mask = ATA_MWDMA2,
749 .udma_mask = ATA_UDMA6, 749 .udma_mask = ATA_UDMA6,
750 .port_ops = &inic_port_ops 750 .port_ops = &inic_port_ops
751}; 751};
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index f65b53785a8f..2f523f8c27f6 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -57,9 +57,9 @@ enum {
57 NV_MMIO_BAR = 5, 57 NV_MMIO_BAR = 5,
58 58
59 NV_PORTS = 2, 59 NV_PORTS = 2,
60 NV_PIO_MASK = 0x1f, 60 NV_PIO_MASK = ATA_PIO4,
61 NV_MWDMA_MASK = 0x07, 61 NV_MWDMA_MASK = ATA_MWDMA2,
62 NV_UDMA_MASK = 0x7f, 62 NV_UDMA_MASK = ATA_UDMA6,
63 NV_PORT0_SCR_REG_OFFSET = 0x00, 63 NV_PORT0_SCR_REG_OFFSET = 0x00,
64 NV_PORT1_SCR_REG_OFFSET = 0x40, 64 NV_PORT1_SCR_REG_OFFSET = 0x40,
65 65
diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c
index ba9a2570a742..3ad2b8863636 100644
--- a/drivers/ata/sata_promise.c
+++ b/drivers/ata/sata_promise.c
@@ -213,8 +213,8 @@ static const struct ata_port_info pdc_port_info[] = {
213 { 213 {
214 .flags = PDC_COMMON_FLAGS | ATA_FLAG_SATA | 214 .flags = PDC_COMMON_FLAGS | ATA_FLAG_SATA |
215 PDC_FLAG_SATA_PATA, 215 PDC_FLAG_SATA_PATA,
216 .pio_mask = 0x1f, /* pio0-4 */ 216 .pio_mask = ATA_PIO4,
217 .mwdma_mask = 0x07, /* mwdma0-2 */ 217 .mwdma_mask = ATA_MWDMA2,
218 .udma_mask = ATA_UDMA6, 218 .udma_mask = ATA_UDMA6,
219 .port_ops = &pdc_old_sata_ops, 219 .port_ops = &pdc_old_sata_ops,
220 }, 220 },
@@ -222,8 +222,8 @@ static const struct ata_port_info pdc_port_info[] = {
222 [board_2037x_pata] = 222 [board_2037x_pata] =
223 { 223 {
224 .flags = PDC_COMMON_FLAGS | ATA_FLAG_SLAVE_POSS, 224 .flags = PDC_COMMON_FLAGS | ATA_FLAG_SLAVE_POSS,
225 .pio_mask = 0x1f, /* pio0-4 */ 225 .pio_mask = ATA_PIO4,
226 .mwdma_mask = 0x07, /* mwdma0-2 */ 226 .mwdma_mask = ATA_MWDMA2,
227 .udma_mask = ATA_UDMA6, 227 .udma_mask = ATA_UDMA6,
228 .port_ops = &pdc_pata_ops, 228 .port_ops = &pdc_pata_ops,
229 }, 229 },
@@ -232,8 +232,8 @@ static const struct ata_port_info pdc_port_info[] = {
232 { 232 {
233 .flags = PDC_COMMON_FLAGS | ATA_FLAG_SATA | 233 .flags = PDC_COMMON_FLAGS | ATA_FLAG_SATA |
234 PDC_FLAG_4_PORTS, 234 PDC_FLAG_4_PORTS,
235 .pio_mask = 0x1f, /* pio0-4 */ 235 .pio_mask = ATA_PIO4,
236 .mwdma_mask = 0x07, /* mwdma0-2 */ 236 .mwdma_mask = ATA_MWDMA2,
237 .udma_mask = ATA_UDMA6, 237 .udma_mask = ATA_UDMA6,
238 .port_ops = &pdc_old_sata_ops, 238 .port_ops = &pdc_old_sata_ops,
239 }, 239 },
@@ -242,8 +242,8 @@ static const struct ata_port_info pdc_port_info[] = {
242 { 242 {
243 .flags = PDC_COMMON_FLAGS | ATA_FLAG_SLAVE_POSS | 243 .flags = PDC_COMMON_FLAGS | ATA_FLAG_SLAVE_POSS |
244 PDC_FLAG_4_PORTS, 244 PDC_FLAG_4_PORTS,
245 .pio_mask = 0x1f, /* pio0-4 */ 245 .pio_mask = ATA_PIO4,
246 .mwdma_mask = 0x07, /* mwdma0-2 */ 246 .mwdma_mask = ATA_MWDMA2,
247 .udma_mask = ATA_UDMA6, 247 .udma_mask = ATA_UDMA6,
248 .port_ops = &pdc_pata_ops, 248 .port_ops = &pdc_pata_ops,
249 }, 249 },
@@ -252,8 +252,8 @@ static const struct ata_port_info pdc_port_info[] = {
252 { 252 {
253 .flags = PDC_COMMON_FLAGS | ATA_FLAG_SATA | 253 .flags = PDC_COMMON_FLAGS | ATA_FLAG_SATA |
254 PDC_FLAG_GEN_II | PDC_FLAG_SATA_PATA, 254 PDC_FLAG_GEN_II | PDC_FLAG_SATA_PATA,
255 .pio_mask = 0x1f, /* pio0-4 */ 255 .pio_mask = ATA_PIO4,
256 .mwdma_mask = 0x07, /* mwdma0-2 */ 256 .mwdma_mask = ATA_MWDMA2,
257 .udma_mask = ATA_UDMA6, 257 .udma_mask = ATA_UDMA6,
258 .port_ops = &pdc_sata_ops, 258 .port_ops = &pdc_sata_ops,
259 }, 259 },
@@ -262,8 +262,8 @@ static const struct ata_port_info pdc_port_info[] = {
262 { 262 {
263 .flags = PDC_COMMON_FLAGS | ATA_FLAG_SLAVE_POSS | 263 .flags = PDC_COMMON_FLAGS | ATA_FLAG_SLAVE_POSS |
264 PDC_FLAG_GEN_II, 264 PDC_FLAG_GEN_II,
265 .pio_mask = 0x1f, /* pio0-4 */ 265 .pio_mask = ATA_PIO4,
266 .mwdma_mask = 0x07, /* mwdma0-2 */ 266 .mwdma_mask = ATA_MWDMA2,
267 .udma_mask = ATA_UDMA6, 267 .udma_mask = ATA_UDMA6,
268 .port_ops = &pdc_pata_ops, 268 .port_ops = &pdc_pata_ops,
269 }, 269 },
@@ -272,8 +272,8 @@ static const struct ata_port_info pdc_port_info[] = {
272 { 272 {
273 .flags = PDC_COMMON_FLAGS | ATA_FLAG_SATA | 273 .flags = PDC_COMMON_FLAGS | ATA_FLAG_SATA |
274 PDC_FLAG_GEN_II | PDC_FLAG_4_PORTS, 274 PDC_FLAG_GEN_II | PDC_FLAG_4_PORTS,
275 .pio_mask = 0x1f, /* pio0-4 */ 275 .pio_mask = ATA_PIO4,
276 .mwdma_mask = 0x07, /* mwdma0-2 */ 276 .mwdma_mask = ATA_MWDMA2,
277 .udma_mask = ATA_UDMA6, 277 .udma_mask = ATA_UDMA6,
278 .port_ops = &pdc_sata_ops, 278 .port_ops = &pdc_sata_ops,
279 }, 279 },
diff --git a/drivers/ata/sata_qstor.c b/drivers/ata/sata_qstor.c
index a000c86ac859..7112d89fd9ff 100644
--- a/drivers/ata/sata_qstor.c
+++ b/drivers/ata/sata_qstor.c
@@ -160,7 +160,7 @@ static const struct ata_port_info qs_port_info[] = {
160 { 160 {
161 .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | 161 .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
162 ATA_FLAG_MMIO | ATA_FLAG_PIO_POLLING, 162 ATA_FLAG_MMIO | ATA_FLAG_PIO_POLLING,
163 .pio_mask = 0x10, /* pio4 */ 163 .pio_mask = ATA_PIO4_ONLY,
164 .udma_mask = ATA_UDMA6, 164 .udma_mask = ATA_UDMA6,
165 .port_ops = &qs_ata_ops, 165 .port_ops = &qs_ata_ops,
166 }, 166 },
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c
index d0091609e210..e67ce8e5caa5 100644
--- a/drivers/ata/sata_sil.c
+++ b/drivers/ata/sata_sil.c
@@ -200,8 +200,8 @@ static const struct ata_port_info sil_port_info[] = {
200 /* sil_3112 */ 200 /* sil_3112 */
201 { 201 {
202 .flags = SIL_DFL_PORT_FLAGS | SIL_FLAG_MOD15WRITE, 202 .flags = SIL_DFL_PORT_FLAGS | SIL_FLAG_MOD15WRITE,
203 .pio_mask = 0x1f, /* pio0-4 */ 203 .pio_mask = ATA_PIO4,
204 .mwdma_mask = 0x07, /* mwdma0-2 */ 204 .mwdma_mask = ATA_MWDMA2,
205 .udma_mask = ATA_UDMA5, 205 .udma_mask = ATA_UDMA5,
206 .port_ops = &sil_ops, 206 .port_ops = &sil_ops,
207 }, 207 },
@@ -209,24 +209,24 @@ static const struct ata_port_info sil_port_info[] = {
209 { 209 {
210 .flags = SIL_DFL_PORT_FLAGS | SIL_FLAG_MOD15WRITE | 210 .flags = SIL_DFL_PORT_FLAGS | SIL_FLAG_MOD15WRITE |
211 SIL_FLAG_NO_SATA_IRQ, 211 SIL_FLAG_NO_SATA_IRQ,
212 .pio_mask = 0x1f, /* pio0-4 */ 212 .pio_mask = ATA_PIO4,
213 .mwdma_mask = 0x07, /* mwdma0-2 */ 213 .mwdma_mask = ATA_MWDMA2,
214 .udma_mask = ATA_UDMA5, 214 .udma_mask = ATA_UDMA5,
215 .port_ops = &sil_ops, 215 .port_ops = &sil_ops,
216 }, 216 },
217 /* sil_3512 */ 217 /* sil_3512 */
218 { 218 {
219 .flags = SIL_DFL_PORT_FLAGS | SIL_FLAG_RERR_ON_DMA_ACT, 219 .flags = SIL_DFL_PORT_FLAGS | SIL_FLAG_RERR_ON_DMA_ACT,
220 .pio_mask = 0x1f, /* pio0-4 */ 220 .pio_mask = ATA_PIO4,
221 .mwdma_mask = 0x07, /* mwdma0-2 */ 221 .mwdma_mask = ATA_MWDMA2,
222 .udma_mask = ATA_UDMA5, 222 .udma_mask = ATA_UDMA5,
223 .port_ops = &sil_ops, 223 .port_ops = &sil_ops,
224 }, 224 },
225 /* sil_3114 */ 225 /* sil_3114 */
226 { 226 {
227 .flags = SIL_DFL_PORT_FLAGS | SIL_FLAG_RERR_ON_DMA_ACT, 227 .flags = SIL_DFL_PORT_FLAGS | SIL_FLAG_RERR_ON_DMA_ACT,
228 .pio_mask = 0x1f, /* pio0-4 */ 228 .pio_mask = ATA_PIO4,
229 .mwdma_mask = 0x07, /* mwdma0-2 */ 229 .mwdma_mask = ATA_MWDMA2,
230 .udma_mask = ATA_UDMA5, 230 .udma_mask = ATA_UDMA5,
231 .port_ops = &sil_ops, 231 .port_ops = &sil_ops,
232 }, 232 },
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c
index 2590c2279fa7..0d8990dcdfcd 100644
--- a/drivers/ata/sata_sil24.c
+++ b/drivers/ata/sata_sil24.c
@@ -429,25 +429,25 @@ static const struct ata_port_info sil24_port_info[] = {
429 { 429 {
430 .flags = SIL24_COMMON_FLAGS | SIL24_NPORTS2FLAG(4) | 430 .flags = SIL24_COMMON_FLAGS | SIL24_NPORTS2FLAG(4) |
431 SIL24_FLAG_PCIX_IRQ_WOC, 431 SIL24_FLAG_PCIX_IRQ_WOC,
432 .pio_mask = 0x1f, /* pio0-4 */ 432 .pio_mask = ATA_PIO4,
433 .mwdma_mask = 0x07, /* mwdma0-2 */ 433 .mwdma_mask = ATA_MWDMA2,
434 .udma_mask = ATA_UDMA5, /* udma0-5 */ 434 .udma_mask = ATA_UDMA5,
435 .port_ops = &sil24_ops, 435 .port_ops = &sil24_ops,
436 }, 436 },
437 /* sil_3132 */ 437 /* sil_3132 */
438 { 438 {
439 .flags = SIL24_COMMON_FLAGS | SIL24_NPORTS2FLAG(2), 439 .flags = SIL24_COMMON_FLAGS | SIL24_NPORTS2FLAG(2),
440 .pio_mask = 0x1f, /* pio0-4 */ 440 .pio_mask = ATA_PIO4,
441 .mwdma_mask = 0x07, /* mwdma0-2 */ 441 .mwdma_mask = ATA_MWDMA2,
442 .udma_mask = ATA_UDMA5, /* udma0-5 */ 442 .udma_mask = ATA_UDMA5,
443 .port_ops = &sil24_ops, 443 .port_ops = &sil24_ops,
444 }, 444 },
445 /* sil_3131/sil_3531 */ 445 /* sil_3131/sil_3531 */
446 { 446 {
447 .flags = SIL24_COMMON_FLAGS | SIL24_NPORTS2FLAG(1), 447 .flags = SIL24_COMMON_FLAGS | SIL24_NPORTS2FLAG(1),
448 .pio_mask = 0x1f, /* pio0-4 */ 448 .pio_mask = ATA_PIO4,
449 .mwdma_mask = 0x07, /* mwdma0-2 */ 449 .mwdma_mask = ATA_MWDMA2,
450 .udma_mask = ATA_UDMA5, /* udma0-5 */ 450 .udma_mask = ATA_UDMA5,
451 .port_ops = &sil24_ops, 451 .port_ops = &sil24_ops,
452 }, 452 },
453}; 453};
diff --git a/drivers/ata/sata_sis.c b/drivers/ata/sata_sis.c
index 9c43b4e7c4a6..8f9833228619 100644
--- a/drivers/ata/sata_sis.c
+++ b/drivers/ata/sata_sis.c
@@ -97,8 +97,8 @@ static struct ata_port_operations sis_ops = {
97 97
98static const struct ata_port_info sis_port_info = { 98static const struct ata_port_info sis_port_info = {
99 .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY, 99 .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY,
100 .pio_mask = 0x1f, 100 .pio_mask = ATA_PIO4,
101 .mwdma_mask = 0x7, 101 .mwdma_mask = ATA_MWDMA2,
102 .udma_mask = ATA_UDMA6, 102 .udma_mask = ATA_UDMA6,
103 .port_ops = &sis_ops, 103 .port_ops = &sis_ops,
104}; 104};
diff --git a/drivers/ata/sata_svw.c b/drivers/ata/sata_svw.c
index 609d147813ae..7257f2d5c52c 100644
--- a/drivers/ata/sata_svw.c
+++ b/drivers/ata/sata_svw.c
@@ -361,8 +361,8 @@ static const struct ata_port_info k2_port_info[] = {
361 { 361 {
362 .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | 362 .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
363 ATA_FLAG_MMIO | K2_FLAG_NO_ATAPI_DMA, 363 ATA_FLAG_MMIO | K2_FLAG_NO_ATAPI_DMA,
364 .pio_mask = 0x1f, 364 .pio_mask = ATA_PIO4,
365 .mwdma_mask = 0x07, 365 .mwdma_mask = ATA_MWDMA2,
366 .udma_mask = ATA_UDMA6, 366 .udma_mask = ATA_UDMA6,
367 .port_ops = &k2_sata_ops, 367 .port_ops = &k2_sata_ops,
368 }, 368 },
@@ -371,8 +371,8 @@ static const struct ata_port_info k2_port_info[] = {
371 .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | 371 .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
372 ATA_FLAG_MMIO | K2_FLAG_NO_ATAPI_DMA | 372 ATA_FLAG_MMIO | K2_FLAG_NO_ATAPI_DMA |
373 K2_FLAG_SATA_8_PORTS, 373 K2_FLAG_SATA_8_PORTS,
374 .pio_mask = 0x1f, 374 .pio_mask = ATA_PIO4,
375 .mwdma_mask = 0x07, 375 .mwdma_mask = ATA_MWDMA2,
376 .udma_mask = ATA_UDMA6, 376 .udma_mask = ATA_UDMA6,
377 .port_ops = &k2_sata_ops, 377 .port_ops = &k2_sata_ops,
378 }, 378 },
@@ -380,8 +380,8 @@ static const struct ata_port_info k2_port_info[] = {
380 { 380 {
381 .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | 381 .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
382 ATA_FLAG_MMIO | K2_FLAG_BAR_POS_3, 382 ATA_FLAG_MMIO | K2_FLAG_BAR_POS_3,
383 .pio_mask = 0x1f, 383 .pio_mask = ATA_PIO4,
384 .mwdma_mask = 0x07, 384 .mwdma_mask = ATA_MWDMA2,
385 .udma_mask = ATA_UDMA6, 385 .udma_mask = ATA_UDMA6,
386 .port_ops = &k2_sata_ops, 386 .port_ops = &k2_sata_ops,
387 }, 387 },
@@ -389,8 +389,8 @@ static const struct ata_port_info k2_port_info[] = {
389 { 389 {
390 .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | 390 .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
391 ATA_FLAG_MMIO, 391 ATA_FLAG_MMIO,
392 .pio_mask = 0x1f, 392 .pio_mask = ATA_PIO4,
393 .mwdma_mask = 0x07, 393 .mwdma_mask = ATA_MWDMA2,
394 .udma_mask = ATA_UDMA6, 394 .udma_mask = ATA_UDMA6,
395 .port_ops = &k2_sata_ops, 395 .port_ops = &k2_sata_ops,
396 }, 396 },
diff --git a/drivers/ata/sata_sx4.c b/drivers/ata/sata_sx4.c
index ec04b8d3c791..dce3dccced3f 100644
--- a/drivers/ata/sata_sx4.c
+++ b/drivers/ata/sata_sx4.c
@@ -265,8 +265,8 @@ static const struct ata_port_info pdc_port_info[] = {
265 .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | 265 .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
266 ATA_FLAG_SRST | ATA_FLAG_MMIO | 266 ATA_FLAG_SRST | ATA_FLAG_MMIO |
267 ATA_FLAG_NO_ATAPI | ATA_FLAG_PIO_POLLING, 267 ATA_FLAG_NO_ATAPI | ATA_FLAG_PIO_POLLING,
268 .pio_mask = 0x1f, /* pio0-4 */ 268 .pio_mask = ATA_PIO4,
269 .mwdma_mask = 0x07, /* mwdma0-2 */ 269 .mwdma_mask = ATA_MWDMA2,
270 .udma_mask = ATA_UDMA6, 270 .udma_mask = ATA_UDMA6,
271 .port_ops = &pdc_20621_ops, 271 .port_ops = &pdc_20621_ops,
272 }, 272 },
diff --git a/drivers/ata/sata_uli.c b/drivers/ata/sata_uli.c
index 019575bb3e08..e5bff47e8aa1 100644
--- a/drivers/ata/sata_uli.c
+++ b/drivers/ata/sata_uli.c
@@ -89,7 +89,7 @@ static struct ata_port_operations uli_ops = {
89static const struct ata_port_info uli_port_info = { 89static const struct ata_port_info uli_port_info = {
90 .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | 90 .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
91 ATA_FLAG_IGN_SIMPLEX, 91 ATA_FLAG_IGN_SIMPLEX,
92 .pio_mask = 0x1f, /* pio0-4 */ 92 .pio_mask = ATA_PIO4,
93 .udma_mask = ATA_UDMA6, 93 .udma_mask = ATA_UDMA6,
94 .port_ops = &uli_ops, 94 .port_ops = &uli_ops,
95}; 95};
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
index 5c62da9cd491..98e8c50703b3 100644
--- a/drivers/ata/sata_via.c
+++ b/drivers/ata/sata_via.c
@@ -146,24 +146,24 @@ static struct ata_port_operations vt8251_ops = {
146 146
147static const struct ata_port_info vt6420_port_info = { 147static const struct ata_port_info vt6420_port_info = {
148 .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY, 148 .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY,
149 .pio_mask = 0x1f, 149 .pio_mask = ATA_PIO4,
150 .mwdma_mask = 0x07, 150 .mwdma_mask = ATA_MWDMA2,
151 .udma_mask = ATA_UDMA6, 151 .udma_mask = ATA_UDMA6,
152 .port_ops = &vt6420_sata_ops, 152 .port_ops = &vt6420_sata_ops,
153}; 153};
154 154
155static struct ata_port_info vt6421_sport_info = { 155static struct ata_port_info vt6421_sport_info = {
156 .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY, 156 .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY,
157 .pio_mask = 0x1f, 157 .pio_mask = ATA_PIO4,
158 .mwdma_mask = 0x07, 158 .mwdma_mask = ATA_MWDMA2,
159 .udma_mask = ATA_UDMA6, 159 .udma_mask = ATA_UDMA6,
160 .port_ops = &vt6421_sata_ops, 160 .port_ops = &vt6421_sata_ops,
161}; 161};
162 162
163static struct ata_port_info vt6421_pport_info = { 163static struct ata_port_info vt6421_pport_info = {
164 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_NO_LEGACY, 164 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_NO_LEGACY,
165 .pio_mask = 0x1f, 165 .pio_mask = ATA_PIO4,
166 .mwdma_mask = 0, 166 /* No MWDMA */
167 .udma_mask = ATA_UDMA6, 167 .udma_mask = ATA_UDMA6,
168 .port_ops = &vt6421_pata_ops, 168 .port_ops = &vt6421_pata_ops,
169}; 169};
@@ -171,8 +171,8 @@ static struct ata_port_info vt6421_pport_info = {
171static struct ata_port_info vt8251_port_info = { 171static struct ata_port_info vt8251_port_info = {
172 .flags = ATA_FLAG_SATA | ATA_FLAG_SLAVE_POSS | 172 .flags = ATA_FLAG_SATA | ATA_FLAG_SLAVE_POSS |
173 ATA_FLAG_NO_LEGACY, 173 ATA_FLAG_NO_LEGACY,
174 .pio_mask = 0x1f, 174 .pio_mask = ATA_PIO4,
175 .mwdma_mask = 0x07, 175 .mwdma_mask = ATA_MWDMA2,
176 .udma_mask = ATA_UDMA6, 176 .udma_mask = ATA_UDMA6,
177 .port_ops = &vt8251_ops, 177 .port_ops = &vt8251_ops,
178}; 178};
diff --git a/drivers/ata/sata_vsc.c b/drivers/ata/sata_vsc.c
index c57cdff9e6bd..ef211f333d7b 100644
--- a/drivers/ata/sata_vsc.c
+++ b/drivers/ata/sata_vsc.c
@@ -345,8 +345,8 @@ static int __devinit vsc_sata_init_one(struct pci_dev *pdev,
345 static const struct ata_port_info pi = { 345 static const struct ata_port_info pi = {
346 .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | 346 .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
347 ATA_FLAG_MMIO, 347 ATA_FLAG_MMIO,
348 .pio_mask = 0x1f, 348 .pio_mask = ATA_PIO4,
349 .mwdma_mask = 0x07, 349 .mwdma_mask = ATA_MWDMA2,
350 .udma_mask = ATA_UDMA6, 350 .udma_mask = ATA_UDMA6,
351 .port_ops = &vsc_sata_ops, 351 .port_ops = &vsc_sata_ops,
352 }; 352 };