diff options
| -rw-r--r-- | drivers/scsi/libata-core.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 15d6c24c8e54..f39352a3ac11 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
| @@ -1961,12 +1961,8 @@ static int ata_dev_set_mode(struct ata_port *ap, struct ata_device *dev) | |||
| 1961 | } | 1961 | } |
| 1962 | 1962 | ||
| 1963 | rc = ata_dev_revalidate(ap, dev, 0); | 1963 | rc = ata_dev_revalidate(ap, dev, 0); |
| 1964 | if (rc) { | 1964 | if (rc) |
| 1965 | printk(KERN_ERR | ||
| 1966 | "ata%u: failed to revalidate after set xfermode\n", | ||
| 1967 | ap->id); | ||
| 1968 | return rc; | 1965 | return rc; |
| 1969 | } | ||
| 1970 | 1966 | ||
| 1971 | DPRINTK("xfer_shift=%u, xfer_mode=0x%x\n", | 1967 | DPRINTK("xfer_shift=%u, xfer_mode=0x%x\n", |
| 1972 | dev->xfer_shift, (int)dev->xfer_mode); | 1968 | dev->xfer_shift, (int)dev->xfer_mode); |
| @@ -2786,15 +2782,14 @@ static int ata_dev_same_device(struct ata_port *ap, struct ata_device *dev, | |||
| 2786 | int ata_dev_revalidate(struct ata_port *ap, struct ata_device *dev, | 2782 | int ata_dev_revalidate(struct ata_port *ap, struct ata_device *dev, |
| 2787 | int post_reset) | 2783 | int post_reset) |
| 2788 | { | 2784 | { |
| 2789 | unsigned int class; | 2785 | unsigned int class = dev->class; |
| 2790 | u16 *id; | 2786 | u16 *id = NULL; |
| 2791 | int rc; | 2787 | int rc; |
| 2792 | 2788 | ||
| 2793 | if (!ata_dev_enabled(dev)) | 2789 | if (!ata_dev_enabled(dev)) { |
| 2794 | return -ENODEV; | 2790 | rc = -ENODEV; |
| 2795 | 2791 | goto fail; | |
| 2796 | class = dev->class; | 2792 | } |
| 2797 | id = NULL; | ||
| 2798 | 2793 | ||
| 2799 | /* allocate & read ID data */ | 2794 | /* allocate & read ID data */ |
| 2800 | rc = ata_dev_read_id(ap, dev, &class, post_reset, &id); | 2795 | rc = ata_dev_read_id(ap, dev, &class, post_reset, &id); |
| @@ -2811,7 +2806,9 @@ int ata_dev_revalidate(struct ata_port *ap, struct ata_device *dev, | |||
| 2811 | dev->id = id; | 2806 | dev->id = id; |
| 2812 | 2807 | ||
| 2813 | /* configure device according to the new ID */ | 2808 | /* configure device according to the new ID */ |
| 2814 | return ata_dev_configure(ap, dev, 0); | 2809 | rc = ata_dev_configure(ap, dev, 0); |
| 2810 | if (rc == 0) | ||
| 2811 | return 0; | ||
| 2815 | 2812 | ||
| 2816 | fail: | 2813 | fail: |
| 2817 | printk(KERN_ERR "ata%u: dev %u revalidation failed (errno=%d)\n", | 2814 | printk(KERN_ERR "ata%u: dev %u revalidation failed (errno=%d)\n", |
