Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29225
b: refs/heads/master
c: 5eb45c0
h: refs/heads/master
i:
  29223: 9b28244
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Apr 2, 2006
1 parent ad73b5e commit e13e889
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 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: d63cb4a6365aa161341fc365df1edc87cd00c9c0
refs/heads/master: 5eb45c02a9944e813a0b82457607557a1f2c64b5
23 changes: 10 additions & 13 deletions trunk/drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1961,12 +1961,8 @@ static int ata_dev_set_mode(struct ata_port *ap, struct ata_device *dev)
}

rc = ata_dev_revalidate(ap, dev, 0);
if (rc) {
printk(KERN_ERR
"ata%u: failed to revalidate after set xfermode\n",
ap->id);
if (rc)
return rc;
}

DPRINTK("xfer_shift=%u, xfer_mode=0x%x\n",
dev->xfer_shift, (int)dev->xfer_mode);
Expand Down Expand Up @@ -2786,15 +2782,14 @@ static int ata_dev_same_device(struct ata_port *ap, struct ata_device *dev,
int ata_dev_revalidate(struct ata_port *ap, struct ata_device *dev,
int post_reset)
{
unsigned int class;
u16 *id;
unsigned int class = dev->class;
u16 *id = NULL;
int rc;

if (!ata_dev_enabled(dev))
return -ENODEV;

class = dev->class;
id = NULL;
if (!ata_dev_enabled(dev)) {
rc = -ENODEV;
goto fail;
}

/* allocate & read ID data */
rc = ata_dev_read_id(ap, dev, &class, post_reset, &id);
Expand All @@ -2811,7 +2806,9 @@ int ata_dev_revalidate(struct ata_port *ap, struct ata_device *dev,
dev->id = id;

/* configure device according to the new ID */
return ata_dev_configure(ap, dev, 0);
rc = ata_dev_configure(ap, dev, 0);
if (rc == 0)
return 0;

fail:
printk(KERN_ERR "ata%u: dev %u revalidation failed (errno=%d)\n",
Expand Down

0 comments on commit e13e889

Please sign in to comment.