diff options
Diffstat (limited to 'drivers/s390/scsi/zfcp_erp.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_erp.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index 0cf31f7d1c0f..cb4f612550ba 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c | |||
@@ -3360,13 +3360,32 @@ zfcp_erp_action_cleanup(int action, struct zfcp_adapter *adapter, | |||
3360 | if ((result == ZFCP_ERP_SUCCEEDED) | 3360 | if ((result == ZFCP_ERP_SUCCEEDED) |
3361 | && (!atomic_test_mask(ZFCP_STATUS_UNIT_TEMPORARY, | 3361 | && (!atomic_test_mask(ZFCP_STATUS_UNIT_TEMPORARY, |
3362 | &unit->status)) | 3362 | &unit->status)) |
3363 | && (!unit->device)) | 3363 | && !unit->device |
3364 | scsi_add_device(unit->port->adapter->scsi_host, 0, | 3364 | && port->rport) |
3365 | unit->port->scsi_id, unit->scsi_lun); | 3365 | scsi_add_device(port->adapter->scsi_host, 0, |
3366 | port->rport->scsi_target_id, | ||
3367 | unit->scsi_lun); | ||
3366 | zfcp_unit_put(unit); | 3368 | zfcp_unit_put(unit); |
3367 | break; | 3369 | break; |
3368 | case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED: | 3370 | case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED: |
3369 | case ZFCP_ERP_ACTION_REOPEN_PORT: | 3371 | case ZFCP_ERP_ACTION_REOPEN_PORT: |
3372 | if ((result == ZFCP_ERP_SUCCEEDED) | ||
3373 | && !atomic_test_mask(ZFCP_STATUS_PORT_NO_WWPN, | ||
3374 | &port->status) | ||
3375 | && !port->rport) { | ||
3376 | struct fc_rport_identifiers ids; | ||
3377 | ids.node_name = port->wwnn; | ||
3378 | ids.port_name = port->wwpn; | ||
3379 | ids.port_id = port->d_id; | ||
3380 | ids.roles = FC_RPORT_ROLE_FCP_TARGET; | ||
3381 | port->rport = | ||
3382 | fc_remote_port_add(adapter->scsi_host, 0, &ids); | ||
3383 | if (!port->rport) | ||
3384 | ZFCP_LOG_NORMAL("failed registration of rport" | ||
3385 | "(adapter %s, wwpn=0x%016Lx)\n", | ||
3386 | zfcp_get_busid_by_port(port), | ||
3387 | port->wwpn); | ||
3388 | } | ||
3370 | zfcp_port_put(port); | 3389 | zfcp_port_put(port); |
3371 | break; | 3390 | break; |
3372 | case ZFCP_ERP_ACTION_REOPEN_ADAPTER: | 3391 | case ZFCP_ERP_ACTION_REOPEN_ADAPTER: |