]> err.no Git - linux-2.6/commitdiff
libata: normalize port_info, port_operations and sht tables
authorTejun Heo <htejun@gmail.com>
Tue, 25 Mar 2008 03:22:48 +0000 (12:22 +0900)
committerJeff Garzik <jgarzik@redhat.com>
Thu, 17 Apr 2008 19:44:17 +0000 (15:44 -0400)
Over the time, port info, ops and sht structures developed quite a bit
of inconsistencies.  This patch updates drivers.

* Enable/disable_pm callbacks added to all ahci ops tables.

* Every driver for SFF controllers now uses ata_sff_port_start()
  instead of ata_port_start() unless the driver has custom
  implementation.

* Every driver for SFF controllers now uses ata_pci_default_filter()
  unless the driver has custom implementation.

* Removed an odd port_info->sht initialization from ata_piix.c.
  Likely a merge byproduct.

* A port which has ATA_FLAG_SATA set doesn't need to set cable_detect
  to ata_cable_sata().  Remove it from via and mv port ops.

* Some drivers had unnecessary .max_sectors initialization which is
  ignored and was missing .slave_destroy callback.  Fixed.

* Removed unnecessary sht initializations port_info's.

* Removed onsolete scsi device suspend/resume callbacks from
  pata_bf54x.

* No reason to set ata_pci_default_filter() and bmdma functions for
  PIO-only drivers.  Remove those callbacks and replace
  ata_bmdma_irq_clear with ata_noop_irq_clear.

* pata_platform sets port_start to ata_dummy_ret0.  port_start can
  just be set to NULL.

* sata_fsl supports NCQ but was missing qc_defer.  Fixed.

* pata_rb600_cf implements dummy port_start.  Removed.

Signed-off-by: Tejun Heo <htejun@gmail.com>
29 files changed:
drivers/ata/ahci.c
drivers/ata/ata_generic.c
drivers/ata/ata_piix.c
drivers/ata/pata_artop.c
drivers/ata/pata_bf54x.c
drivers/ata/pata_cmd64x.c
drivers/ata/pata_cs5520.c
drivers/ata/pata_cs5536.c
drivers/ata/pata_hpt3x3.c
drivers/ata/pata_it8213.c
drivers/ata/pata_ixp4xx_cf.c
drivers/ata/pata_jmicron.c
drivers/ata/pata_marvell.c
drivers/ata/pata_mpc52xx.c
drivers/ata/pata_netcell.c
drivers/ata/pata_opti.c
drivers/ata/pata_optidma.c
drivers/ata/pata_platform.c
drivers/ata/pata_rb500_cf.c
drivers/ata/pata_rz1000.c
drivers/ata/sata_fsl.c
drivers/ata/sata_mv.c
drivers/ata/sata_nv.c
drivers/ata/sata_sil.c
drivers/ata/sata_sis.c
drivers/ata/sata_svw.c
drivers/ata/sata_uli.c
drivers/ata/sata_via.c
drivers/ata/sata_vsc.c

