aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/scsi')
-rw-r--r--drivers/s390/scsi/zfcp_def.h1
-rw-r--r--drivers/s390/scsi/zfcp_fc.c9
2 files changed, 10 insertions, 0 deletions
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h
index 601f5a575def..c1becfc1e7fe 100644
--- a/drivers/s390/scsi/zfcp_def.h
+++ b/drivers/s390/scsi/zfcp_def.h
@@ -232,6 +232,7 @@ struct zfcp_ls_adisc {
232 232
233/* remote port status */ 233/* remote port status */
234#define ZFCP_STATUS_PORT_PHYS_OPEN 0x00000001 234#define ZFCP_STATUS_PORT_PHYS_OPEN 0x00000001
235#define ZFCP_STATUS_PORT_LINK_TEST 0x00000002
235 236
236/* well known address (WKA) port status*/ 237/* well known address (WKA) port status*/
237enum zfcp_wka_status { 238enum zfcp_wka_status {
diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c
index 47daebfa7e59..94c13bd32b5f 100644
--- a/drivers/s390/scsi/zfcp_fc.c
+++ b/drivers/s390/scsi/zfcp_fc.c
@@ -404,6 +404,7 @@ static void zfcp_fc_adisc_handler(unsigned long data)
404 /* port is good, unblock rport without going through erp */ 404 /* port is good, unblock rport without going through erp */
405 zfcp_scsi_schedule_rport_register(port); 405 zfcp_scsi_schedule_rport_register(port);
406 out: 406 out:
407 atomic_clear_mask(ZFCP_STATUS_PORT_LINK_TEST, &port->status);
407 zfcp_port_put(port); 408 zfcp_port_put(port);
408 kfree(adisc); 409 kfree(adisc);
409} 410}
@@ -450,13 +451,21 @@ void zfcp_fc_link_test_work(struct work_struct *work)
450 port->rport_task = RPORT_DEL; 451 port->rport_task = RPORT_DEL;
451 zfcp_scsi_rport_work(&port->rport_work); 452 zfcp_scsi_rport_work(&port->rport_work);
452 453
454 /* only issue one test command at one time per port */
455 if (atomic_read(&port->status) & ZFCP_STATUS_PORT_LINK_TEST)
456 goto out;
457
458 atomic_set_mask(ZFCP_STATUS_PORT_LINK_TEST, &port->status);
459
453 retval = zfcp_fc_adisc(port); 460 retval = zfcp_fc_adisc(port);
454 if (retval == 0) 461 if (retval == 0)
455 return; 462 return;
456 463
457 /* send of ADISC was not possible */ 464 /* send of ADISC was not possible */
465 atomic_clear_mask(ZFCP_STATUS_PORT_LINK_TEST, &port->status);
458 zfcp_erp_port_forced_reopen(port, 0, "fcltwk1", NULL); 466 zfcp_erp_port_forced_reopen(port, 0, "fcltwk1", NULL);
459 467
468out:
460 zfcp_port_put(port); 469 zfcp_port_put(port);
461} 470}
462 471