diff options
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/scsi/zfcp_ccw.c | 6 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_fc.c | 33 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_fsf.c | 88 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_qdio.c | 4 |
4 files changed, 59 insertions, 72 deletions
diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c index 391dd29749f8..51b6a05f4d12 100644 --- a/drivers/s390/scsi/zfcp_ccw.c +++ b/drivers/s390/scsi/zfcp_ccw.c | |||
@@ -152,10 +152,8 @@ static int zfcp_ccw_set_offline(struct ccw_device *ccw_device) | |||
152 | */ | 152 | */ |
153 | static int zfcp_ccw_notify(struct ccw_device *ccw_device, int event) | 153 | static int zfcp_ccw_notify(struct ccw_device *ccw_device, int event) |
154 | { | 154 | { |
155 | struct zfcp_adapter *adapter; | 155 | struct zfcp_adapter *adapter = dev_get_drvdata(&ccw_device->dev); |
156 | 156 | ||
157 | down(&zfcp_data.config_sema); | ||
158 | adapter = dev_get_drvdata(&ccw_device->dev); | ||
159 | switch (event) { | 157 | switch (event) { |
160 | case CIO_GONE: | 158 | case CIO_GONE: |
161 | dev_warn(&adapter->ccw_device->dev, "device gone\n"); | 159 | dev_warn(&adapter->ccw_device->dev, "device gone\n"); |
@@ -174,8 +172,6 @@ static int zfcp_ccw_notify(struct ccw_device *ccw_device, int event) | |||
174 | 89, NULL); | 172 | 89, NULL); |
175 | break; | 173 | break; |
176 | } | 174 | } |
177 | zfcp_erp_wait(adapter); | ||
178 | up(&zfcp_data.config_sema); | ||
179 | return 1; | 175 | return 1; |
180 | } | 176 | } |
181 | 177 | ||
diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c index e984469bb98b..56196c98c07b 100644 --- a/drivers/s390/scsi/zfcp_fc.c +++ b/drivers/s390/scsi/zfcp_fc.c | |||
@@ -39,18 +39,6 @@ struct zfcp_gpn_ft { | |||
39 | struct scatterlist sg_resp[ZFCP_GPN_FT_BUFFERS]; | 39 | struct scatterlist sg_resp[ZFCP_GPN_FT_BUFFERS]; |
40 | }; | 40 | }; |
41 | 41 | ||
42 | static struct zfcp_port *zfcp_get_port_by_did(struct zfcp_adapter *adapter, | ||
43 | u32 d_id) | ||
44 | { | ||
45 | struct zfcp_port *port; | ||
46 | |||
47 | list_for_each_entry(port, &adapter->port_list_head, list) | ||
48 | if ((port->d_id == d_id) && | ||
49 | !atomic_test_mask(ZFCP_STATUS_COMMON_REMOVE, &port->status)) | ||
50 | return port; | ||
51 | return NULL; | ||
52 | } | ||
53 | |||
54 | static void _zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req, u32 range, | 42 | static void _zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req, u32 range, |
55 | struct fcp_rscn_element *elem) | 43 | struct fcp_rscn_element *elem) |
56 | { | 44 | { |
@@ -341,12 +329,13 @@ void zfcp_test_link(struct zfcp_port *port) | |||
341 | 329 | ||
342 | zfcp_port_get(port); | 330 | zfcp_port_get(port); |
343 | retval = zfcp_fc_adisc(port); | 331 | retval = zfcp_fc_adisc(port); |
344 | if (retval == 0 || retval == -EBUSY) | 332 | if (retval == 0) |
345 | return; | 333 | return; |
346 | 334 | ||
347 | /* send of ADISC was not possible */ | 335 | /* send of ADISC was not possible */ |
348 | zfcp_port_put(port); | 336 | zfcp_port_put(port); |
349 | zfcp_erp_port_forced_reopen(port, 0, 65, NULL); | 337 | if (retval != -EBUSY) |
338 | zfcp_erp_port_forced_reopen(port, 0, 65, NULL); | ||
350 | } | 339 | } |
351 | 340 | ||
352 | static int zfcp_scan_get_nameserver(struct zfcp_adapter *adapter) | 341 | static int zfcp_scan_get_nameserver(struct zfcp_adapter *adapter) |
@@ -363,7 +352,6 @@ static int zfcp_scan_get_nameserver(struct zfcp_adapter *adapter) | |||
363 | if (ret) | 352 | if (ret) |
364 | return ret; | 353 | return ret; |
365 | zfcp_erp_wait(adapter); | 354 | zfcp_erp_wait(adapter); |
366 | zfcp_port_put(adapter->nameserver_port); | ||
367 | } | 355 | } |
368 | return !atomic_test_mask(ZFCP_STATUS_COMMON_UNBLOCKED, | 356 | return !atomic_test_mask(ZFCP_STATUS_COMMON_UNBLOCKED, |
369 | &adapter->nameserver_port->status); | 357 | &adapter->nameserver_port->status); |
@@ -475,7 +463,7 @@ static int zfcp_scan_eval_gpn_ft(struct zfcp_gpn_ft *gpn_ft) | |||
475 | struct zfcp_adapter *adapter = ct->port->adapter; | 463 | struct zfcp_adapter *adapter = ct->port->adapter; |
476 | struct zfcp_port *port, *tmp; | 464 | struct zfcp_port *port, *tmp; |
477 | u32 d_id; | 465 | u32 d_id; |
478 | int ret = 0, x; | 466 | int ret = 0, x, last = 0; |
479 | 467 | ||
480 | if (ct->status) | 468 | if (ct->status) |
481 | return -EIO; | 469 | return -EIO; |
@@ -492,19 +480,24 @@ static int zfcp_scan_eval_gpn_ft(struct zfcp_gpn_ft *gpn_ft) | |||
492 | down(&zfcp_data.config_sema); | 480 | down(&zfcp_data.config_sema); |
493 | 481 | ||
494 | /* first entry is the header */ | 482 | /* first entry is the header */ |
495 | for (x = 1; x < ZFCP_GPN_FT_MAX_ENTRIES; x++) { | 483 | for (x = 1; x < ZFCP_GPN_FT_MAX_ENTRIES && !last; x++) { |
496 | if (x % (ZFCP_GPN_FT_ENTRIES + 1)) | 484 | if (x % (ZFCP_GPN_FT_ENTRIES + 1)) |
497 | acc++; | 485 | acc++; |
498 | else | 486 | else |
499 | acc = sg_virt(++sg); | 487 | acc = sg_virt(++sg); |
500 | 488 | ||
489 | last = acc->control & 0x80; | ||
501 | d_id = acc->port_id[0] << 16 | acc->port_id[1] << 8 | | 490 | d_id = acc->port_id[0] << 16 | acc->port_id[1] << 8 | |
502 | acc->port_id[2]; | 491 | acc->port_id[2]; |
503 | 492 | ||
504 | /* skip the adapter's port and known remote ports */ | 493 | /* skip the adapter's port and known remote ports */ |
505 | if (acc->wwpn == fc_host_port_name(adapter->scsi_host) || | 494 | if (acc->wwpn == fc_host_port_name(adapter->scsi_host)) |
506 | zfcp_get_port_by_did(adapter, d_id)) | 495 | continue; |
496 | port = zfcp_get_port_by_wwpn(adapter, acc->wwpn); | ||
497 | if (port) { | ||
498 | zfcp_port_get(port); | ||
507 | continue; | 499 | continue; |
500 | } | ||
508 | 501 | ||
509 | port = zfcp_port_enqueue(adapter, acc->wwpn, | 502 | port = zfcp_port_enqueue(adapter, acc->wwpn, |
510 | ZFCP_STATUS_PORT_DID_DID | | 503 | ZFCP_STATUS_PORT_DID_DID | |
@@ -513,8 +506,6 @@ static int zfcp_scan_eval_gpn_ft(struct zfcp_gpn_ft *gpn_ft) | |||
513 | ret = PTR_ERR(port); | 506 | ret = PTR_ERR(port); |
514 | else | 507 | else |
515 | zfcp_erp_port_reopen(port, 0, 149, NULL); | 508 | zfcp_erp_port_reopen(port, 0, 149, NULL); |
516 | if (acc->control & 0x80) /* last entry */ | ||
517 | break; | ||
518 | } | 509 | } |
519 | 510 | ||
520 | zfcp_erp_wait(adapter); | 511 | zfcp_erp_wait(adapter); |
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 19c1ca913874..49dbeb754e5f 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
@@ -710,10 +710,10 @@ static void zfcp_fsf_exchange_port_data_handler(struct zfcp_fsf_req *req) | |||
710 | 710 | ||
711 | static int zfcp_fsf_sbal_check(struct zfcp_qdio_queue *queue) | 711 | static int zfcp_fsf_sbal_check(struct zfcp_qdio_queue *queue) |
712 | { | 712 | { |
713 | spin_lock(&queue->lock); | 713 | spin_lock_bh(&queue->lock); |
714 | if (atomic_read(&queue->count)) | 714 | if (atomic_read(&queue->count)) |
715 | return 1; | 715 | return 1; |
716 | spin_unlock(&queue->lock); | 716 | spin_unlock_bh(&queue->lock); |
717 | return 0; | 717 | return 0; |
718 | } | 718 | } |
719 | 719 | ||
@@ -722,13 +722,13 @@ static int zfcp_fsf_req_sbal_get(struct zfcp_adapter *adapter) | |||
722 | long ret; | 722 | long ret; |
723 | struct zfcp_qdio_queue *req_q = &adapter->req_q; | 723 | struct zfcp_qdio_queue *req_q = &adapter->req_q; |
724 | 724 | ||
725 | spin_unlock(&req_q->lock); | 725 | spin_unlock_bh(&req_q->lock); |
726 | ret = wait_event_interruptible_timeout(adapter->request_wq, | 726 | ret = wait_event_interruptible_timeout(adapter->request_wq, |
727 | zfcp_fsf_sbal_check(req_q), 5 * HZ); | 727 | zfcp_fsf_sbal_check(req_q), 5 * HZ); |
728 | if (ret > 0) | 728 | if (ret > 0) |
729 | return 0; | 729 | return 0; |
730 | 730 | ||
731 | spin_lock(&req_q->lock); | 731 | spin_lock_bh(&req_q->lock); |
732 | return -EIO; | 732 | return -EIO; |
733 | } | 733 | } |
734 | 734 | ||
@@ -870,14 +870,14 @@ int zfcp_fsf_status_read(struct zfcp_adapter *adapter) | |||
870 | volatile struct qdio_buffer_element *sbale; | 870 | volatile struct qdio_buffer_element *sbale; |
871 | int retval = -EIO; | 871 | int retval = -EIO; |
872 | 872 | ||
873 | spin_lock(&adapter->req_q.lock); | 873 | spin_lock_bh(&adapter->req_q.lock); |
874 | if (zfcp_fsf_req_sbal_get(adapter)) | 874 | if (zfcp_fsf_req_sbal_get(adapter)) |
875 | goto out; | 875 | goto out; |
876 | 876 | ||
877 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_UNSOLICITED_STATUS, | 877 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_UNSOLICITED_STATUS, |
878 | ZFCP_REQ_NO_QTCB, | 878 | ZFCP_REQ_NO_QTCB, |
879 | adapter->pool.fsf_req_status_read); | 879 | adapter->pool.fsf_req_status_read); |
880 | if (unlikely(IS_ERR(req))) { | 880 | if (IS_ERR(req)) { |
881 | retval = PTR_ERR(req); | 881 | retval = PTR_ERR(req); |
882 | goto out; | 882 | goto out; |
883 | } | 883 | } |
@@ -910,7 +910,7 @@ failed_buf: | |||
910 | zfcp_fsf_req_free(req); | 910 | zfcp_fsf_req_free(req); |
911 | zfcp_hba_dbf_event_fsf_unsol("fail", adapter, NULL); | 911 | zfcp_hba_dbf_event_fsf_unsol("fail", adapter, NULL); |
912 | out: | 912 | out: |
913 | spin_unlock(&adapter->req_q.lock); | 913 | spin_unlock_bh(&adapter->req_q.lock); |
914 | return retval; | 914 | return retval; |
915 | } | 915 | } |
916 | 916 | ||
@@ -988,7 +988,7 @@ struct zfcp_fsf_req *zfcp_fsf_abort_fcp_command(unsigned long old_req_id, | |||
988 | goto out; | 988 | goto out; |
989 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_ABORT_FCP_CMND, | 989 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_ABORT_FCP_CMND, |
990 | req_flags, adapter->pool.fsf_req_abort); | 990 | req_flags, adapter->pool.fsf_req_abort); |
991 | if (unlikely(IS_ERR(req))) | 991 | if (IS_ERR(req)) |
992 | goto out; | 992 | goto out; |
993 | 993 | ||
994 | if (unlikely(!(atomic_read(&unit->status) & | 994 | if (unlikely(!(atomic_read(&unit->status) & |
@@ -1106,13 +1106,13 @@ int zfcp_fsf_send_ct(struct zfcp_send_ct *ct, mempool_t *pool, | |||
1106 | struct zfcp_fsf_req *req; | 1106 | struct zfcp_fsf_req *req; |
1107 | int ret = -EIO; | 1107 | int ret = -EIO; |
1108 | 1108 | ||
1109 | spin_lock(&adapter->req_q.lock); | 1109 | spin_lock_bh(&adapter->req_q.lock); |
1110 | if (zfcp_fsf_req_sbal_get(adapter)) | 1110 | if (zfcp_fsf_req_sbal_get(adapter)) |
1111 | goto out; | 1111 | goto out; |
1112 | 1112 | ||
1113 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_SEND_GENERIC, | 1113 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_SEND_GENERIC, |
1114 | ZFCP_REQ_AUTO_CLEANUP, pool); | 1114 | ZFCP_REQ_AUTO_CLEANUP, pool); |
1115 | if (unlikely(IS_ERR(req))) { | 1115 | if (IS_ERR(req)) { |
1116 | ret = PTR_ERR(req); | 1116 | ret = PTR_ERR(req); |
1117 | goto out; | 1117 | goto out; |
1118 | } | 1118 | } |
@@ -1148,7 +1148,7 @@ failed_send: | |||
1148 | if (erp_action) | 1148 | if (erp_action) |
1149 | erp_action->fsf_req = NULL; | 1149 | erp_action->fsf_req = NULL; |
1150 | out: | 1150 | out: |
1151 | spin_unlock(&adapter->req_q.lock); | 1151 | spin_unlock_bh(&adapter->req_q.lock); |
1152 | return ret; | 1152 | return ret; |
1153 | } | 1153 | } |
1154 | 1154 | ||
@@ -1223,7 +1223,7 @@ int zfcp_fsf_send_els(struct zfcp_send_els *els) | |||
1223 | goto out; | 1223 | goto out; |
1224 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_SEND_ELS, | 1224 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_SEND_ELS, |
1225 | ZFCP_REQ_AUTO_CLEANUP, NULL); | 1225 | ZFCP_REQ_AUTO_CLEANUP, NULL); |
1226 | if (unlikely(IS_ERR(req))) { | 1226 | if (IS_ERR(req)) { |
1227 | ret = PTR_ERR(req); | 1227 | ret = PTR_ERR(req); |
1228 | goto out; | 1228 | goto out; |
1229 | } | 1229 | } |
@@ -1263,14 +1263,14 @@ int zfcp_fsf_exchange_config_data(struct zfcp_erp_action *erp_action) | |||
1263 | struct zfcp_adapter *adapter = erp_action->adapter; | 1263 | struct zfcp_adapter *adapter = erp_action->adapter; |
1264 | int retval = -EIO; | 1264 | int retval = -EIO; |
1265 | 1265 | ||
1266 | spin_lock(&adapter->req_q.lock); | 1266 | spin_lock_bh(&adapter->req_q.lock); |
1267 | if (!atomic_read(&adapter->req_q.count)) | 1267 | if (!atomic_read(&adapter->req_q.count)) |
1268 | goto out; | 1268 | goto out; |
1269 | req = zfcp_fsf_req_create(adapter, | 1269 | req = zfcp_fsf_req_create(adapter, |
1270 | FSF_QTCB_EXCHANGE_CONFIG_DATA, | 1270 | FSF_QTCB_EXCHANGE_CONFIG_DATA, |
1271 | ZFCP_REQ_AUTO_CLEANUP, | 1271 | ZFCP_REQ_AUTO_CLEANUP, |
1272 | adapter->pool.fsf_req_erp); | 1272 | adapter->pool.fsf_req_erp); |
1273 | if (unlikely(IS_ERR(req))) { | 1273 | if (IS_ERR(req)) { |
1274 | retval = PTR_ERR(req); | 1274 | retval = PTR_ERR(req); |
1275 | goto out; | 1275 | goto out; |
1276 | } | 1276 | } |
@@ -1295,7 +1295,7 @@ int zfcp_fsf_exchange_config_data(struct zfcp_erp_action *erp_action) | |||
1295 | erp_action->fsf_req = NULL; | 1295 | erp_action->fsf_req = NULL; |
1296 | } | 1296 | } |
1297 | out: | 1297 | out: |
1298 | spin_unlock(&adapter->req_q.lock); | 1298 | spin_unlock_bh(&adapter->req_q.lock); |
1299 | return retval; | 1299 | return retval; |
1300 | } | 1300 | } |
1301 | 1301 | ||
@@ -1306,13 +1306,13 @@ int zfcp_fsf_exchange_config_data_sync(struct zfcp_adapter *adapter, | |||
1306 | struct zfcp_fsf_req *req = NULL; | 1306 | struct zfcp_fsf_req *req = NULL; |
1307 | int retval = -EIO; | 1307 | int retval = -EIO; |
1308 | 1308 | ||
1309 | spin_lock(&adapter->req_q.lock); | 1309 | spin_lock_bh(&adapter->req_q.lock); |
1310 | if (zfcp_fsf_req_sbal_get(adapter)) | 1310 | if (zfcp_fsf_req_sbal_get(adapter)) |
1311 | goto out; | 1311 | goto out; |
1312 | 1312 | ||
1313 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_EXCHANGE_CONFIG_DATA, | 1313 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_EXCHANGE_CONFIG_DATA, |
1314 | 0, NULL); | 1314 | 0, NULL); |
1315 | if (unlikely(IS_ERR(req))) { | 1315 | if (IS_ERR(req)) { |
1316 | retval = PTR_ERR(req); | 1316 | retval = PTR_ERR(req); |
1317 | goto out; | 1317 | goto out; |
1318 | } | 1318 | } |
@@ -1334,7 +1334,7 @@ int zfcp_fsf_exchange_config_data_sync(struct zfcp_adapter *adapter, | |||
1334 | zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT); | 1334 | zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT); |
1335 | retval = zfcp_fsf_req_send(req); | 1335 | retval = zfcp_fsf_req_send(req); |
1336 | out: | 1336 | out: |
1337 | spin_unlock(&adapter->req_q.lock); | 1337 | spin_unlock_bh(&adapter->req_q.lock); |
1338 | if (!retval) | 1338 | if (!retval) |
1339 | wait_event(req->completion_wq, | 1339 | wait_event(req->completion_wq, |
1340 | req->status & ZFCP_STATUS_FSFREQ_COMPLETED); | 1340 | req->status & ZFCP_STATUS_FSFREQ_COMPLETED); |
@@ -1359,13 +1359,13 @@ int zfcp_fsf_exchange_port_data(struct zfcp_erp_action *erp_action) | |||
1359 | if (!(adapter->adapter_features & FSF_FEATURE_HBAAPI_MANAGEMENT)) | 1359 | if (!(adapter->adapter_features & FSF_FEATURE_HBAAPI_MANAGEMENT)) |
1360 | return -EOPNOTSUPP; | 1360 | return -EOPNOTSUPP; |
1361 | 1361 | ||
1362 | spin_lock(&adapter->req_q.lock); | 1362 | spin_lock_bh(&adapter->req_q.lock); |
1363 | if (!atomic_read(&adapter->req_q.count)) | 1363 | if (!atomic_read(&adapter->req_q.count)) |
1364 | goto out; | 1364 | goto out; |
1365 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_EXCHANGE_PORT_DATA, | 1365 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_EXCHANGE_PORT_DATA, |
1366 | ZFCP_REQ_AUTO_CLEANUP, | 1366 | ZFCP_REQ_AUTO_CLEANUP, |
1367 | adapter->pool.fsf_req_erp); | 1367 | adapter->pool.fsf_req_erp); |
1368 | if (unlikely(IS_ERR(req))) { | 1368 | if (IS_ERR(req)) { |
1369 | retval = PTR_ERR(req); | 1369 | retval = PTR_ERR(req); |
1370 | goto out; | 1370 | goto out; |
1371 | } | 1371 | } |
@@ -1385,7 +1385,7 @@ int zfcp_fsf_exchange_port_data(struct zfcp_erp_action *erp_action) | |||
1385 | erp_action->fsf_req = NULL; | 1385 | erp_action->fsf_req = NULL; |
1386 | } | 1386 | } |
1387 | out: | 1387 | out: |
1388 | spin_unlock(&adapter->req_q.lock); | 1388 | spin_unlock_bh(&adapter->req_q.lock); |
1389 | return retval; | 1389 | return retval; |
1390 | } | 1390 | } |
1391 | 1391 | ||
@@ -1405,13 +1405,13 @@ int zfcp_fsf_exchange_port_data_sync(struct zfcp_adapter *adapter, | |||
1405 | if (!(adapter->adapter_features & FSF_FEATURE_HBAAPI_MANAGEMENT)) | 1405 | if (!(adapter->adapter_features & FSF_FEATURE_HBAAPI_MANAGEMENT)) |
1406 | return -EOPNOTSUPP; | 1406 | return -EOPNOTSUPP; |
1407 | 1407 | ||
1408 | spin_lock(&adapter->req_q.lock); | 1408 | spin_lock_bh(&adapter->req_q.lock); |
1409 | if (!atomic_read(&adapter->req_q.count)) | 1409 | if (!atomic_read(&adapter->req_q.count)) |
1410 | goto out; | 1410 | goto out; |
1411 | 1411 | ||
1412 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_EXCHANGE_PORT_DATA, 0, | 1412 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_EXCHANGE_PORT_DATA, 0, |
1413 | NULL); | 1413 | NULL); |
1414 | if (unlikely(IS_ERR(req))) { | 1414 | if (IS_ERR(req)) { |
1415 | retval = PTR_ERR(req); | 1415 | retval = PTR_ERR(req); |
1416 | goto out; | 1416 | goto out; |
1417 | } | 1417 | } |
@@ -1427,7 +1427,7 @@ int zfcp_fsf_exchange_port_data_sync(struct zfcp_adapter *adapter, | |||
1427 | zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT); | 1427 | zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT); |
1428 | retval = zfcp_fsf_req_send(req); | 1428 | retval = zfcp_fsf_req_send(req); |
1429 | out: | 1429 | out: |
1430 | spin_unlock(&adapter->req_q.lock); | 1430 | spin_unlock_bh(&adapter->req_q.lock); |
1431 | if (!retval) | 1431 | if (!retval) |
1432 | wait_event(req->completion_wq, | 1432 | wait_event(req->completion_wq, |
1433 | req->status & ZFCP_STATUS_FSFREQ_COMPLETED); | 1433 | req->status & ZFCP_STATUS_FSFREQ_COMPLETED); |
@@ -1531,7 +1531,7 @@ int zfcp_fsf_open_port(struct zfcp_erp_action *erp_action) | |||
1531 | struct zfcp_fsf_req *req; | 1531 | struct zfcp_fsf_req *req; |
1532 | int retval = -EIO; | 1532 | int retval = -EIO; |
1533 | 1533 | ||
1534 | spin_lock(&adapter->req_q.lock); | 1534 | spin_lock_bh(&adapter->req_q.lock); |
1535 | if (zfcp_fsf_req_sbal_get(adapter)) | 1535 | if (zfcp_fsf_req_sbal_get(adapter)) |
1536 | goto out; | 1536 | goto out; |
1537 | 1537 | ||
@@ -1539,7 +1539,7 @@ int zfcp_fsf_open_port(struct zfcp_erp_action *erp_action) | |||
1539 | FSF_QTCB_OPEN_PORT_WITH_DID, | 1539 | FSF_QTCB_OPEN_PORT_WITH_DID, |
1540 | ZFCP_REQ_AUTO_CLEANUP, | 1540 | ZFCP_REQ_AUTO_CLEANUP, |
1541 | adapter->pool.fsf_req_erp); | 1541 | adapter->pool.fsf_req_erp); |
1542 | if (unlikely(IS_ERR(req))) { | 1542 | if (IS_ERR(req)) { |
1543 | retval = PTR_ERR(req); | 1543 | retval = PTR_ERR(req); |
1544 | goto out; | 1544 | goto out; |
1545 | } | 1545 | } |
@@ -1562,7 +1562,7 @@ int zfcp_fsf_open_port(struct zfcp_erp_action *erp_action) | |||
1562 | erp_action->fsf_req = NULL; | 1562 | erp_action->fsf_req = NULL; |
1563 | } | 1563 | } |
1564 | out: | 1564 | out: |
1565 | spin_unlock(&adapter->req_q.lock); | 1565 | spin_unlock_bh(&adapter->req_q.lock); |
1566 | return retval; | 1566 | return retval; |
1567 | } | 1567 | } |
1568 | 1568 | ||
@@ -1603,14 +1603,14 @@ int zfcp_fsf_close_port(struct zfcp_erp_action *erp_action) | |||
1603 | struct zfcp_fsf_req *req; | 1603 | struct zfcp_fsf_req *req; |
1604 | int retval = -EIO; | 1604 | int retval = -EIO; |
1605 | 1605 | ||
1606 | spin_lock(&adapter->req_q.lock); | 1606 | spin_lock_bh(&adapter->req_q.lock); |
1607 | if (zfcp_fsf_req_sbal_get(adapter)) | 1607 | if (zfcp_fsf_req_sbal_get(adapter)) |
1608 | goto out; | 1608 | goto out; |
1609 | 1609 | ||
1610 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_CLOSE_PORT, | 1610 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_CLOSE_PORT, |
1611 | ZFCP_REQ_AUTO_CLEANUP, | 1611 | ZFCP_REQ_AUTO_CLEANUP, |
1612 | adapter->pool.fsf_req_erp); | 1612 | adapter->pool.fsf_req_erp); |
1613 | if (unlikely(IS_ERR(req))) { | 1613 | if (IS_ERR(req)) { |
1614 | retval = PTR_ERR(req); | 1614 | retval = PTR_ERR(req); |
1615 | goto out; | 1615 | goto out; |
1616 | } | 1616 | } |
@@ -1633,7 +1633,7 @@ int zfcp_fsf_close_port(struct zfcp_erp_action *erp_action) | |||
1633 | erp_action->fsf_req = NULL; | 1633 | erp_action->fsf_req = NULL; |
1634 | } | 1634 | } |
1635 | out: | 1635 | out: |
1636 | spin_unlock(&adapter->req_q.lock); | 1636 | spin_unlock_bh(&adapter->req_q.lock); |
1637 | return retval; | 1637 | return retval; |
1638 | } | 1638 | } |
1639 | 1639 | ||
@@ -1700,14 +1700,14 @@ int zfcp_fsf_close_physical_port(struct zfcp_erp_action *erp_action) | |||
1700 | struct zfcp_fsf_req *req; | 1700 | struct zfcp_fsf_req *req; |
1701 | int retval = -EIO; | 1701 | int retval = -EIO; |
1702 | 1702 | ||
1703 | spin_lock(&adapter->req_q.lock); | 1703 | spin_lock_bh(&adapter->req_q.lock); |
1704 | if (zfcp_fsf_req_sbal_get(adapter)) | 1704 | if (zfcp_fsf_req_sbal_get(adapter)) |
1705 | goto out; | 1705 | goto out; |
1706 | 1706 | ||
1707 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_CLOSE_PHYSICAL_PORT, | 1707 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_CLOSE_PHYSICAL_PORT, |
1708 | ZFCP_REQ_AUTO_CLEANUP, | 1708 | ZFCP_REQ_AUTO_CLEANUP, |
1709 | adapter->pool.fsf_req_erp); | 1709 | adapter->pool.fsf_req_erp); |
1710 | if (unlikely(IS_ERR(req))) { | 1710 | if (IS_ERR(req)) { |
1711 | retval = PTR_ERR(req); | 1711 | retval = PTR_ERR(req); |
1712 | goto out; | 1712 | goto out; |
1713 | } | 1713 | } |
@@ -1731,7 +1731,7 @@ int zfcp_fsf_close_physical_port(struct zfcp_erp_action *erp_action) | |||
1731 | erp_action->fsf_req = NULL; | 1731 | erp_action->fsf_req = NULL; |
1732 | } | 1732 | } |
1733 | out: | 1733 | out: |
1734 | spin_unlock(&adapter->req_q.lock); | 1734 | spin_unlock_bh(&adapter->req_q.lock); |
1735 | return retval; | 1735 | return retval; |
1736 | } | 1736 | } |
1737 | 1737 | ||
@@ -1875,14 +1875,14 @@ int zfcp_fsf_open_unit(struct zfcp_erp_action *erp_action) | |||
1875 | struct zfcp_fsf_req *req; | 1875 | struct zfcp_fsf_req *req; |
1876 | int retval = -EIO; | 1876 | int retval = -EIO; |
1877 | 1877 | ||
1878 | spin_lock(&adapter->req_q.lock); | 1878 | spin_lock_bh(&adapter->req_q.lock); |
1879 | if (zfcp_fsf_req_sbal_get(adapter)) | 1879 | if (zfcp_fsf_req_sbal_get(adapter)) |
1880 | goto out; | 1880 | goto out; |
1881 | 1881 | ||
1882 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_OPEN_LUN, | 1882 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_OPEN_LUN, |
1883 | ZFCP_REQ_AUTO_CLEANUP, | 1883 | ZFCP_REQ_AUTO_CLEANUP, |
1884 | adapter->pool.fsf_req_erp); | 1884 | adapter->pool.fsf_req_erp); |
1885 | if (unlikely(IS_ERR(req))) { | 1885 | if (IS_ERR(req)) { |
1886 | retval = PTR_ERR(req); | 1886 | retval = PTR_ERR(req); |
1887 | goto out; | 1887 | goto out; |
1888 | } | 1888 | } |
@@ -1910,7 +1910,7 @@ int zfcp_fsf_open_unit(struct zfcp_erp_action *erp_action) | |||
1910 | erp_action->fsf_req = NULL; | 1910 | erp_action->fsf_req = NULL; |
1911 | } | 1911 | } |
1912 | out: | 1912 | out: |
1913 | spin_unlock(&adapter->req_q.lock); | 1913 | spin_unlock_bh(&adapter->req_q.lock); |
1914 | return retval; | 1914 | return retval; |
1915 | } | 1915 | } |
1916 | 1916 | ||
@@ -1965,13 +1965,13 @@ int zfcp_fsf_close_unit(struct zfcp_erp_action *erp_action) | |||
1965 | struct zfcp_fsf_req *req; | 1965 | struct zfcp_fsf_req *req; |
1966 | int retval = -EIO; | 1966 | int retval = -EIO; |
1967 | 1967 | ||
1968 | spin_lock(&adapter->req_q.lock); | 1968 | spin_lock_bh(&adapter->req_q.lock); |
1969 | if (zfcp_fsf_req_sbal_get(adapter)) | 1969 | if (zfcp_fsf_req_sbal_get(adapter)) |
1970 | goto out; | 1970 | goto out; |
1971 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_CLOSE_LUN, | 1971 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_CLOSE_LUN, |
1972 | ZFCP_REQ_AUTO_CLEANUP, | 1972 | ZFCP_REQ_AUTO_CLEANUP, |
1973 | adapter->pool.fsf_req_erp); | 1973 | adapter->pool.fsf_req_erp); |
1974 | if (unlikely(IS_ERR(req))) { | 1974 | if (IS_ERR(req)) { |
1975 | retval = PTR_ERR(req); | 1975 | retval = PTR_ERR(req); |
1976 | goto out; | 1976 | goto out; |
1977 | } | 1977 | } |
@@ -1995,7 +1995,7 @@ int zfcp_fsf_close_unit(struct zfcp_erp_action *erp_action) | |||
1995 | erp_action->fsf_req = NULL; | 1995 | erp_action->fsf_req = NULL; |
1996 | } | 1996 | } |
1997 | out: | 1997 | out: |
1998 | spin_unlock(&adapter->req_q.lock); | 1998 | spin_unlock_bh(&adapter->req_q.lock); |
1999 | return retval; | 1999 | return retval; |
2000 | } | 2000 | } |
2001 | 2001 | ||
@@ -2228,7 +2228,7 @@ int zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *adapter, | |||
2228 | goto out; | 2228 | goto out; |
2229 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_FCP_CMND, req_flags, | 2229 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_FCP_CMND, req_flags, |
2230 | adapter->pool.fsf_req_scsi); | 2230 | adapter->pool.fsf_req_scsi); |
2231 | if (unlikely(IS_ERR(req))) { | 2231 | if (IS_ERR(req)) { |
2232 | retval = PTR_ERR(req); | 2232 | retval = PTR_ERR(req); |
2233 | goto out; | 2233 | goto out; |
2234 | } | 2234 | } |
@@ -2351,7 +2351,7 @@ struct zfcp_fsf_req *zfcp_fsf_send_fcp_ctm(struct zfcp_adapter *adapter, | |||
2351 | goto out; | 2351 | goto out; |
2352 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_FCP_CMND, req_flags, | 2352 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_FCP_CMND, req_flags, |
2353 | adapter->pool.fsf_req_scsi); | 2353 | adapter->pool.fsf_req_scsi); |
2354 | if (unlikely(IS_ERR(req))) | 2354 | if (IS_ERR(req)) |
2355 | goto out; | 2355 | goto out; |
2356 | 2356 | ||
2357 | req->status |= ZFCP_STATUS_FSFREQ_TASK_MANAGEMENT; | 2357 | req->status |= ZFCP_STATUS_FSFREQ_TASK_MANAGEMENT; |
@@ -2417,12 +2417,12 @@ struct zfcp_fsf_req *zfcp_fsf_control_file(struct zfcp_adapter *adapter, | |||
2417 | return ERR_PTR(-EINVAL); | 2417 | return ERR_PTR(-EINVAL); |
2418 | } | 2418 | } |
2419 | 2419 | ||
2420 | spin_lock(&adapter->req_q.lock); | 2420 | spin_lock_bh(&adapter->req_q.lock); |
2421 | if (zfcp_fsf_req_sbal_get(adapter)) | 2421 | if (zfcp_fsf_req_sbal_get(adapter)) |
2422 | goto out; | 2422 | goto out; |
2423 | 2423 | ||
2424 | req = zfcp_fsf_req_create(adapter, fsf_cfdc->command, 0, NULL); | 2424 | req = zfcp_fsf_req_create(adapter, fsf_cfdc->command, 0, NULL); |
2425 | if (unlikely(IS_ERR(req))) { | 2425 | if (IS_ERR(req)) { |
2426 | retval = -EPERM; | 2426 | retval = -EPERM; |
2427 | goto out; | 2427 | goto out; |
2428 | } | 2428 | } |
@@ -2447,7 +2447,7 @@ struct zfcp_fsf_req *zfcp_fsf_control_file(struct zfcp_adapter *adapter, | |||
2447 | zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT); | 2447 | zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT); |
2448 | retval = zfcp_fsf_req_send(req); | 2448 | retval = zfcp_fsf_req_send(req); |
2449 | out: | 2449 | out: |
2450 | spin_unlock(&adapter->req_q.lock); | 2450 | spin_unlock_bh(&adapter->req_q.lock); |
2451 | 2451 | ||
2452 | if (!retval) { | 2452 | if (!retval) { |
2453 | wait_event(req->completion_wq, | 2453 | wait_event(req->completion_wq, |
diff --git a/drivers/s390/scsi/zfcp_qdio.c b/drivers/s390/scsi/zfcp_qdio.c index d6dbd653fde9..69d632d851d9 100644 --- a/drivers/s390/scsi/zfcp_qdio.c +++ b/drivers/s390/scsi/zfcp_qdio.c | |||
@@ -423,9 +423,9 @@ void zfcp_qdio_close(struct zfcp_adapter *adapter) | |||
423 | 423 | ||
424 | /* clear QDIOUP flag, thus do_QDIO is not called during qdio_shutdown */ | 424 | /* clear QDIOUP flag, thus do_QDIO is not called during qdio_shutdown */ |
425 | req_q = &adapter->req_q; | 425 | req_q = &adapter->req_q; |
426 | spin_lock(&req_q->lock); | 426 | spin_lock_bh(&req_q->lock); |
427 | atomic_clear_mask(ZFCP_STATUS_ADAPTER_QDIOUP, &adapter->status); | 427 | atomic_clear_mask(ZFCP_STATUS_ADAPTER_QDIOUP, &adapter->status); |
428 | spin_unlock(&req_q->lock); | 428 | spin_unlock_bh(&req_q->lock); |
429 | 429 | ||
430 | qdio_shutdown(adapter->ccw_device, QDIO_FLAG_CLEANUP_USING_CLEAR); | 430 | qdio_shutdown(adapter->ccw_device, QDIO_FLAG_CLEANUP_USING_CLEAR); |
431 | 431 | ||