Skip to content

Commit

Permalink
[SCSI] megaraid_sas: tape drive support fix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yang, Bo authored and James Bottomley committed Oct 29, 2009
1 parent 153f251 commit 8d56825
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drivers/scsi/megaraid/megaraid_sas.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit 8d56825

Please sign in to comment.