From: Robert Love <robert.w.love@intel.com>
To: James.Bottomley@suse.de, linux-scsi@vger.kernel.org
Cc: Joe Eykholt <jeykholt@cisco.com>,
Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Subject: [PATCH 6/8] libfc: Do not let disc work cancel itself
Date: Fri, 08 Oct 2010 17:12:36 -0700 [thread overview]
Message-ID: <20101009001236.7744.68960.stgit@localhost.localdomain> (raw)
In-Reply-To: <20101009001204.7744.21642.stgit@localhost.localdomain>
From: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
When number of NPIV ports created are greater than the xids
allocated per pool -- for eg., creating 255 NPIV ports on a
system with nr_cpu_ids of 32, with each pool containing 128
xids -- and then generating a link event - for eg.,
shutdown/no shutdown -- on the switch port causes the hang
with the following stack trace.
Call Trace:
schedule_timeout+0x19d/0x230
wait_for_common+0xc0/0x170
__cancel_work_timer+0xcf/0x1b0
fc_disc_stop+0x16/0x30 [libfc]
fc_lport_reset_locked+0x47/0x90 [libfc]
fc_lport_enter_reset+0x67/0xe0 [libfc]
fc_lport_disc_callback+0xbc/0xe0 [libfc]
fc_disc_done+0xa8/0xf0 [libfc]
fc_disc_timeout+0x29/0x40 [libfc]
run_workqueue+0xb8/0x140
worker_thread+0x96/0x110
kthread+0x96/0xa0
child_rip+0xa/0x20
Fix is to not cancel the disc_work if discovery is already
stopped, thus allowing lport state machine to restart and try
discovery again.
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Acked-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
---
drivers/scsi/libfc/fc_disc.c | 5 ++---
include/scsi/libfc.h | 2 +-
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
index 32f67c4..911b273 100644
--- a/drivers/scsi/libfc/fc_disc.c
+++ b/drivers/scsi/libfc/fc_disc.c
@@ -684,10 +684,9 @@ void fc_disc_stop(struct fc_lport *lport)
{
struct fc_disc *disc = &lport->disc;
- if (disc) {
+ if (disc->pending)
cancel_delayed_work_sync(&disc->disc_work);
- fc_disc_stop_rports(disc);
- }
+ fc_disc_stop_rports(disc);
}
/**
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index 14be49b..f986ab7 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -721,7 +721,7 @@ struct libfc_function_template {
* struct fc_disc - Discovery context
* @retry_count: Number of retries
* @pending: 1 if discovery is pending, 0 if not
- * @requesting: 1 if discovery has been requested, 0 if not
+ * @requested: 1 if discovery has been requested, 0 if not
* @seq_count: Number of sequences used for discovery
* @buf_len: Length of the discovery buffer
* @disc_id: Discovery ID
next prev parent reply other threads:[~2010-10-09 0:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-09 0:12 [PATCH 0/8] libfc, libfcoe and fcoe updates for scsi-misc Robert Love
2010-10-09 0:12 ` [PATCH 1/8] libfc: fix setting of rport dev loss Robert Love
2010-10-09 0:12 ` [PATCH 2/8] libfc: use DID_TRANSPORT_DISRUPTED while lport not ready Robert Love
2010-10-09 0:12 ` [PATCH 3/8] libfc: adds flogi retry in case DID is zero in RJT Robert Love
2010-10-09 0:12 ` [PATCH 4/8] fcoe: set default FIP mode as FIP_MODE_FABRIC Robert Love
2010-10-09 0:12 ` [PATCH 5/8] libfc: possible race could panic system due to NULL fsp->cmd Robert Love
2010-10-09 0:12 ` Robert Love [this message]
2010-10-09 0:12 ` [PATCH 7/8] libfcoe: VN2VN connection setup causing stack memory corruption Robert Love
2010-10-09 0:12 ` [PATCH 8/8] fcoe: Fix broken NPIV with correction to MAC validation 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=20101009001236.7744.68960.stgit@localhost.localdomain \
--to=robert.w.love@intel.com \
--cc=James.Bottomley@suse.de \
--cc=bprakash@broadcom.com \
--cc=jeykholt@cisco.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