From: Robert Love <robert.w.love@intel.com>
To: james.bottomley@hansenpartnership.com
Cc: linux-scsi@vger.kernel.org
Subject: [Open-FCoE PATCH 2/6] libfc: when rport goes away (re-plogi), clean up exchanges to/from rport
Date: Wed, 21 Jan 2009 12:44:50 -0800 [thread overview]
Message-ID: <20090121204450.2468.28711.stgit@fritz> (raw)
In-Reply-To: <20090121204444.2468.66245.stgit@fritz>
From: Abhijeet Joglekar <abjoglek@cisco.com>
When a rport goes away, libFC does a plogi which will reset exchanges
at the rport. Clean exchanges at our end, both in transport and libFC.
If transport hooks into exch_mgr_reset, it will call back into
fc_exch_mgr_reset() to clean up libFC exchanges.
Signed-off-by: Abhijeet Joglekar <abjoglek@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
---
drivers/scsi/libfc/fc_rport.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index dec7bae..7175759 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -214,6 +214,7 @@ static void fc_rport_state_enter(struct fc_rport *rport,
static void fc_rport_work(struct work_struct *work)
{
+ u32 port_id;
struct fc_rport_libfc_priv *rdata =
container_of(work, struct fc_rport_libfc_priv, event_work);
enum fc_rport_event event;
@@ -279,8 +280,12 @@ static void fc_rport_work(struct work_struct *work)
rport_ops->event_callback(lport, rport, event);
if (trans_state == FC_PORTSTATE_ROGUE)
put_device(&rport->dev);
- else
+ else {
+ port_id = rport->port_id;
fc_remote_port_delete(rport);
+ lport->tt.exch_mgr_reset(lport, 0, port_id);
+ lport->tt.exch_mgr_reset(lport, port_id, 0);
+ }
} else
mutex_unlock(&rdata->rp_mutex);
}
next prev parent reply other threads:[~2009-01-21 20:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-21 20:44 [Open-FCoE PATCH 1/6] libfc: Pass lport in exch_mgr_reset Robert Love
2009-01-21 20:44 ` Robert Love [this message]
2009-01-21 20:44 ` [Open-FCoE PATCH 3/6] libfc: handle RRQ exch timeout Robert Love
2009-01-21 20:45 ` [Open-FCoE PATCH 4/6] libfc: fixed a soft lockup issue in fc_exch_recv_abts Robert Love
2009-01-21 20:45 ` [Open-FCoE PATCH 5/6] libfc, fcoe: fixed locking issues with lport->lp_mutex around lport->link_status Robert Love
2009-01-21 20:45 ` [Open-FCoE PATCH 6/6] libfc: rport retry on LS_RJT from certain ELS Robert Love
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090121204450.2468.28711.stgit@fritz \
--to=robert.w.love@intel.com \
--cc=james.bottomley@hansenpartnership.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox