diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2008-07-10 19:55:48 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-07-26 15:14:36 -0400 |
commit | 85821c906cf3563a00a3d98fa380a2581a7a5ff1 (patch) | |
tree | 52529a6a5f03c8d1aaacda0055cb480a63b50457 /drivers | |
parent | 5f3a9a207f1fccde476dd31b4c63ead2967d934f (diff) |
[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')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_attr.c | 20 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 2 |
2 files changed, 3 insertions, 19 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) | |||
972 | } | 972 | } |
973 | 973 | ||
974 | static void | 974 | static void |
975 | qla2x00_get_rport_loss_tmo(struct fc_rport *rport) | ||
976 | { | ||
977 | struct Scsi_Host *host = rport_to_shost(rport); | ||
978 | scsi_qla_host_t *ha = shost_priv(host); | ||
979 | |||
980 | rport->dev_loss_tmo = ha->port_down_retry_count + 5; | ||
981 | } | ||
982 | |||
983 | static void | ||
984 | qla2x00_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout) | 975 | qla2x00_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout) |
985 | { | 976 | { |
986 | struct Scsi_Host *host = rport_to_shost(rport); | ||
987 | scsi_qla_host_t *ha = shost_priv(host); | ||
988 | |||
989 | if (timeout) | 977 | if (timeout) |
990 | ha->port_down_retry_count = timeout; | 978 | rport->dev_loss_tmo = timeout; |
991 | else | 979 | else |
992 | ha->port_down_retry_count = 1; | 980 | rport->dev_loss_tmo = 1; |
993 | |||
994 | rport->dev_loss_tmo = ha->port_down_retry_count + 5; | ||
995 | } | 981 | } |
996 | 982 | ||
997 | static void | 983 | static void |
@@ -1275,7 +1261,6 @@ struct fc_function_template qla2xxx_transport_functions = { | |||
1275 | .get_starget_port_id = qla2x00_get_starget_port_id, | 1261 | .get_starget_port_id = qla2x00_get_starget_port_id, |
1276 | .show_starget_port_id = 1, | 1262 | .show_starget_port_id = 1, |
1277 | 1263 | ||
1278 | .get_rport_dev_loss_tmo = qla2x00_get_rport_loss_tmo, | ||
1279 | .set_rport_dev_loss_tmo = qla2x00_set_rport_loss_tmo, | 1264 | .set_rport_dev_loss_tmo = qla2x00_set_rport_loss_tmo, |
1280 | .show_rport_dev_loss_tmo = 1, | 1265 | .show_rport_dev_loss_tmo = 1, |
1281 | 1266 | ||
@@ -1320,7 +1305,6 @@ struct fc_function_template qla2xxx_transport_vport_functions = { | |||
1320 | .get_starget_port_id = qla2x00_get_starget_port_id, | 1305 | .get_starget_port_id = qla2x00_get_starget_port_id, |
1321 | .show_starget_port_id = 1, | 1306 | .show_starget_port_id = 1, |
1322 | 1307 | ||
1323 | .get_rport_dev_loss_tmo = qla2x00_get_rport_loss_tmo, | ||
1324 | .set_rport_dev_loss_tmo = qla2x00_set_rport_loss_tmo, | 1308 | .set_rport_dev_loss_tmo = qla2x00_set_rport_loss_tmo, |
1325 | .show_rport_dev_loss_tmo = 1, | 1309 | .show_rport_dev_loss_tmo = 1, |
1326 | 1310 | ||
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index c5ad858e17e6..047ee644aa91 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -1107,7 +1107,7 @@ qla2xxx_slave_configure(struct scsi_device *sdev) | |||
1107 | else | 1107 | else |
1108 | scsi_deactivate_tcq(sdev, ha->max_q_depth); | 1108 | scsi_deactivate_tcq(sdev, ha->max_q_depth); |
1109 | 1109 | ||
1110 | rport->dev_loss_tmo = ha->port_down_retry_count + 5; | 1110 | rport->dev_loss_tmo = ha->port_down_retry_count; |
1111 | 1111 | ||
1112 | return 0; | 1112 | return 0; |
1113 | } | 1113 | } |