提交 6c7b7d2b 编写于 作者: J Jeff Garzik

[libata] Fix decoding of 6-byte commands

The code for parsing 6-byte SCSI command LBAs
missed the top 5 bits (the MSB).
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 ddfc87a0
......@@ -1050,14 +1050,15 @@ static unsigned int ata_scsi_flush_xlat(struct ata_queued_cmd *qc)
static void scsi_6_lba_len(const u8 *cdb, u64 *plba, u32 *plen)
{
u64 lba = 0;
u32 len = 0;
u32 len;
VPRINTK("six-byte command\n");
lba |= ((u64)(cdb[1] & 0x1f)) << 16;
lba |= ((u64)cdb[2]) << 8;
lba |= ((u64)cdb[3]);
len |= ((u32)cdb[4]);
len = cdb[4];
*plba = lba;
*plen = len;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册