aacraid: correct use of cmd->timeout field
Subsystems (2)
PATCH 1/1 aacraid: correct use of cmd->timeout field
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-
Quoted 1 line
timeout_per_command.
James
drivers/scsi/aacraid/aachba.c +1 -1
@@ -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 ; }
Quoted 5 lines · James Bottomley
The
cmd->timeoutfield 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-Quoted 1 line
timeout_per_command.
It looks that way to me too. Is scsicmd->timeout even set anywhere? I
didn't find any.
Mark.
Quoted 16 lines
James
drivers/scsi/aacraid/aachba.c +1
-1@@ -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 ; }
Signature · 1 line
Mark Haverkamp <[email protected]>