diff options
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/ahci.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 4f2c05ef1f09..779a2b0aadda 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -228,9 +228,9 @@ static void ahci_thaw(struct ata_port *ap); | |||
228 | static void ahci_error_handler(struct ata_port *ap); | 228 | static void ahci_error_handler(struct ata_port *ap); |
229 | static void ahci_vt8251_error_handler(struct ata_port *ap); | 229 | static void ahci_vt8251_error_handler(struct ata_port *ap); |
230 | static void ahci_post_internal_cmd(struct ata_queued_cmd *qc); | 230 | static void ahci_post_internal_cmd(struct ata_queued_cmd *qc); |
231 | static int ahci_port_resume(struct ata_port *ap); | ||
231 | #ifdef CONFIG_PM | 232 | #ifdef CONFIG_PM |
232 | static int ahci_port_suspend(struct ata_port *ap, pm_message_t mesg); | 233 | static int ahci_port_suspend(struct ata_port *ap, pm_message_t mesg); |
233 | static int ahci_port_resume(struct ata_port *ap); | ||
234 | static int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); | 234 | static int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); |
235 | static int ahci_pci_device_resume(struct pci_dev *pdev); | 235 | static int ahci_pci_device_resume(struct pci_dev *pdev); |
236 | #endif | 236 | #endif |
@@ -740,7 +740,7 @@ static void ahci_power_down(struct ata_port *ap) | |||
740 | } | 740 | } |
741 | #endif | 741 | #endif |
742 | 742 | ||
743 | static void ahci_init_port(struct ata_port *ap) | 743 | static void ahci_start_port(struct ata_port *ap) |
744 | { | 744 | { |
745 | /* enable FIS reception */ | 745 | /* enable FIS reception */ |
746 | ahci_start_fis_rx(ap); | 746 | ahci_start_fis_rx(ap); |
@@ -1242,7 +1242,7 @@ static void ahci_error_intr(struct ata_port *ap, u32 irq_stat) | |||
1242 | ata_port_abort(ap); | 1242 | ata_port_abort(ap); |
1243 | } | 1243 | } |
1244 | 1244 | ||
1245 | static void ahci_host_intr(struct ata_port *ap) | 1245 | static void ahci_port_intr(struct ata_port *ap) |
1246 | { | 1246 | { |
1247 | void __iomem *port_mmio = ap->ioaddr.cmd_addr; | 1247 | void __iomem *port_mmio = ap->ioaddr.cmd_addr; |
1248 | struct ata_eh_info *ehi = &ap->eh_info; | 1248 | struct ata_eh_info *ehi = &ap->eh_info; |
@@ -1368,7 +1368,7 @@ static irqreturn_t ahci_interrupt(int irq, void *dev_instance) | |||
1368 | 1368 | ||
1369 | ap = host->ports[i]; | 1369 | ap = host->ports[i]; |
1370 | if (ap) { | 1370 | if (ap) { |
1371 | ahci_host_intr(ap); | 1371 | ahci_port_intr(ap); |
1372 | VPRINTK("port %u\n", i); | 1372 | VPRINTK("port %u\n", i); |
1373 | } else { | 1373 | } else { |
1374 | VPRINTK("port %u (no irq)\n", i); | 1374 | VPRINTK("port %u (no irq)\n", i); |
@@ -1476,7 +1476,7 @@ static int ahci_port_suspend(struct ata_port *ap, pm_message_t mesg) | |||
1476 | ahci_power_down(ap); | 1476 | ahci_power_down(ap); |
1477 | else { | 1477 | else { |
1478 | ata_port_printk(ap, KERN_ERR, "%s (%d)\n", emsg, rc); | 1478 | ata_port_printk(ap, KERN_ERR, "%s (%d)\n", emsg, rc); |
1479 | ahci_init_port(ap); | 1479 | ahci_start_port(ap); |
1480 | } | 1480 | } |
1481 | 1481 | ||
1482 | return rc; | 1482 | return rc; |
@@ -1485,7 +1485,7 @@ static int ahci_port_suspend(struct ata_port *ap, pm_message_t mesg) | |||
1485 | static int ahci_port_resume(struct ata_port *ap) | 1485 | static int ahci_port_resume(struct ata_port *ap) |
1486 | { | 1486 | { |
1487 | ahci_power_up(ap); | 1487 | ahci_power_up(ap); |
1488 | ahci_init_port(ap); | 1488 | ahci_start_port(ap); |
1489 | 1489 | ||
1490 | return 0; | 1490 | return 0; |
1491 | } | 1491 | } |
@@ -1583,13 +1583,8 @@ static int ahci_port_start(struct ata_port *ap) | |||
1583 | 1583 | ||
1584 | ap->private_data = pp; | 1584 | ap->private_data = pp; |
1585 | 1585 | ||
1586 | /* power up port */ | 1586 | /* engage engines, captain */ |
1587 | ahci_power_up(ap); | 1587 | return ahci_port_resume(ap); |
1588 | |||
1589 | /* initialize port */ | ||
1590 | ahci_init_port(ap); | ||
1591 | |||
1592 | return 0; | ||
1593 | } | 1588 | } |
1594 | 1589 | ||
1595 | static void ahci_port_stop(struct ata_port *ap) | 1590 | static void ahci_port_stop(struct ata_port *ap) |