aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2010-09-15 17:52:28 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-10-07 18:09:33 -0400
commit485868208ee833628d49f81b4609001749d92d56 (patch)
treedcbb01362c2fbf0436e494395c24a09e075cd496 /drivers/scsi
parenta6751ccb9ba85180c84135cc921eea11d83d5689 (diff)
[SCSI] fnic: prep for fc host dev loss tmo support
This removes the driver's get_host_def_dev_loss_tmo callback and just has the driver set the dev loss using the fc class fc_host_dev_loss_tmo macro like is done for other fc params. This also adds a set rport dev loss function so the fc class host dev loss tmp sysfs support being added in the fc class patch can update rports. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/fnic/fnic_main.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c
index df91a61591b2..bb63f1a1f808 100644
--- a/drivers/scsi/fnic/fnic_main.c
+++ b/drivers/scsi/fnic/fnic_main.c
@@ -110,12 +110,12 @@ static struct scsi_host_template fnic_host_template = {
110}; 110};
111 111
112static void 112static void
113fnic_get_host_def_loss_tmo(struct Scsi_Host *shost) 113fnic_set_rport_dev_loss_tmo(struct fc_rport *rport, u32 timeout)
114{ 114{
115 struct fc_lport *lp = shost_priv(shost); 115 if (timeout)
116 struct fnic *fnic = lport_priv(lp); 116 rport->dev_loss_tmo = timeout;
117 117 else
118 fc_host_def_dev_loss_tmo(shost) = fnic->config.port_down_timeout / 1000; 118 rport->dev_loss_tmo = 1;
119} 119}
120 120
121static void fnic_get_host_speed(struct Scsi_Host *shost); 121static void fnic_get_host_speed(struct Scsi_Host *shost);
@@ -145,9 +145,9 @@ static struct fc_function_template fnic_fc_functions = {
145 .show_starget_port_name = 1, 145 .show_starget_port_name = 1,
146 .show_starget_port_id = 1, 146 .show_starget_port_id = 1,
147 .show_rport_dev_loss_tmo = 1, 147 .show_rport_dev_loss_tmo = 1,
148 .set_rport_dev_loss_tmo = fnic_set_rport_dev_loss_tmo,
148 .issue_fc_host_lip = fnic_reset, 149 .issue_fc_host_lip = fnic_reset,
149 .get_fc_host_stats = fnic_get_stats, 150 .get_fc_host_stats = fnic_get_stats,
150 .get_host_def_dev_loss_tmo = fnic_get_host_def_loss_tmo,
151 .dd_fcrport_size = sizeof(struct fc_rport_libfc_priv), 151 .dd_fcrport_size = sizeof(struct fc_rport_libfc_priv),
152 .terminate_rport_io = fnic_terminate_rport_io, 152 .terminate_rport_io = fnic_terminate_rport_io,
153 .bsg_request = fc_lport_bsg_request, 153 .bsg_request = fc_lport_bsg_request,
@@ -712,6 +712,7 @@ static int __devinit fnic_probe(struct pci_dev *pdev,
712 goto err_out_free_exch_mgr; 712 goto err_out_free_exch_mgr;
713 } 713 }
714 fc_host_maxframe_size(lp->host) = lp->mfs; 714 fc_host_maxframe_size(lp->host) = lp->mfs;
715 fc_host_dev_loss_tmo(lp->host) = fnic->config.port_down_timeout / 1000;
715 716
716 sprintf(fc_host_symbolic_name(lp->host), 717 sprintf(fc_host_symbolic_name(lp->host),
717 DRV_NAME " v" DRV_VERSION " over %s", fnic->name); 718 DRV_NAME " v" DRV_VERSION " over %s", fnic->name);