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 5/5] ibmvfc: do not reset dev_loss_tmo in slave callout
Date: Fri, 6 Aug 2010 03:02:41 -0500 [thread overview]
Message-ID: <1281081761-24586-6-git-send-email-michaelc@cs.wisc.edu> (raw)
In-Reply-To: <1281081761-24586-5-git-send-email-michaelc@cs.wisc.edu>
From: Mike Christie <michaelc@cs.wisc.edu>
This fixes a bug where the driver was resetting the
rport dev_loss_tmo when devices were added by adding
support for the get_host_def_dev_loss_tmo callout.
Patch has only been compile tested.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
---
drivers/scsi/ibmvscsi/ibmvfc.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index bd96cec..56b68a8 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -1027,6 +1027,11 @@ static void ibmvfc_get_host_port_state(struct Scsi_Host *shost)
spin_unlock_irqrestore(shost->host_lock, flags);
}
+static void ibmvfc_set_host_def_dev_loss_tmo(struct Scsi_Host *shost)
+{
+ fc_host_def_dev_loss_tmo(shost) = dev_loss_tmo;
+}
+
/**
* ibmvfc_set_rport_dev_loss_tmo - Set rport's device loss timeout
* @rport: rport struct
@@ -2751,7 +2756,6 @@ static int ibmvfc_target_alloc(struct scsi_target *starget)
static int ibmvfc_slave_configure(struct scsi_device *sdev)
{
struct Scsi_Host *shost = sdev->host;
- struct fc_rport *rport = starget_to_rport(sdev->sdev_target);
unsigned long flags = 0;
spin_lock_irqsave(shost->host_lock, flags);
@@ -2763,8 +2767,6 @@ static int ibmvfc_slave_configure(struct scsi_device *sdev)
scsi_activate_tcq(sdev, sdev->queue_depth);
} else
scsi_deactivate_tcq(sdev, sdev->queue_depth);
-
- rport->dev_loss_tmo = dev_loss_tmo;
spin_unlock_irqrestore(shost->host_lock, flags);
return 0;
}
@@ -4847,6 +4849,8 @@ static struct fc_function_template ibmvfc_transport_functions = {
.get_host_speed = ibmvfc_get_host_speed,
.show_host_speed = 1,
+ .get_host_def_dev_loss_tmo = ibmvfc_set_host_def_dev_loss_tmo,
+
.issue_fc_host_lip = ibmvfc_issue_fc_host_lip,
.terminate_rport_io = ibmvfc_terminate_rport_io,
--
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 ` [PATCH 1/5] fc class: add fc host default default dev loss setting michaelc
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 ` michaelc [this message]
2010-08-06 15:06 ` 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-6-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).