diff options
author | Christof Schmitt <christof.schmitt@de.ibm.com> | 2009-10-14 11:00:43 +0200 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-10-22 09:38:45 +0900 |
commit | 934aeb587bab3173b6dec8e7717b909d8efc77b0 (patch) | |
tree | 051a4836be95f529bf82914ba09847694d9673c2 /drivers/s390/scsi/zfcp_fc.c | |
parent | d10c0858f618c20547d4eda8aee9c3afd91599cf (diff) | |
download | op-kernel-dev-934aeb587bab3173b6dec8e7717b909d8efc77b0.zip op-kernel-dev-934aeb587bab3173b6dec8e7717b909d8efc77b0.tar.gz |
[SCSI] zfcp: Handle WWPN mismatch in PLOGI payload
For ports, zfcp gets the DID from the FC nameserver and tries to open
the port. If the open succeeds, zfcp compares the WWPN from the
nameserver with the WWPN in the PLOGI payload. In case of a mismatch,
zfcp assumes that the DID of the port just changed and we opened the
wrong port. This means that zfcp has to forget the DID, lookup the DID
again and retry.
This error case had a problem that zfcp forgets the DID, but never
looks up a new one, stalling the ERP in this case. Fix this by
triggering the DID lookup and properly exit from the ERP. The DID
lookup will trigger a new ERP action.
Also ensure when trying to open the port again with the new DID, first
close the open port, even in the NOESC case.
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/s390/scsi/zfcp_fc.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_fc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c index 722f22d..df23bce 100644 --- a/drivers/s390/scsi/zfcp_fc.c +++ b/drivers/s390/scsi/zfcp_fc.c @@ -361,6 +361,17 @@ out: } /** + * zfcp_fc_trigger_did_lookup - trigger the d_id lookup using a GID_PN request + * @port: The zfcp_port to lookup the d_id for. + */ +void zfcp_fc_trigger_did_lookup(struct zfcp_port *port) +{ + zfcp_port_get(port); + if (!queue_work(port->adapter->work_queue, &port->gid_pn_work)) + zfcp_port_put(port); +} + +/** * zfcp_fc_plogi_evaluate - evaluate PLOGI playload * @port: zfcp_port structure * @plogi: plogi payload |