[SCSI] qlogicpti: fix timeout
authorMeelis Roos <mroos@linux.ee>
Fri, 7 Oct 2011 15:05:08 +0000 (18:05 +0300)
committerJames Bottomley <JBottomley@Parallels.com>
Sun, 16 Oct 2011 15:58:52 +0000 (10:58 -0500)
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>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/qlogicpti.c

index 9689d41c788887f4f3fb12e43c87b0c67ae1aa39..e40dc1cb09a0bdd89606981fe341cdd4630edbd5 100644 (file)
@@ -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);
 }
 
This page took 0.025036 seconds and 5 git commands to generate.