|
@@ -994,7 +994,7 @@ static int scsi_probe_and_add_lun(struct scsi_target *starget,
|
|
*/
|
|
*/
|
|
sdev = scsi_device_lookup_by_target(starget, lun);
|
|
sdev = scsi_device_lookup_by_target(starget, lun);
|
|
if (sdev) {
|
|
if (sdev) {
|
|
- if (rescan || sdev->sdev_state != SDEV_CREATED) {
|
|
|
|
|
|
+ if (rescan || !scsi_device_created(sdev)) {
|
|
SCSI_LOG_SCAN_BUS(3, printk(KERN_INFO
|
|
SCSI_LOG_SCAN_BUS(3, printk(KERN_INFO
|
|
"scsi scan: device exists on %s\n",
|
|
"scsi scan: device exists on %s\n",
|
|
sdev->sdev_gendev.bus_id));
|
|
sdev->sdev_gendev.bus_id));
|
|
@@ -1467,7 +1467,7 @@ static int scsi_report_lun_scan(struct scsi_target *starget, int bflags,
|
|
kfree(lun_data);
|
|
kfree(lun_data);
|
|
out:
|
|
out:
|
|
scsi_device_put(sdev);
|
|
scsi_device_put(sdev);
|
|
- if (sdev->sdev_state == SDEV_CREATED)
|
|
|
|
|
|
+ if (scsi_device_created(sdev))
|
|
/*
|
|
/*
|
|
* the sdev we used didn't appear in the report luns scan
|
|
* the sdev we used didn't appear in the report luns scan
|
|
*/
|
|
*/
|