public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] qla1280 command timeout
@ 2006-09-25  9:44 Jes Sorensen
  2006-09-25 16:11 ` Ian Dall
  0 siblings, 1 reply; 2+ messages in thread
From: Jes Sorensen @ 2006-09-25  9:44 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Andrew Morton, James.Bottomley, linux-kernel, linux-scsi,
	scott.bailey, ian, Jeremy Higdon

Hi,

This one is originally from Ian Dall via bugzilla.kernel.org - Ian if
you wish to add a Signed-off-by please do, couldn't add it since you
didn't leave one in bugzilla.

Anyway the patch seems obviously correct (famous last words) and it
would be nice to get into 2.6.19.

Thanks,
Jes

Original patch from Ian Dall in bugzilla. Set command timeout as
specified by the SCSI layer rather than hardcode it to 30 seconds. I
have received a couple of reports of people hitting this one with
various tape configurations and the patch looks obviously correct.
                                                                  - Jes

>From http://bugzilla.kernel.org/show_bug.cgi?id=6275

ian@beware.dropbear.id.au (Ian Dall):

The command sent to the card was using a 30second timeout regardless of the
timeout requested in the scsi command passed down from higher levels.

Signed-off-by: Jes Sorensen <jes@sgi.com>

---
 drivers/scsi/qla1280.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6/drivers/scsi/qla1280.c
===================================================================
--- linux-2.6.orig/drivers/scsi/qla1280.c
+++ linux-2.6/drivers/scsi/qla1280.c
@@ -2864,7 +2864,7 @@ qla1280_64bit_start_scsi(struct scsi_qla
 	memset(((char *)pkt + 8), 0, (REQUEST_ENTRY_SIZE - 8));
 
 	/* Set ISP command timeout. */
-	pkt->timeout = cpu_to_le16(30);
+	pkt->timeout = cpu_to_le16(cmd->timeout_per_command/HZ);
 
 	/* Set device target ID and LUN */
 	pkt->lun = SCSI_LUN_32(cmd);
@@ -3163,7 +3163,7 @@ qla1280_32bit_start_scsi(struct scsi_qla
 	memset(((char *)pkt + 8), 0, (REQUEST_ENTRY_SIZE - 8));
 
 	/* Set ISP command timeout. */
-	pkt->timeout = cpu_to_le16(30);
+	pkt->timeout = cpu_to_le16(cmd->timeout_per_command/HZ);
 
 	/* Set device target ID and LUN */
 	pkt->lun = SCSI_LUN_32(cmd);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch] qla1280 command timeout
  2006-09-25  9:44 [patch] qla1280 command timeout Jes Sorensen
@ 2006-09-25 16:11 ` Ian Dall
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Dall @ 2006-09-25 16:11 UTC (permalink / raw)
  To: Jes Sorensen
  Cc: Linus Torvalds, Andrew Morton, James.Bottomley, linux-kernel,
	linux-scsi, scott.bailey, Jeremy Higdon

On Mon, 2006-09-25 at 05:44 -0400, Jes Sorensen wrote:
> Hi,
> 
> This one is originally from Ian Dall via bugzilla.kernel.org - Ian if
> you wish to add a Signed-off-by please do, couldn't add it since you
> didn't leave one in bugzilla.

See below.

> Anyway the patch seems obviously correct (famous last words) and it
> would be nice to get into 2.6.19.
> 
> Thanks,
> Jes
> 
> Original patch from Ian Dall in bugzilla. Set command timeout as
> specified by the SCSI layer rather than hardcode it to 30 seconds. I
> have received a couple of reports of people hitting this one with
> various tape configurations and the patch looks obviously correct.
>                                                                   - Jes
> 
> >From http://bugzilla.kernel.org/show_bug.cgi?id=6275
> 
> ian@beware.dropbear.id.au (Ian Dall):
> 
> The command sent to the card was using a 30second timeout regardless of the
> timeout requested in the scsi command passed down from higher levels.
> 
> Signed-off-by: Jes Sorensen <jes@sgi.com>

Signed-off-by: Ian Dall <ian@beware.dropbear.id.au>
> 
> ---
>  drivers/scsi/qla1280.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> Index: linux-2.6/drivers/scsi/qla1280.c
> ===================================================================
> --- linux-2.6.orig/drivers/scsi/qla1280.c
> +++ linux-2.6/drivers/scsi/qla1280.c
> @@ -2864,7 +2864,7 @@ qla1280_64bit_start_scsi(struct scsi_qla
>  	memset(((char *)pkt + 8), 0, (REQUEST_ENTRY_SIZE - 8));
>  
>  	/* Set ISP command timeout. */
> -	pkt->timeout = cpu_to_le16(30);
> +	pkt->timeout = cpu_to_le16(cmd->timeout_per_command/HZ);
>  
>  	/* Set device target ID and LUN */
>  	pkt->lun = SCSI_LUN_32(cmd);
> @@ -3163,7 +3163,7 @@ qla1280_32bit_start_scsi(struct scsi_qla
>  	memset(((char *)pkt + 8), 0, (REQUEST_ENTRY_SIZE - 8));
>  
>  	/* Set ISP command timeout. */
> -	pkt->timeout = cpu_to_le16(30);
> +	pkt->timeout = cpu_to_le16(cmd->timeout_per_command/HZ);
>  
>  	/* Set device target ID and LUN */
>  	pkt->lun = SCSI_LUN_32(cmd);
-- 
Ian Dall <ian@beware.dropbear.id.au>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-09-25 16:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-25  9:44 [patch] qla1280 command timeout Jes Sorensen
2006-09-25 16:11 ` Ian Dall

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