Skip to contentSkip to conversation

qlogicpti: increase timeout

PATCH In review Meelis Roos 3 participants 4 messages Oct 7, 2011 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qlogicpti: increase timeout

qlogicpti times out for some tape library operations (like mtx inventory). It seems SCSI command timeout is hardcoded into the driver. So let's increase it to some arbitrary higher value that Works For Me(tm).

drivers/scsi/qlogicpti.c +1 -1
index 9689d41c..4290141 100644
@@ -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 = 120;
 	memcpy(cmd->cdb, Cmnd->cmnd, Cmnd->cmd_len);
 }
 
Signature · 1 line
Meelis Roos ([email protected])
maintainer
#1 lore raw
Quoted 12 lines · Meelis Roos

qlogicpti times out for some tape library operations (like mtx inventory). It seems SCSI command timeout is hardcoded into the driver. So let's increase it to some arbitrary higher value that Works For Me(tm).

drivers/scsi/qlogicpti.c +0 -0
index 9689d41c..4290141 100644

drivers/scsi/qlogicpti.c static inline void cmd_frob(struct Command_Entry *cmd, struct scsi_cmnd *Cmnd, · line 883

Quoted 5 lines
drivers/scsi/qlogicpti.c +1 -1
@@ -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 = 120;

What about just using the actual command specific timeout:

cmd->time_out = Cmnd->request->timeout/HZ;

?

James

James

#2 lore raw

PATCH v2 1/1 qlogicpti: fix timeout

In reply to Meelis Roos

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.

drivers/scsi/qlogicpti.c +1 -1
index 9689d41c..e40dc1c 100644
@@ -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);
 }
 
Signature · 1 line
Meelis Roos ([email protected])
Acked-by on v2 1/1
#3 lore raw

Re: [PATCH v2] qlogicpti: fix timeout

From: Meelis Roos <[email protected]>
Date: Fri, 7 Oct 2011 18:05:08 +0300 (EEST)

Quoted 8 lines

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.