]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.31/patches.drivers/libfc-pass-lport-in-exch_mgr_r.diff
Add a patch to fix Intel E100 wake-on-lan problems.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.drivers / libfc-pass-lport-in-exch_mgr_r.diff
CommitLineData
6a930a95
BS
1From: Abhijeet Joglekar <abjoglek@cisco.com>
2Subject: libfc: Pass lport in exch_mgr_reset
3References: bnc #465596
4
5fc_exch_mgr structure is private to fc_exch.c. To export exch_mgr_reset to
6transport, transport needs access to the exch manager. Change
7exch_mgr_reset to use lport param which is the shared structure between
8libFC and transport.
9
10Alternatively, fc_exch_mgr definition can be moved to libfc.h so that lport
11can be accessed from mp*.
12
13Signed-off-by: Abhijeet Joglekar <abjoglek@cisco.com>
14Acked-by: Bernhard Walle <bwalle@suse.de>
15---
16
17 drivers/scsi/libfc/fc_exch.c | 3 ++-
18 drivers/scsi/libfc/fc_lport.c | 4 ++--
19 drivers/scsi/libfc/fc_rport.c | 4 ++--
20 include/scsi/libfc.h | 4 ++--
21 4 files changed, 8 insertions(+), 7 deletions(-)
22
23
24--- a/drivers/scsi/libfc/fc_exch.c
25+++ b/drivers/scsi/libfc/fc_exch.c
26@@ -1478,10 +1478,11 @@ static void fc_exch_reset(struct fc_exch
27 * If sid is non-zero, reset only exchanges we source from that FID.
28 * If did is non-zero, reset only exchanges destined to that FID.
29 */
30-void fc_exch_mgr_reset(struct fc_exch_mgr *mp, u32 sid, u32 did)
31+void fc_exch_mgr_reset(struct fc_lport *lp, u32 sid, u32 did)
32 {
33 struct fc_exch *ep;
34 struct fc_exch *next;
35+ struct fc_exch_mgr *mp = lp->emp;
36
37 spin_lock_bh(&mp->em_lock);
38 restart:
39--- a/drivers/scsi/libfc/fc_lport.c
40+++ b/drivers/scsi/libfc/fc_lport.c
41@@ -640,7 +640,7 @@ int fc_lport_destroy(struct fc_lport *lp
42 {
43 lport->tt.frame_send = fc_frame_drop;
44 lport->tt.fcp_abort_io(lport);
45- lport->tt.exch_mgr_reset(lport->emp, 0, 0);
46+ lport->tt.exch_mgr_reset(lport, 0, 0);
47 return 0;
48 }
49 EXPORT_SYMBOL(fc_lport_destroy);
50@@ -951,7 +951,7 @@ static void fc_lport_enter_reset(struct
51
52 lport->tt.disc_stop(lport);
53
54- lport->tt.exch_mgr_reset(lport->emp, 0, 0);
55+ lport->tt.exch_mgr_reset(lport, 0, 0);
56 fc_host_fabric_name(lport->host) = 0;
57 fc_host_port_id(lport->host) = 0;
58
59--- a/drivers/scsi/libfc/fc_rport.c
60+++ b/drivers/scsi/libfc/fc_rport.c
61@@ -1302,7 +1302,7 @@ void fc_rport_terminate_io(struct fc_rpo
62 struct fc_rport_libfc_priv *rdata = rport->dd_data;
63 struct fc_lport *lport = rdata->local_port;
64
65- lport->tt.exch_mgr_reset(lport->emp, 0, rport->port_id);
66- lport->tt.exch_mgr_reset(lport->emp, rport->port_id, 0);
67+ lport->tt.exch_mgr_reset(lport, 0, rport->port_id);
68+ lport->tt.exch_mgr_reset(lport, rport->port_id, 0);
69 }
70 EXPORT_SYMBOL(fc_rport_terminate_io);
71--- a/include/scsi/libfc.h
72+++ b/include/scsi/libfc.h
73@@ -469,7 +469,7 @@ struct libfc_function_template {
74 * If s_id is non-zero, reset only exchanges originating from that FID.
75 * If d_id is non-zero, reset only exchanges sending to that FID.
76 */
77- void (*exch_mgr_reset)(struct fc_exch_mgr *,
78+ void (*exch_mgr_reset)(struct fc_lport *,
79 u32 s_id, u32 d_id);
80
81 void (*rport_flush_queue)(void);
82@@ -908,7 +908,7 @@ struct fc_seq *fc_seq_start_next(struct
83 * If s_id is non-zero, reset only exchanges originating from that FID.
84 * If d_id is non-zero, reset only exchanges sending to that FID.
85 */
86-void fc_exch_mgr_reset(struct fc_exch_mgr *, u32 s_id, u32 d_id);
87+void fc_exch_mgr_reset(struct fc_lport *, u32 s_id, u32 d_id);
88
89 /*
90 * Functions for fc_functions_template