提交 72ecb8d9 编写于 作者: A aliguori

scsi-generic: correct 6-bytes commands transfer length (Laurent Vivier)

According to SCSI documentation, for 6 bytes commands (READ(6),
WRITE(6)), if transfer length is 0 it specifies 256 blocks.
Signed-off-by: NLaurent Vivier <Laurent.Vivier@bull.net>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5292 c046a42c-6fe2-441c-8c8c-71466251a162
上级 4f26a486
......@@ -352,6 +352,9 @@ static int scsi_length(uint8_t *cmd, int blocksize, int *cmdlen, uint32_t *len)
case 0:
*len = cmd[4];
*cmdlen = 6;
/* length 0 means 256 blocks */
if (*len == 0)
*len = 256;
break;
case 1:
case 2:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册