diff options
Diffstat (limited to 'drivers/s390/scsi/zfcp_fc.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_fc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c index 1a7c80a77ff5..8aab3091a7b1 100644 --- a/drivers/s390/scsi/zfcp_fc.c +++ b/drivers/s390/scsi/zfcp_fc.c | |||
@@ -50,7 +50,8 @@ static int zfcp_wka_port_get(struct zfcp_wka_port *wka_port) | |||
50 | if (mutex_lock_interruptible(&wka_port->mutex)) | 50 | if (mutex_lock_interruptible(&wka_port->mutex)) |
51 | return -ERESTARTSYS; | 51 | return -ERESTARTSYS; |
52 | 52 | ||
53 | if (wka_port->status != ZFCP_WKA_PORT_ONLINE) { | 53 | if (wka_port->status == ZFCP_WKA_PORT_OFFLINE || |
54 | wka_port->status == ZFCP_WKA_PORT_CLOSING) { | ||
54 | wka_port->status = ZFCP_WKA_PORT_OPENING; | 55 | wka_port->status = ZFCP_WKA_PORT_OPENING; |
55 | if (zfcp_fsf_open_wka_port(wka_port)) | 56 | if (zfcp_fsf_open_wka_port(wka_port)) |
56 | wka_port->status = ZFCP_WKA_PORT_OFFLINE; | 57 | wka_port->status = ZFCP_WKA_PORT_OFFLINE; |
@@ -125,8 +126,7 @@ static void _zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req, u32 range, | |||
125 | 126 | ||
126 | read_lock_irqsave(&zfcp_data.config_lock, flags); | 127 | read_lock_irqsave(&zfcp_data.config_lock, flags); |
127 | list_for_each_entry(port, &fsf_req->adapter->port_list_head, list) { | 128 | list_for_each_entry(port, &fsf_req->adapter->port_list_head, list) { |
128 | /* FIXME: ZFCP_STATUS_PORT_DID_DID check is racy */ | 129 | if (!(atomic_read(&port->status) & ZFCP_STATUS_PORT_PHYS_OPEN)) |
129 | if (!(atomic_read(&port->status) & ZFCP_STATUS_PORT_DID_DID)) | ||
130 | /* Try to connect to unused ports anyway. */ | 130 | /* Try to connect to unused ports anyway. */ |
131 | zfcp_erp_port_reopen(port, | 131 | zfcp_erp_port_reopen(port, |
132 | ZFCP_STATUS_COMMON_ERP_FAILED, | 132 | ZFCP_STATUS_COMMON_ERP_FAILED, |
@@ -610,7 +610,6 @@ int zfcp_scan_ports(struct zfcp_adapter *adapter) | |||
610 | int ret, i; | 610 | int ret, i; |
611 | struct zfcp_gpn_ft *gpn_ft; | 611 | struct zfcp_gpn_ft *gpn_ft; |
612 | 612 | ||
613 | zfcp_erp_wait(adapter); /* wait until adapter is finished with ERP */ | ||
614 | if (fc_host_port_type(adapter->scsi_host) != FC_PORTTYPE_NPORT) | 613 | if (fc_host_port_type(adapter->scsi_host) != FC_PORTTYPE_NPORT) |
615 | return 0; | 614 | return 0; |
616 | 615 | ||