]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.arch/s390-11-10-zfcp_nameserver_state_on_adapter_offline.patch
Move xen patchset to new version's subdir.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.arch / s390-11-10-zfcp_nameserver_state_on_adapter_offline.patch
1 From: Gerald Schaefer <geraldsc@de.ibm.com>
2 Subject: zfcp: set nameserver port to offline on adapter deactivation.
3 References: bnc#484767,LTC#52232
4
5 Symptom: Storage ports remain in offline state after adapter reactivation.
6 Problem: The nameserver port might be in state online when the adapter is
7 offlined. On adapter reactivation the nameserver port is not
8 re-opened due to the PORT_ONLINE status. This results in an
9 unsuccessful recovery.
10 Solution: Force the nameserver port status to offline on all adapter
11 offline events ensuring a nameserver port open on adapter
12 reactivation.
13
14 Acked-by: John Jolly <jjolly@suse.de>
15
16 ---
17 drivers/s390/scsi/zfcp_aux.c | 1 -
18 drivers/s390/scsi/zfcp_erp.c | 1 +
19 drivers/s390/scsi/zfcp_ext.h | 1 +
20 drivers/s390/scsi/zfcp_fc.c | 8 ++++++++
21 4 files changed, 10 insertions(+), 1 deletion(-)
22
23 --- a/drivers/s390/scsi/zfcp_aux.c
24 +++ b/drivers/s390/scsi/zfcp_aux.c
25 @@ -553,7 +553,6 @@ void zfcp_adapter_dequeue(struct zfcp_ad
26
27 cancel_work_sync(&adapter->scan_work);
28 cancel_work_sync(&adapter->stat_work);
29 - cancel_delayed_work_sync(&adapter->nsp.work);
30 zfcp_adapter_scsi_unregister(adapter);
31 sysfs_remove_group(&adapter->ccw_device->dev.kobj,
32 &zfcp_sysfs_adapter_attrs);
33 --- a/drivers/s390/scsi/zfcp_erp.c
34 +++ b/drivers/s390/scsi/zfcp_erp.c
35 @@ -738,6 +738,7 @@ static int zfcp_erp_adapter_strategy_gen
36 zfcp_qdio_close(adapter);
37 zfcp_fsf_req_dismiss_all(adapter);
38 adapter->fsf_req_seq_no = 0;
39 + zfcp_fc_wka_port_force_offline(&adapter->nsp);
40 /* all ports and units are closed */
41 zfcp_erp_modify_adapter_status(adapter, 24, NULL,
42 ZFCP_STATUS_COMMON_OPEN, ZFCP_CLEAR);
43 --- a/drivers/s390/scsi/zfcp_ext.h
44 +++ b/drivers/s390/scsi/zfcp_ext.h
45 @@ -103,6 +103,7 @@ extern void zfcp_fc_plogi_evaluate(struc
46 extern void zfcp_test_link(struct zfcp_port *);
47 extern void zfcp_fc_link_test_work(struct work_struct *);
48 extern void zfcp_fc_nameserver_init(struct zfcp_adapter *);
49 +extern void zfcp_fc_wka_port_force_offline(struct zfcp_wka_port *);
50
51 /* zfcp_fsf.c */
52 extern int zfcp_fsf_open_port(struct zfcp_erp_action *);
53 --- a/drivers/s390/scsi/zfcp_fc.c
54 +++ b/drivers/s390/scsi/zfcp_fc.c
55 @@ -115,6 +115,14 @@ void zfcp_fc_nameserver_init(struct zfcp
56 INIT_DELAYED_WORK(&wka_port->work, zfcp_wka_port_offline);
57 }
58
59 +void zfcp_fc_wka_port_force_offline(struct zfcp_wka_port *wka)
60 +{
61 + cancel_delayed_work_sync(&wka->work);
62 + mutex_lock(&wka->mutex);
63 + wka->status = ZFCP_WKA_PORT_OFFLINE;
64 + mutex_unlock(&wka->mutex);
65 +}
66 +
67 static void _zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req, u32 range,
68 struct fcp_rscn_element *elem)
69 {