diff options
Diffstat (limited to 'drivers/s390/scsi/zfcp_erp.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_erp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index 35364f64da7f..c557ba34e1aa 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c | |||
@@ -720,7 +720,6 @@ static int zfcp_erp_adapter_strategy_generic(struct zfcp_erp_action *act, | |||
720 | goto failed_openfcp; | 720 | goto failed_openfcp; |
721 | 721 | ||
722 | atomic_set_mask(ZFCP_STATUS_COMMON_OPEN, &act->adapter->status); | 722 | atomic_set_mask(ZFCP_STATUS_COMMON_OPEN, &act->adapter->status); |
723 | schedule_work(&act->adapter->scan_work); | ||
724 | 723 | ||
725 | return ZFCP_ERP_SUCCEEDED; | 724 | return ZFCP_ERP_SUCCEEDED; |
726 | 725 | ||
@@ -1186,7 +1185,9 @@ static void zfcp_erp_scsi_scan(struct work_struct *work) | |||
1186 | container_of(work, struct zfcp_erp_add_work, work); | 1185 | container_of(work, struct zfcp_erp_add_work, work); |
1187 | struct zfcp_unit *unit = p->unit; | 1186 | struct zfcp_unit *unit = p->unit; |
1188 | struct fc_rport *rport = unit->port->rport; | 1187 | struct fc_rport *rport = unit->port->rport; |
1189 | scsi_scan_target(&rport->dev, 0, rport->scsi_target_id, | 1188 | |
1189 | if (rport && rport->port_state == FC_PORTSTATE_ONLINE) | ||
1190 | scsi_scan_target(&rport->dev, 0, rport->scsi_target_id, | ||
1190 | scsilun_to_int((struct scsi_lun *)&unit->fcp_lun), 0); | 1191 | scsilun_to_int((struct scsi_lun *)&unit->fcp_lun), 0); |
1191 | atomic_clear_mask(ZFCP_STATUS_UNIT_SCSI_WORK_PENDING, &unit->status); | 1192 | atomic_clear_mask(ZFCP_STATUS_UNIT_SCSI_WORK_PENDING, &unit->status); |
1192 | zfcp_unit_put(unit); | 1193 | zfcp_unit_put(unit); |
@@ -1282,6 +1283,8 @@ static void zfcp_erp_action_cleanup(struct zfcp_erp_action *act, int result) | |||
1282 | case ZFCP_ERP_ACTION_REOPEN_ADAPTER: | 1283 | case ZFCP_ERP_ACTION_REOPEN_ADAPTER: |
1283 | if (result != ZFCP_ERP_SUCCEEDED) | 1284 | if (result != ZFCP_ERP_SUCCEEDED) |
1284 | zfcp_erp_rports_del(adapter); | 1285 | zfcp_erp_rports_del(adapter); |
1286 | else | ||
1287 | schedule_work(&adapter->scan_work); | ||
1285 | zfcp_adapter_put(adapter); | 1288 | zfcp_adapter_put(adapter); |
1286 | break; | 1289 | break; |
1287 | } | 1290 | } |