Commit 48586820 authored by Mike Christie's avatar Mike Christie Committed by James Bottomley

[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: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent a6751ccb
...@@ -110,12 +110,12 @@ static struct scsi_host_template fnic_host_template = { ...@@ -110,12 +110,12 @@ static struct scsi_host_template fnic_host_template = {
}; };
static void static void
fnic_get_host_def_loss_tmo(struct Scsi_Host *shost) fnic_set_rport_dev_loss_tmo(struct fc_rport *rport, u32 timeout)
{ {
struct fc_lport *lp = shost_priv(shost); if (timeout)
struct fnic *fnic = lport_priv(lp); rport->dev_loss_tmo = timeout;
else
fc_host_def_dev_loss_tmo(shost) = fnic->config.port_down_timeout / 1000; rport->dev_loss_tmo = 1;
} }
static void fnic_get_host_speed(struct Scsi_Host *shost); static void fnic_get_host_speed(struct Scsi_Host *shost);
...@@ -145,9 +145,9 @@ static struct fc_function_template fnic_fc_functions = { ...@@ -145,9 +145,9 @@ static struct fc_function_template fnic_fc_functions = {
.show_starget_port_name = 1, .show_starget_port_name = 1,
.show_starget_port_id = 1, .show_starget_port_id = 1,
.show_rport_dev_loss_tmo = 1, .show_rport_dev_loss_tmo = 1,
.set_rport_dev_loss_tmo = fnic_set_rport_dev_loss_tmo,
.issue_fc_host_lip = fnic_reset, .issue_fc_host_lip = fnic_reset,
.get_fc_host_stats = fnic_get_stats, .get_fc_host_stats = fnic_get_stats,
.get_host_def_dev_loss_tmo = fnic_get_host_def_loss_tmo,
.dd_fcrport_size = sizeof(struct fc_rport_libfc_priv), .dd_fcrport_size = sizeof(struct fc_rport_libfc_priv),
.terminate_rport_io = fnic_terminate_rport_io, .terminate_rport_io = fnic_terminate_rport_io,
.bsg_request = fc_lport_bsg_request, .bsg_request = fc_lport_bsg_request,
...@@ -712,6 +712,7 @@ static int __devinit fnic_probe(struct pci_dev *pdev, ...@@ -712,6 +712,7 @@ static int __devinit fnic_probe(struct pci_dev *pdev,
goto err_out_free_exch_mgr; goto err_out_free_exch_mgr;
} }
fc_host_maxframe_size(lp->host) = lp->mfs; fc_host_maxframe_size(lp->host) = lp->mfs;
fc_host_dev_loss_tmo(lp->host) = fnic->config.port_down_timeout / 1000;
sprintf(fc_host_symbolic_name(lp->host), sprintf(fc_host_symbolic_name(lp->host),
DRV_NAME " v" DRV_VERSION " over %s", fnic->name); DRV_NAME " v" DRV_VERSION " over %s", fnic->name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment