aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2008-03-24 23:22:49 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-04-17 15:44:17 -0400
commit1bd5b715a305f6f13455e89becbd839010dd14b5 (patch)
tree22e74b38495c51cda92145b7ae31f504f80d9fd3 /drivers/ata
parent029cfd6b74fc5c517865fad78cf4a3ea8d9b664a (diff)
libata: make ata_pci_init_one() not use ops->irq_handler and pi->sht
ata_pci_init_one() is the only function which uses ops->irq_handler and pi->sht. Other initialization functions take the same information as arguments. This causes confusion and duplicate unused entries in structures. Make ata_pci_init_one() take sht as an argument and use ata_interrupt implicitly. All current users use ata_interrupt and if different irq handler is necessary open coding ata_pci_init_one() using ata_prepare_sff_host() and ata_activate_sff_host can be done under ten lines including error handling and driver which requires custom interrupt handler is likely to require custom initialization anyway. As ata_pci_init_one() was the last user of ops->irq_handler, this patch also kills the field. Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/ata_generic.c3
-rw-r--r--drivers/ata/libata-core.c1
-rw-r--r--drivers/ata/libata-sff.c7
-rw-r--r--drivers/ata/pata_acpi.c3
-rw-r--r--drivers/ata/pata_ali.c9
-rw-r--r--drivers/ata/pata_amd.c12
-rw-r--r--drivers/ata/pata_artop.c6
-rw-r--r--drivers/ata/pata_atiixp.c3
-rw-r--r--drivers/ata/pata_cmd640.c3
-rw-r--r--drivers/ata/pata_cmd64x.c8
-rw-r--r--drivers/ata/pata_cs5530.c4
-rw-r--r--drivers/ata/pata_cs5535.c3
-rw-r--r--drivers/ata/pata_cs5536.c3
-rw-r--r--drivers/ata/pata_cypress.c3
-rw-r--r--drivers/ata/pata_efar.c3
-rw-r--r--drivers/ata/pata_hpt366.c3
-rw-r--r--drivers/ata/pata_hpt37x.c8
-rw-r--r--drivers/ata/pata_hpt3x2n.c3
-rw-r--r--drivers/ata/pata_it8213.c3
-rw-r--r--drivers/ata/pata_it821x.c4
-rw-r--r--drivers/ata/pata_jmicron.c3
-rw-r--r--drivers/ata/pata_marvell.c4
-rw-r--r--drivers/ata/pata_netcell.c3
-rw-r--r--drivers/ata/pata_ns87410.c3
-rw-r--r--drivers/ata/pata_ns87415.c4
-rw-r--r--drivers/ata/pata_oldpiix.c3
-rw-r--r--drivers/ata/pata_opti.c3
-rw-r--r--drivers/ata/pata_optidma.c4
-rw-r--r--drivers/ata/pata_pdc202xx_old.c5
-rw-r--r--drivers/ata/pata_radisys.c3
-rw-r--r--drivers/ata/pata_rz1000.c3
-rw-r--r--drivers/ata/pata_sc1200.c3
-rw-r--r--drivers/ata/pata_serverworks.c6
-rw-r--r--drivers/ata/pata_sil680.c4
-rw-r--r--drivers/ata/pata_sis.c10
-rw-r--r--drivers/ata/pata_sl82c105.c4
-rw-r--r--drivers/ata/pata_triflex.c3
-rw-r--r--drivers/ata/pata_via.c8
38 files changed, 40 insertions, 128 deletions
diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c
index 0b5b515ae159..a912ee01a47c 100644
--- a/drivers/ata/ata_generic.c
+++ b/drivers/ata/ata_generic.c
@@ -120,7 +120,6 @@ static int ata_generic_init_one(struct pci_dev *dev, const struct pci_device_id
120{ 120{
121 u16 command; 121 u16 command;
122 static const struct ata_port_info info = { 122 static const struct ata_port_info info = {
123 .sht = &generic_sht,
124 .flags = ATA_FLAG_SLAVE_POSS, 123 .flags = ATA_FLAG_SLAVE_POSS,
125 .pio_mask = 0x1f, 124 .pio_mask = 0x1f,
126 .mwdma_mask = 0x07, 125 .mwdma_mask = 0x07,
@@ -153,7 +152,7 @@ static int ata_generic_init_one(struct pci_dev *dev, const struct pci_device_id
153 if (dev->vendor == PCI_VENDOR_ID_AL) 152 if (dev->vendor == PCI_VENDOR_ID_AL)
154 ata_pci_clear_simplex(dev); 153 ata_pci_clear_simplex(dev);
155 154
156 return ata_pci_init_one(dev, ppi); 155 return ata_pci_init_one(dev, ppi, &generic_sht);
157} 156}
158 157
159static struct pci_device_id ata_generic[] = { 158static struct pci_device_id ata_generic[] = {
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 32fa9ee397b6..abbe3229480c 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -109,7 +109,6 @@ const struct ata_port_operations ata_sff_port_ops = {
109 .irq_on = ata_irq_on, 109 .irq_on = ata_irq_on,
110 110
111 .port_start = ata_sff_port_start, 111 .port_start = ata_sff_port_start,
112 .irq_handler = ata_interrupt,
113}; 112};
114 113
115const struct ata_port_operations ata_bmdma_port_ops = { 114const struct ata_port_operations ata_bmdma_port_ops = {
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 1cf03d41aa33..a9d5898cbbc4 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -826,6 +826,7 @@ int ata_pci_activate_sff_host(struct ata_host *host,
826 * ata_pci_init_one - Initialize/register PCI IDE host controller 826 * ata_pci_init_one - Initialize/register PCI IDE host controller
827 * @pdev: Controller to be initialized 827 * @pdev: Controller to be initialized
828 * @ppi: array of port_info, must be enough for two ports 828 * @ppi: array of port_info, must be enough for two ports
829 * @sht: scsi_host_template to use when registering the host
829 * 830 *
830 * This is a helper function which can be called from a driver's 831 * This is a helper function which can be called from a driver's
831 * xxx_init_one() probe function if the hardware uses traditional 832 * xxx_init_one() probe function if the hardware uses traditional
@@ -846,7 +847,8 @@ int ata_pci_activate_sff_host(struct ata_host *host,
846 * Zero on success, negative on errno-based value on error. 847 * Zero on success, negative on errno-based value on error.
847 */ 848 */
848int ata_pci_init_one(struct pci_dev *pdev, 849int ata_pci_init_one(struct pci_dev *pdev,
849 const struct ata_port_info * const * ppi) 850 const struct ata_port_info * const * ppi,
851 struct scsi_host_template *sht)
850{ 852{
851 struct device *dev = &pdev->dev; 853 struct device *dev = &pdev->dev;
852 const struct ata_port_info *pi = NULL; 854 const struct ata_port_info *pi = NULL;
@@ -882,8 +884,7 @@ int ata_pci_init_one(struct pci_dev *pdev,
882 goto out; 884 goto out;
883 885
884 pci_set_master(pdev); 886 pci_set_master(pdev);
885 rc = ata_pci_activate_sff_host(host, pi->port_ops->irq_handler, 887 rc = ata_pci_activate_sff_host(host, ata_interrupt, sht);
886 pi->sht);
887 out: 888 out:
888 if (rc == 0) 889 if (rc == 0)
889 devres_remove_group(&pdev->dev, NULL); 890 devres_remove_group(&pdev->dev, NULL);
diff --git a/drivers/ata/pata_acpi.c b/drivers/ata/pata_acpi.c
index 35ad488db6ed..3edde51750da 100644
--- a/drivers/ata/pata_acpi.c
+++ b/drivers/ata/pata_acpi.c
@@ -264,7 +264,6 @@ static struct ata_port_operations pacpi_ops = {
264static int pacpi_init_one (struct pci_dev *pdev, const struct pci_device_id *id) 264static int pacpi_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
265{ 265{
266 static const struct ata_port_info info = { 266 static const struct ata_port_info info = {
267 .sht = &pacpi_sht,
268 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, 267 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
269 268
270 .pio_mask = 0x1f, 269 .pio_mask = 0x1f,
@@ -274,7 +273,7 @@ static int pacpi_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
274 .port_ops = &pacpi_ops, 273 .port_ops = &pacpi_ops,
275 }; 274 };
276 const struct ata_port_info *ppi[] = { &info, NULL }; 275 const struct ata_port_info *ppi[] = { &info, NULL };
277 return ata_pci_init_one(pdev, ppi); 276 return ata_pci_init_one(pdev, ppi, &pacpi_sht);
278} 277}
279 278
280static const struct pci_device_id pacpi_pci_tbl[] = { 279static const struct pci_device_id pacpi_pci_tbl[] = {
diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c
index b00a9cf72c31..f2924996f6e3 100644
--- a/drivers/ata/pata_ali.c
+++ b/drivers/ata/pata_ali.c
@@ -463,14 +463,12 @@ static void ali_init_chipset(struct pci_dev *pdev)
463static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id) 463static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
464{ 464{
465 static const struct ata_port_info info_early = { 465 static const struct ata_port_info info_early = {
466 .sht = &ali_sht,
467 .flags = ATA_FLAG_SLAVE_POSS, 466 .flags = ATA_FLAG_SLAVE_POSS,
468 .pio_mask = 0x1f, 467 .pio_mask = 0x1f,
469 .port_ops = &ali_early_port_ops 468 .port_ops = &ali_early_port_ops
470 }; 469 };
471 /* Revision 0x20 added DMA */ 470 /* Revision 0x20 added DMA */
472 static const struct ata_port_info info_20 = { 471 static const struct ata_port_info info_20 = {
473 .sht = &ali_sht,
474 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48, 472 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48,
475 .pio_mask = 0x1f, 473 .pio_mask = 0x1f,
476 .mwdma_mask = 0x07, 474 .mwdma_mask = 0x07,
@@ -478,7 +476,6 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
478 }; 476 };
479 /* Revision 0x20 with support logic added UDMA */ 477 /* Revision 0x20 with support logic added UDMA */
480 static const struct ata_port_info info_20_udma = { 478 static const struct ata_port_info info_20_udma = {
481 .sht = &ali_sht,
482 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48, 479 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48,
483 .pio_mask = 0x1f, 480 .pio_mask = 0x1f,
484 .mwdma_mask = 0x07, 481 .mwdma_mask = 0x07,
@@ -487,7 +484,6 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
487 }; 484 };
488 /* Revision 0xC2 adds UDMA66 */ 485 /* Revision 0xC2 adds UDMA66 */
489 static const struct ata_port_info info_c2 = { 486 static const struct ata_port_info info_c2 = {
490 .sht = &ali_sht,
491 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48, 487 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48,
492 .pio_mask = 0x1f, 488 .pio_mask = 0x1f,
493 .mwdma_mask = 0x07, 489 .mwdma_mask = 0x07,
@@ -496,7 +492,6 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
496 }; 492 };
497 /* Revision 0xC3 is UDMA66 for now */ 493 /* Revision 0xC3 is UDMA66 for now */
498 static const struct ata_port_info info_c3 = { 494 static const struct ata_port_info info_c3 = {
499 .sht = &ali_sht,
500 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48, 495 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48,
501 .pio_mask = 0x1f, 496 .pio_mask = 0x1f,
502 .mwdma_mask = 0x07, 497 .mwdma_mask = 0x07,
@@ -505,7 +500,6 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
505 }; 500 };
506 /* Revision 0xC4 is UDMA100 */ 501 /* Revision 0xC4 is UDMA100 */
507 static const struct ata_port_info info_c4 = { 502 static const struct ata_port_info info_c4 = {
508 .sht = &ali_sht,
509 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48, 503 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48,
510 .pio_mask = 0x1f, 504 .pio_mask = 0x1f,
511 .mwdma_mask = 0x07, 505 .mwdma_mask = 0x07,
@@ -514,7 +508,6 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
514 }; 508 };
515 /* Revision 0xC5 is UDMA133 with LBA48 DMA */ 509 /* Revision 0xC5 is UDMA133 with LBA48 DMA */
516 static const struct ata_port_info info_c5 = { 510 static const struct ata_port_info info_c5 = {
517 .sht = &ali_sht,
518 .flags = ATA_FLAG_SLAVE_POSS, 511 .flags = ATA_FLAG_SLAVE_POSS,
519 .pio_mask = 0x1f, 512 .pio_mask = 0x1f,
520 .mwdma_mask = 0x07, 513 .mwdma_mask = 0x07,
@@ -559,7 +552,7 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
559 ppi[0] = &info_20_udma; 552 ppi[0] = &info_20_udma;
560 pci_dev_put(isa_bridge); 553 pci_dev_put(isa_bridge);
561 } 554 }
562 return ata_pci_init_one(pdev, ppi); 555 return ata_pci_init_one(pdev, ppi, &ali_sht);
563} 556}
564 557
565#ifdef CONFIG_PM 558#ifdef CONFIG_PM
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c
index b0cb4eaf273c..644702cac6ee 100644
--- a/drivers/ata/pata_amd.c
+++ b/drivers/ata/pata_amd.c
@@ -413,7 +413,6 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
413{ 413{
414 static const struct ata_port_info info[10] = { 414 static const struct ata_port_info info[10] = {
415 { /* 0: AMD 7401 */ 415 { /* 0: AMD 7401 */
416 .sht = &amd_sht,
417 .flags = ATA_FLAG_SLAVE_POSS, 416 .flags = ATA_FLAG_SLAVE_POSS,
418 .pio_mask = 0x1f, 417 .pio_mask = 0x1f,
419 .mwdma_mask = 0x07, /* No SWDMA */ 418 .mwdma_mask = 0x07, /* No SWDMA */
@@ -421,7 +420,6 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
421 .port_ops = &amd33_port_ops 420 .port_ops = &amd33_port_ops
422 }, 421 },
423 { /* 1: Early AMD7409 - no swdma */ 422 { /* 1: Early AMD7409 - no swdma */
424 .sht = &amd_sht,
425 .flags = ATA_FLAG_SLAVE_POSS, 423 .flags = ATA_FLAG_SLAVE_POSS,
426 .pio_mask = 0x1f, 424 .pio_mask = 0x1f,
427 .mwdma_mask = 0x07, 425 .mwdma_mask = 0x07,
@@ -429,7 +427,6 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
429 .port_ops = &amd66_port_ops 427 .port_ops = &amd66_port_ops
430 }, 428 },
431 { /* 2: AMD 7409, no swdma errata */ 429 { /* 2: AMD 7409, no swdma errata */
432 .sht = &amd_sht,
433 .flags = ATA_FLAG_SLAVE_POSS, 430 .flags = ATA_FLAG_SLAVE_POSS,
434 .pio_mask = 0x1f, 431 .pio_mask = 0x1f,
435 .mwdma_mask = 0x07, 432 .mwdma_mask = 0x07,
@@ -437,7 +434,6 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
437 .port_ops = &amd66_port_ops 434 .port_ops = &amd66_port_ops
438 }, 435 },
439 { /* 3: AMD 7411 */ 436 { /* 3: AMD 7411 */
440 .sht = &amd_sht,
441 .flags = ATA_FLAG_SLAVE_POSS, 437 .flags = ATA_FLAG_SLAVE_POSS,
442 .pio_mask = 0x1f, 438 .pio_mask = 0x1f,
443 .mwdma_mask = 0x07, 439 .mwdma_mask = 0x07,
@@ -445,7 +441,6 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
445 .port_ops = &amd100_port_ops 441 .port_ops = &amd100_port_ops
446 }, 442 },
447 { /* 4: AMD 7441 */ 443 { /* 4: AMD 7441 */
448 .sht = &amd_sht,
449 .flags = ATA_FLAG_SLAVE_POSS, 444 .flags = ATA_FLAG_SLAVE_POSS,
450 .pio_mask = 0x1f, 445 .pio_mask = 0x1f,
451 .mwdma_mask = 0x07, 446 .mwdma_mask = 0x07,
@@ -453,7 +448,6 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
453 .port_ops = &amd100_port_ops 448 .port_ops = &amd100_port_ops
454 }, 449 },
455 { /* 5: AMD 8111*/ 450 { /* 5: AMD 8111*/
456 .sht = &amd_sht,
457 .flags = ATA_FLAG_SLAVE_POSS, 451 .flags = ATA_FLAG_SLAVE_POSS,
458 .pio_mask = 0x1f, 452 .pio_mask = 0x1f,
459 .mwdma_mask = 0x07, 453 .mwdma_mask = 0x07,
@@ -461,7 +455,6 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
461 .port_ops = &amd133_port_ops 455 .port_ops = &amd133_port_ops
462 }, 456 },
463 { /* 6: AMD 8111 UDMA 100 (Serenade) */ 457 { /* 6: AMD 8111 UDMA 100 (Serenade) */
464 .sht = &amd_sht,
465 .flags = ATA_FLAG_SLAVE_POSS, 458 .flags = ATA_FLAG_SLAVE_POSS,
466 .pio_mask = 0x1f, 459 .pio_mask = 0x1f,
467 .mwdma_mask = 0x07, 460 .mwdma_mask = 0x07,
@@ -469,7 +462,6 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
469 .port_ops = &amd133_port_ops 462 .port_ops = &amd133_port_ops
470 }, 463 },
471 { /* 7: Nvidia Nforce */ 464 { /* 7: Nvidia Nforce */
472 .sht = &amd_sht,
473 .flags = ATA_FLAG_SLAVE_POSS, 465 .flags = ATA_FLAG_SLAVE_POSS,
474 .pio_mask = 0x1f, 466 .pio_mask = 0x1f,
475 .mwdma_mask = 0x07, 467 .mwdma_mask = 0x07,
@@ -477,7 +469,6 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
477 .port_ops = &nv100_port_ops 469 .port_ops = &nv100_port_ops
478 }, 470 },
479 { /* 8: Nvidia Nforce2 and later */ 471 { /* 8: Nvidia Nforce2 and later */
480 .sht = &amd_sht,
481 .flags = ATA_FLAG_SLAVE_POSS, 472 .flags = ATA_FLAG_SLAVE_POSS,
482 .pio_mask = 0x1f, 473 .pio_mask = 0x1f,
483 .mwdma_mask = 0x07, 474 .mwdma_mask = 0x07,
@@ -485,7 +476,6 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
485 .port_ops = &nv133_port_ops 476 .port_ops = &nv133_port_ops
486 }, 477 },
487 { /* 9: AMD CS5536 (Geode companion) */ 478 { /* 9: AMD CS5536 (Geode companion) */
488 .sht = &amd_sht,
489 .flags = ATA_FLAG_SLAVE_POSS, 479 .flags = ATA_FLAG_SLAVE_POSS,
490 .pio_mask = 0x1f, 480 .pio_mask = 0x1f,
491 .mwdma_mask = 0x07, 481 .mwdma_mask = 0x07,
@@ -544,7 +534,7 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
544 } 534 }
545 535
546 /* And fire it up */ 536 /* And fire it up */
547 return ata_pci_init_one(pdev, ppi); 537 return ata_pci_init_one(pdev, ppi, &amd_sht);
548} 538}
549 539
550#ifdef CONFIG_PM 540#ifdef CONFIG_PM
diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c
index 0101e5aef3e0..698a53c96111 100644
--- a/drivers/ata/pata_artop.c
+++ b/drivers/ata/pata_artop.c
@@ -352,7 +352,6 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
352{ 352{
353 static int printed_version; 353 static int printed_version;
354 static const struct ata_port_info info_6210 = { 354 static const struct ata_port_info info_6210 = {
355 .sht = &artop_sht,
356 .flags = ATA_FLAG_SLAVE_POSS, 355 .flags = ATA_FLAG_SLAVE_POSS,
357 .pio_mask = 0x1f, /* pio0-4 */ 356 .pio_mask = 0x1f, /* pio0-4 */
358 .mwdma_mask = 0x07, /* mwdma0-2 */ 357 .mwdma_mask = 0x07, /* mwdma0-2 */
@@ -360,7 +359,6 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
360 .port_ops = &artop6210_ops, 359 .port_ops = &artop6210_ops,
361 }; 360 };
362 static const struct ata_port_info info_626x = { 361 static const struct ata_port_info info_626x = {
363 .sht = &artop_sht,
364 .flags = ATA_FLAG_SLAVE_POSS, 362 .flags = ATA_FLAG_SLAVE_POSS,
365 .pio_mask = 0x1f, /* pio0-4 */ 363 .pio_mask = 0x1f, /* pio0-4 */
366 .mwdma_mask = 0x07, /* mwdma0-2 */ 364 .mwdma_mask = 0x07, /* mwdma0-2 */
@@ -368,7 +366,6 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
368 .port_ops = &artop6260_ops, 366 .port_ops = &artop6260_ops,
369 }; 367 };
370 static const struct ata_port_info info_628x = { 368 static const struct ata_port_info info_628x = {
371 .sht = &artop_sht,
372 .flags = ATA_FLAG_SLAVE_POSS, 369 .flags = ATA_FLAG_SLAVE_POSS,
373 .pio_mask = 0x1f, /* pio0-4 */ 370 .pio_mask = 0x1f, /* pio0-4 */
374 .mwdma_mask = 0x07, /* mwdma0-2 */ 371 .mwdma_mask = 0x07, /* mwdma0-2 */
@@ -376,7 +373,6 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
376 .port_ops = &artop6260_ops, 373 .port_ops = &artop6260_ops,
377 }; 374 };
378 static const struct ata_port_info info_628x_fast = { 375 static const struct ata_port_info info_628x_fast = {
379 .sht = &artop_sht,
380 .flags = ATA_FLAG_SLAVE_POSS, 376 .flags = ATA_FLAG_SLAVE_POSS,
381 .pio_mask = 0x1f, /* pio0-4 */ 377 .pio_mask = 0x1f, /* pio0-4 */
382 .mwdma_mask = 0x07, /* mwdma0-2 */ 378 .mwdma_mask = 0x07, /* mwdma0-2 */
@@ -434,7 +430,7 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
434 430
435 BUG_ON(ppi[0] == NULL); 431 BUG_ON(ppi[0] == NULL);
436 432
437 return ata_pci_init_one(pdev, ppi); 433 return ata_pci_init_one(pdev, ppi, &artop_sht);
438} 434}
439 435
440static const struct pci_device_id artop_pci_tbl[] = { 436static const struct pci_device_id artop_pci_tbl[] = {
diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c
index 2655f6a17ad3..6fe433ba62bd 100644
--- a/drivers/ata/pata_atiixp.c
+++ b/drivers/ata/pata_atiixp.c
@@ -241,7 +241,6 @@ static struct ata_port_operations atiixp_port_ops = {
241static int atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id) 241static int atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id)
242{ 242{
243 static const struct ata_port_info info = { 243 static const struct ata_port_info info = {
244 .sht = &atiixp_sht,
245 .flags = ATA_FLAG_SLAVE_POSS, 244 .flags = ATA_FLAG_SLAVE_POSS,
246 .pio_mask = 0x1f, 245 .pio_mask = 0x1f,
247 .mwdma_mask = 0x06, /* No MWDMA0 support */ 246 .mwdma_mask = 0x06, /* No MWDMA0 support */
@@ -249,7 +248,7 @@ static int atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id)
249 .port_ops = &atiixp_port_ops 248 .port_ops = &atiixp_port_ops
250 }; 249 };
251 const struct ata_port_info *ppi[] = { &info, NULL }; 250 const struct ata_port_info *ppi[] = { &info, NULL };
252 return ata_pci_init_one(dev, ppi); 251 return ata_pci_init_one(dev, ppi, &atiixp_sht);
253} 252}
254 253
255static const struct pci_device_id atiixp[] = { 254static const struct pci_device_id atiixp[] = {
diff --git a/drivers/ata/pata_cmd640.c b/drivers/ata/pata_cmd640.c
index 061c891c8a66..efd2bb5747b4 100644
--- a/drivers/ata/pata_cmd640.c
+++ b/drivers/ata/pata_cmd640.c
@@ -211,7 +211,6 @@ static void cmd640_hardware_init(struct pci_dev *pdev)
211static int cmd640_init_one(struct pci_dev *pdev, const struct pci_device_id *id) 211static int cmd640_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
212{ 212{
213 static const struct ata_port_info info = { 213 static const struct ata_port_info info = {
214 .sht = &cmd640_sht,
215 .flags = ATA_FLAG_SLAVE_POSS, 214 .flags = ATA_FLAG_SLAVE_POSS,
216 .pio_mask = 0x1f, 215 .pio_mask = 0x1f,
217 .port_ops = &cmd640_port_ops 216 .port_ops = &cmd640_port_ops
@@ -225,7 +224,7 @@ static int cmd640_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
225 224
226 cmd640_hardware_init(pdev); 225 cmd640_hardware_init(pdev);
227 226
228 return ata_pci_init_one(pdev, ppi); 227 return ata_pci_init_one(pdev, ppi, &cmd640_sht);
229} 228}
230 229
231#ifdef CONFIG_PM 230#ifdef CONFIG_PM
diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c
index 1ac8ecfb97e2..bfd72ef9cd31 100644
--- a/drivers/ata/pata_cmd64x.c
+++ b/drivers/ata/pata_cmd64x.c
@@ -298,21 +298,18 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
298 298
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 .sht = &cmd64x_sht,
302 .flags = ATA_FLAG_SLAVE_POSS, 301 .flags = ATA_FLAG_SLAVE_POSS,
303 .pio_mask = 0x1f, 302 .pio_mask = 0x1f,
304 .mwdma_mask = 0x07, 303 .mwdma_mask = 0x07,
305 .port_ops = &cmd64x_port_ops 304 .port_ops = &cmd64x_port_ops
306 }, 305 },
307 { /* CMD 646 with broken UDMA */ 306 { /* CMD 646 with broken UDMA */
308 .sht = &cmd64x_sht,
309 .flags = ATA_FLAG_SLAVE_POSS, 307 .flags = ATA_FLAG_SLAVE_POSS,
310 .pio_mask = 0x1f, 308 .pio_mask = 0x1f,
311 .mwdma_mask = 0x07, 309 .mwdma_mask = 0x07,
312 .port_ops = &cmd64x_port_ops 310 .port_ops = &cmd64x_port_ops
313 }, 311 },
314 { /* CMD 646 with working UDMA */ 312 { /* CMD 646 with working UDMA */
315 .sht = &cmd64x_sht,
316 .flags = ATA_FLAG_SLAVE_POSS, 313 .flags = ATA_FLAG_SLAVE_POSS,
317 .pio_mask = 0x1f, 314 .pio_mask = 0x1f,
318 .mwdma_mask = 0x07, 315 .mwdma_mask = 0x07,
@@ -320,14 +317,12 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
320 .port_ops = &cmd64x_port_ops 317 .port_ops = &cmd64x_port_ops
321 }, 318 },
322 { /* CMD 646 rev 1 */ 319 { /* CMD 646 rev 1 */
323 .sht = &cmd64x_sht,
324 .flags = ATA_FLAG_SLAVE_POSS, 320 .flags = ATA_FLAG_SLAVE_POSS,
325 .pio_mask = 0x1f, 321 .pio_mask = 0x1f,
326 .mwdma_mask = 0x07, 322 .mwdma_mask = 0x07,
327 .port_ops = &cmd646r1_port_ops 323 .port_ops = &cmd646r1_port_ops
328 }, 324 },
329 { /* CMD 648 */ 325 { /* CMD 648 */
330 .sht = &cmd64x_sht,
331 .flags = ATA_FLAG_SLAVE_POSS, 326 .flags = ATA_FLAG_SLAVE_POSS,
332 .pio_mask = 0x1f, 327 .pio_mask = 0x1f,
333 .mwdma_mask = 0x07, 328 .mwdma_mask = 0x07,
@@ -335,7 +330,6 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
335 .port_ops = &cmd648_port_ops 330 .port_ops = &cmd648_port_ops
336 }, 331 },
337 { /* CMD 649 */ 332 { /* CMD 649 */
338 .sht = &cmd64x_sht,
339 .flags = ATA_FLAG_SLAVE_POSS, 333 .flags = ATA_FLAG_SLAVE_POSS,
340 .pio_mask = 0x1f, 334 .pio_mask = 0x1f,
341 .mwdma_mask = 0x07, 335 .mwdma_mask = 0x07,
@@ -379,7 +373,7 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
379 pci_write_config_byte(pdev, UDIDETCR0, 0xF0); 373 pci_write_config_byte(pdev, UDIDETCR0, 0xF0);
380#endif 374#endif
381 375
382 return ata_pci_init_one(pdev, ppi); 376 return ata_pci_init_one(pdev, ppi, &cmd64x_sht);
383} 377}
384 378
385#ifdef CONFIG_PM 379#ifdef CONFIG_PM
diff --git a/drivers/ata/pata_cs5530.c b/drivers/ata/pata_cs5530.c
index e4a16a578cac..c632ce499d33 100644
--- a/drivers/ata/pata_cs5530.c
+++ b/drivers/ata/pata_cs5530.c
@@ -298,7 +298,6 @@ fail_put:
298static int cs5530_init_one(struct pci_dev *pdev, const struct pci_device_id *id) 298static int cs5530_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
299{ 299{
300 static const struct ata_port_info info = { 300 static const struct ata_port_info info = {
301 .sht = &cs5530_sht,
302 .flags = ATA_FLAG_SLAVE_POSS, 301 .flags = ATA_FLAG_SLAVE_POSS,
303 .pio_mask = 0x1f, 302 .pio_mask = 0x1f,
304 .mwdma_mask = 0x07, 303 .mwdma_mask = 0x07,
@@ -307,7 +306,6 @@ static int cs5530_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
307 }; 306 };
308 /* The docking connector doesn't do UDMA, and it seems not MWDMA */ 307 /* The docking connector doesn't do UDMA, and it seems not MWDMA */
309 static const struct ata_port_info info_palmax_secondary = { 308 static const struct ata_port_info info_palmax_secondary = {
310 .sht = &cs5530_sht,
311 .flags = ATA_FLAG_SLAVE_POSS, 309 .flags = ATA_FLAG_SLAVE_POSS,
312 .pio_mask = 0x1f, 310 .pio_mask = 0x1f,
313 .port_ops = &cs5530_port_ops 311 .port_ops = &cs5530_port_ops
@@ -327,7 +325,7 @@ static int cs5530_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
327 ppi[1] = &info_palmax_secondary; 325 ppi[1] = &info_palmax_secondary;
328 326
329 /* Now kick off ATA set up */ 327 /* Now kick off ATA set up */
330 return ata_pci_init_one(pdev, ppi); 328 return ata_pci_init_one(pdev, ppi, &cs5530_sht);
331} 329}
332 330
333#ifdef CONFIG_PM 331#ifdef CONFIG_PM
diff --git a/drivers/ata/pata_cs5535.c b/drivers/ata/pata_cs5535.c
index f910a8aa7437..d78cf95cbe45 100644
--- a/drivers/ata/pata_cs5535.c
+++ b/drivers/ata/pata_cs5535.c
@@ -181,7 +181,6 @@ static struct ata_port_operations cs5535_port_ops = {
181static int cs5535_init_one(struct pci_dev *dev, const struct pci_device_id *id) 181static int cs5535_init_one(struct pci_dev *dev, const struct pci_device_id *id)
182{ 182{
183 static const struct ata_port_info info = { 183 static const struct ata_port_info info = {
184 .sht = &cs5535_sht,
185 .flags = ATA_FLAG_SLAVE_POSS, 184 .flags = ATA_FLAG_SLAVE_POSS,
186 .pio_mask = 0x1f, 185 .pio_mask = 0x1f,
187 .mwdma_mask = 0x07, 186 .mwdma_mask = 0x07,
@@ -200,7 +199,7 @@ static int cs5535_init_one(struct pci_dev *dev, const struct pci_device_id *id)
200 rdmsr(ATAC_CH0D1_PIO, timings, dummy); 199 rdmsr(ATAC_CH0D1_PIO, timings, dummy);
201 if (CS5535_BAD_PIO(timings)) 200 if (CS5535_BAD_PIO(timings))
202 wrmsr(ATAC_CH0D1_PIO, 0xF7F4F7F4UL, 0); 201 wrmsr(ATAC_CH0D1_PIO, 0xF7F4F7F4UL, 0);
203 return ata_pci_init_one(dev, ppi); 202 return ata_pci_init_one(dev, ppi, &cs5535_sht);
204} 203}
205 204
206static const struct pci_device_id cs5535[] = { 205static const struct pci_device_id cs5535[] = {
diff --git a/drivers/ata/pata_cs5536.c b/drivers/ata/pata_cs5536.c
index 075ee6a7be39..f7c0e4e319ed 100644
--- a/drivers/ata/pata_cs5536.c
+++ b/drivers/ata/pata_cs5536.c
@@ -241,7 +241,6 @@ static struct ata_port_operations cs5536_port_ops = {
241static int cs5536_init_one(struct pci_dev *dev, const struct pci_device_id *id) 241static int cs5536_init_one(struct pci_dev *dev, const struct pci_device_id *id)
242{ 242{
243 static const struct ata_port_info info = { 243 static const struct ata_port_info info = {
244 .sht = &cs5536_sht,
245 .flags = ATA_FLAG_SLAVE_POSS, 244 .flags = ATA_FLAG_SLAVE_POSS,
246 .pio_mask = 0x1f, 245 .pio_mask = 0x1f,
247 .mwdma_mask = 0x07, 246 .mwdma_mask = 0x07,
@@ -262,7 +261,7 @@ static int cs5536_init_one(struct pci_dev *dev, const struct pci_device_id *id)
262 return -ENODEV; 261 return -ENODEV;
263 } 262 }
264 263
265 return ata_pci_init_one(dev, ppi); 264 return ata_pci_init_one(dev, ppi, &cs5536_sht);
266} 265}
267 266
268static const struct pci_device_id cs5536[] = { 267static const struct pci_device_id cs5536[] = {
diff --git a/drivers/ata/pata_cypress.c b/drivers/ata/pata_cypress.c
index c459553e7d1e..cbd6670ea0de 100644
--- a/drivers/ata/pata_cypress.c
+++ b/drivers/ata/pata_cypress.c
@@ -123,7 +123,6 @@ static struct ata_port_operations cy82c693_port_ops = {
123static int cy82c693_init_one(struct pci_dev *pdev, const struct pci_device_id *id) 123static int cy82c693_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
124{ 124{
125 static const struct ata_port_info info = { 125 static const struct ata_port_info info = {
126 .sht = &cy82c693_sht,
127 .flags = ATA_FLAG_SLAVE_POSS, 126 .flags = ATA_FLAG_SLAVE_POSS,
128 .pio_mask = 0x1f, 127 .pio_mask = 0x1f,
129 .mwdma_mask = 0x07, 128 .mwdma_mask = 0x07,
@@ -137,7 +136,7 @@ static int cy82c693_init_one(struct pci_dev *pdev, const struct pci_device_id *i
137 if (PCI_FUNC(pdev->devfn) != 1) 136 if (PCI_FUNC(pdev->devfn) != 1)
138 return -ENODEV; 137 return -ENODEV;
139 138
140 return ata_pci_init_one(pdev, ppi); 139 return ata_pci_init_one(pdev, ppi, &cy82c693_sht);
141} 140}
142 141
143static const struct pci_device_id cy82c693[] = { 142static const struct pci_device_id cy82c693[] = {
diff --git a/drivers/ata/pata_efar.c b/drivers/ata/pata_efar.c
index ef62fc642c17..0260edac2370 100644
--- a/drivers/ata/pata_efar.c
+++ b/drivers/ata/pata_efar.c
@@ -263,7 +263,6 @@ static int efar_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
263{ 263{
264 static int printed_version; 264 static int printed_version;
265 static const struct ata_port_info info = { 265 static const struct ata_port_info info = {
266 .sht = &efar_sht,
267 .flags = ATA_FLAG_SLAVE_POSS, 266 .flags = ATA_FLAG_SLAVE_POSS,
268 .pio_mask = 0x1f, /* pio0-4 */ 267 .pio_mask = 0x1f, /* pio0-4 */
269 .mwdma_mask = 0x07, /* mwdma1-2 */ 268 .mwdma_mask = 0x07, /* mwdma1-2 */
@@ -276,7 +275,7 @@ static int efar_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
276 dev_printk(KERN_DEBUG, &pdev->dev, 275 dev_printk(KERN_DEBUG, &pdev->dev,
277 "version " DRV_VERSION "\n"); 276 "version " DRV_VERSION "\n");
278 277
279 return ata_pci_init_one(pdev, ppi); 278 return ata_pci_init_one(pdev, ppi, &efar_sht);
280} 279}
281 280
282static const struct pci_device_id efar_pci_tbl[] = { 281static const struct pci_device_id efar_pci_tbl[] = {
diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c
index 788955f57ff8..b62d398ed84b 100644
--- a/drivers/ata/pata_hpt366.c
+++ b/drivers/ata/pata_hpt366.c
@@ -350,7 +350,6 @@ static void hpt36x_init_chipset(struct pci_dev *dev)
350static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id) 350static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
351{ 351{
352 static const struct ata_port_info info_hpt366 = { 352 static const struct ata_port_info info_hpt366 = {
353 .sht = &hpt36x_sht,
354 .flags = ATA_FLAG_SLAVE_POSS, 353 .flags = ATA_FLAG_SLAVE_POSS,
355 .pio_mask = 0x1f, 354 .pio_mask = 0x1f,
356 .mwdma_mask = 0x07, 355 .mwdma_mask = 0x07,
@@ -394,7 +393,7 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
394 break; 393 break;
395 } 394 }
396 /* Now kick off ATA set up */ 395 /* Now kick off ATA set up */
397 return ata_pci_init_one(dev, ppi); 396 return ata_pci_init_one(dev, ppi, &hpt36x_sht);
398} 397}
399 398
400#ifdef CONFIG_PM 399#ifdef CONFIG_PM
diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c
index c42eec70d297..a43c19753669 100644
--- a/drivers/ata/pata_hpt37x.c
+++ b/drivers/ata/pata_hpt37x.c
@@ -783,7 +783,6 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
783{ 783{
784 /* HPT370 - UDMA100 */ 784 /* HPT370 - UDMA100 */
785 static const struct ata_port_info info_hpt370 = { 785 static const struct ata_port_info info_hpt370 = {
786 .sht = &hpt37x_sht,
787 .flags = ATA_FLAG_SLAVE_POSS, 786 .flags = ATA_FLAG_SLAVE_POSS,
788 .pio_mask = 0x1f, 787 .pio_mask = 0x1f,
789 .mwdma_mask = 0x07, 788 .mwdma_mask = 0x07,
@@ -792,7 +791,6 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
792 }; 791 };
793 /* HPT370A - UDMA100 */ 792 /* HPT370A - UDMA100 */
794 static const struct ata_port_info info_hpt370a = { 793 static const struct ata_port_info info_hpt370a = {
795 .sht = &hpt37x_sht,
796 .flags = ATA_FLAG_SLAVE_POSS, 794 .flags = ATA_FLAG_SLAVE_POSS,
797 .pio_mask = 0x1f, 795 .pio_mask = 0x1f,
798 .mwdma_mask = 0x07, 796 .mwdma_mask = 0x07,
@@ -801,7 +799,6 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
801 }; 799 };
802 /* HPT370 - UDMA100 */ 800 /* HPT370 - UDMA100 */
803 static const struct ata_port_info info_hpt370_33 = { 801 static const struct ata_port_info info_hpt370_33 = {
804 .sht = &hpt37x_sht,
805 .flags = ATA_FLAG_SLAVE_POSS, 802 .flags = ATA_FLAG_SLAVE_POSS,
806 .pio_mask = 0x1f, 803 .pio_mask = 0x1f,
807 .mwdma_mask = 0x07, 804 .mwdma_mask = 0x07,
@@ -810,7 +807,6 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
810 }; 807 };
811 /* HPT370A - UDMA100 */ 808 /* HPT370A - UDMA100 */
812 static const struct ata_port_info info_hpt370a_33 = { 809 static const struct ata_port_info info_hpt370a_33 = {
813 .sht = &hpt37x_sht,
814 .flags = ATA_FLAG_SLAVE_POSS, 810 .flags = ATA_FLAG_SLAVE_POSS,
815 .pio_mask = 0x1f, 811 .pio_mask = 0x1f,
816 .mwdma_mask = 0x07, 812 .mwdma_mask = 0x07,
@@ -819,7 +815,6 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
819 }; 815 };
820 /* HPT371, 372 and friends - UDMA133 */ 816 /* HPT371, 372 and friends - UDMA133 */
821 static const struct ata_port_info info_hpt372 = { 817 static const struct ata_port_info info_hpt372 = {
822 .sht = &hpt37x_sht,
823 .flags = ATA_FLAG_SLAVE_POSS, 818 .flags = ATA_FLAG_SLAVE_POSS,
824 .pio_mask = 0x1f, 819 .pio_mask = 0x1f,
825 .mwdma_mask = 0x07, 820 .mwdma_mask = 0x07,
@@ -828,7 +823,6 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
828 }; 823 };
829 /* HPT374 - UDMA100 */ 824 /* HPT374 - UDMA100 */
830 static const struct ata_port_info info_hpt374 = { 825 static const struct ata_port_info info_hpt374 = {
831 .sht = &hpt37x_sht,
832 .flags = ATA_FLAG_SLAVE_POSS, 826 .flags = ATA_FLAG_SLAVE_POSS,
833 .pio_mask = 0x1f, 827 .pio_mask = 0x1f,
834 .mwdma_mask = 0x07, 828 .mwdma_mask = 0x07,
@@ -1051,7 +1045,7 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
1051 port_info = *port; 1045 port_info = *port;
1052 port_info.private_data = private_data; 1046 port_info.private_data = private_data;
1053 1047
1054 return ata_pci_init_one(dev, ppi); 1048 return ata_pci_init_one(dev, ppi, &hpt37x_sht);
1055} 1049}
1056 1050
1057static const struct pci_device_id hpt37x[] = { 1051static const struct pci_device_id hpt37x[] = {
diff --git a/drivers/ata/pata_hpt3x2n.c b/drivers/ata/pata_hpt3x2n.c
index b77b1279d757..2c178c30116c 100644
--- a/drivers/ata/pata_hpt3x2n.c
+++ b/drivers/ata/pata_hpt3x2n.c
@@ -452,7 +452,6 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id)
452{ 452{
453 /* HPT372N and friends - UDMA133 */ 453 /* HPT372N and friends - UDMA133 */
454 static const struct ata_port_info info = { 454 static const struct ata_port_info info = {
455 .sht = &hpt3x2n_sht,
456 .flags = ATA_FLAG_SLAVE_POSS, 455 .flags = ATA_FLAG_SLAVE_POSS,
457 .pio_mask = 0x1f, 456 .pio_mask = 0x1f,
458 .mwdma_mask = 0x07, 457 .mwdma_mask = 0x07,
@@ -568,7 +567,7 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id)
568 } 567 }
569 568
570 /* Now kick off ATA set up */ 569 /* Now kick off ATA set up */
571 return ata_pci_init_one(dev, ppi); 570 return ata_pci_init_one(dev, ppi, &hpt3x2n_sht);
572} 571}
573 572
574static const struct pci_device_id hpt3x2n[] = { 573static const struct pci_device_id hpt3x2n[] = {
diff --git a/drivers/ata/pata_it8213.c b/drivers/ata/pata_it8213.c
index 9ce89522e764..291a0d6e2434 100644
--- a/drivers/ata/pata_it8213.c
+++ b/drivers/ata/pata_it8213.c
@@ -274,7 +274,6 @@ static int it8213_init_one (struct pci_dev *pdev, const struct pci_device_id *en
274{ 274{
275 static int printed_version; 275 static int printed_version;
276 static const struct ata_port_info info = { 276 static const struct ata_port_info info = {
277 .sht = &it8213_sht,
278 .flags = ATA_FLAG_SLAVE_POSS, 277 .flags = ATA_FLAG_SLAVE_POSS,
279 .pio_mask = 0x1f, /* pio0-4 */ 278 .pio_mask = 0x1f, /* pio0-4 */
280 .mwdma_mask = 0x07, /* mwdma0-2 */ 279 .mwdma_mask = 0x07, /* mwdma0-2 */
@@ -288,7 +287,7 @@ static int it8213_init_one (struct pci_dev *pdev, const struct pci_device_id *en
288 dev_printk(KERN_DEBUG, &pdev->dev, 287 dev_printk(KERN_DEBUG, &pdev->dev,
289 "version " DRV_VERSION "\n"); 288 "version " DRV_VERSION "\n");
290 289
291 return ata_pci_init_one(pdev, ppi); 290 return ata_pci_init_one(pdev, ppi, &it8213_sht);
292} 291}
293 292
294static const struct pci_device_id it8213_pci_tbl[] = { 293static const struct pci_device_id it8213_pci_tbl[] = {
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c
index 669d224d30ca..63c5cf0d1fee 100644
--- a/drivers/ata/pata_it821x.c
+++ b/drivers/ata/pata_it821x.c
@@ -687,14 +687,12 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
687 u8 conf; 687 u8 conf;
688 688
689 static const struct ata_port_info info_smart = { 689 static const struct ata_port_info info_smart = {
690 .sht = &it821x_sht,
691 .flags = ATA_FLAG_SLAVE_POSS, 690 .flags = ATA_FLAG_SLAVE_POSS,
692 .pio_mask = 0x1f, 691 .pio_mask = 0x1f,
693 .mwdma_mask = 0x07, 692 .mwdma_mask = 0x07,
694 .port_ops = &it821x_smart_port_ops 693 .port_ops = &it821x_smart_port_ops
695 }; 694 };
696 static const struct ata_port_info info_passthru = { 695 static const struct ata_port_info info_passthru = {
697 .sht = &it821x_sht,
698 .flags = ATA_FLAG_SLAVE_POSS, 696 .flags = ATA_FLAG_SLAVE_POSS,
699 .pio_mask = 0x1f, 697 .pio_mask = 0x1f,
700 .mwdma_mask = 0x07, 698 .mwdma_mask = 0x07,
@@ -724,7 +722,7 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
724 else 722 else
725 ppi[0] = &info_smart; 723 ppi[0] = &info_smart;
726 724
727 return ata_pci_init_one(pdev, ppi); 725 return ata_pci_init_one(pdev, ppi, &it821x_sht);
728} 726}
729 727
730#ifdef CONFIG_PM 728#ifdef CONFIG_PM
diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c
index 61ff5c6b4568..859e47a600cc 100644
--- a/drivers/ata/pata_jmicron.c
+++ b/drivers/ata/pata_jmicron.c
@@ -148,7 +148,6 @@ static struct ata_port_operations jmicron_ops = {
148static int jmicron_init_one (struct pci_dev *pdev, const struct pci_device_id *id) 148static int jmicron_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
149{ 149{
150 static const struct ata_port_info info = { 150 static const struct ata_port_info info = {
151 .sht = &jmicron_sht,
152 .flags = ATA_FLAG_SLAVE_POSS, 151 .flags = ATA_FLAG_SLAVE_POSS,
153 152
154 .pio_mask = 0x1f, 153 .pio_mask = 0x1f,
@@ -159,7 +158,7 @@ static int jmicron_init_one (struct pci_dev *pdev, const struct pci_device_id *i
159 }; 158 };
160 const struct ata_port_info *ppi[] = { &info, NULL }; 159 const struct ata_port_info *ppi[] = { &info, NULL };
161 160
162 return ata_pci_init_one(pdev, ppi); 161 return ata_pci_init_one(pdev, ppi, &jmicron_sht);
163} 162}
164 163
165static const struct pci_device_id jmicron_pci_tbl[] = { 164static const struct pci_device_id jmicron_pci_tbl[] = {
diff --git a/drivers/ata/pata_marvell.c b/drivers/ata/pata_marvell.c
index 286310fc5910..d8da4f344c0a 100644
--- a/drivers/ata/pata_marvell.c
+++ b/drivers/ata/pata_marvell.c
@@ -119,7 +119,6 @@ static struct ata_port_operations marvell_ops = {
119static int marvell_init_one (struct pci_dev *pdev, const struct pci_device_id *id) 119static int marvell_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
120{ 120{
121 static const struct ata_port_info info = { 121 static const struct ata_port_info info = {
122 .sht = &marvell_sht,
123 .flags = ATA_FLAG_SLAVE_POSS, 122 .flags = ATA_FLAG_SLAVE_POSS,
124 123
125 .pio_mask = 0x1f, 124 .pio_mask = 0x1f,
@@ -129,7 +128,6 @@ static int marvell_init_one (struct pci_dev *pdev, const struct pci_device_id *i
129 .port_ops = &marvell_ops, 128 .port_ops = &marvell_ops,
130 }; 129 };
131 static const struct ata_port_info info_sata = { 130 static const struct ata_port_info info_sata = {
132 .sht = &marvell_sht,
133 /* Slave possible as its magically mapped not real */ 131 /* Slave possible as its magically mapped not real */
134 .flags = ATA_FLAG_SLAVE_POSS, 132 .flags = ATA_FLAG_SLAVE_POSS,
135 133
@@ -144,7 +142,7 @@ static int marvell_init_one (struct pci_dev *pdev, const struct pci_device_id *i
144 if (pdev->device == 0x6101) 142 if (pdev->device == 0x6101)
145 ppi[1] = &ata_dummy_port_info; 143 ppi[1] = &ata_dummy_port_info;
146 144
147 return ata_pci_init_one(pdev, ppi); 145 return ata_pci_init_one(pdev, ppi, &marvell_sht);
148} 146}
149 147
150static const struct pci_device_id marvell_pci_tbl[] = { 148static const struct pci_device_id marvell_pci_tbl[] = {
diff --git a/drivers/ata/pata_netcell.c b/drivers/ata/pata_netcell.c
index 65389d1837b3..ae50a5e85cf1 100644
--- a/drivers/ata/pata_netcell.c
+++ b/drivers/ata/pata_netcell.c
@@ -48,7 +48,6 @@ static int netcell_init_one (struct pci_dev *pdev, const struct pci_device_id *e
48{ 48{
49 static int printed_version; 49 static int printed_version;
50 static const struct ata_port_info info = { 50 static const struct ata_port_info info = {
51 .sht = &netcell_sht,
52 .flags = ATA_FLAG_SLAVE_POSS, 51 .flags = ATA_FLAG_SLAVE_POSS,
53 /* Actually we don't really care about these as the 52 /* Actually we don't really care about these as the
54 firmware deals with it */ 53 firmware deals with it */
@@ -72,7 +71,7 @@ static int netcell_init_one (struct pci_dev *pdev, const struct pci_device_id *e
72 ata_pci_clear_simplex(pdev); 71 ata_pci_clear_simplex(pdev);
73 72
74 /* And let the library code do the work */ 73 /* And let the library code do the work */
75 return ata_pci_init_one(pdev, port_info); 74 return ata_pci_init_one(pdev, port_info, &netcell_sht);
76} 75}
77 76
78static const struct pci_device_id netcell_pci_tbl[] = { 77static const struct pci_device_id netcell_pci_tbl[] = {
diff --git a/drivers/ata/pata_ns87410.c b/drivers/ata/pata_ns87410.c
index 5b1982fa0be1..1bdca8f1e767 100644
--- a/drivers/ata/pata_ns87410.c
+++ b/drivers/ata/pata_ns87410.c
@@ -158,13 +158,12 @@ static struct ata_port_operations ns87410_port_ops = {
158static int ns87410_init_one(struct pci_dev *dev, const struct pci_device_id *id) 158static int ns87410_init_one(struct pci_dev *dev, const struct pci_device_id *id)
159{ 159{
160 static const struct ata_port_info info = { 160 static const struct ata_port_info info = {
161 .sht = &ns87410_sht,
162 .flags = ATA_FLAG_SLAVE_POSS, 161 .flags = ATA_FLAG_SLAVE_POSS,
163 .pio_mask = 0x0F, 162 .pio_mask = 0x0F,
164 .port_ops = &ns87410_port_ops 163 .port_ops = &ns87410_port_ops
165 }; 164 };
166 const struct ata_port_info *ppi[] = { &info, NULL }; 165 const struct ata_port_info *ppi[] = { &info, NULL };
167 return ata_pci_init_one(dev, ppi); 166 return ata_pci_init_one(dev, ppi, &ns87410_sht);
168} 167}
169 168
170static const struct pci_device_id ns87410[] = { 169static const struct pci_device_id ns87410[] = {
diff --git a/drivers/ata/pata_ns87415.c b/drivers/ata/pata_ns87415.c
index 38d86a262dbb..42508940e4a9 100644
--- a/drivers/ata/pata_ns87415.c
+++ b/drivers/ata/pata_ns87415.c
@@ -345,7 +345,6 @@ static int ns87415_init_one (struct pci_dev *pdev, const struct pci_device_id *e
345{ 345{
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 .sht = &ns87415_sht,
349 .flags = ATA_FLAG_SLAVE_POSS, 348 .flags = ATA_FLAG_SLAVE_POSS,
350 .pio_mask = 0x1f, /* pio0-4 */ 349 .pio_mask = 0x1f, /* pio0-4 */
351 .mwdma_mask = 0x07, /* mwdma0-2 */ 350 .mwdma_mask = 0x07, /* mwdma0-2 */
@@ -355,7 +354,6 @@ static int ns87415_init_one (struct pci_dev *pdev, const struct pci_device_id *e
355 int rc; 354 int rc;
356#if defined(CONFIG_SUPERIO) 355#if defined(CONFIG_SUPERIO)
357 static const struct ata_port_info info87560 = { 356 static const struct ata_port_info info87560 = {
358 .sht = &ns87415_sht,
359 .flags = ATA_FLAG_SLAVE_POSS, 357 .flags = ATA_FLAG_SLAVE_POSS,
360 .pio_mask = 0x1f, /* pio0-4 */ 358 .pio_mask = 0x1f, /* pio0-4 */
361 .mwdma_mask = 0x07, /* mwdma0-2 */ 359 .mwdma_mask = 0x07, /* mwdma0-2 */
@@ -377,7 +375,7 @@ static int ns87415_init_one (struct pci_dev *pdev, const struct pci_device_id *e
377 pci_write_config_byte(pdev, 0x55, 0xEE); 375 pci_write_config_byte(pdev, 0x55, 0xEE);
378 /* Select PIO0 8bit clocking */ 376 /* Select PIO0 8bit clocking */
379 pci_write_config_byte(pdev, 0x54, 0xB7); 377 pci_write_config_byte(pdev, 0x54, 0xB7);
380 return ata_pci_init_one(pdev, ppi); 378 return ata_pci_init_one(pdev, ppi, &ns87415_sht);
381} 379}
382 380
383static const struct pci_device_id ns87415_pci_tbl[] = { 381static const struct pci_device_id ns87415_pci_tbl[] = {
diff --git a/drivers/ata/pata_oldpiix.c b/drivers/ata/pata_oldpiix.c
index f6062b37310d..9e3afadbd04a 100644
--- a/drivers/ata/pata_oldpiix.c
+++ b/drivers/ata/pata_oldpiix.c
@@ -252,7 +252,6 @@ static int oldpiix_init_one (struct pci_dev *pdev, const struct pci_device_id *e
252{ 252{
253 static int printed_version; 253 static int printed_version;
254 static const struct ata_port_info info = { 254 static const struct ata_port_info info = {
255 .sht = &oldpiix_sht,
256 .flags = ATA_FLAG_SLAVE_POSS, 255 .flags = ATA_FLAG_SLAVE_POSS,
257 .pio_mask = 0x1f, /* pio0-4 */ 256 .pio_mask = 0x1f, /* pio0-4 */
258 .mwdma_mask = 0x07, /* mwdma1-2 */ 257 .mwdma_mask = 0x07, /* mwdma1-2 */
@@ -264,7 +263,7 @@ static int oldpiix_init_one (struct pci_dev *pdev, const struct pci_device_id *e
264 dev_printk(KERN_DEBUG, &pdev->dev, 263 dev_printk(KERN_DEBUG, &pdev->dev,
265 "version " DRV_VERSION "\n"); 264 "version " DRV_VERSION "\n");
266 265
267 return ata_pci_init_one(pdev, ppi); 266 return ata_pci_init_one(pdev, ppi, &oldpiix_sht);
268} 267}
269 268
270static const struct pci_device_id oldpiix_pci_tbl[] = { 269static const struct pci_device_id oldpiix_pci_tbl[] = {
diff --git a/drivers/ata/pata_opti.c b/drivers/ata/pata_opti.c
index c4a0795c3ff4..8601d9c3cb39 100644
--- a/drivers/ata/pata_opti.c
+++ b/drivers/ata/pata_opti.c
@@ -178,7 +178,6 @@ static struct ata_port_operations opti_port_ops = {
178static int opti_init_one(struct pci_dev *dev, const struct pci_device_id *id) 178static int opti_init_one(struct pci_dev *dev, const struct pci_device_id *id)
179{ 179{
180 static const struct ata_port_info info = { 180 static const struct ata_port_info info = {
181 .sht = &opti_sht,
182 .flags = ATA_FLAG_SLAVE_POSS, 181 .flags = ATA_FLAG_SLAVE_POSS,
183 .pio_mask = 0x1f, 182 .pio_mask = 0x1f,
184 .port_ops = &opti_port_ops 183 .port_ops = &opti_port_ops
@@ -189,7 +188,7 @@ static int opti_init_one(struct pci_dev *dev, const struct pci_device_id *id)
189 if (!printed_version++) 188 if (!printed_version++)
190 dev_printk(KERN_DEBUG, &dev->dev, "version " DRV_VERSION "\n"); 189 dev_printk(KERN_DEBUG, &dev->dev, "version " DRV_VERSION "\n");
191 190
192 return ata_pci_init_one(dev, ppi); 191 return ata_pci_init_one(dev, ppi, &opti_sht);
193} 192}
194 193
195static const struct pci_device_id opti[] = { 194static const struct pci_device_id opti[] = {
diff --git a/drivers/ata/pata_optidma.c b/drivers/ata/pata_optidma.c
index eb4b08190e3a..c376f9ef77c8 100644
--- a/drivers/ata/pata_optidma.c
+++ b/drivers/ata/pata_optidma.c
@@ -414,14 +414,12 @@ done_nomsg: /* Wrong chip revision */
414static int optidma_init_one(struct pci_dev *dev, const struct pci_device_id *id) 414static int optidma_init_one(struct pci_dev *dev, const struct pci_device_id *id)
415{ 415{
416 static const struct ata_port_info info_82c700 = { 416 static const struct ata_port_info info_82c700 = {
417 .sht = &optidma_sht,
418 .flags = ATA_FLAG_SLAVE_POSS, 417 .flags = ATA_FLAG_SLAVE_POSS,
419 .pio_mask = 0x1f, 418 .pio_mask = 0x1f,
420 .mwdma_mask = 0x07, 419 .mwdma_mask = 0x07,
421 .port_ops = &optidma_port_ops 420 .port_ops = &optidma_port_ops
422 }; 421 };
423 static const struct ata_port_info info_82c700_udma = { 422 static const struct ata_port_info info_82c700_udma = {
424 .sht = &optidma_sht,
425 .flags = ATA_FLAG_SLAVE_POSS, 423 .flags = ATA_FLAG_SLAVE_POSS,
426 .pio_mask = 0x1f, 424 .pio_mask = 0x1f,
427 .mwdma_mask = 0x07, 425 .mwdma_mask = 0x07,
@@ -447,7 +445,7 @@ static int optidma_init_one(struct pci_dev *dev, const struct pci_device_id *id)
447 if (optiplus_with_udma(dev)) 445 if (optiplus_with_udma(dev))
448 ppi[0] = &info_82c700_udma; 446 ppi[0] = &info_82c700_udma;
449 447
450 return ata_pci_init_one(dev, ppi); 448 return ata_pci_init_one(dev, ppi, &optidma_sht);
451} 449}
452 450
453static const struct pci_device_id optidma[] = { 451static const struct pci_device_id optidma[] = {
diff --git a/drivers/ata/pata_pdc202xx_old.c b/drivers/ata/pata_pdc202xx_old.c
index 4daac20df0bc..5545fbab6a7e 100644
--- a/drivers/ata/pata_pdc202xx_old.c
+++ b/drivers/ata/pata_pdc202xx_old.c
@@ -290,7 +290,6 @@ static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id
290{ 290{
291 static const struct ata_port_info info[3] = { 291 static const struct ata_port_info info[3] = {
292 { 292 {
293 .sht = &pdc202xx_sht,
294 .flags = ATA_FLAG_SLAVE_POSS, 293 .flags = ATA_FLAG_SLAVE_POSS,
295 .pio_mask = 0x1f, 294 .pio_mask = 0x1f,
296 .mwdma_mask = 0x07, 295 .mwdma_mask = 0x07,
@@ -298,7 +297,6 @@ static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id
298 .port_ops = &pdc2024x_port_ops 297 .port_ops = &pdc2024x_port_ops
299 }, 298 },
300 { 299 {
301 .sht = &pdc202xx_sht,
302 .flags = ATA_FLAG_SLAVE_POSS, 300 .flags = ATA_FLAG_SLAVE_POSS,
303 .pio_mask = 0x1f, 301 .pio_mask = 0x1f,
304 .mwdma_mask = 0x07, 302 .mwdma_mask = 0x07,
@@ -306,7 +304,6 @@ static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id
306 .port_ops = &pdc2026x_port_ops 304 .port_ops = &pdc2026x_port_ops
307 }, 305 },
308 { 306 {
309 .sht = &pdc202xx_sht,
310 .flags = ATA_FLAG_SLAVE_POSS, 307 .flags = ATA_FLAG_SLAVE_POSS,
311 .pio_mask = 0x1f, 308 .pio_mask = 0x1f,
312 .mwdma_mask = 0x07, 309 .mwdma_mask = 0x07,
@@ -327,7 +324,7 @@ static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id
327 return -ENODEV; 324 return -ENODEV;
328 } 325 }
329 } 326 }
330 return ata_pci_init_one(dev, ppi); 327 return ata_pci_init_one(dev, ppi, &pdc202xx_sht);
331} 328}
332 329
333static const struct pci_device_id pdc202xx[] = { 330static const struct pci_device_id pdc202xx[] = {
diff --git a/drivers/ata/pata_radisys.c b/drivers/ata/pata_radisys.c
index 94e60b3a1ec6..145d5ba92795 100644
--- a/drivers/ata/pata_radisys.c
+++ b/drivers/ata/pata_radisys.c
@@ -216,7 +216,6 @@ static int radisys_init_one (struct pci_dev *pdev, const struct pci_device_id *e
216{ 216{
217 static int printed_version; 217 static int printed_version;
218 static const struct ata_port_info info = { 218 static const struct ata_port_info info = {
219 .sht = &radisys_sht,
220 .flags = ATA_FLAG_SLAVE_POSS, 219 .flags = ATA_FLAG_SLAVE_POSS,
221 .pio_mask = 0x1f, /* pio0-4 */ 220 .pio_mask = 0x1f, /* pio0-4 */
222 .mwdma_mask = 0x07, /* mwdma1-2 */ 221 .mwdma_mask = 0x07, /* mwdma1-2 */
@@ -229,7 +228,7 @@ static int radisys_init_one (struct pci_dev *pdev, const struct pci_device_id *e
229 dev_printk(KERN_DEBUG, &pdev->dev, 228 dev_printk(KERN_DEBUG, &pdev->dev,
230 "version " DRV_VERSION "\n"); 229 "version " DRV_VERSION "\n");
231 230
232 return ata_pci_init_one(pdev, ppi); 231 return ata_pci_init_one(pdev, ppi, &radisys_sht);
233} 232}
234 233
235static const struct pci_device_id radisys_pci_tbl[] = { 234static const struct pci_device_id radisys_pci_tbl[] = {
diff --git a/drivers/ata/pata_rz1000.c b/drivers/ata/pata_rz1000.c
index a2aef7328bfc..04be6aee4354 100644
--- a/drivers/ata/pata_rz1000.c
+++ b/drivers/ata/pata_rz1000.c
@@ -89,7 +89,6 @@ static int rz1000_init_one (struct pci_dev *pdev, const struct pci_device_id *en
89{ 89{
90 static int printed_version; 90 static int printed_version;
91 static const struct ata_port_info info = { 91 static const struct ata_port_info info = {
92 .sht = &rz1000_sht,
93 .flags = ATA_FLAG_SLAVE_POSS, 92 .flags = ATA_FLAG_SLAVE_POSS,
94 .pio_mask = 0x1f, 93 .pio_mask = 0x1f,
95 .port_ops = &rz1000_port_ops 94 .port_ops = &rz1000_port_ops
@@ -100,7 +99,7 @@ static int rz1000_init_one (struct pci_dev *pdev, const struct pci_device_id *en
100 printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n"); 99 printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n");
101 100
102 if (rz1000_fifo_disable(pdev) == 0) 101 if (rz1000_fifo_disable(pdev) == 0)
103 return ata_pci_init_one(pdev, ppi); 102 return ata_pci_init_one(pdev, ppi, &rz1000_sht);
104 103
105 printk(KERN_ERR DRV_NAME ": failed to disable read-ahead on chipset..\n"); 104 printk(KERN_ERR DRV_NAME ": failed to disable read-ahead on chipset..\n");
106 /* Not safe to use so skip */ 105 /* Not safe to use so skip */
diff --git a/drivers/ata/pata_sc1200.c b/drivers/ata/pata_sc1200.c
index 362b7f829d8e..38c7fb0bebe9 100644
--- a/drivers/ata/pata_sc1200.c
+++ b/drivers/ata/pata_sc1200.c
@@ -204,7 +204,6 @@ static struct ata_port_operations sc1200_port_ops = {
204static int sc1200_init_one(struct pci_dev *dev, const struct pci_device_id *id) 204static 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 .sht = &sc1200_sht,
208 .flags = ATA_FLAG_SLAVE_POSS, 207 .flags = ATA_FLAG_SLAVE_POSS,
209 .pio_mask = 0x1f, 208 .pio_mask = 0x1f,
210 .mwdma_mask = 0x07, 209 .mwdma_mask = 0x07,
@@ -214,7 +213,7 @@ static int sc1200_init_one(struct pci_dev *dev, const struct pci_device_id *id)
214 /* Can't enable port 2 yet, see top comments */ 213 /* Can't enable port 2 yet, see top comments */
215 const struct ata_port_info *ppi[] = { &info, &ata_dummy_port_info }; 214 const struct ata_port_info *ppi[] = { &info, &ata_dummy_port_info };
216 215
217 return ata_pci_init_one(dev, ppi); 216 return ata_pci_init_one(dev, ppi, &sc1200_sht);
218} 217}
219 218
220static const struct pci_device_id sc1200[] = { 219static const struct pci_device_id sc1200[] = {
diff --git a/drivers/ata/pata_serverworks.c b/drivers/ata/pata_serverworks.c
index 627abcf85c6e..515b5b70a555 100644
--- a/drivers/ata/pata_serverworks.c
+++ b/drivers/ata/pata_serverworks.c
@@ -399,28 +399,24 @@ static int serverworks_init_one(struct pci_dev *pdev, const struct pci_device_id
399{ 399{
400 static const struct ata_port_info info[4] = { 400 static const struct ata_port_info info[4] = {
401 { /* OSB4 */ 401 { /* OSB4 */
402 .sht = &serverworks_sht,
403 .flags = ATA_FLAG_SLAVE_POSS, 402 .flags = ATA_FLAG_SLAVE_POSS,
404 .pio_mask = 0x1f, 403 .pio_mask = 0x1f,
405 .mwdma_mask = 0x07, 404 .mwdma_mask = 0x07,
406 .udma_mask = 0x07, 405 .udma_mask = 0x07,
407 .port_ops = &serverworks_osb4_port_ops 406 .port_ops = &serverworks_osb4_port_ops
408 }, { /* OSB4 no UDMA */ 407 }, { /* OSB4 no UDMA */
409 .sht = &serverworks_sht,
410 .flags = ATA_FLAG_SLAVE_POSS, 408 .flags = ATA_FLAG_SLAVE_POSS,
411 .pio_mask = 0x1f, 409 .pio_mask = 0x1f,
412 .mwdma_mask = 0x07, 410 .mwdma_mask = 0x07,
413 .udma_mask = 0x00, 411 .udma_mask = 0x00,
414 .port_ops = &serverworks_osb4_port_ops 412 .port_ops = &serverworks_osb4_port_ops
415 }, { /* CSB5 */ 413 }, { /* CSB5 */
416 .sht = &serverworks_sht,
417 .flags = ATA_FLAG_SLAVE_POSS, 414 .flags = ATA_FLAG_SLAVE_POSS,
418 .pio_mask = 0x1f, 415 .pio_mask = 0x1f,
419 .mwdma_mask = 0x07, 416 .mwdma_mask = 0x07,
420 .udma_mask = ATA_UDMA4, 417 .udma_mask = ATA_UDMA4,
421 .port_ops = &serverworks_csb_port_ops 418 .port_ops = &serverworks_csb_port_ops
422 }, { /* CSB5 - later revisions*/ 419 }, { /* CSB5 - later revisions*/
423 .sht = &serverworks_sht,
424 .flags = ATA_FLAG_SLAVE_POSS, 420 .flags = ATA_FLAG_SLAVE_POSS,
425 .pio_mask = 0x1f, 421 .pio_mask = 0x1f,
426 .mwdma_mask = 0x07, 422 .mwdma_mask = 0x07,
@@ -465,7 +461,7 @@ static int serverworks_init_one(struct pci_dev *pdev, const struct pci_device_id
465 if (pdev->device == PCI_DEVICE_ID_SERVERWORKS_CSB5IDE) 461 if (pdev->device == PCI_DEVICE_ID_SERVERWORKS_CSB5IDE)
466 ata_pci_clear_simplex(pdev); 462 ata_pci_clear_simplex(pdev);
467 463
468 return ata_pci_init_one(pdev, ppi); 464 return ata_pci_init_one(pdev, ppi, &serverworks_sht);
469} 465}
470 466
471#ifdef CONFIG_PM 467#ifdef CONFIG_PM
diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c
index 0936f534d9c7..5313deeffa6d 100644
--- a/drivers/ata/pata_sil680.c
+++ b/drivers/ata/pata_sil680.c
@@ -282,7 +282,6 @@ static int __devinit sil680_init_one(struct pci_dev *pdev,
282 const struct pci_device_id *id) 282 const struct pci_device_id *id)
283{ 283{
284 static const struct ata_port_info info = { 284 static const struct ata_port_info info = {
285 .sht = &sil680_sht,
286 .flags = ATA_FLAG_SLAVE_POSS, 285 .flags = ATA_FLAG_SLAVE_POSS,
287 .pio_mask = 0x1f, 286 .pio_mask = 0x1f,
288 .mwdma_mask = 0x07, 287 .mwdma_mask = 0x07,
@@ -290,7 +289,6 @@ static int __devinit sil680_init_one(struct pci_dev *pdev,
290 .port_ops = &sil680_port_ops 289 .port_ops = &sil680_port_ops
291 }; 290 };
292 static const struct ata_port_info info_slow = { 291 static const struct ata_port_info info_slow = {
293 .sht = &sil680_sht,
294 .flags = ATA_FLAG_SLAVE_POSS, 292 .flags = ATA_FLAG_SLAVE_POSS,
295 .pio_mask = 0x1f, 293 .pio_mask = 0x1f,
296 .mwdma_mask = 0x07, 294 .mwdma_mask = 0x07,
@@ -364,7 +362,7 @@ static int __devinit sil680_init_one(struct pci_dev *pdev,
364 &sil680_sht); 362 &sil680_sht);
365 363
366use_ioports: 364use_ioports:
367 return ata_pci_init_one(pdev, ppi); 365 return ata_pci_init_one(pdev, ppi, &sil680_sht);
368} 366}
369 367
370#ifdef CONFIG_PM 368#ifdef CONFIG_PM
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c
index 3ed628670cd7..32be13ba5f06 100644
--- a/drivers/ata/pata_sis.c
+++ b/drivers/ata/pata_sis.c
@@ -565,7 +565,6 @@ static struct ata_port_operations sis_old_ops = {
565}; 565};
566 566
567static const struct ata_port_info sis_info = { 567static const struct ata_port_info sis_info = {
568 .sht = &sis_sht,
569 .flags = ATA_FLAG_SLAVE_POSS, 568 .flags = ATA_FLAG_SLAVE_POSS,
570 .pio_mask = 0x1f, /* pio0-4 */ 569 .pio_mask = 0x1f, /* pio0-4 */
571 .mwdma_mask = 0x07, 570 .mwdma_mask = 0x07,
@@ -573,7 +572,6 @@ static const struct ata_port_info sis_info = {
573 .port_ops = &sis_old_ops, 572 .port_ops = &sis_old_ops,
574}; 573};
575static const struct ata_port_info sis_info33 = { 574static const struct ata_port_info sis_info33 = {
576 .sht = &sis_sht,
577 .flags = ATA_FLAG_SLAVE_POSS, 575 .flags = ATA_FLAG_SLAVE_POSS,
578 .pio_mask = 0x1f, /* pio0-4 */ 576 .pio_mask = 0x1f, /* pio0-4 */
579 .mwdma_mask = 0x07, 577 .mwdma_mask = 0x07,
@@ -581,42 +579,36 @@ static const struct ata_port_info sis_info33 = {
581 .port_ops = &sis_old_ops, 579 .port_ops = &sis_old_ops,
582}; 580};
583static const struct ata_port_info sis_info66 = { 581static const struct ata_port_info sis_info66 = {
584 .sht = &sis_sht,
585 .flags = ATA_FLAG_SLAVE_POSS, 582 .flags = ATA_FLAG_SLAVE_POSS,
586 .pio_mask = 0x1f, /* pio0-4 */ 583 .pio_mask = 0x1f, /* pio0-4 */
587 .udma_mask = ATA_UDMA4, /* UDMA 66 */ 584 .udma_mask = ATA_UDMA4, /* UDMA 66 */
588 .port_ops = &sis_66_ops, 585 .port_ops = &sis_66_ops,
589}; 586};
590static const struct ata_port_info sis_info100 = { 587static const struct ata_port_info sis_info100 = {
591 .sht = &sis_sht,
592 .flags = ATA_FLAG_SLAVE_POSS, 588 .flags = ATA_FLAG_SLAVE_POSS,
593 .pio_mask = 0x1f, /* pio0-4 */ 589 .pio_mask = 0x1f, /* pio0-4 */
594 .udma_mask = ATA_UDMA5, 590 .udma_mask = ATA_UDMA5,
595 .port_ops = &sis_100_ops, 591 .port_ops = &sis_100_ops,
596}; 592};
597static const struct ata_port_info sis_info100_early = { 593static const struct ata_port_info sis_info100_early = {
598 .sht = &sis_sht,
599 .flags = ATA_FLAG_SLAVE_POSS, 594 .flags = ATA_FLAG_SLAVE_POSS,
600 .udma_mask = ATA_UDMA5, 595 .udma_mask = ATA_UDMA5,
601 .pio_mask = 0x1f, /* pio0-4 */ 596 .pio_mask = 0x1f, /* pio0-4 */
602 .port_ops = &sis_66_ops, 597 .port_ops = &sis_66_ops,
603}; 598};
604static const struct ata_port_info sis_info133 = { 599static const struct ata_port_info sis_info133 = {
605 .sht = &sis_sht,
606 .flags = ATA_FLAG_SLAVE_POSS, 600 .flags = ATA_FLAG_SLAVE_POSS,
607 .pio_mask = 0x1f, /* pio0-4 */ 601 .pio_mask = 0x1f, /* pio0-4 */
608 .udma_mask = ATA_UDMA6, 602 .udma_mask = ATA_UDMA6,
609 .port_ops = &sis_133_ops, 603 .port_ops = &sis_133_ops,
610}; 604};
611const struct ata_port_info sis_info133_for_sata = { 605const struct ata_port_info sis_info133_for_sata = {
612 .sht = &sis_sht,
613 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, 606 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
614 .pio_mask = 0x1f, /* pio0-4 */ 607 .pio_mask = 0x1f, /* pio0-4 */
615 .udma_mask = ATA_UDMA6, 608 .udma_mask = ATA_UDMA6,
616 .port_ops = &sis_133_for_sata_ops, 609 .port_ops = &sis_133_for_sata_ops,
617}; 610};
618static const struct ata_port_info sis_info133_early = { 611static const struct ata_port_info sis_info133_early = {
619 .sht = &sis_sht,
620 .flags = ATA_FLAG_SLAVE_POSS, 612 .flags = ATA_FLAG_SLAVE_POSS,
621 .pio_mask = 0x1f, /* pio0-4 */ 613 .pio_mask = 0x1f, /* pio0-4 */
622 .udma_mask = ATA_UDMA6, 614 .udma_mask = ATA_UDMA6,
@@ -844,7 +836,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
844 836
845 sis_fixup(pdev, chipset); 837 sis_fixup(pdev, chipset);
846 838
847 return ata_pci_init_one(pdev, ppi); 839 return ata_pci_init_one(pdev, ppi, &sis_sht);
848} 840}
849 841
850static const struct pci_device_id sis_pci_tbl[] = { 842static const struct pci_device_id sis_pci_tbl[] = {
diff --git a/drivers/ata/pata_sl82c105.c b/drivers/ata/pata_sl82c105.c
index 0dd8e2f69558..2d14b2505c7d 100644
--- a/drivers/ata/pata_sl82c105.c
+++ b/drivers/ata/pata_sl82c105.c
@@ -289,14 +289,12 @@ static int sl82c105_bridge_revision(struct pci_dev *pdev)
289static int sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id) 289static int sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id)
290{ 290{
291 static const struct ata_port_info info_dma = { 291 static const struct ata_port_info info_dma = {
292 .sht = &sl82c105_sht,
293 .flags = ATA_FLAG_SLAVE_POSS, 292 .flags = ATA_FLAG_SLAVE_POSS,
294 .pio_mask = 0x1f, 293 .pio_mask = 0x1f,
295 .mwdma_mask = 0x07, 294 .mwdma_mask = 0x07,
296 .port_ops = &sl82c105_port_ops 295 .port_ops = &sl82c105_port_ops
297 }; 296 };
298 static const struct ata_port_info info_early = { 297 static const struct ata_port_info info_early = {
299 .sht = &sl82c105_sht,
300 .flags = ATA_FLAG_SLAVE_POSS, 298 .flags = ATA_FLAG_SLAVE_POSS,
301 .pio_mask = 0x1f, 299 .pio_mask = 0x1f,
302 .port_ops = &sl82c105_port_ops 300 .port_ops = &sl82c105_port_ops
@@ -325,7 +323,7 @@ static int sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id
325 val |= CTRL_P0EN | CTRL_P0F16 | CTRL_P1F16; 323 val |= CTRL_P0EN | CTRL_P0F16 | CTRL_P1F16;
326 pci_write_config_dword(dev, 0x40, val); 324 pci_write_config_dword(dev, 0x40, val);
327 325
328 return ata_pci_init_one(dev, ppi); 326 return ata_pci_init_one(dev, ppi, &sl82c105_sht);
329} 327}
330 328
331static const struct pci_device_id sl82c105[] = { 329static const struct pci_device_id sl82c105[] = {
diff --git a/drivers/ata/pata_triflex.c b/drivers/ata/pata_triflex.c
index bc4956ef0931..86dc66c37389 100644
--- a/drivers/ata/pata_triflex.c
+++ b/drivers/ata/pata_triflex.c
@@ -195,7 +195,6 @@ static struct ata_port_operations triflex_port_ops = {
195static int triflex_init_one(struct pci_dev *dev, const struct pci_device_id *id) 195static int triflex_init_one(struct pci_dev *dev, const struct pci_device_id *id)
196{ 196{
197 static const struct ata_port_info info = { 197 static const struct ata_port_info info = {
198 .sht = &triflex_sht,
199 .flags = ATA_FLAG_SLAVE_POSS, 198 .flags = ATA_FLAG_SLAVE_POSS,
200 .pio_mask = 0x1f, 199 .pio_mask = 0x1f,
201 .mwdma_mask = 0x07, 200 .mwdma_mask = 0x07,
@@ -207,7 +206,7 @@ static int triflex_init_one(struct pci_dev *dev, const struct pci_device_id *id)
207 if (!printed_version++) 206 if (!printed_version++)
208 dev_printk(KERN_DEBUG, &dev->dev, "version " DRV_VERSION "\n"); 207 dev_printk(KERN_DEBUG, &dev->dev, "version " DRV_VERSION "\n");
209 208
210 return ata_pci_init_one(dev, ppi); 209 return ata_pci_init_one(dev, ppi, &triflex_sht);
211} 210}
212 211
213static const struct pci_device_id triflex[] = { 212static const struct pci_device_id triflex[] = {
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index d1edb1b27480..e66bb85ad3d1 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -398,7 +398,6 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
398{ 398{
399 /* Early VIA without UDMA support */ 399 /* Early VIA without UDMA support */
400 static const struct ata_port_info via_mwdma_info = { 400 static const struct ata_port_info via_mwdma_info = {
401 .sht = &via_sht,
402 .flags = ATA_FLAG_SLAVE_POSS, 401 .flags = ATA_FLAG_SLAVE_POSS,
403 .pio_mask = 0x1f, 402 .pio_mask = 0x1f,
404 .mwdma_mask = 0x07, 403 .mwdma_mask = 0x07,
@@ -406,7 +405,6 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
406 }; 405 };
407 /* Ditto with IRQ masking required */ 406 /* Ditto with IRQ masking required */
408 static const struct ata_port_info via_mwdma_info_borked = { 407 static const struct ata_port_info via_mwdma_info_borked = {
409 .sht = &via_sht,
410 .flags = ATA_FLAG_SLAVE_POSS, 408 .flags = ATA_FLAG_SLAVE_POSS,
411 .pio_mask = 0x1f, 409 .pio_mask = 0x1f,
412 .mwdma_mask = 0x07, 410 .mwdma_mask = 0x07,
@@ -414,7 +412,6 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
414 }; 412 };
415 /* VIA UDMA 33 devices (and borked 66) */ 413 /* VIA UDMA 33 devices (and borked 66) */
416 static const struct ata_port_info via_udma33_info = { 414 static const struct ata_port_info via_udma33_info = {
417 .sht = &via_sht,
418 .flags = ATA_FLAG_SLAVE_POSS, 415 .flags = ATA_FLAG_SLAVE_POSS,
419 .pio_mask = 0x1f, 416 .pio_mask = 0x1f,
420 .mwdma_mask = 0x07, 417 .mwdma_mask = 0x07,
@@ -423,7 +420,6 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
423 }; 420 };
424 /* VIA UDMA 66 devices */ 421 /* VIA UDMA 66 devices */
425 static const struct ata_port_info via_udma66_info = { 422 static const struct ata_port_info via_udma66_info = {
426 .sht = &via_sht,
427 .flags = ATA_FLAG_SLAVE_POSS, 423 .flags = ATA_FLAG_SLAVE_POSS,
428 .pio_mask = 0x1f, 424 .pio_mask = 0x1f,
429 .mwdma_mask = 0x07, 425 .mwdma_mask = 0x07,
@@ -432,7 +428,6 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
432 }; 428 };
433 /* VIA UDMA 100 devices */ 429 /* VIA UDMA 100 devices */
434 static const struct ata_port_info via_udma100_info = { 430 static const struct ata_port_info via_udma100_info = {
435 .sht = &via_sht,
436 .flags = ATA_FLAG_SLAVE_POSS, 431 .flags = ATA_FLAG_SLAVE_POSS,
437 .pio_mask = 0x1f, 432 .pio_mask = 0x1f,
438 .mwdma_mask = 0x07, 433 .mwdma_mask = 0x07,
@@ -441,7 +436,6 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
441 }; 436 };
442 /* UDMA133 with bad AST (All current 133) */ 437 /* UDMA133 with bad AST (All current 133) */
443 static const struct ata_port_info via_udma133_info = { 438 static const struct ata_port_info via_udma133_info = {
444 .sht = &via_sht,
445 .flags = ATA_FLAG_SLAVE_POSS, 439 .flags = ATA_FLAG_SLAVE_POSS,
446 .pio_mask = 0x1f, 440 .pio_mask = 0x1f,
447 .mwdma_mask = 0x07, 441 .mwdma_mask = 0x07,
@@ -532,7 +526,7 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
532 /* We have established the device type, now fire it up */ 526 /* We have established the device type, now fire it up */
533 type.private_data = (void *)config; 527 type.private_data = (void *)config;
534 528
535 return ata_pci_init_one(pdev, ppi); 529 return ata_pci_init_one(pdev, ppi, &via_sht);
536} 530}
537 531
538#ifdef CONFIG_PM 532#ifdef CONFIG_PM