Commit ac2ef120 authored by Andrew Vasquez's avatar Andrew Vasquez Committed by Greg Kroah-Hartman

qla2xxx: Set an rport's dev_loss_tmo value in a consistent manner.

[ Upstream commit 85821c90 ]

As there's no point in adding a fixed-fudge value (originally 5
seconds), honor the user settings only.  We also remove the
driver's dead-callback get_rport_dev_loss_tmo function
(qla2x00_get_rport_loss_tmo()).
Signed-off-by: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 34b8cfcf
...@@ -971,27 +971,13 @@ qla2x00_get_starget_port_id(struct scsi_target *starget) ...@@ -971,27 +971,13 @@ qla2x00_get_starget_port_id(struct scsi_target *starget)
fc_starget_port_id(starget) = port_id; fc_starget_port_id(starget) = port_id;
} }
static void
qla2x00_get_rport_loss_tmo(struct fc_rport *rport)
{
struct Scsi_Host *host = rport_to_shost(rport);
scsi_qla_host_t *ha = shost_priv(host);
rport->dev_loss_tmo = ha->port_down_retry_count + 5;
}
static void static void
qla2x00_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout) qla2x00_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout)
{ {
struct Scsi_Host *host = rport_to_shost(rport);
scsi_qla_host_t *ha = shost_priv(host);
if (timeout) if (timeout)
ha->port_down_retry_count = timeout; rport->dev_loss_tmo = timeout;
else else
ha->port_down_retry_count = 1; rport->dev_loss_tmo = 1;
rport->dev_loss_tmo = ha->port_down_retry_count + 5;
} }
static void static void
...@@ -1275,7 +1261,6 @@ struct fc_function_template qla2xxx_transport_functions = { ...@@ -1275,7 +1261,6 @@ struct fc_function_template qla2xxx_transport_functions = {
.get_starget_port_id = qla2x00_get_starget_port_id, .get_starget_port_id = qla2x00_get_starget_port_id,
.show_starget_port_id = 1, .show_starget_port_id = 1,
.get_rport_dev_loss_tmo = qla2x00_get_rport_loss_tmo,
.set_rport_dev_loss_tmo = qla2x00_set_rport_loss_tmo, .set_rport_dev_loss_tmo = qla2x00_set_rport_loss_tmo,
.show_rport_dev_loss_tmo = 1, .show_rport_dev_loss_tmo = 1,
...@@ -1320,7 +1305,6 @@ struct fc_function_template qla2xxx_transport_vport_functions = { ...@@ -1320,7 +1305,6 @@ struct fc_function_template qla2xxx_transport_vport_functions = {
.get_starget_port_id = qla2x00_get_starget_port_id, .get_starget_port_id = qla2x00_get_starget_port_id,
.show_starget_port_id = 1, .show_starget_port_id = 1,
.get_rport_dev_loss_tmo = qla2x00_get_rport_loss_tmo,
.set_rport_dev_loss_tmo = qla2x00_set_rport_loss_tmo, .set_rport_dev_loss_tmo = qla2x00_set_rport_loss_tmo,
.show_rport_dev_loss_tmo = 1, .show_rport_dev_loss_tmo = 1,
......
...@@ -1107,7 +1107,7 @@ qla2xxx_slave_configure(struct scsi_device *sdev) ...@@ -1107,7 +1107,7 @@ qla2xxx_slave_configure(struct scsi_device *sdev)
else else
scsi_deactivate_tcq(sdev, ha->max_q_depth); scsi_deactivate_tcq(sdev, ha->max_q_depth);
rport->dev_loss_tmo = ha->port_down_retry_count + 5; rport->dev_loss_tmo = ha->port_down_retry_count;
return 0; return 0;
} }
......
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