Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Don Brace and committed by
Martin K. Petersen
a45bcc4e 49ea45cb

+7 -3
+7 -3
drivers/scsi/hpsa.c
··· 3967 3967 memset(this_device->device_id, 0, 3968 3968 sizeof(this_device->device_id)); 3969 3969 if (hpsa_get_device_id(h, scsi3addr, this_device->device_id, 8, 3970 - sizeof(this_device->device_id)) < 0) 3970 + sizeof(this_device->device_id)) < 0) { 3971 3971 dev_err(&h->pdev->dev, 3972 - "hpsa%d: %s: can't get device id for host %d:C0:T%d:L%d\t%s\t%.16s\n", 3972 + "hpsa%d: %s: can't get device id for [%d:%d:%d:%d]\t%s\t%.16s\n", 3973 3973 h->ctlr, __func__, 3974 3974 h->scsi_host->host_no, 3975 - this_device->target, this_device->lun, 3975 + this_device->bus, this_device->target, 3976 + this_device->lun, 3976 3977 scsi_device_type(this_device->devtype), 3977 3978 this_device->model); 3979 + rc = HPSA_LV_FAILED; 3980 + goto bail_out; 3981 + } 3978 3982 3979 3983 if ((this_device->devtype == TYPE_DISK || 3980 3984 this_device->devtype == TYPE_ZBC) &&