public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qla2xxx -- Properly schedule mailbox command timeouts.
@ 2004-02-10 23:17 Andrew Vasquez
  0 siblings, 0 replies; only message in thread
From: Andrew Vasquez @ 2004-02-10 23:17 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi

[-- Attachment #1: Type: text/plain, Size: 233 bytes --]

James,

For mailbox commands which the firmware internally times-out in 
2 * R_A_TOV, the driver should timeout no sooner than 2.5 * R_A_TOV so
we do not inappropriately schedule an ISP abort.

Please apply.

Regards,
Andrew Vasquez

[-- Attachment #2: QL2_mbx_timeout_fix.diff --]
[-- Type: text/plain, Size: 1721 bytes --]

--- a/drivers/scsi/qla2xxx/qla_mbx.c	2004-02-02 08:29:35.000000000 -0800
+++ b/drivers/scsi/qla2xxx/qla_mbx.c	2004-02-05 22:03:45.000000000 -0800
@@ -1421,7 +1421,7 @@
 	mcp->in_mb = MBX_0;
 	mcp->buf_size = PORT_DATABASE_SIZE;
 	mcp->flags = MBX_DMA_IN;
-	mcp->tov =  ha->login_timeout * 2;
+	mcp->tov = (ha->login_timeout * 2) + (ha->login_timeout / 2);
 	rval = qla2x00_mailbox_command(ha, mcp);
 
 	if (rval == QLA_SUCCESS) {
@@ -1774,8 +1774,7 @@
 	mcp->in_mb = MBX_0|MBX_1;
 	mcp->buf_size = buf_size;
 	mcp->flags = MBX_DMA_OUT|MBX_DMA_IN;
-	/*mcp->tov = ha->retry_count * ha->login_timeout * 2;*/
-	mcp->tov =  ha->login_timeout * 2;
+	mcp->tov = (ha->login_timeout * 2) + (ha->login_timeout / 2);
 	rval = qla2x00_mailbox_command(ha, mcp);
 
 	if (rval != QLA_SUCCESS) {
@@ -1836,8 +1835,7 @@
 	mcp->mb[3] = area << 8 | al_pa;
 
 	mcp->in_mb = MBX_7|MBX_6|MBX_2|MBX_1|MBX_0;
-	/*mcp->tov = ha->retry_count * ha->login_timeout * 2;*/
-	mcp->tov = ha->login_timeout * 2;
+	mcp->tov = (ha->login_timeout * 2) + (ha->login_timeout / 2);
 	mcp->flags = 0;
 	rval = qla2x00_mailbox_command(ha, mcp);
 
@@ -1909,7 +1907,7 @@
 	mcp->mb[2] = opt;
 	mcp->out_mb = MBX_2|MBX_1|MBX_0;
  	mcp->in_mb = MBX_7|MBX_6|MBX_1|MBX_0;
-	mcp->tov =  ha->login_timeout * 2;
+	mcp->tov = (ha->login_timeout * 2) + (ha->login_timeout / 2);
 	mcp->flags = 0;
 	rval = qla2x00_mailbox_command(ha, mcp);
 
@@ -2412,7 +2410,7 @@
 	mcp->in_mb = MBX_1|MBX_0;
 	mcp->buf_size = FCAL_MAP_SIZE;
 	mcp->flags = MBX_DMA_IN;
-	mcp->tov =  ha->login_timeout * 2;
+	mcp->tov = (ha->login_timeout * 2) + (ha->login_timeout / 2);
 	rval = qla2x00_mailbox_command(ha, mcp);
 
 	if (rval == QLA_SUCCESS) {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-02-10 23:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-10 23:17 [PATCH] qla2xxx -- Properly schedule mailbox command timeouts Andrew Vasquez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox