summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid
diff options
context:
space:
mode:
authorYang, Bo <Bo.Yang@lsi.com>2009-10-06 22:12:21 +0200
committerJames Bottomley <James.Bottomley@suse.de>2009-10-29 18:03:17 +0100
commit8d56825321339f0ef7ad08eb58332e1836881e3b (patch)
tree183a76e1ded81f5cdfaa429a05fd04b5ba2c5efe /drivers/scsi/megaraid
parent[SCSI] mpt2sas: Bump version 03.100.03.00 (diff)
downloadlinux-8d56825321339f0ef7ad08eb58332e1836881e3b.tar.xz
linux-8d56825321339f0ef7ad08eb58332e1836881e3b.zip
[SCSI] megaraid_sas: tape drive support fix
Add the Tape drive fix to the megaraid_sas driver: If the command is for the tape device, set the FW pthru timeout to the os layer timeout value. Signed-off-by Bo Yang<bo.yang@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/megaraid')
-rw-r--r--drivers/scsi/megaraid/megaraid_sas.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c
index a39addc3a596..6fd1e1796029 100644
--- a/drivers/scsi/megaraid/megaraid_sas.c
+++ b/drivers/scsi/megaraid/megaraid_sas.c
@@ -687,6 +687,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
*/
if (IS_DMA64) {