]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: Gerald Schaefer <geraldsc@de.ibm.com> |
2 | Subject: zfcp: Fix opening of wka ports | |
3 | References: bnc#450096 | |
4 | ||
5 | Symptom: Opening the wka port twice in parallel leads to error | |
6 | recovery. | |
7 | Problem: Two port_open requests are sent and the second one | |
8 | invalidates the existing port handle. Using the wrong | |
9 | port handle later is unexpected and starts error | |
10 | recovery. | |
11 | Solution: Change the status check to only issue one port_open | |
12 | request and do not accidentally overwrite the existing | |
13 | port handle. | |
14 | ||
15 | Acked-by: John Jolly <jjolly@suse.de> | |
16 | --- | |
17 | ||
18 | drivers/s390/scsi/zfcp_fc.c | 3 ++- | |
19 | drivers/s390/scsi/zfcp_fsf.c | 1 + | |
20 | 2 files changed, 3 insertions(+), 1 deletion(-) | |
21 | ||
22 | --- a/drivers/s390/scsi/zfcp_fc.c 2008-11-26 15:05:49.000000000 +0100 | |
23 | +++ b/drivers/s390/scsi/zfcp_fc.c 2008-11-26 15:13:11.000000000 +0100 | |
24 | @@ -52,7 +52,8 @@ static int zfcp_wka_port_get(struct zfcp | |
25 | if (mutex_lock_interruptible(&wka_port->mutex)) | |
26 | return -ERESTARTSYS; | |
27 | ||
28 | - if (wka_port->status != ZFCP_WKA_PORT_ONLINE) { | |
29 | + if (wka_port->status == ZFCP_WKA_PORT_OFFLINE || | |
30 | + wka_port->status == ZFCP_WKA_PORT_CLOSING) { | |
31 | wka_port->status = ZFCP_WKA_PORT_OPENING; | |
32 | if (zfcp_fsf_open_wka_port(wka_port)) | |
33 | wka_port->status = ZFCP_WKA_PORT_OFFLINE; | |
34 | --- a/drivers/s390/scsi/zfcp_fsf.c 2008-11-26 15:05:51.000000000 +0100 | |
35 | +++ b/drivers/s390/scsi/zfcp_fsf.c 2008-11-26 15:13:11.000000000 +0100 | |
36 | @@ -1588,6 +1588,7 @@ static void zfcp_fsf_open_wka_port_handl | |
37 | wka_port->status = ZFCP_WKA_PORT_OFFLINE; | |
38 | break; | |
39 | case FSF_PORT_ALREADY_OPEN: | |
40 | + break; | |
41 | case FSF_GOOD: | |
42 | wka_port->handle = header->port_handle; | |
43 | wka_port->status = ZFCP_WKA_PORT_ONLINE; |