diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2008-07-11 03:55:48 +0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-07-26 23:14:36 +0400 |
commit | 85821c906cf3563a00a3d98fa380a2581a7a5ff1 (patch) | |
tree | 52529a6a5f03c8d1aaacda0055cb480a63b50457 /drivers/scsi/qla2xxx/qla_attr.c | |
parent | 5f3a9a207f1fccde476dd31b4c63ead2967d934f (diff) | |
download | linux-85821c906cf3563a00a3d98fa380a2581a7a5ff1.tar.xz |
[SCSI] qla2xxx: Set an rport's dev_loss_tmo value in a consistent manner.
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: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_attr.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_attr.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 3112518b0e64..8728e873996d 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c @@ -972,26 +972,12 @@ qla2x00_get_starget_port_id(struct scsi_target *starget) } 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 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) - ha->port_down_retry_count = timeout; + rport->dev_loss_tmo = timeout; else - ha->port_down_retry_count = 1; - - rport->dev_loss_tmo = ha->port_down_retry_count + 5; + rport->dev_loss_tmo = 1; } static void @@ -1275,7 +1261,6 @@ struct fc_function_template qla2xxx_transport_functions = { .get_starget_port_id = qla2x00_get_starget_port_id, .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, .show_rport_dev_loss_tmo = 1, @@ -1320,7 +1305,6 @@ struct fc_function_template qla2xxx_transport_vport_functions = { .get_starget_port_id = qla2x00_get_starget_port_id, .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, .show_rport_dev_loss_tmo = 1, |