Commit 49838689 authored by Jeff Garzik's avatar Jeff Garzik Committed by Linus Torvalds

[PATCH] fix SATA simulation of 6-byte read/write

Here's one for -rc...  either this bit is assumed on most modern drives,
or nobody uses the 6-byte commands for read/write (which is very
likely).  Either way it definitely wants fixing.

Since we use the modern "LBA" method of addressing sectors, this bit
must be present in the Device register when issuing a read or write. 
There are three code paths that need this bit, and only two of them
actually set it.  This patch fixes the third (and apparently never used)
code path.
parent 24c75d48
......@@ -251,6 +251,8 @@ static unsigned int ata_scsi_rw_xlat(struct ata_queued_cmd *qc, u8 *scsicmd,
tf->lbam = scsicmd[2];
tf->lbah = scsicmd[1] & 0x1f; /* mask out reserved bits */
tf->device |= ATA_LBA;
VPRINTK("six-byte command\n");
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment