* [PATCH] aacraid: correct use of cmd->timeout field
@ 2005-08-05 21:31 James Bottomley
2005-08-05 21:45 ` Mark Haverkamp
0 siblings, 1 reply; 3+ messages in thread
From: James Bottomley @ 2005-08-05 21:31 UTC (permalink / raw)
To: Salyzyn, Mark, Mark Haverkamp; +Cc: SCSI Mailing List
The cmd->timeout field has been obsolete for a while now. While looking
to remove it, I came across this use in the aacraid driver. It looks
like you want to initialise the firmware with the current timeout of the
command (in seconds), so the value I think you should be using is cmd-
>timeout_per_command.
James
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -1894,7 +1893,7 @@ static int aac_send_srb_fib(struct scsi_
srbcmd->id = cpu_to_le32(scsicmd->device->id);
srbcmd->lun = cpu_to_le32(scsicmd->device->lun);
srbcmd->flags = cpu_to_le32(flag);
- timeout = (scsicmd->timeout-jiffies)/HZ;
+ timeout = scsicmd->timeout_per_command/HZ;
if(timeout == 0){
timeout = 1;
}
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] aacraid: correct use of cmd->timeout field
2005-08-05 21:31 [PATCH] aacraid: correct use of cmd->timeout field James Bottomley
@ 2005-08-05 21:45 ` Mark Haverkamp
0 siblings, 0 replies; 3+ messages in thread
From: Mark Haverkamp @ 2005-08-05 21:45 UTC (permalink / raw)
To: James Bottomley; +Cc: Mark Salyzyn, SCSI Mailing List
On Fri, 2005-08-05 at 16:31 -0500, James Bottomley wrote:
> The cmd->timeout field has been obsolete for a while now. While looking
> to remove it, I came across this use in the aacraid driver. It looks
> like you want to initialise the firmware with the current timeout of the
> command (in seconds), so the value I think you should be using is cmd-
> >timeout_per_command.
It looks that way to me too. Is scsicmd->timeout even set anywhere? I
didn't find any.
Mark.
>
> James
>
> diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
> --- a/drivers/scsi/aacraid/aachba.c
> +++ b/drivers/scsi/aacraid/aachba.c
> @@ -1894,7 +1893,7 @@ static int aac_send_srb_fib(struct scsi_
> srbcmd->id = cpu_to_le32(scsicmd->device->id);
> srbcmd->lun = cpu_to_le32(scsicmd->device->lun);
> srbcmd->flags = cpu_to_le32(flag);
> - timeout = (scsicmd->timeout-jiffies)/HZ;
> + timeout = scsicmd->timeout_per_command/HZ;
> if(timeout == 0){
> timeout = 1;
> }
>
--
Mark Haverkamp <markh@osdl.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] aacraid: correct use of cmd->timeout field
@ 2005-08-08 12:03 Salyzyn, Mark
0 siblings, 0 replies; 3+ messages in thread
From: Salyzyn, Mark @ 2005-08-08 12:03 UTC (permalink / raw)
To: Mark Haverkamp, James Bottomley; +Cc: SCSI Mailing List
James' patch is fine!
Sincerely -- Mark Salyzyn
-----Original Message-----
From: Mark Haverkamp [mailto:markh@osdl.org]
Sent: Friday, August 05, 2005 5:45 PM
To: James Bottomley
Cc: Salyzyn, Mark; SCSI Mailing List
Subject: Re: [PATCH] aacraid: correct use of cmd->timeout field
On Fri, 2005-08-05 at 16:31 -0500, James Bottomley wrote:
> The cmd->timeout field has been obsolete for a while now. While
looking
> to remove it, I came across this use in the aacraid driver. It looks
> like you want to initialise the firmware with the current timeout of
the
> command (in seconds), so the value I think you should be using is cmd-
> >timeout_per_command.
It looks that way to me too. Is scsicmd->timeout even set anywhere? I
didn't find any.
Mark.
>
> James
>
> diff --git a/drivers/scsi/aacraid/aachba.c
b/drivers/scsi/aacraid/aachba.c
> --- a/drivers/scsi/aacraid/aachba.c
> +++ b/drivers/scsi/aacraid/aachba.c
> @@ -1894,7 +1893,7 @@ static int aac_send_srb_fib(struct scsi_
> srbcmd->id = cpu_to_le32(scsicmd->device->id);
> srbcmd->lun = cpu_to_le32(scsicmd->device->lun);
> srbcmd->flags = cpu_to_le32(flag);
> - timeout = (scsicmd->timeout-jiffies)/HZ;
> + timeout = scsicmd->timeout_per_command/HZ;
> if(timeout == 0){
> timeout = 1;
> }
>
--
Mark Haverkamp <markh@osdl.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-08-08 12:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-05 21:31 [PATCH] aacraid: correct use of cmd->timeout field James Bottomley
2005-08-05 21:45 ` Mark Haverkamp
-- strict thread matches above, loose matches on Subject: below --
2005-08-08 12:03 Salyzyn, Mark
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.