From: Robert Love <robert.w.love@intel.com>
To: linux-scsi@vger.kernel.org
Cc: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Subject: [PATCH 12/12] libfc: Handle discovery failure during ctlr link down
Date: Fri, 10 Feb 2012 17:18:57 -0800 [thread overview]
Message-ID: <20120211011857.7668.44467.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20120211011754.7668.51489.stgit@localhost6.localdomain6>
From: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
While we wait for GPN_FT response, if the ctlr link goes down, the stack
generates a completion for GPN_FT with error FC_EXCH_CLOSED, and reports a
discovery error. Discovery is not retried in this case, and rightly so.
However, the 'pending' flag stays set, which does not allow subsequent
discovery to succeed as GPN_FT will never be issued. Fix it by clearing the
pending flag when the discovery fails due to GPN_FT failure.
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
---
drivers/scsi/libfc/fc_disc.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
index 1d1b0c9..8e561e6 100644
--- a/drivers/scsi/libfc/fc_disc.c
+++ b/drivers/scsi/libfc/fc_disc.c
@@ -337,6 +337,13 @@ static void fc_disc_error(struct fc_disc *disc, struct fc_frame *fp)
schedule_delayed_work(&disc->disc_work, delay);
} else
fc_disc_done(disc, DISC_EV_FAILED);
+ } else if (PTR_ERR(fp) == -FC_EX_CLOSED) {
+ /*
+ * if discovery fails due to lport reset, clear
+ * pending flag so that subsequent discovery can
+ * continue
+ */
+ disc->pending = 0;
}
}
prev parent reply other threads:[~2012-02-11 1:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-11 1:17 [PATCH 00/12] libfc, libfcoe and fcoe updates for scsi-misc Robert Love
2012-02-11 1:17 ` [PATCH 01/12] libfcoe: Don't KERN_ERR on netdev notification Robert Love
2012-02-11 1:18 ` [PATCH 02/12] scsi_transport_fc: Add FDMI host attributes Robert Love
2012-02-11 1:18 ` [PATCH 03/12] scsi_transport_fc: Getting FC Port Speed in sync with FC-GS Robert Love
2012-02-11 1:18 ` [PATCH 04/12] libfc: Make the libfc Common Transport(CT) code generic Robert Love
2012-02-11 1:18 ` [PATCH 05/12] libfc: Add support for FDMI Robert Love
2012-02-11 1:18 ` [PATCH 06/12] fcoe: Add support for FDMI in fcoe Robert Love
2012-02-11 1:18 ` [PATCH 07/12] fcoe: Allow exposing FDMI attributes via sysfs Robert Love
2012-02-11 1:18 ` [PATCH 08/12] fcoe: Rename out_nomod label to out_putmod Robert Love
2012-02-11 1:18 ` [PATCH 09/12] fcoe: Do not switch context in vport_delete callback Robert Love
2012-02-11 1:18 ` [PATCH 10/12] fcoe: Remove reference counting on 'stuct fcoe_interface' Robert Love
2012-02-11 1:18 ` [PATCH 11/12] libfc: Fix panic in fc_exch_recv Robert Love
2012-02-11 1:18 ` Robert Love [this message]
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=20120211011857.7668.44467.stgit@localhost6.localdomain6 \
--to=robert.w.love@intel.com \
--cc=bprakash@broadcom.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).