]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.31/patches.drivers/libfc-when-rport-goes-away-re.diff
Add a patch to fix Intel E100 wake-on-lan problems.
[ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.drivers / libfc-when-rport-goes-away-re.diff
CommitLineData
6a930a95
BS
1From: Abhijeet Joglekar <abjoglek@cisco.com>
2Subject: libfc: when rport goes away (re-plogi), clean up exchanges to/from rport
3References: bnc #465596
4
5When a rport goes away, libFC does a plogi which will reset exchanges
6 at the rport. Clean exchanges at our end, both in transport and libFC.
7 If transport hooks into exch_mgr_reset, it will call back into
8 fc_exch_mgr_reset() to clean up libFC exchanges.
9
10Signed-off-by: Abhijeet Joglekar <abjoglek@cisco.com>
11Acked-by: Bernhard Walle <bwalle@suse.de>
12---
13
14 drivers/scsi/libfc/fc_rport.c | 7 ++++++-
15 1 file changed, 6 insertions(+), 1 deletion(-)
16
17
18--- a/drivers/scsi/libfc/fc_rport.c
19+++ b/drivers/scsi/libfc/fc_rport.c
20@@ -215,6 +215,7 @@ static void fc_rport_state_enter(struct
21
22 static void fc_rport_work(struct work_struct *work)
23 {
24+ u32 port_id;
25 struct fc_rport_libfc_priv *rdata =
26 container_of(work, struct fc_rport_libfc_priv, event_work);
27 enum fc_rport_event event;
28@@ -280,8 +281,12 @@ static void fc_rport_work(struct work_st
29 rport_ops->event_callback(lport, rport, event);
30 if (trans_state == FC_PORTSTATE_ROGUE)
31 put_device(&rport->dev);
32- else
33+ else {
34+ port_id = rport->port_id;
35 fc_remote_port_delete(rport);
36+ lport->tt.exch_mgr_reset(lport, 0, port_id);
37+ lport->tt.exch_mgr_reset(lport, port_id, 0);
38+ }
39 } else
40 mutex_unlock(&rdata->rp_mutex);
41 }