From 528c04ee6dcdb4591aab94a003e77e41cd7d2d23 Mon Sep 17 00:00:00 2001 From: Meelis Roos Date: Fri, 7 Oct 2011 18:05:08 +0300 Subject: [PATCH] [SCSI] qlogicpti: fix timeout 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 Acked-by: David S. Miller Signed-off-by: James Bottomley --- drivers/scsi/qlogicpti.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c index 9689d41c788..e40dc1cb09a 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); } -- 2.39.5