Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35361
b: refs/heads/master
c: 9f59205
h: refs/heads/master
i:
  35359: d99fab1
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Jul 29, 2006
1 parent 85243dd commit cda776f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 20 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: d8fcd116d203dfe2f6c272d0cd67724b172f1bc2
refs/heads/master: 9f5920567bfabbd1be26112a31c44652b6587394
21 changes: 2 additions & 19 deletions trunk/drivers/scsi/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,32 +406,15 @@ static void ahci_scr_write (struct ata_port *ap, unsigned int sc_reg_in,
writel(val, (void __iomem *) ap->ioaddr.scr_addr + (sc_reg * 4));
}

static int ahci_start_engine(void __iomem *port_mmio)
static void ahci_start_engine(void __iomem *port_mmio)
{
u32 tmp;

/* get current status */
tmp = readl(port_mmio + PORT_CMD);

/* AHCI rev 1.1 section 10.3.1:
* Software shall not set PxCMD.ST to '1' until it verifies
* that PxCMD.CR is '0' and has set PxCMD.FRE to '1'
*/
if ((tmp & PORT_CMD_FIS_RX) == 0)
return -EPERM;

/* wait for engine to become idle */
tmp = ata_wait_register(port_mmio + PORT_CMD,
PORT_CMD_LIST_ON, PORT_CMD_LIST_ON, 1,500);
if (tmp & PORT_CMD_LIST_ON)
return -EBUSY;

/* start DMA */
tmp = readl(port_mmio + PORT_CMD);
tmp |= PORT_CMD_START;
writel(tmp, port_mmio + PORT_CMD);
readl(port_mmio + PORT_CMD); /* flush */

return 0;
}

static int ahci_stop_engine(void __iomem *port_mmio)
Expand Down

0 comments on commit cda776f

Please sign in to comment.