Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f58db80267c24e15d959e372d23651a43443c5f3
Commit:     f58db80267c24e15d959e372d23651a43443c5f3
Parent:     f140f0f12fc8dc7264d2f97cbe663564e7d24f6d
Author:     Tejun Heo <[EMAIL PROTECTED]>
AuthorDate: Wed Oct 10 15:57:44 2007 +0900
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Mon Oct 15 15:24:54 2007 -0400

    libata: fix revalidation issuing after configuration commands
    
    After commands which can change device configuration, EH is scheduled
    to revalidate and reconfigure the device.  Host link was incorrectly
    used unconditionally when scheduling EH action.  This resulted in
    bogus revalidation request and mismatched configuration between device
    and driver.  Fix it.
    
    This bug was reported by Igor Durdanovic.
    
    Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
    Cc: Igor Durdanovic <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/ata/libata-scsi.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index ea53e6a..d63c81e 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -1363,6 +1363,7 @@ nothing_to_do:
 static void ata_scsi_qc_complete(struct ata_queued_cmd *qc)
 {
        struct ata_port *ap = qc->ap;
+       struct ata_eh_info *ehi = &qc->dev->link->eh_info;
        struct scsi_cmnd *cmd = qc->scsicmd;
        u8 *cdb = cmd->cmnd;
        int need_sense = (qc->err_mask != 0);
@@ -1376,14 +1377,14 @@ static void ata_scsi_qc_complete(struct ata_queued_cmd 
*qc)
                case ATA_CMD_SET_FEATURES:
                        if ((qc->tf.feature == SETFEATURES_WC_ON) ||
                            (qc->tf.feature == SETFEATURES_WC_OFF)) {
-                               ap->link.eh_info.action |= ATA_EH_REVALIDATE;
+                               ehi->action |= ATA_EH_REVALIDATE;
                                ata_port_schedule_eh(ap);
                        }
                        break;
 
                case ATA_CMD_INIT_DEV_PARAMS: /* CHS translation changed */
                case ATA_CMD_SET_MULTI: /* multi_count changed */
-                       ap->link.eh_info.action |= ATA_EH_REVALIDATE;
+                       ehi->action |= ATA_EH_REVALIDATE;
                        ata_port_schedule_eh(ap);
                        break;
                }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to