diff options
author | Swen Schillig <swen@vnet.ibm.com> | 2009-07-13 09:06:13 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-07-30 09:49:58 -0400 |
commit | 27f492ccec94b6acd8440c83bfe0515ce4db0af0 (patch) | |
tree | e920153d2eca6d83659b4fd1cbfcdbd71bb976b6 /drivers/s390 | |
parent | 17a093ef018481ee1760da19568bad3c11da395d (diff) |
[SCSI] zfcp: Fix wka port processing
Under certain conditions it is possible that a WKA port ist not opened
within the expected timeframe of half a second. In this situation
the WKA port remains in the state OPENING preventing any succeding
request to open the port. This led to unrecoverable remote ports.
Fixing this by always setting an appropriate WKA port status before
leaving the function and removing the timeout value here since it's
not needed here because the general timeout processing would deal
with it if required.
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/scsi/zfcp_fc.c | 8 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_fsf.c | 4 |
2 files changed, 5 insertions, 7 deletions
diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c index 2f0705d76b72..47daebfa7e59 100644 --- a/drivers/s390/scsi/zfcp_fc.c +++ b/drivers/s390/scsi/zfcp_fc.c | |||
@@ -79,11 +79,9 @@ static int zfcp_wka_port_get(struct zfcp_wka_port *wka_port) | |||
79 | 79 | ||
80 | mutex_unlock(&wka_port->mutex); | 80 | mutex_unlock(&wka_port->mutex); |
81 | 81 | ||
82 | wait_event_timeout( | 82 | wait_event(wka_port->completion_wq, |
83 | wka_port->completion_wq, | 83 | wka_port->status == ZFCP_WKA_PORT_ONLINE || |
84 | wka_port->status == ZFCP_WKA_PORT_ONLINE || | 84 | wka_port->status == ZFCP_WKA_PORT_OFFLINE); |
85 | wka_port->status == ZFCP_WKA_PORT_OFFLINE, | ||
86 | HZ >> 1); | ||
87 | 85 | ||
88 | if (wka_port->status == ZFCP_WKA_PORT_ONLINE) { | 86 | if (wka_port->status == ZFCP_WKA_PORT_ONLINE) { |
89 | atomic_inc(&wka_port->refcount); | 87 | atomic_inc(&wka_port->refcount); |
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index b7e48844056a..47795fbf081f 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
@@ -1627,10 +1627,10 @@ static void zfcp_fsf_open_wka_port_handler(struct zfcp_fsf_req *req) | |||
1627 | case FSF_ACCESS_DENIED: | 1627 | case FSF_ACCESS_DENIED: |
1628 | wka_port->status = ZFCP_WKA_PORT_OFFLINE; | 1628 | wka_port->status = ZFCP_WKA_PORT_OFFLINE; |
1629 | break; | 1629 | break; |
1630 | case FSF_PORT_ALREADY_OPEN: | ||
1631 | break; | ||
1632 | case FSF_GOOD: | 1630 | case FSF_GOOD: |
1633 | wka_port->handle = header->port_handle; | 1631 | wka_port->handle = header->port_handle; |
1632 | /* fall through */ | ||
1633 | case FSF_PORT_ALREADY_OPEN: | ||
1634 | wka_port->status = ZFCP_WKA_PORT_ONLINE; | 1634 | wka_port->status = ZFCP_WKA_PORT_ONLINE; |
1635 | } | 1635 | } |
1636 | out: | 1636 | out: |