[patch 49/49] qla2xxx: Set an rports dev_loss_tmo value in a consistent manner.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>, <stable@...>
Cc: Justin Forbes <jmforbes@...>, Zwane Mwaikambo <zwane@...>, Theodore Ts'o <tytso@...>, Randy Dunlap <rdunlap@...>, Dave Jones <davej@...>, Chuck Wolber <chuckw@...>, Chris Wedgwood <reviews@...>, Michael Krufky <mkrufky@...>, Chuck Ebbert <cebbert@...>, Domenico Andreoli <cavokz@...>, Willy Tarreau <w@...>, Rodrigo Rubira Branco <rbranco@...>, Jake Edge <jake@...>, Eugene Teo <eteo@...>, <torvalds@...>, <akpm@...>, <alan@...>, Andrew Vasquez <andrew.vasquez@...>, James Bottomley <James.Bottomley@...>
Date: Monday, August 18, 2008 - 3:21 pm

2.6.25-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Andrew Vasquez <andrew.vasquez@qlogic.com>

[ Upstream commit 85821c906cf3563a00a3d98fa380a2581a7a5ff1 ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/scsi/qla2xxx/qla_attr.c |   20 ++------------------
 drivers/scsi/qla2xxx/qla_os.c   |    2 +-
 2 files changed, 3 insertions(+), 19 deletions(-)

--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -947,26 +947,12 @@ qla2x00_get_starget_port_id(struct scsi_
 }
 
 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
@@ -1249,7 +1235,6 @@ struct fc_function_template qla2xxx_tran
 	.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,
 
@@ -1294,7 +1279,6 @@ struct fc_function_template qla2xxx_tran
 	.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,
 
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1194,7 +1194,7 @@ qla2xxx_slave_configure(struct scsi_devi
 	else
 		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;
 }

-- 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 00/49] 2.6.25-stable review, Greg KH, (Mon Aug 18, 3:18 pm)
[patch 49/49] qla2xxx: Set an rports dev_loss_tmo value in a..., Greg KH, (Mon Aug 18, 3:21 pm)
[patch 46/49] x86: fix spin_is_contended(), Greg KH, (Mon Aug 18, 3:21 pm)
[patch 41/49] radeon: misc corrections, Greg KH, (Mon Aug 18, 3:20 pm)
[patch 40/49] uml: PATH_MAX needs limits.h, Greg KH, (Mon Aug 18, 3:20 pm)
[patch 39/49] uml: Fix boot crash, Greg KH, (Mon Aug 18, 3:20 pm)
[patch 30/49] uml: track and make up lost ticks, Greg KH, (Mon Aug 18, 3:20 pm)
[patch 25/49] sparc64: FUTEX_OP_ANDN fix, Greg KH, (Mon Aug 18, 3:20 pm)
[patch 23/49] random32: seeding improvement, Greg KH, (Mon Aug 18, 3:20 pm)
[patch 15/49] mlock() fix return values, Greg KH, (Mon Aug 18, 3:19 pm)
[patch 12/49] radeonfb: fix accel engine hangs, Greg KH, (Mon Aug 18, 3:19 pm)
[patch 07/49] SCSI: ses: fix VPD inquiry overrun, Greg KH, (Mon Aug 18, 3:19 pm)