From: michaelc@cs.wisc.edu
To: linux-scsi@vger.kernel.org, jeykholt@cisco.com,
andrew.vasquez@qlogic.com, giridhar.malavali@qlogic.com,
James.Smart@Emulex.Com, brking@us.ibm.com
Cc: Mike Christie <michaelc@cs.wisc.edu>
Subject: [PATCH 1/5] fc class: add fc host default default dev loss setting
Date: Fri, 6 Aug 2010 03:02:37 -0500 [thread overview]
Message-ID: <1281081761-24586-2-git-send-email-michaelc@cs.wisc.edu> (raw)
In-Reply-To: <1281081761-24586-1-git-send-email-michaelc@cs.wisc.edu>
From: Mike Christie <michaelc@cs.wisc.edu>
This patch adds a fc_host setting to store the
default dev_loss_tmo. It is used if the driver
has a callack to get the value from the LLD. If
the callback is not set, then we use the fc class
module default value.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
---
drivers/scsi/scsi_transport_fc.c | 6 +++++-
include/scsi/scsi_transport_fc.h | 4 ++++
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
index 0681378..01a5f9b 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -2525,7 +2525,11 @@ fc_rport_create(struct Scsi_Host *shost, int channel,
rport->maxframe_size = -1;
rport->supported_classes = FC_COS_UNSPECIFIED;
- rport->dev_loss_tmo = fc_dev_loss_tmo;
+ if (fci->f->get_host_def_dev_loss_tmo) {
+ fci->f->get_host_def_dev_loss_tmo(shost);
+ rport->dev_loss_tmo = fc_host_def_dev_loss_tmo(shost);
+ } else
+ rport->dev_loss_tmo = fc_dev_loss_tmo;
memcpy(&rport->node_name, &ids->node_name, sizeof(rport->node_name));
memcpy(&rport->port_name, &ids->port_name, sizeof(rport->port_name));
rport->port_id = ids->port_id;
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h
index 87d81b3..9f98fca 100644
--- a/include/scsi/scsi_transport_fc.h
+++ b/include/scsi/scsi_transport_fc.h
@@ -496,6 +496,7 @@ struct fc_host_attrs {
u64 fabric_name;
char symbolic_name[FC_SYMBOLIC_NAME_SIZE];
char system_hostname[FC_SYMBOLIC_NAME_SIZE];
+ u32 def_dev_loss_tmo;
/* Private (Transport-managed) Attributes */
enum fc_tgtid_binding_type tgtid_bind_type;
@@ -580,6 +581,8 @@ struct fc_host_attrs {
(((struct fc_host_attrs *)(x)->shost_data)->devloss_work_q_name)
#define fc_host_devloss_work_q(x) \
(((struct fc_host_attrs *)(x)->shost_data)->devloss_work_q)
+#define fc_host_def_dev_loss_tmo(x) \
+ (((struct fc_host_attrs *)(x)->shost_data)->def_dev_loss_tmo)
struct fc_bsg_buffer {
@@ -640,6 +643,7 @@ struct fc_function_template {
void (*get_host_fabric_name)(struct Scsi_Host *);
void (*get_host_symbolic_name)(struct Scsi_Host *);
void (*set_host_system_hostname)(struct Scsi_Host *);
+ void (*get_host_def_dev_loss_tmo)(struct Scsi_Host *);
struct fc_host_statistics * (*get_fc_host_stats)(struct Scsi_Host *);
void (*reset_fc_host_stats)(struct Scsi_Host *);
--
1.6.6.1
next prev parent reply other threads:[~2010-08-06 7:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-06 8:02 FC: fix rport dev_loss_tmo initialization michaelc
2010-08-06 8:02 ` michaelc [this message]
2010-08-06 8:02 ` [PATCH 2/5] qla2xxx: do not reset dev_loss_tmo in slave callout michaelc
2010-08-06 8:02 ` [PATCH 3/5] lpfc: " michaelc
2010-08-06 8:02 ` [PATCH 4/5] fnic: " michaelc
2010-08-06 8:02 ` [PATCH 5/5] ibmvfc: " michaelc
2010-08-06 15:06 ` [PATCH 4/5] fnic: " Joe Eykholt
2010-08-06 16:32 ` Mike Christie
2010-08-06 16:51 ` Mike Christie
2010-08-06 20:20 ` James Bottomley
2010-08-06 21:14 ` Mike Christie
2010-08-06 8:05 ` [PATCH 3/5] lpfc: " Mike Christie
2010-08-09 14:53 ` [PATCH 1/5] fc class: add fc host default default dev loss setting James Smart
2010-08-09 15:00 ` Mike Christie
2010-08-09 15:17 ` Mike Christie
2010-08-09 18:32 ` Andrew Vasquez
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=1281081761-24586-2-git-send-email-michaelc@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--cc=James.Smart@Emulex.Com \
--cc=andrew.vasquez@qlogic.com \
--cc=brking@us.ibm.com \
--cc=giridhar.malavali@qlogic.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;
as well as URLs for NNTP newsgroup(s).