We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d910fe commit 08b64eeCopy full SHA for 08b64ee
drivers/ata/libata-scsi.c
@@ -1334,17 +1334,8 @@ static unsigned int ata_scsi_flush_xlat(struct ata_queued_cmd *qc)
1334
*/
1335
static void scsi_6_lba_len(const u8 *cdb, u64 *plba, u32 *plen)
1336
{
1337
- u64 lba = 0;
1338
- u32 len;
1339
-
1340
- lba |= ((u64)(cdb[1] & 0x1f)) << 16;
1341
- lba |= ((u64)cdb[2]) << 8;
1342
- lba |= ((u64)cdb[3]);
1343
1344
- len = cdb[4];
1345
1346
- *plba = lba;
1347
- *plen = len;
+ *plba = get_unaligned_be24(&cdb[1]) & 0x1fffff;
+ *plen = cdb[4];
1348
}
1349
1350
/**
0 commit comments