diff options
Diffstat (limited to 'drivers/s390/scsi/zfcp_fc.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_fc.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c index 56196c98c07b..44456f74a12d 100644 --- a/drivers/s390/scsi/zfcp_fc.c +++ b/drivers/s390/scsi/zfcp_fc.c | |||
@@ -47,10 +47,11 @@ static void _zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req, u32 range, | |||
47 | 47 | ||
48 | read_lock_irqsave(&zfcp_data.config_lock, flags); | 48 | read_lock_irqsave(&zfcp_data.config_lock, flags); |
49 | list_for_each_entry(port, &fsf_req->adapter->port_list_head, list) { | 49 | list_for_each_entry(port, &fsf_req->adapter->port_list_head, list) { |
50 | if (atomic_test_mask(ZFCP_STATUS_PORT_WKA, &port->status)) | 50 | if ((atomic_read(&port->status) & ZFCP_STATUS_PORT_WKA) == |
51 | ZFCP_STATUS_PORT_WKA) | ||
51 | continue; | 52 | continue; |
52 | /* FIXME: ZFCP_STATUS_PORT_DID_DID check is racy */ | 53 | /* FIXME: ZFCP_STATUS_PORT_DID_DID check is racy */ |
53 | if (!atomic_test_mask(ZFCP_STATUS_PORT_DID_DID, &port->status)) | 54 | if (!(atomic_read(&port->status) & ZFCP_STATUS_PORT_DID_DID)) |
54 | /* Try to connect to unused ports anyway. */ | 55 | /* Try to connect to unused ports anyway. */ |
55 | zfcp_erp_port_reopen(port, | 56 | zfcp_erp_port_reopen(port, |
56 | ZFCP_STATUS_COMMON_ERP_FAILED, | 57 | ZFCP_STATUS_COMMON_ERP_FAILED, |
@@ -255,14 +256,14 @@ struct zfcp_els_adisc { | |||
255 | struct scatterlist req; | 256 | struct scatterlist req; |
256 | struct scatterlist resp; | 257 | struct scatterlist resp; |
257 | struct zfcp_ls_adisc ls_adisc; | 258 | struct zfcp_ls_adisc ls_adisc; |
258 | struct zfcp_ls_adisc_acc ls_adisc_acc; | 259 | struct zfcp_ls_adisc ls_adisc_acc; |
259 | }; | 260 | }; |
260 | 261 | ||
261 | static void zfcp_fc_adisc_handler(unsigned long data) | 262 | static void zfcp_fc_adisc_handler(unsigned long data) |
262 | { | 263 | { |
263 | struct zfcp_els_adisc *adisc = (struct zfcp_els_adisc *) data; | 264 | struct zfcp_els_adisc *adisc = (struct zfcp_els_adisc *) data; |
264 | struct zfcp_port *port = adisc->els.port; | 265 | struct zfcp_port *port = adisc->els.port; |
265 | struct zfcp_ls_adisc_acc *ls_adisc = &adisc->ls_adisc_acc; | 266 | struct zfcp_ls_adisc *ls_adisc = &adisc->ls_adisc_acc; |
266 | 267 | ||
267 | if (adisc->els.status) { | 268 | if (adisc->els.status) { |
268 | /* request rejected or timed out */ | 269 | /* request rejected or timed out */ |
@@ -295,7 +296,7 @@ static int zfcp_fc_adisc(struct zfcp_port *port) | |||
295 | sg_init_one(adisc->els.req, &adisc->ls_adisc, | 296 | sg_init_one(adisc->els.req, &adisc->ls_adisc, |
296 | sizeof(struct zfcp_ls_adisc)); | 297 | sizeof(struct zfcp_ls_adisc)); |
297 | sg_init_one(adisc->els.resp, &adisc->ls_adisc_acc, | 298 | sg_init_one(adisc->els.resp, &adisc->ls_adisc_acc, |
298 | sizeof(struct zfcp_ls_adisc_acc)); | 299 | sizeof(struct zfcp_ls_adisc)); |
299 | 300 | ||
300 | adisc->els.req_count = 1; | 301 | adisc->els.req_count = 1; |
301 | adisc->els.resp_count = 1; | 302 | adisc->els.resp_count = 1; |
@@ -345,16 +346,16 @@ static int zfcp_scan_get_nameserver(struct zfcp_adapter *adapter) | |||
345 | if (!adapter->nameserver_port) | 346 | if (!adapter->nameserver_port) |
346 | return -EINTR; | 347 | return -EINTR; |
347 | 348 | ||
348 | if (!atomic_test_mask(ZFCP_STATUS_COMMON_UNBLOCKED, | 349 | if (!(atomic_read(&adapter->nameserver_port->status) & |
349 | &adapter->nameserver_port->status)) { | 350 | ZFCP_STATUS_COMMON_UNBLOCKED)) { |
350 | ret = zfcp_erp_port_reopen(adapter->nameserver_port, 0, 148, | 351 | ret = zfcp_erp_port_reopen(adapter->nameserver_port, 0, 148, |
351 | NULL); | 352 | NULL); |
352 | if (ret) | 353 | if (ret) |
353 | return ret; | 354 | return ret; |
354 | zfcp_erp_wait(adapter); | 355 | zfcp_erp_wait(adapter); |
355 | } | 356 | } |
356 | return !atomic_test_mask(ZFCP_STATUS_COMMON_UNBLOCKED, | 357 | return !(atomic_read(&adapter->nameserver_port->status) & |
357 | &adapter->nameserver_port->status); | 358 | ZFCP_STATUS_COMMON_UNBLOCKED); |
358 | } | 359 | } |
359 | 360 | ||
360 | static void zfcp_gpn_ft_handler(unsigned long _done) | 361 | static void zfcp_gpn_ft_handler(unsigned long _done) |