提交 8d568253 编写于 作者: Y Yang, Bo 提交者: James Bottomley

[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: NJames Bottomley <James.Bottomley@suse.de>
上级 153f251e
......@@ -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
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册