diff options
author | Yang, Bo <Bo.Yang@lsi.com> | 2009-10-06 16:12:21 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-10-29 13:03:17 -0400 |
commit | 8d56825321339f0ef7ad08eb58332e1836881e3b (patch) | |
tree | 183a76e1ded81f5cdfaa429a05fd04b5ba2c5efe | |
parent | 153f251e477f41dab0314c4cd2004b9e7ebac4eb (diff) |
[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>
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas.c | 11 |
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, | |||
687 | memcpy(pthru->cdb, scp->cmnd, scp->cmd_len); | 687 | memcpy(pthru->cdb, scp->cmnd, scp->cmd_len); |
688 | 688 | ||
689 | /* | 689 | /* |
690 | * If the command is for the tape device, set the | ||
691 | * pthru timeout to the os layer timeout value. | ||
692 | */ | ||
693 | if (scp->device->type == TYPE_TAPE) { | ||
694 | if ((scp->request->timeout / HZ) > 0xFFFF) | ||
695 | pthru->timeout = 0xFFFF; | ||
696 | else | ||
697 | pthru->timeout = scp->request->timeout / HZ; | ||
698 | } | ||
699 | |||
700 | /* | ||
690 | * Construct SGL | 701 | * Construct SGL |
691 | */ | 702 | */ |
692 | if (IS_DMA64) { | 703 | if (IS_DMA64) { |