Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61999
b: refs/heads/master
c: 2cbb79e
h: refs/heads/master
i:
  61997: 84e7cfa
  61995: ba1ed42
  61991: 5f667f2
  61983: 1526d45
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Jul 20, 2007
1 parent 15bd8ba commit 2065b91
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: 9977126c4b65c1396b665f7a0eeb8c7dede336f9
refs/heads/master: 2cbb79ebbd4be07041368da5379a64f89f8ad518
8 changes: 7 additions & 1 deletion trunk/drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,7 @@ static int ahci_softreset(struct ata_port *ap, unsigned int *class,
void __iomem *port_mmio = ahci_port_base(ap);
const u32 cmd_fis_len = 5; /* five dwords */
const char *reason = NULL;
unsigned long now, msecs;
struct ata_taskfile tf;
u32 tmp;
u8 *fis;
Expand Down Expand Up @@ -1016,6 +1017,11 @@ static int ahci_softreset(struct ata_port *ap, unsigned int *class,
fis = pp->cmd_tbl;

/* issue the first D2H Register FIS */
msecs = 0;
now = jiffies;
if (time_after(now, deadline))
msecs = jiffies_to_msecs(deadline - now);

ahci_fill_cmd_slot(pp, 0,
cmd_fis_len | AHCI_CMD_RESET | AHCI_CMD_CLR_BUSY);

Expand All @@ -1024,7 +1030,7 @@ static int ahci_softreset(struct ata_port *ap, unsigned int *class,

writel(1, port_mmio + PORT_CMD_ISSUE);

tmp = ata_wait_register(port_mmio + PORT_CMD_ISSUE, 0x1, 0x1, 1, 500);
tmp = ata_wait_register(port_mmio + PORT_CMD_ISSUE, 0x1, 0x1, 1, msecs);
if (tmp & 0x1) {
rc = -EIO;
reason = "1st FIS failed";
Expand Down

0 comments on commit 2065b91

Please sign in to comment.