scsi: hpsa: update reset handler
authorDon Brace <don.brace@microsemi.com>
Thu, 4 May 2017 22:50:58 +0000 (17:50 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 13 Jun 2017 00:48:00 +0000 (20:48 -0400)
Use the return from TUR as a check for the device state.

Reviewed-by: Scott Benesh <scott.benesh@microsemi.com>
Reviewed-by: Scott Teel <scott.tell@microsemi.com>
Reviewed-by: Kevin Barnett <kevin.barnett@microsemi.com>
Signed-off-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hpsa.c

index 8e22aed..9fb30c4 100644 (file)
@@ -3090,7 +3090,7 @@ static int hpsa_do_reset(struct ctlr_info *h, struct hpsa_scsi_dev_t *dev,
        if (unlikely(rc))
                atomic_set(&dev->reset_cmds_out, 0);
        else
-               wait_for_device_to_become_ready(h, scsi3addr, 0);
+               rc = wait_for_device_to_become_ready(h, scsi3addr, 0);
 
        mutex_unlock(&h->reset_mutex);
        return rc;