aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/ata_piix.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2008-03-24 23:22:48 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-04-17 15:44:17 -0400
commit6bd99b4e0998571808fc1f09d5162348f21ff8c1 (patch)
treee338bd445aaa5cda4bbf1f5598acf70f0d6b68de /drivers/ata/ata_piix.c
parent358f9a77a668660729e705fde9c3cf69f013aa98 (diff)
libata: normalize port_info, port_operations and sht tables
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>
Diffstat (limited to 'drivers/ata/ata_piix.c')
-rw-r--r--drivers/ata/ata_piix.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index fae8404254c0..067760a16889 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -336,7 +336,7 @@ static const struct ata_port_operations piix_pata_ops = {
336 .irq_clear = ata_bmdma_irq_clear, 336 .irq_clear = ata_bmdma_irq_clear,
337 .irq_on = ata_irq_on, 337 .irq_on = ata_irq_on,
338 338
339 .port_start = ata_port_start, 339 .port_start = ata_sff_port_start,
340}; 340};
341 341
342static const struct ata_port_operations ich_pata_ops = { 342static const struct ata_port_operations ich_pata_ops = {
@@ -367,7 +367,7 @@ static const struct ata_port_operations ich_pata_ops = {
367 .irq_clear = ata_bmdma_irq_clear, 367 .irq_clear = ata_bmdma_irq_clear,
368 .irq_on = ata_irq_on, 368 .irq_on = ata_irq_on,
369 369
370 .port_start = ata_port_start, 370 .port_start = ata_sff_port_start,
371}; 371};
372 372
373static const struct ata_port_operations piix_sata_ops = { 373static const struct ata_port_operations piix_sata_ops = {
@@ -385,6 +385,7 @@ static const struct ata_port_operations piix_sata_ops = {
385 .qc_issue = ata_qc_issue_prot, 385 .qc_issue = ata_qc_issue_prot,
386 .data_xfer = ata_data_xfer, 386 .data_xfer = ata_data_xfer,
387 387
388 .mode_filter = ata_pci_default_filter,
388 .freeze = ata_bmdma_freeze, 389 .freeze = ata_bmdma_freeze,
389 .thaw = ata_bmdma_thaw, 390 .thaw = ata_bmdma_thaw,
390 .error_handler = ata_bmdma_error_handler, 391 .error_handler = ata_bmdma_error_handler,
@@ -393,7 +394,7 @@ static const struct ata_port_operations piix_sata_ops = {
393 .irq_clear = ata_bmdma_irq_clear, 394 .irq_clear = ata_bmdma_irq_clear,
394 .irq_on = ata_irq_on, 395 .irq_on = ata_irq_on,
395 396
396 .port_start = ata_port_start, 397 .port_start = ata_sff_port_start,
397}; 398};
398 399
399static const struct ata_port_operations piix_vmw_ops = { 400static const struct ata_port_operations piix_vmw_ops = {
@@ -425,7 +426,7 @@ static const struct ata_port_operations piix_vmw_ops = {
425 .irq_clear = ata_bmdma_irq_clear, 426 .irq_clear = ata_bmdma_irq_clear,
426 .irq_on = ata_irq_on, 427 .irq_on = ata_irq_on,
427 428
428 .port_start = ata_port_start, 429 .port_start = ata_sff_port_start,
429}; 430};
430 431
431static const struct ata_port_operations piix_sidpr_sata_ops = { 432static const struct ata_port_operations piix_sidpr_sata_ops = {
@@ -446,6 +447,7 @@ static const struct ata_port_operations piix_sidpr_sata_ops = {
446 .scr_read = piix_sidpr_scr_read, 447 .scr_read = piix_sidpr_scr_read,
447 .scr_write = piix_sidpr_scr_write, 448 .scr_write = piix_sidpr_scr_write,
448 449
450 .mode_filter = ata_pci_default_filter,
449 .freeze = ata_bmdma_freeze, 451 .freeze = ata_bmdma_freeze,
450 .thaw = ata_bmdma_thaw, 452 .thaw = ata_bmdma_thaw,
451 .error_handler = piix_sidpr_error_handler, 453 .error_handler = piix_sidpr_error_handler,
@@ -454,7 +456,7 @@ static const struct ata_port_operations piix_sidpr_sata_ops = {
454 .irq_clear = ata_bmdma_irq_clear, 456 .irq_clear = ata_bmdma_irq_clear,
455 .irq_on = ata_irq_on, 457 .irq_on = ata_irq_on,
456 458
457 .port_start = ata_port_start, 459 .port_start = ata_sff_port_start,
458}; 460};
459 461
460static const struct piix_map_db ich5_map_db = { 462static const struct piix_map_db ich5_map_db = {
@@ -683,7 +685,6 @@ static struct ata_port_info piix_port_info[] = {
683 685
684 [piix_pata_vmw] = 686 [piix_pata_vmw] =
685 { 687 {
686 .sht = &piix_sht,
687 .flags = PIIX_PATA_FLAGS, 688 .flags = PIIX_PATA_FLAGS,
688 .pio_mask = 0x1f, /* pio0-4 */ 689 .pio_mask = 0x1f, /* pio0-4 */
689 .mwdma_mask = 0x06, /* mwdma1-2 ?? CHECK 0 should be ok but slow */ 690 .mwdma_mask = 0x06, /* mwdma1-2 ?? CHECK 0 should be ok but slow */