index 492e521715d6efe12775c94c8295702af5239865..c6ea44a7f2a981c25b65979b6fe8355182d3713e 100644 (file)
@@ -336,6 +336,8 @@ static const struct ata_port_operations ahci_vt8251_ops = {
        .check_altstatus        = ahci_check_status,
        .dev_select             = ata_noop_dev_select,
 
+       .dev_config             = ahci_dev_config,
+
        .tf_read                = ahci_tf_read,
 
        .qc_defer               = sata_pmp_qc_defer_cmd_switch,
@@ -360,6 +362,8 @@ static const struct ata_port_operations ahci_vt8251_ops = {
        .port_suspend           = ahci_port_suspend,
        .port_resume            = ahci_port_resume,
 #endif
+       .enable_pm              = ahci_enable_alpm,
+       .disable_pm             = ahci_disable_alpm,
 
        .port_start             = ahci_port_start,
        .port_stop              = ahci_port_stop,
@@ -370,6 +374,8 @@ static const struct ata_port_operations ahci_p5wdh_ops = {
        .check_altstatus        = ahci_check_status,
        .dev_select             = ata_noop_dev_select,
 
+       .dev_config             = ahci_dev_config,
+
        .tf_read                = ahci_tf_read,
 
        .qc_defer               = sata_pmp_qc_defer_cmd_switch,
@@ -394,6 +400,8 @@ static const struct ata_port_operations ahci_p5wdh_ops = {
        .port_suspend           = ahci_port_suspend,
        .port_resume            = ahci_port_resume,
 #endif
+       .enable_pm              = ahci_enable_alpm,
+       .disable_pm             = ahci_disable_alpm,
 
        .port_start             = ahci_port_start,
        .port_stop              = ahci_port_stop,
index 20534202fc79b28c5e93f944fe3224a460016318..db4c3cb78fda4f680db851e10eabf5e229e5f63b 100644 (file)
@@ -114,6 +114,7 @@ static struct scsi_host_template generic_sht = {
 
 static struct ata_port_operations generic_port_ops = {
        .set_mode       = generic_set_mode,
+       .mode_filter    = ata_pci_default_filter,
 
        .tf_load        = ata_tf_load,
        .tf_read        = ata_tf_read,
index fae8404254c022dcaba09085eedfc9864657fa78..067760a1688944e7421f740f736ccad4e5de2018 100644 (file)
@@ -336,7 +336,7 @@ static const struct ata_port_operations piix_pata_ops = {
        .irq_clear              = ata_bmdma_irq_clear,
        .irq_on                 = ata_irq_on,
 
-       .port_start             = ata_port_start,
+       .port_start             = ata_sff_port_start,
 };
 
 static const struct ata_port_operations ich_pata_ops = {
@@ -367,7 +367,7 @@ static const struct ata_port_operations ich_pata_ops = {
        .irq_clear              = ata_bmdma_irq_clear,
        .irq_on                 = ata_irq_on,
 
-       .port_start             = ata_port_start,
+       .port_start             = ata_sff_port_start,
 };
 
 static const struct ata_port_operations piix_sata_ops = {
@@ -385,6 +385,7 @@ static const struct ata_port_operations piix_sata_ops = {
        .qc_issue               = ata_qc_issue_prot,
        .data_xfer              = ata_data_xfer,
 
+       .mode_filter            = ata_pci_default_filter,
        .freeze                 = ata_bmdma_freeze,
        .thaw                   = ata_bmdma_thaw,
        .error_handler          = ata_bmdma_error_handler,
@@ -393,7 +394,7 @@ static const struct ata_port_operations piix_sata_ops = {
        .irq_clear              = ata_bmdma_irq_clear,
        .irq_on                 = ata_irq_on,
 
-       .port_start             = ata_port_start,
+       .port_start             = ata_sff_port_start,
 };
 
 static const struct ata_port_operations piix_vmw_ops = {
@@ -425,7 +426,7 @@ static const struct ata_port_operations piix_vmw_ops = {
        .irq_clear              = ata_bmdma_irq_clear,
        .irq_on                 = ata_irq_on,
 
-       .port_start             = ata_port_start,
+       .port_start             = ata_sff_port_start,
 };
 
 static const struct ata_port_operations piix_sidpr_sata_ops = {
@@ -446,6 +447,7 @@ static const struct ata_port_operations piix_sidpr_sata_ops = {
        .scr_read               = piix_sidpr_scr_read,
        .scr_write              = piix_sidpr_scr_write,
 
+       .mode_filter            = ata_pci_default_filter,
        .freeze                 = ata_bmdma_freeze,
        .thaw                   = ata_bmdma_thaw,
        .error_handler          = piix_sidpr_error_handler,
@@ -454,7 +456,7 @@ static const struct ata_port_operations piix_sidpr_sata_ops = {
        .irq_clear              = ata_bmdma_irq_clear,
        .irq_on                 = ata_irq_on,
 
-       .port_start             = ata_port_start,
+       .port_start             = ata_sff_port_start,
 };
 
 static const struct piix_map_db ich5_map_db = {
@@ -683,7 +685,6 @@ static struct ata_port_info piix_port_info[] = {
 
        [piix_pata_vmw] =
        {
-               .sht            = &piix_sht,
                .flags          = PIIX_PATA_FLAGS,
                .pio_mask       = 0x1f, /* pio0-4 */
                .mwdma_mask     = 0x06, /* mwdma1-2 ?? CHECK 0 should be ok but slow */
index 2f8148016971faafa3227929eaf7c91560606028..a238c7bd0bba42ab4cd1b6f2d80eddabe37d9383 100644 (file)
@@ -367,6 +367,7 @@ static const struct ata_port_operations artop6210_ops = {
 static const struct ata_port_operations artop6260_ops = {
        .set_piomode            = artop6260_set_piomode,
        .set_dmamode            = artop6260_set_dmamode,
+       .mode_filter            = ata_pci_default_filter,
 
        .tf_load                = ata_tf_load,
        .tf_read                = ata_tf_read,
index 7f87f105c2f6af44e61d119ba7e3f3dfc1930426..146c202d5834032c7e263022a15f808b5ee08813 100644 (file)
@@ -1409,7 +1409,6 @@ static const struct ata_port_operations bfin_pata_ops = {
 
 static struct ata_port_info bfin_port_info[] = {
        {
-               .sht            = &bfin_sht,
                .flags          = ATA_FLAG_SLAVE_POSS
                                | ATA_FLAG_MMIO
                                | ATA_FLAG_NO_LEGACY,
index 1c9a8d97f874c0e2454f116984efc0ef787467f1..e8c1262341eeea8333fb02d8fdc4b4748e08f4df 100644 (file)
@@ -313,7 +313,7 @@ static struct ata_port_operations cmd64x_port_ops = {
        .irq_clear      = ata_bmdma_irq_clear,
        .irq_on         = ata_irq_on,
 
-       .port_start     = ata_port_start,
+       .port_start     = ata_sff_port_start,
 };
 
 static struct ata_port_operations cmd646r1_port_ops = {
@@ -346,7 +346,7 @@ static struct ata_port_operations cmd646r1_port_ops = {
        .irq_clear      = ata_bmdma_irq_clear,
        .irq_on         = ata_irq_on,
 
-       .port_start     = ata_port_start,
+       .port_start     = ata_sff_port_start,
 };
 
 static struct ata_port_operations cmd648_port_ops = {
@@ -379,7 +379,7 @@ static struct ata_port_operations cmd648_port_ops = {
        .irq_clear      = ata_bmdma_irq_clear,
        .irq_on         = ata_irq_on,
 
-       .port_start     = ata_port_start,
+       .port_start     = ata_sff_port_start,
 };
 
 static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
index dd6b2355fcdc8a13e52b2f43b853caaddc134c21..44ad2c9d488fb455287906b03c2784b3b10a4c12 100644 (file)
@@ -160,6 +160,7 @@ static struct scsi_host_template cs5520_sht = {
 static struct ata_port_operations cs5520_port_ops = {
        .set_piomode            = cs5520_set_piomode,
        .set_dmamode            = cs5520_set_dmamode,
+       .mode_filter            = ata_pci_default_filter,
 
        .tf_load                = ata_tf_load,
        .tf_read                = ata_tf_read,
index 1c4ff9b52b5c0b0bc39c27d2eaf73c5da601cda6..391aa888f8fd3547fabb006b60f81c53a88f82a4 100644 (file)
@@ -269,7 +269,7 @@ static struct ata_port_operations cs5536_port_ops = {
        .irq_clear              = ata_bmdma_irq_clear,
        .irq_on                 = ata_irq_on,
 
-       .port_start             = ata_port_start,
+       .port_start             = ata_sff_port_start,
 };
 
 /**
index cb8bdb6887dea6322e22cdb20290311b5234bf0b..c09f95a4a0d1be924511d9a18276313099945adb 100644 (file)
@@ -189,7 +189,6 @@ static int hpt3x3_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 {
        static int printed_version;
        static const struct ata_port_info info = {
-               .sht = &hpt3x3_sht,
                .flags = ATA_FLAG_SLAVE_POSS,
                .pio_mask = 0x1f,
 #if defined(CONFIG_PATA_HPT3X3_DMA)
index e0c2cc29d0ca93d60b970441ef0d4d54599aced9..25c49c2e15192e7b339ead3cb7e1cd80caf0f12f 100644 (file)
@@ -250,13 +250,13 @@ static struct scsi_host_template it8213_sht = {
        .can_queue              = ATA_DEF_QUEUE,
        .this_id                = ATA_SHT_THIS_ID,
        .sg_tablesize           = LIBATA_MAX_PRD,
-       .max_sectors            = ATA_MAX_SECTORS,
        .cmd_per_lun            = ATA_SHT_CMD_PER_LUN,
        .emulated               = ATA_SHT_EMULATED,
        .use_clustering         = ATA_SHT_USE_CLUSTERING,
        .proc_name              = DRV_NAME,
        .dma_boundary           = ATA_DMA_BOUNDARY,
        .slave_configure        = ata_scsi_slave_config,
+       .slave_destroy          = ata_scsi_slave_destroy,
        .bios_param             = ata_std_bios_param,
 };
 
index 83e38cc077e1581b2570052bd2a35d8f26e30f7c..6eb8cc9a3f1221f50a826cfe153605bec82b02a0 100644 (file)
@@ -107,7 +107,6 @@ static struct scsi_host_template ixp4xx_sht = {
 
 static struct ata_port_operations ixp4xx_port_ops = {
        .set_mode               = ixp4xx_set_mode,
-       .mode_filter            = ata_pci_default_filter,
 
        .tf_load                = ata_tf_load,
        .tf_read                = ata_tf_read,
@@ -129,7 +128,7 @@ static struct ata_port_operations ixp4xx_port_ops = {
        .irq_clear              = ata_noop_irq_clear,
        .irq_on                 = ata_irq_on,
 
-       .port_start             = ata_port_start,
+       .port_start             = ata_sff_port_start,
 };
 
 static void ixp4xx_setup_port(struct ata_port *ap,
index 00bbbbd50e97e8abe6aac0dd36fedfe8a91257d9..7d36fa85435a8b9ee883d530c73c4f3e89cbe411 100644 (file)
@@ -148,6 +148,7 @@ static const struct ata_port_operations jmicron_ops = {
        .exec_command           = ata_exec_command,
        .dev_select             = ata_std_dev_select,
 
+       .mode_filter            = ata_pci_default_filter,
        .freeze                 = ata_bmdma_freeze,
        .thaw                   = ata_bmdma_thaw,
        .error_handler          = jmicron_error_handler,
@@ -168,7 +169,7 @@ static const struct ata_port_operations jmicron_ops = {
        .irq_on                 = ata_irq_on,
 
        /* Generic PATA PCI ATA helpers */
-       .port_start             = ata_port_start,
+       .port_start             = ata_sff_port_start,
 };
 
 
index a81f25d872355df8dad4d52b04103bdde9ad640c..c4ee9b45301f75d85bd8db660cf771649c867b88 100644 (file)
@@ -118,6 +118,7 @@ static const struct ata_port_operations marvell_ops = {
        .exec_command           = ata_exec_command,
        .dev_select             = ata_std_dev_select,
 
+       .mode_filter            = ata_pci_default_filter,
        .freeze                 = ata_bmdma_freeze,
        .thaw                   = ata_bmdma_thaw,
        .error_handler          = marvell_error_handler,
index d84e0c8ea02ff214caaeba23f1bf379bca4339a9..fefe71dbed1a4a101a1b1e1b3a454e6ec119d729 100644 (file)
@@ -272,13 +272,13 @@ static struct scsi_host_template mpc52xx_ata_sht = {
        .can_queue              = ATA_DEF_QUEUE,
        .this_id                = ATA_SHT_THIS_ID,
        .sg_tablesize           = LIBATA_MAX_PRD,
-       .max_sectors            = ATA_MAX_SECTORS,
        .cmd_per_lun            = ATA_SHT_CMD_PER_LUN,
        .emulated               = ATA_SHT_EMULATED,
        .use_clustering         = ATA_SHT_USE_CLUSTERING,
        .proc_name              = DRV_NAME,
        .dma_boundary           = ATA_DMA_BOUNDARY,
        .slave_configure        = ata_scsi_slave_config,
+       .slave_destroy          = ata_scsi_slave_destroy,
        .bios_param             = ata_std_bios_param,
 };
 
@@ -298,7 +298,7 @@ static struct ata_port_operations mpc52xx_ata_port_ops = {
        .data_xfer              = ata_data_xfer,
        .irq_clear              = ata_noop_irq_clear,
        .irq_on                 = ata_irq_on,
-       .port_start             = ata_port_start,
+       .port_start             = ata_sff_port_start,
 };
 
 static int __devinit
index 0e4a08e15209e1b72eaa510dcf882709923d08fa..9fd1a84c01d35515b56082fb1961143b7f223966 100644 (file)
@@ -47,6 +47,7 @@ static const struct ata_port_operations netcell_ops = {
        .exec_command           = ata_exec_command,
        .dev_select             = ata_std_dev_select,
 
+       .mode_filter            = ata_pci_default_filter,
        .freeze                 = ata_bmdma_freeze,
        .thaw                   = ata_bmdma_thaw,
        .error_handler          = ata_bmdma_error_handler,
index 8f79447b6151a006629ce1b0aea6a94d7f030b4d..1e865f138d1c27b4c3d6733df14fdb626de00e0a 100644 (file)
@@ -196,18 +196,13 @@ static struct ata_port_operations opti_port_ops = {
        .post_internal_cmd = ata_bmdma_post_internal_cmd,
        .cable_detect   = ata_cable_40wire,
 
-       .bmdma_setup    = ata_bmdma_setup,
-       .bmdma_start    = ata_bmdma_start,
-       .bmdma_stop     = ata_bmdma_stop,
-       .bmdma_status   = ata_bmdma_status,
-
        .qc_prep        = ata_qc_prep,
        .qc_issue       = ata_qc_issue_prot,
 
        .data_xfer      = ata_data_xfer,
 
        .irq_handler    = ata_interrupt,
-       .irq_clear      = ata_bmdma_irq_clear,
+       .irq_clear      = ata_noop_irq_clear,
        .irq_on         = ata_irq_on,
 
        .port_start     = ata_sff_port_start,
index be8c421dc2aa6245dd915fa9e92a99e8e13894a7..3f9d03599f23bb661b82f8b926d56b18c9f17726 100644 (file)
@@ -370,6 +370,7 @@ static struct scsi_host_template optidma_sht = {
 static struct ata_port_operations optidma_port_ops = {
        .set_piomode    = optidma_set_pio_mode,
        .set_dmamode    = optidma_set_dma_mode,
+       .mode_filter    = ata_pci_default_filter,
 
        .tf_load        = ata_tf_load,
        .tf_read        = ata_tf_read,
@@ -404,6 +405,7 @@ static struct ata_port_operations optidma_port_ops = {
 static struct ata_port_operations optiplus_port_ops = {
        .set_piomode    = optiplus_set_pio_mode,
        .set_dmamode    = optiplus_set_dma_mode,
+       .mode_filter    = ata_pci_default_filter,
 
        .tf_load        = ata_tf_load,
        .tf_read        = ata_tf_read,
index a8429f5c3006d2b3879cdd113d9cb78f36d6d971..602f5562d6fb64417a42b7ec452ef6e9b04d3c95 100644 (file)
@@ -46,8 +46,6 @@ static int pata_platform_set_mode(struct ata_link *link, struct ata_device **unu
        return 0;
 }
 
-static int ata_dummy_ret0(struct ata_port *ap) { return 0; }
-
 static struct scsi_host_template pata_platform_sht = {
        .module                 = THIS_MODULE,
        .name                   = DRV_NAME,
@@ -88,8 +86,6 @@ static struct ata_port_operations pata_platform_port_ops = {
 
        .irq_clear              = ata_noop_irq_clear,
        .irq_on                 = ata_irq_on,
-
-       .port_start             = ata_dummy_ret0,
 };
 
 static void pata_platform_setup_port(struct ata_ioports *ioaddr,
index 08c32af1c84d4675d34452ba62fa81f7eeb20b43..22cb9e1a02f5031795e0c842f9e2a1fac64affb2 100644 (file)
@@ -117,11 +117,6 @@ static irqreturn_t rb500_pata_irq_handler(int irq, void *dev_instance)
        return IRQ_HANDLED;
 }
 
-static int rb500_pata_port_start(struct ata_port *ap)
-{
-       return 0;
-}
-
 static struct ata_port_operations rb500_pata_port_ops = {
        .tf_load                = ata_tf_load,
        .tf_read                = ata_tf_read,
@@ -138,12 +133,10 @@ static struct ata_port_operations rb500_pata_port_ops = {
        .freeze                 = rb500_pata_freeze,
        .thaw                   = rb500_pata_thaw,
        .error_handler          = ata_bmdma_error_handler,
+       .post_internal_cmd      = ata_bmdma_post_internal_cmd,
 
-       .irq_handler            = rb500_pata_irq_handler,
        .irq_clear              = ata_noop_irq_clear,
        .irq_on                 = ata_irq_on,
-
-       .port_start             = rb500_pata_port_start,
 };
 
 /* ------------------------------------------------------------------------ */
index ba8a31c55edb5fef3ab9a856fc395932b2ae7847..75b252111106543f34c8aec688ae6321a55d9dcd 100644 (file)
@@ -79,11 +79,6 @@ static struct ata_port_operations rz1000_port_ops = {
        .exec_command   = ata_exec_command,
        .dev_select     = ata_std_dev_select,
 
-       .bmdma_setup    = ata_bmdma_setup,
-       .bmdma_start    = ata_bmdma_start,
-       .bmdma_stop     = ata_bmdma_stop,
-       .bmdma_status   = ata_bmdma_status,
-
        .qc_prep        = ata_qc_prep,
        .qc_issue       = ata_qc_issue_prot,
 
@@ -96,7 +91,7 @@ static struct ata_port_operations rz1000_port_ops = {
        .cable_detect   = ata_cable_40wire,
 
        .irq_handler    = ata_interrupt,
-       .irq_clear      = ata_bmdma_irq_clear,
+       .irq_clear      = ata_noop_irq_clear,
        .irq_on         = ata_irq_on,
 
        .port_start     = ata_sff_port_start,
index 031a512cbaa88bb5bc951d3d6521640ca43eeb40..8389ecac62cdaaba8bdc3ca061c9b0bb8b367f82 100644 (file)
@@ -1216,6 +1216,7 @@ static const struct ata_port_operations sata_fsl_ops = {
 
        .tf_read = sata_fsl_tf_read,
 
+       .qc_defer = ata_std_qc_defer,
        .qc_prep = sata_fsl_qc_prep,
        .qc_issue = sata_fsl_qc_issue,
        .irq_clear = ata_noop_irq_clear,
index b3b3da4eaa0321b140440913e7e3f8157e75fae1..4685bce745bb00395697dcb0456ff3992d48ccdf 100644 (file)
@@ -557,8 +557,6 @@ static const struct ata_port_operations mv5_ops = {
        .exec_command           = ata_exec_command,
        .dev_select             = ata_std_dev_select,
 
-       .cable_detect           = ata_cable_sata,
-
        .qc_prep                = mv_qc_prep,
        .qc_issue               = mv_qc_issue,
        .data_xfer              = ata_data_xfer,
@@ -585,8 +583,6 @@ static const struct ata_port_operations mv6_ops = {
        .exec_command           = ata_exec_command,
        .dev_select             = ata_std_dev_select,
 
-       .cable_detect           = ata_cable_sata,
-
        .qc_prep                = mv_qc_prep,
        .qc_issue               = mv_qc_issue,
        .data_xfer              = ata_data_xfer,
@@ -613,8 +609,6 @@ static const struct ata_port_operations mv_iie_ops = {
        .exec_command           = ata_exec_command,
        .dev_select             = ata_std_dev_select,
 
-       .cable_detect           = ata_cable_sata,
-
        .qc_prep                = mv_qc_prep_iie,
        .qc_issue               = mv_qc_issue,
        .data_xfer              = ata_data_xfer,
index 75b76535c7202dc11ef41f5fec5537551d98eb74..bd5b6c35ee5d8c5ac318964db4236db7432be7fb 100644 (file)
@@ -452,6 +452,7 @@ static const struct ata_port_operations nv_generic_ops = {
        .bmdma_status           = ata_bmdma_status,
        .qc_prep                = ata_qc_prep,
        .qc_issue               = ata_qc_issue_prot,
+       .mode_filter            = ata_pci_default_filter,
        .freeze                 = ata_bmdma_freeze,
        .thaw                   = ata_bmdma_thaw,
        .error_handler          = nv_error_handler,
@@ -461,7 +462,7 @@ static const struct ata_port_operations nv_generic_ops = {
        .irq_on                 = ata_irq_on,
        .scr_read               = nv_scr_read,
        .scr_write              = nv_scr_write,
-       .port_start             = ata_port_start,
+       .port_start             = ata_sff_port_start,
 };
 
 static const struct ata_port_operations nv_nf2_ops = {
@@ -476,6 +477,7 @@ static const struct ata_port_operations nv_nf2_ops = {
        .bmdma_status           = ata_bmdma_status,
        .qc_prep                = ata_qc_prep,
        .qc_issue               = ata_qc_issue_prot,
+       .mode_filter            = ata_pci_default_filter,
        .freeze                 = nv_nf2_freeze,
        .thaw                   = nv_nf2_thaw,
        .error_handler          = nv_error_handler,
@@ -485,7 +487,7 @@ static const struct ata_port_operations nv_nf2_ops = {
        .irq_on                 = ata_irq_on,
        .scr_read               = nv_scr_read,
        .scr_write              = nv_scr_write,
-       .port_start             = ata_port_start,
+       .port_start             = ata_sff_port_start,
 };
 
 static const struct ata_port_operations nv_ck804_ops = {
@@ -500,6 +502,7 @@ static const struct ata_port_operations nv_ck804_ops = {
        .bmdma_status           = ata_bmdma_status,
        .qc_prep                = ata_qc_prep,
        .qc_issue               = ata_qc_issue_prot,
+       .mode_filter            = ata_pci_default_filter,
        .freeze                 = nv_ck804_freeze,
        .thaw                   = nv_ck804_thaw,
        .error_handler          = nv_error_handler,
@@ -509,7 +512,7 @@ static const struct ata_port_operations nv_ck804_ops = {
        .irq_on                 = ata_irq_on,
        .scr_read               = nv_scr_read,
        .scr_write              = nv_scr_write,
-       .port_start             = ata_port_start,
+       .port_start             = ata_sff_port_start,
        .host_stop              = nv_ck804_host_stop,
 };
 
@@ -527,6 +530,7 @@ static const struct ata_port_operations nv_adma_ops = {
        .qc_defer               = ata_std_qc_defer,
        .qc_prep                = nv_adma_qc_prep,
        .qc_issue               = nv_adma_qc_issue,
+       .mode_filter            = ata_pci_default_filter,
        .freeze                 = nv_adma_freeze,
        .thaw                   = nv_adma_thaw,
        .error_handler          = nv_adma_error_handler,
@@ -558,6 +562,7 @@ static const struct ata_port_operations nv_swncq_ops = {
        .qc_defer               = ata_std_qc_defer,
        .qc_prep                = nv_swncq_qc_prep,
        .qc_issue               = nv_swncq_qc_issue,
+       .mode_filter            = ata_pci_default_filter,
        .freeze                 = nv_mcp55_freeze,
        .thaw                   = nv_mcp55_thaw,
        .error_handler          = nv_swncq_error_handler,
index 7052915a31b6ee940ea2ac5d21cd4c30e555cdb3..53f0bae3be43dbad61a0d61c1785499c158c8c6b 100644 (file)
@@ -192,6 +192,7 @@ static const struct ata_port_operations sil_ops = {
        .exec_command           = ata_exec_command,
        .dev_select             = ata_std_dev_select,
        .set_mode               = sil_set_mode,
+       .mode_filter            = ata_pci_default_filter,
        .bmdma_setup            = ata_bmdma_setup,
        .bmdma_start            = ata_bmdma_start,
        .bmdma_stop             = ata_bmdma_stop,
@@ -207,7 +208,7 @@ static const struct ata_port_operations sil_ops = {
        .irq_on                 = ata_irq_on,
        .scr_read               = sil_scr_read,
        .scr_write              = sil_scr_write,
-       .port_start             = ata_port_start,
+       .port_start             = ata_sff_port_start,
 };
 
 static const struct ata_port_info sil_port_info[] = {
index a01260a564324490787c4a93cba20778cd4dbb8f..a8adef9786b76fdb21993580865dfbde2a22e4b2 100644 (file)
@@ -116,6 +116,7 @@ static const struct ata_port_operations sis_ops = {
        .qc_prep                = ata_qc_prep,
        .qc_issue               = ata_qc_issue_prot,
        .data_xfer              = ata_data_xfer,
+       .mode_filter            = ata_pci_default_filter,
        .freeze                 = ata_bmdma_freeze,
        .thaw                   = ata_bmdma_thaw,
        .error_handler          = ata_bmdma_error_handler,
@@ -124,7 +125,7 @@ static const struct ata_port_operations sis_ops = {
        .irq_on                 = ata_irq_on,
        .scr_read               = sis_scr_read,
        .scr_write              = sis_scr_write,
-       .port_start             = ata_port_start,
+       .port_start             = ata_sff_port_start,
 };
 
 static const struct ata_port_info sis_port_info = {
index 019e367b59fc3e9293df0800606010f950a31597..aa690142fa90962140e4bab75641eb098a74cc64 100644 (file)
@@ -362,6 +362,7 @@ static const struct ata_port_operations k2_sata_ops = {
        .qc_prep                = ata_qc_prep,
        .qc_issue               = ata_qc_issue_prot,
        .data_xfer              = ata_data_xfer,
+       .mode_filter            = ata_pci_default_filter,
        .freeze                 = ata_bmdma_freeze,
        .thaw                   = ata_bmdma_thaw,
        .error_handler          = ata_bmdma_error_handler,
@@ -370,7 +371,7 @@ static const struct ata_port_operations k2_sata_ops = {
        .irq_on                 = ata_irq_on,
        .scr_read               = k2_sata_scr_read,
        .scr_write              = k2_sata_scr_write,
-       .port_start             = ata_port_start,
+       .port_start             = ata_sff_port_start,
 };
 
 static const struct ata_port_info k2_port_info[] = {
index e710e71b7b92ca89da03b14c1266d83dacc7dd19..f7fc0450478b03600278d15e54ccfd2d6574ba23 100644 (file)
@@ -108,6 +108,7 @@ static const struct ata_port_operations uli_ops = {
        .qc_issue               = ata_qc_issue_prot,
        .data_xfer              = ata_data_xfer,
 
+       .mode_filter            = ata_pci_default_filter,
        .freeze                 = ata_bmdma_freeze,
        .thaw                   = ata_bmdma_thaw,
        .error_handler          = ata_bmdma_error_handler,
@@ -119,7 +120,7 @@ static const struct ata_port_operations uli_ops = {
        .scr_read               = uli_scr_read,
        .scr_write              = uli_scr_write,
 
-       .port_start             = ata_port_start,
+       .port_start             = ata_sff_port_start,
 };
 
 static const struct ata_port_info uli_port_info = {
index c0e0f1d18d50a38901596dda1de68d089b3b6487..f66ffd7da54e5551172f0c58a909683e2acfda0d 100644 (file)
@@ -118,6 +118,8 @@ static struct scsi_host_template svia_sht = {
 };
 
 static const struct ata_port_operations vt6420_sata_ops = {
+       .mode_filter            = ata_pci_default_filter,
+
        .tf_load                = ata_tf_load,
        .tf_read                = ata_tf_read,
        .check_status           = ata_check_status,
@@ -141,12 +143,13 @@ static const struct ata_port_operations vt6420_sata_ops = {
        .irq_clear              = ata_bmdma_irq_clear,
        .irq_on                 = ata_irq_on,
 
-       .port_start             = ata_port_start,
+       .port_start             = ata_sff_port_start,
 };
 
 static const struct ata_port_operations vt6421_pata_ops = {
        .set_piomode            = vt6421_set_pio_mode,
        .set_dmamode            = vt6421_set_dma_mode,
+       .mode_filter            = ata_pci_default_filter,
 
        .tf_load                = ata_tf_load,
        .tf_read                = ata_tf_read,
@@ -172,10 +175,12 @@ static const struct ata_port_operations vt6421_pata_ops = {
        .irq_clear              = ata_bmdma_irq_clear,
        .irq_on                 = ata_irq_on,
 
-       .port_start             = ata_port_start,
+       .port_start             = ata_sff_port_start,
 };
 
 static const struct ata_port_operations vt6421_sata_ops = {
+       .mode_filter            = ata_pci_default_filter,
+
        .tf_load                = ata_tf_load,
        .tf_read                = ata_tf_read,
        .check_status           = ata_check_status,
@@ -195,7 +200,6 @@ static const struct ata_port_operations vt6421_sata_ops = {
        .thaw                   = ata_bmdma_thaw,
        .error_handler          = ata_bmdma_error_handler,
        .post_internal_cmd      = ata_bmdma_post_internal_cmd,
-       .cable_detect           = ata_cable_sata,
 
        .irq_clear              = ata_bmdma_irq_clear,
        .irq_on                 = ata_irq_on,
@@ -203,7 +207,7 @@ static const struct ata_port_operations vt6421_sata_ops = {
        .scr_read               = svia_scr_read,
        .scr_write              = svia_scr_write,
 
-       .port_start             = ata_port_start,
+       .port_start             = ata_sff_port_start,
 };
 
 static const struct ata_port_info vt6420_port_info = {
index 95ae3ed24a9dd39eb6b223e87dbb16b918ba2108..099a2ba4cd4fad4f6594fb3aa29e2057eb38a42a 100644 (file)
@@ -331,6 +331,7 @@ static const struct ata_port_operations vsc_sata_ops = {
        .qc_prep                = ata_qc_prep,
        .qc_issue               = ata_qc_issue_prot,
        .data_xfer              = ata_data_xfer,
+       .mode_filter            = ata_pci_default_filter,
        .freeze                 = vsc_freeze,
        .thaw                   = vsc_thaw,
        .error_handler          = ata_bmdma_error_handler,
@@ -339,7 +340,7 @@ static const struct ata_port_operations vsc_sata_ops = {
        .irq_on                 = ata_irq_on,
        .scr_read               = vsc_sata_scr_read,
        .scr_write              = vsc_sata_scr_write,
-       .port_start             = ata_port_start,
+       .port_start             = ata_sff_port_start,
 };
 
 static void __devinit vsc_sata_setup_port(struct ata_ioports *port,