Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 161074
b: refs/heads/master
c: 14e242e
h: refs/heads/master
v: v3
  • Loading branch information
Christof Schmitt authored and James Bottomley committed Sep 5, 2009
1 parent 98bfcb0 commit 8b8f96c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 44f09f73766a97d9c1ff8bf787cfe6b932eabc2c
refs/heads/master: 14e242ea55a8b807dc1fb7654941caf68a20cd81
1 change: 1 addition & 0 deletions trunk/drivers/s390/scsi/zfcp_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ struct zfcp_ls_adisc {

/* remote port status */
#define ZFCP_STATUS_PORT_PHYS_OPEN 0x00000001
#define ZFCP_STATUS_PORT_LINK_TEST 0x00000002

/* well known address (WKA) port status*/
enum zfcp_wka_status {
Expand Down
9 changes: 9 additions & 0 deletions trunk/drivers/s390/scsi/zfcp_fc.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ static void zfcp_fc_adisc_handler(unsigned long data)
/* port is good, unblock rport without going through erp */
zfcp_scsi_schedule_rport_register(port);
out:
atomic_clear_mask(ZFCP_STATUS_PORT_LINK_TEST, &port->status);
zfcp_port_put(port);
kfree(adisc);
}
Expand Down Expand Up @@ -450,13 +451,21 @@ void zfcp_fc_link_test_work(struct work_struct *work)
port->rport_task = RPORT_DEL;
zfcp_scsi_rport_work(&port->rport_work);

/* only issue one test command at one time per port */
if (atomic_read(&port->status) & ZFCP_STATUS_PORT_LINK_TEST)
goto out;

atomic_set_mask(ZFCP_STATUS_PORT_LINK_TEST, &port->status);

retval = zfcp_fc_adisc(port);
if (retval == 0)
return;

/* send of ADISC was not possible */
atomic_clear_mask(ZFCP_STATUS_PORT_LINK_TEST, &port->status);
zfcp_erp_port_forced_reopen(port, 0, "fcltwk1", NULL);

out:
zfcp_port_put(port);
}

Expand Down

0 comments on commit 8b8f96c

Please sign in to comment.