Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 89285
b: refs/heads/master
c: 45db2f6
h: refs/heads/master
i:
  89283: 619052a
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Apr 17, 2008
1 parent 12f6947 commit b478818
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 33 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: 2a0c15ca39f5881aa1b472ca856bb7a2e584ece7
refs/heads/master: 45db2f6c95eee7c6622ea1b3edb9abafba58e3ab
6 changes: 0 additions & 6 deletions trunk/drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1273,12 +1273,6 @@ static int ahci_softreset(struct ata_link *link, unsigned int *class,

DPRINTK("ENTER\n");

if (ata_link_offline(link)) {
DPRINTK("PHY reports no device\n");
*class = ATA_DEV_NONE;
return 0;
}

/* prepare for SRST (AHCI-1.1 10.4.1) */
rc = ahci_kick_engine(ap, 1);
if (rc && rc != -EOPNOTSUPP)
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3541,6 +3541,10 @@ int ata_std_prereset(struct ata_link *link, unsigned long deadline)
"link for reset (errno=%d)\n", rc);
}

/* no point in trying softreset on offline link */
if (ata_link_offline(link))
ehc->i.action &= ~ATA_EH_SOFTRESET;

return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ata/libata-eh.c
Original file line number Diff line number Diff line change
Expand Up @@ -2065,7 +2065,7 @@ static int ata_eh_followup_srst_needed(struct ata_link *link,
int rc, int classify,
const unsigned int *classes)
{
if (link->flags & ATA_LFLAG_NO_SRST)
if ((link->flags & ATA_LFLAG_NO_SRST) || ata_link_offline(link))
return 0;
if (rc == -EAGAIN) {
if (classify)
Expand Down
6 changes: 0 additions & 6 deletions trunk/drivers/ata/libata-sff.c
Original file line number Diff line number Diff line change
Expand Up @@ -1889,11 +1889,6 @@ int ata_sff_softreset(struct ata_link *link, unsigned int *classes,

DPRINTK("ENTER\n");

if (ata_link_offline(link)) {
classes[0] = ATA_DEV_NONE;
goto out;
}

/* determine if device 0/1 are present */
if (ata_devchk(ap, 0))
devmask |= (1 << 0);
Expand All @@ -1919,7 +1914,6 @@ int ata_sff_softreset(struct ata_link *link, unsigned int *classes,
classes[1] = ata_sff_dev_classify(&link->device[1],
devmask & (1 << 1), &err);

out:
DPRINTK("EXIT, classes[0]=%u [1]=%u\n", classes[0], classes[1]);
return 0;
}
Expand Down
6 changes: 0 additions & 6 deletions trunk/drivers/ata/pata_bf54x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1103,11 +1103,6 @@ static int bfin_softreset(struct ata_link *link, unsigned int *classes,
unsigned int devmask = 0, err_mask;
u8 err;

if (ata_link_offline(link)) {
classes[0] = ATA_DEV_NONE;
goto out;
}

/* determine if device 0/1 are present */
if (bfin_devchk(ap, 0))
devmask |= (1 << 0);
Expand All @@ -1132,7 +1127,6 @@ static int bfin_softreset(struct ata_link *link, unsigned int *classes,
classes[1] = ata_sff_dev_classify(&ap->link.device[1],
devmask & (1 << 1), &err);

out:
return 0;
}

Expand Down
6 changes: 0 additions & 6 deletions trunk/drivers/ata/pata_scc.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,11 +615,6 @@ static int scc_softreset(struct ata_link *link, unsigned int *classes,

DPRINTK("ENTER\n");

if (ata_link_offline(link)) {
classes[0] = ATA_DEV_NONE;
goto out;
}

/* determine if device 0/1 are present */
if (scc_devchk(ap, 0))
devmask |= (1 << 0);
Expand All @@ -645,7 +640,6 @@ static int scc_softreset(struct ata_link *link, unsigned int *classes,
classes[1] = ata_sff_dev_classify(&ap->link.device[1],
devmask & (1 << 1), &err);

out:
DPRINTK("EXIT, classes[0]=%u [1]=%u\n", classes[0], classes[1]);
return 0;
}
Expand Down
10 changes: 10 additions & 0 deletions trunk/drivers/ata/sata_fsl.c
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,15 @@ static unsigned int sata_fsl_dev_classify(struct ata_port *ap)
return ata_dev_classify(&tf);
}

static int sata_fsl_prereset(struct ata_linke *link, unsigned long deadline)
{
/* FIXME: Never skip softreset, sata_fsl_softreset() is
* combination of soft and hard resets. sata_fsl_softreset()
* needs to be splitted into soft and hard resets.
*/
return 0;
}

static int sata_fsl_softreset(struct ata_link *link, unsigned int *class,
unsigned long deadline)
{
Expand Down Expand Up @@ -1157,6 +1166,7 @@ static const struct ata_port_operations sata_fsl_ops = {

.freeze = sata_fsl_freeze,
.thaw = sata_fsl_thaw,
.prereset = sata_fsl_prereset,
.softreset = sata_fsl_softreset,
.post_internal_cmd = sata_fsl_post_internal_cmd,

Expand Down
7 changes: 0 additions & 7 deletions trunk/drivers/ata/sata_sil24.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,12 +663,6 @@ static int sil24_softreset(struct ata_link *link, unsigned int *class,

DPRINTK("ENTER\n");

if (ata_link_offline(link)) {
DPRINTK("PHY reports no device\n");
*class = ATA_DEV_NONE;
goto out;
}

/* put the port into known state */
if (sil24_init_port(ap)) {
reason = "port not ready";
Expand All @@ -693,7 +687,6 @@ static int sil24_softreset(struct ata_link *link, unsigned int *class,
sil24_read_tf(ap, 0, &tf);
*class = ata_dev_classify(&tf);

out:
DPRINTK("EXIT, class=%u\n", *class);
return 0;

Expand Down

0 comments on commit b478818

Please sign in to comment.