diff options
author | Tejun Heo <htejun@gmail.com> | 2006-07-03 16:07:26 +0900 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-07-05 22:16:27 -0400 |
commit | 28324304350e23db24d679c55de3f06a5b1e40aa (patch) | |
tree | d1100fbbc939a5f214a3d2917f5ef9cce5159a0e /drivers/scsi/libata-core.c | |
parent | e30349d27e093f32ef517b5416d9dce1998d4676 (diff) |
[PATCH] libata: implement ATA_EHI_RESUME_LINK
Implement ATA_EHI_RESUME_LINK, which indicates that the link needs to
be resumed. This used to be implied by ATA_EHI_HOTPLUGGED. However,
hotplug isn't the only event which requires link resume and separating
this out allows other places to request link resume. This
differentiation also allows better debounce timing selection.
This patch converts user scan to use ATA_EHI_RESUME_LINK.
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.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index ccab1d7cead..90db054fa99 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -2627,13 +2627,14 @@ int ata_std_prereset(struct ata_port *ap) const unsigned long *timing; int rc; - /* hotplug? */ - if (ehc->i.flags & ATA_EHI_HOTPLUGGED) { - if (ap->flags & ATA_FLAG_HRST_TO_RESUME) - ehc->i.action |= ATA_EH_HARDRESET; - if (ap->flags & ATA_FLAG_SKIP_D2H_BSY) - ata_wait_spinup(ap); - } + /* handle link resume & hotplug spinup */ + if ((ehc->i.flags & ATA_EHI_RESUME_LINK) && + (ap->flags & ATA_FLAG_HRST_TO_RESUME)) + ehc->i.action |= ATA_EH_HARDRESET; + + if ((ehc->i.flags & ATA_EHI_HOTPLUGGED) && + (ap->flags & ATA_FLAG_SKIP_D2H_BSY)) + ata_wait_spinup(ap); /* if we're about to do hardreset, nothing more to do */ if (ehc->i.action & ATA_EH_HARDRESET) |