From: Ari Sundholm <asundhol@xxxxxxxxx> Backported from Areca's current version of the driver. Signed-off-by: Ari Sundholm <asundhol@xxxxxxxxx> --- drivers/scsi/arcmsr/arcmsr_hba.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index 652b41b..e79b62b 100644 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c @@ -79,6 +79,9 @@ MODULE_VERSION(ARCMSR_DRIVER_VERSION); #define ARCMSR_RETRYCOUNT 12 wait_queue_head_t wait_q; +static int timeout; +module_param(timeout, int, 0644); +MODULE_PARM_DESC(timeout, " scsi cmd timeout value (0 - 120 sec.)"); static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb, struct scsi_cmnd *cmd); static int arcmsr_iop_confirm(struct AdapterControlBlock *acb); @@ -1151,6 +1154,14 @@ static int arcmsr_build_ccb(struct AdapterControlBlock *acb, if (pcmd->sc_data_direction == DMA_TO_DEVICE) arcmsr_cdb->Flags |= ARCMSR_CDB_FLAG_WRITE; ccb->arc_cdb_size = arccdbsize; + + if (timeout) { + pcmd->request->deadline = jiffies + timeout * HZ; + if (pcmd->device->request_queue->timeout.function) + mod_timer(&pcmd->device->request_queue->timeout, + pcmd->request->deadline); + } + return SUCCESS; } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html