diff options
author | Don Brace <don.brace@microsemi.com> | 2019-03-12 13:11:39 -0500 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-03-18 16:46:14 -0400 |
commit | a45bcc4e11b1ebc9a2301c457f7746a1309e8a94 (patch) | |
tree | 5df97c1bd8c4fdcf5c246ddd4577a4495ac25127 | |
parent | 49ea45cb1d97fd65090b00c887dcf7650ced8c1b (diff) | |
download | linux-stable-a45bcc4e11b1ebc9a2301c457f7746a1309e8a94.tar.gz linux-stable-a45bcc4e11b1ebc9a2301c457f7746a1309e8a94.tar.bz2 linux-stable-a45bcc4e11b1ebc9a2301c457f7746a1309e8a94.zip |
scsi: hpsa: correct device id issues
Correct a 'rare' race condition where a disk is failed after a device list
has been obtained from the controller and before attempting to get the
device id.
Reviewed-by: Scott Teel <scott.teel@microsemi.com>
Signed-off-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/hpsa.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index f311ab259a02..bd98a9667ce4 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -3967,14 +3967,18 @@ static int hpsa_update_device_info(struct ctlr_info *h, memset(this_device->device_id, 0, sizeof(this_device->device_id)); if (hpsa_get_device_id(h, scsi3addr, this_device->device_id, 8, - sizeof(this_device->device_id)) < 0) + sizeof(this_device->device_id)) < 0) { dev_err(&h->pdev->dev, - "hpsa%d: %s: can't get device id for host %d:C0:T%d:L%d\t%s\t%.16s\n", + "hpsa%d: %s: can't get device id for [%d:%d:%d:%d]\t%s\t%.16s\n", h->ctlr, __func__, h->scsi_host->host_no, - this_device->target, this_device->lun, + this_device->bus, this_device->target, + this_device->lun, scsi_device_type(this_device->devtype), this_device->model); + rc = HPSA_LV_FAILED; + goto bail_out; + } if ((this_device->devtype == TYPE_DISK || this_device->devtype == TYPE_ZBC) && |