aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-core.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-04-02 05:51:52 -0400
committerJeff Garzik <jeff@garzik.org>2006-04-02 10:09:19 -0400
commit5eb45c02a9944e813a0b82457607557a1f2c64b5 (patch)
tree32a874e2c41ceaa541ef6a30d8d3faf4be2127ad /drivers/scsi/libata-core.c
parentd63cb4a6365aa161341fc365df1edc87cd00c9c0 (diff)
[PATCH] libata: ata_dev_revalidate() printk update
Make sure ata_dev_revalidate() complains on failures and kill revalidation failure message printed from ata_dev_set_mode(). Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r--drivers/scsi/libata-core.c23
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,
2786int ata_dev_revalidate(struct ata_port *ap, struct ata_device *dev, 2782int 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",