[v2] qlogicpti: fix timeout

Submitted by Meelis Roos on Oct. 7, 2011, 3:05 p.m.

Details

Message ID alpine.SOC.1.00.1110071800120.29152@math.ut.ee
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Meelis Roos Oct. 7, 2011, 3:05 p.m.
qlogicpti times out for some tape library operations (like mtx 
inventory). It seems SCSI command timeout is hardcoded into the driver. 
Fix it by propagating the timeout from scsi request to the controller as 
suggested by James Bottomley.

Tested on Sun Ultra 1 with Sun StorEdge L8 Autoloader.

Signed-off-by: Meelis Roos <mroos@linux.ee>

Comments

David Miller Oct. 7, 2011, 3:13 p.m.
From: Meelis Roos <mroos@linux.ee>
Date: Fri, 7 Oct 2011 18:05:08 +0300 (EEST)

> qlogicpti times out for some tape library operations (like mtx 
> inventory). It seems SCSI command timeout is hardcoded into the driver. 
> Fix it by propagating the timeout from scsi request to the controller as 
> suggested by James Bottomley.
> 
> Tested on Sun Ultra 1 with Sun StorEdge L8 Autoloader.
> 
> Signed-off-by: Meelis Roos <mroos@linux.ee>

Acked-by: David S. Miller <davem@davemloft.net>
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch hide | download patch | download mbox

diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index 9689d41c..e40dc1c 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -880,7 +880,7 @@  static inline void cmd_frob(struct Command_Entry *cmd, struct scsi_cmnd *Cmnd,
 		cmd->control_flags |= CFLAG_WRITE;
 	else
 		cmd->control_flags |= CFLAG_READ;
-	cmd->time_out = 30;
+	cmd->time_out = Cmnd->request->timeout/HZ;
 	memcpy(cmd->cdb, Cmnd->cmnd, Cmnd->cmd_len);
 }