]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.arch/s390-16-01-zfcp-link-test.patch
Merge branch 'master' of git://git.ipfire.org/ipfire-2.x
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.arch / s390-16-01-zfcp-link-test.patch
1 From: Gerald Schaefer <geraldsc@de.ibm.com>
2 Subject: zfcp: Only issue one test link command per port
3 References: bnc#529188,LTC#55337
4
5 Symptom: During error recovery, the SAN trace shows a long series
6 of els adisc commands being issued to the same remote port.
7 Problem: When the FCP channel returns a series of failed commands,
8 a els adisc test link command is issued for each failed
9 command.
10 Solution: Introduce a flag to ensure only one els adisc is pending
11 at one time. This is enough to trigger follow-on actions.
12
13 Acked-by: John Jolly <jjolly@suse.de>
14 ---
15 drivers/s390/scsi/zfcp_def.h | 1 +
16 drivers/s390/scsi/zfcp_fc.c | 9 +++++++++
17 2 files changed, 10 insertions(+)
18
19 --- a/drivers/s390/scsi/zfcp_def.h 2009-07-16 12:20:57.000000000 +0200
20 +++ b/drivers/s390/scsi/zfcp_def.h 2009-07-16 12:22:20.000000000 +0200
21 @@ -260,6 +260,7 @@ struct zfcp_ls_adisc {
22 #define ZFCP_STATUS_PORT_PHYS_CLOSING 0x00000004
23 #define ZFCP_STATUS_PORT_NO_WWPN 0x00000008
24 #define ZFCP_STATUS_PORT_INVALID_WWPN 0x00000020
25 +#define ZFCP_STATUS_PORT_LINK_TEST 0x00000040
26
27 /* well known address (WKA) port status*/
28 enum zfcp_wka_status {
29 --- a/drivers/s390/scsi/zfcp_fc.c 2009-07-16 12:20:57.000000000 +0200
30 +++ b/drivers/s390/scsi/zfcp_fc.c 2009-07-16 12:23:15.000000000 +0200
31 @@ -389,6 +389,7 @@ static void zfcp_fc_adisc_handler(unsign
32 zfcp_scsi_schedule_rport_register(port);
33
34 out:
35 + atomic_clear_mask(ZFCP_STATUS_PORT_LINK_TEST, &port->status);
36 zfcp_port_put(port);
37 kfree(adisc);
38 }
39 @@ -435,13 +436,21 @@ void zfcp_fc_link_test_work(struct work_
40 port->rport_task = RPORT_DEL;
41 zfcp_scsi_rport_work(&port->rport_work);
42
43 + /* only issue one test command at one time per port */
44 + if (atomic_read(&port->status) & ZFCP_STATUS_PORT_LINK_TEST)
45 + goto out;
46 +
47 + atomic_set_mask(ZFCP_STATUS_PORT_LINK_TEST, &port->status);
48 +
49 retval = zfcp_fc_adisc(port);
50 if (retval == 0)
51 return;
52
53 /* send of ADISC was not possible */
54 + atomic_clear_mask(ZFCP_STATUS_PORT_LINK_TEST, &port->status);
55 zfcp_erp_port_forced_reopen(port, 0, 65, NULL);
56
57 +out:
58 zfcp_port_put(port);
59 }
60