From: <vmohan@brocade.com>
To: linux-scsi@vger.kernel.org
Cc: agurumur@brocade.com, james.bottomley@hansenpartnership.com
Subject: [PATCH RESEND 3/8] bfa: LUN discovery issue in direct attach mode
Date: Thu, 21 Nov 2013 01:37:45 -0800 [thread overview]
Message-ID: <1385026670-7006-1-git-send-email-vmohan@brocade.com> (raw)
From: Vijaya Mohan Guvva <vmohan@brocade.com>
In direct attach mode, if port features like QoS/Trunk/FEC/CR are
enabled, driver can receive PLOGI from the target before firmware
notifies lport online to the driver. In case the lport is not yet online
and a PLOGI is received, send a reject to the peer port, instead of
dropping it on the floor.
Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
---
drivers/scsi/bfa/bfa_fcs_lport.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c b/drivers/scsi/bfa/bfa_fcs_lport.c
index 2f61a5a..06bae2b 100644
--- a/drivers/scsi/bfa/bfa_fcs_lport.c
+++ b/drivers/scsi/bfa/bfa_fcs_lport.c
@@ -773,7 +773,20 @@ bfa_fcs_lport_uf_recv(struct bfa_fcs_lport_s *lport,
bfa_trc(lport->fcs, fchs->type);
if (!bfa_fcs_lport_is_online(lport)) {
- bfa_stats(lport, uf_recv_drops);
+ /*
+ * In direct attach topology, it is possible to get a PLOGI
+ * before the lport is online due to port feature
+ * (QoS/Trunk/FEC/CR), so send a rjt
+ */
+ if ((fchs->type == FC_TYPE_ELS) &&
+ (els_cmd->els_code == FC_ELS_PLOGI)) {
+ bfa_fcs_lport_send_ls_rjt(lport, fchs,
+ FC_LS_RJT_RSN_UNABLE_TO_PERF_CMD,
+ FC_LS_RJT_EXP_NO_ADDL_INFO);
+ bfa_stats(lport, plogi_rcvd);
+ } else
+ bfa_stats(lport, uf_recv_drops);
+
return;
}
--
1.8.2.1
next reply other threads:[~2013-11-21 9:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-21 9:37 vmohan [this message]
2013-11-21 9:37 ` [PATCH RESEND 4/8] bfa: Fix for bcu or hcm faa query hang vmohan
2013-11-21 9:37 ` [PATCH RESEND 5/8] bfa: Observed auto D-port mode instead of manual vmohan
2013-11-21 9:37 ` [PATCH RESEND 6/8] bfa: change FC_ELS_TOV to 20sec vmohan
2013-11-21 9:37 ` [PATCH RESEND 7/8] bfa: Fix crash when symb name set for offline vport vmohan
2013-11-21 9:37 ` [PATCH RESEND 8/8] bfa: Driver version upgrade to 3.2.23.0 vmohan
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=1385026670-7006-1-git-send-email-vmohan@brocade.com \
--to=vmohan@brocade.com \
--cc=agurumur@brocade.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;
as well as URLs for NNTP newsgroup(s).