summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_attr.c
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2010-08-06 03:02:39 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-09-05 13:45:26 -0300
commit143beaa811aa3cfc4ae8b4a2092f232ad78b33da (patch)
tree9c7c578b4f12f533ff6ce61e7fda57138f8c89ad /drivers/scsi/lpfc/lpfc_attr.c
parenta74bdf4661441d79a700f7ab3fc6d225ea2cf409 (diff)
[SCSI] lpfc: do not reset dev_loss_tmo in slave callout
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. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_attr.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_attr.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index 23ce4570833..87c2b6b858f 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -4370,6 +4370,14 @@ lpfc_get_starget_port_name(struct scsi_target *starget)
ndlp ? wwn_to_u64(ndlp->nlp_portname.u.wwn) : 0;
}
+static void
+lpfc_get_host_def_loss_tmo(struct Scsi_Host *shost)
+{
+ struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
+
+ fc_host_def_dev_loss_tmo(shost) = vport->cfg_devloss_tmo;
+}
+
/**
* lpfc_set_rport_loss_tmo - Set the rport dev loss tmo
* @rport: fc rport address.
@@ -4478,6 +4486,7 @@ struct fc_function_template lpfc_transport_functions = {
.get_host_fabric_name = lpfc_get_host_fabric_name,
.show_host_fabric_name = 1,
+ .get_host_def_dev_loss_tmo = lpfc_get_host_def_loss_tmo,
/*
* The LPFC driver treats linkdown handling as target loss events
* so there are no sysfs handlers for link_down_tmo.
@@ -4545,6 +4554,7 @@ struct fc_function_template lpfc_vport_transport_functions = {
.get_host_fabric_name = lpfc_get_host_fabric_name,
.show_host_fabric_name = 1,
+ .get_host_def_dev_loss_tmo = lpfc_get_host_def_loss_tmo,
/*
* The LPFC driver treats linkdown handling as target loss events
* so there are no sysfs handlers for link_down_tmo.