Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42150
b: refs/heads/master
c: 8e16f94
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo committed Dec 3, 2006
1 parent c50a8bf commit 7e52a47
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 70e6ad0c6d1e6cb9ee3c036a85ca2561eb1fd766
refs/heads/master: 8e16f941226f15622fbbc416a1f3d8705001a191
14 changes: 7 additions & 7 deletions trunk/drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,9 +612,6 @@ static void ahci_power_down(void __iomem *port_mmio, u32 cap)
static void ahci_init_port(void __iomem *port_mmio, u32 cap,
dma_addr_t cmd_slot_dma, dma_addr_t rx_fis_dma)
{
/* power up */
ahci_power_up(port_mmio, cap);

/* enable FIS reception */
ahci_start_fis_rx(port_mmio, cap, cmd_slot_dma, rx_fis_dma);

Expand All @@ -640,9 +637,6 @@ static int ahci_deinit_port(void __iomem *port_mmio, u32 cap, const char **emsg)
return rc;
}

/* put device into slumber mode */
ahci_power_down(port_mmio, cap);

return 0;
}

Expand Down Expand Up @@ -1321,7 +1315,9 @@ static int ahci_port_suspend(struct ata_port *ap, pm_message_t mesg)
int rc;

rc = ahci_deinit_port(port_mmio, hpriv->cap, &emsg);
if (rc) {
if (rc == 0)
ahci_power_down(port_mmio, hpriv->cap);
else {
ata_port_printk(ap, KERN_ERR, "%s (%d)\n", emsg, rc);
ahci_init_port(port_mmio, hpriv->cap,
pp->cmd_slot_dma, pp->rx_fis_dma);
Expand All @@ -1337,6 +1333,7 @@ static int ahci_port_resume(struct ata_port *ap)
void __iomem *mmio = ap->host->mmio_base;
void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no);

ahci_power_up(port_mmio, hpriv->cap);
ahci_init_port(port_mmio, hpriv->cap, pp->cmd_slot_dma, pp->rx_fis_dma);

return 0;
Expand Down Expand Up @@ -1443,6 +1440,9 @@ static int ahci_port_start(struct ata_port *ap)

ap->private_data = pp;

/* power up port */
ahci_power_up(port_mmio, hpriv->cap);

/* initialize port */
ahci_init_port(port_mmio, hpriv->cap, pp->cmd_slot_dma, pp->rx_fis_dma);

Expand Down

0 comments on commit 7e52a47

Please sign in to comment.