aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-eh.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-11-10 04:08:10 -0500
committerJeff Garzik <jeff@garzik.org>2006-12-01 22:45:55 -0500
commitbff0464769f2a1bd348265de704471747378e247 (patch)
tree50b04bf291837cb99ca67ac557d577aaf84a75f8 /drivers/ata/libata-eh.c
parentb3362f88a8f938fb700fdedf074ec222cba7cf83 (diff)
[PATCH] libata: convert @post_reset to @flags in ata_dev_read_id()
Make ata_dev_read_id() take @flags instead of @post_reset. Currently there is only one flag defined - ATA_READID_POSTRESET, which is equivalent to @post_reset. This is preparation for polling presence detection. Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r--drivers/ata/libata-eh.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 477648801a65..755fc68b5374 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -1634,11 +1634,14 @@ static int ata_eh_revalidate_and_attach(struct ata_port *ap,
1634 DPRINTK("ENTER\n"); 1634 DPRINTK("ENTER\n");
1635 1635
1636 for (i = 0; i < ATA_MAX_DEVICES; i++) { 1636 for (i = 0; i < ATA_MAX_DEVICES; i++) {
1637 unsigned int action; 1637 unsigned int action, readid_flags = 0;
1638 1638
1639 dev = &ap->device[i]; 1639 dev = &ap->device[i];
1640 action = ata_eh_dev_action(dev); 1640 action = ata_eh_dev_action(dev);
1641 1641
1642 if (ehc->i.flags & ATA_EHI_DID_RESET)
1643 readid_flags |= ATA_READID_POSTRESET;
1644
1642 if (action & ATA_EH_REVALIDATE && ata_dev_ready(dev)) { 1645 if (action & ATA_EH_REVALIDATE && ata_dev_ready(dev)) {
1643 if (ata_port_offline(ap)) { 1646 if (ata_port_offline(ap)) {
1644 rc = -EIO; 1647 rc = -EIO;
@@ -1646,8 +1649,7 @@ static int ata_eh_revalidate_and_attach(struct ata_port *ap,
1646 } 1649 }
1647 1650
1648 ata_eh_about_to_do(ap, dev, ATA_EH_REVALIDATE); 1651 ata_eh_about_to_do(ap, dev, ATA_EH_REVALIDATE);
1649 rc = ata_dev_revalidate(dev, 1652 rc = ata_dev_revalidate(dev, readid_flags);
1650 ehc->i.flags & ATA_EHI_DID_RESET);
1651 if (rc) 1653 if (rc)
1652 break; 1654 break;
1653 1655
@@ -1665,7 +1667,8 @@ static int ata_eh_revalidate_and_attach(struct ata_port *ap,
1665 ata_class_enabled(ehc->classes[dev->devno])) { 1667 ata_class_enabled(ehc->classes[dev->devno])) {
1666 dev->class = ehc->classes[dev->devno]; 1668 dev->class = ehc->classes[dev->devno];
1667 1669
1668 rc = ata_dev_read_id(dev, &dev->class, 1, dev->id); 1670 rc = ata_dev_read_id(dev, &dev->class, readid_flags,
1671 dev->id);
1669 if (rc == 0) { 1672 if (rc == 0) {
1670 ehc->i.flags |= ATA_EHI_PRINTINFO; 1673 ehc->i.flags |= ATA_EHI_PRINTINFO;
1671 rc = ata_dev_configure(dev); 1674 rc = ata_dev_configure(dev);