From 9c253dfad9a6f54bc0911d257483eea50dd175c8 Mon Sep 17 00:00:00 2001 From: "Yang, Bo" Date: Tue, 6 Oct 2009 14:12:21 -0600 Subject: [PATCH] --- yaml --- r: 173560 b: refs/heads/master c: 8d56825321339f0ef7ad08eb58332e1836881e3b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/scsi/megaraid/megaraid_sas.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index b910d809ee0a..6d53eb656c18 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 153f251e477f41dab0314c4cd2004b9e7ebac4eb +refs/heads/master: 8d56825321339f0ef7ad08eb58332e1836881e3b diff --git a/trunk/drivers/scsi/megaraid/megaraid_sas.c b/trunk/drivers/scsi/megaraid/megaraid_sas.c index a39addc3a596..6fd1e1796029 100644 --- a/trunk/drivers/scsi/megaraid/megaraid_sas.c +++ b/trunk/drivers/scsi/megaraid/megaraid_sas.c @@ -686,6 +686,17 @@ megasas_build_dcdb(struct megasas_instance *instance, struct scsi_cmnd *scp, memcpy(pthru->cdb, scp->cmnd, scp->cmd_len); + /* + * If the command is for the tape device, set the + * pthru timeout to the os layer timeout value. + */ + if (scp->device->type == TYPE_TAPE) { + if ((scp->request->timeout / HZ) > 0xFFFF) + pthru->timeout = 0xFFFF; + else + pthru->timeout = scp->request->timeout / HZ; + } + /* * Construct SGL */