Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5af23d263c33a3f6fc93facfd87d2a091eff2060
Commit:     5af23d263c33a3f6fc93facfd87d2a091eff2060
Parent:     9f28745a6b554fdd6b0dbc9856077701a55f9569
Author:     Brian King <[EMAIL PROTECTED]>
AuthorDate: Wed May 9 15:36:35 2007 -0500
Committer:  James Bottomley <[EMAIL PROTECTED]>
CommitDate: Wed May 16 12:39:33 2007 -0400

    [SCSI] ipr: Proper return codes for eh_dev_reset for SATA devices
    
    Currently ipr always returns success from eh_dev_reset when
    called for a SATA device. If ata_do_eh is unable to recover
    for some reason, this can result in commands that are still
    outstanding when ata_do_eh returns. Change ipr to verify no
    commands are outstanding before returning success.
    
    Signed-off-by: Brian King <[EMAIL PROTECTED]>
    Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
---
 drivers/scsi/ipr.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 4baa79e..fa6ff29 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -3954,6 +3954,13 @@ static int __ipr_eh_dev_reset(struct scsi_cmnd * 
scsi_cmd)
                spin_unlock_irq(scsi_cmd->device->host->host_lock);
                ata_do_eh(ap, NULL, NULL, ipr_sata_reset, NULL);
                spin_lock_irq(scsi_cmd->device->host->host_lock);
+
+               list_for_each_entry(ipr_cmd, &ioa_cfg->pending_q, queue) {
+                       if (ipr_cmd->ioarcb.res_handle == 
res->cfgte.res_handle) {
+                               rc = -EIO;
+                               break;
+                       }
+               }
        } else
                rc = ipr_device_reset(ioa_cfg, res);
        res->resetting_device = 0;
-
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