diff options
author | Swen Schillig <swen@vnet.ibm.com> | 2008-11-26 12:07:38 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-12-01 11:17:34 -0500 |
commit | 26871c97d52e50dc574bd01967926650643b142a (patch) | |
tree | caac9eabd5191353bb659e911f5ec7ef0d7165c6 /drivers/s390 | |
parent | 633528c304f20b5c2e3e04d48f620548ce08b12e (diff) |
[SCSI] zfcp: verify for correct rport state before scanning for SCSI devs
Prevent a SCSI target scan for a rport which have turned invalid
in the meantime.
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/scsi/zfcp_erp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index 35364f64da7f..c55dd2728f90 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c | |||
@@ -1186,7 +1186,9 @@ static void zfcp_erp_scsi_scan(struct work_struct *work) | |||
1186 | container_of(work, struct zfcp_erp_add_work, work); | 1186 | container_of(work, struct zfcp_erp_add_work, work); |
1187 | struct zfcp_unit *unit = p->unit; | 1187 | struct zfcp_unit *unit = p->unit; |
1188 | struct fc_rport *rport = unit->port->rport; | 1188 | struct fc_rport *rport = unit->port->rport; |
1189 | scsi_scan_target(&rport->dev, 0, rport->scsi_target_id, | 1189 | |
1190 | if (rport && rport->port_state == FC_PORTSTATE_ONLINE) | ||
1191 | scsi_scan_target(&rport->dev, 0, rport->scsi_target_id, | ||
1190 | scsilun_to_int((struct scsi_lun *)&unit->fcp_lun), 0); | 1192 | scsilun_to_int((struct scsi_lun *)&unit->fcp_lun), 0); |
1191 | atomic_clear_mask(ZFCP_STATUS_UNIT_SCSI_WORK_PENDING, &unit->status); | 1193 | atomic_clear_mask(ZFCP_STATUS_UNIT_SCSI_WORK_PENDING, &unit->status); |
1192 | zfcp_unit_put(unit); | 1194 | zfcp_unit_put(unit); |