Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 62002
b: refs/heads/master
c: a9cf5e8
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Jul 20, 2007
1 parent 8fc7dbf commit d808167
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 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: 91c4a2e09267b0ddc8e59d121e3748cd18675739
refs/heads/master: a9cf5e858100b2f82ad61028c26a1a3de11c4839
14 changes: 10 additions & 4 deletions trunk/drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1023,8 +1023,8 @@ static int ahci_exec_polled_cmd(struct ata_port *ap, int pmp,
return 0;
}

static int ahci_softreset(struct ata_port *ap, unsigned int *class,
unsigned long deadline)
static int ahci_do_softreset(struct ata_port *ap, unsigned int *class,
int pmp, unsigned long deadline)
{
const char *reason = NULL;
unsigned long now, msecs;
Expand Down Expand Up @@ -1054,7 +1054,7 @@ static int ahci_softreset(struct ata_port *ap, unsigned int *class,
msecs = jiffies_to_msecs(deadline - now);

tf.ctl |= ATA_SRST;
if (ahci_exec_polled_cmd(ap, 0, &tf, 0,
if (ahci_exec_polled_cmd(ap, pmp, &tf, 0,
AHCI_CMD_RESET | AHCI_CMD_CLR_BUSY, msecs)) {
rc = -EIO;
reason = "1st FIS failed";
Expand All @@ -1066,7 +1066,7 @@ static int ahci_softreset(struct ata_port *ap, unsigned int *class,

/* issue the second D2H Register FIS */
tf.ctl &= ~ATA_SRST;
ahci_exec_polled_cmd(ap, 0, &tf, 0, 0, 0);
ahci_exec_polled_cmd(ap, pmp, &tf, 0, 0, 0);

/* spec mandates ">= 2ms" before checking status.
* We wait 150ms, because that was the magic delay used for
Expand Down Expand Up @@ -1094,6 +1094,12 @@ static int ahci_softreset(struct ata_port *ap, unsigned int *class,
return rc;
}

static int ahci_softreset(struct ata_port *ap, unsigned int *class,
unsigned long deadline)
{
return ahci_do_softreset(ap, class, 0, deadline);
}

static int ahci_hardreset(struct ata_port *ap, unsigned int *class,
unsigned long deadline)
{
Expand Down

0 comments on commit d808167

Please sign in to comment.