projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ddfc87a
)
[libata] Fix decoding of 6-byte commands
author
Jeff Garzik
<jeff@garzik.org>
Fri, 25 May 2007 08:39:39 +0000
(
04:39
-0400)
committer
Jeff Garzik
<jeff@garzik.org>
Fri, 25 May 2007 08:39:39 +0000
(
04:39
-0400)
The code for parsing 6-byte SCSI command LBAs
missed the top 5 bits (the MSB).
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/libata-scsi.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/ata/libata-scsi.c
b/drivers/ata/libata-scsi.c
index 242c43eef80773a29e08ab9b18587a7c9376e366..b3900cfbd880f05039014d08ca28b53c4949bb9e 100644
(file)
--- a/
drivers/ata/libata-scsi.c
+++ b/
drivers/ata/libata-scsi.c
@@
-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;