Commit 29ac8534 authored by Albert Lee's avatar Albert Lee Committed by Jeff Garzik

[libata] SCSI-to-ATA translation fixes

Fixes lesser-used READ VERIFY and READ_16/WRITE_16 translations.

Changes:
#1. ata_scsi_rw_xlat():  
Fix incorrect SCSI to ATA translation for 16 bytes SCSI Read/Write commands. 

#2. Fix ata_scsi_verify_xlat():
Fix incorrect tf->hob_lbax translation.
Signed-off-by: default avatarAlbert Lee <albertcc@tw.ibm.com>
parent 067d03e8
......@@ -498,9 +498,9 @@ static unsigned int ata_scsi_verify_xlat(struct ata_queued_cmd *qc, u8 *scsicmd)
tf->nsect = n_sect & 0xff;
tf->hob_lbah = (sect >> 16) & 0xff;
tf->hob_lbam = (sect >> 8) & 0xff;
tf->hob_lbal = sect & 0xff;
tf->lbah = (sect >> 16) & 0xff;
tf->lbam = (sect >> 8) & 0xff;
tf->lbal = sect & 0xff;
return 0;
}
......@@ -600,7 +600,7 @@ static unsigned int ata_scsi_rw_xlat(struct ata_queued_cmd *qc, u8 *scsicmd)
return 1;
/* stores LBA27:24 in lower 4 bits of device reg */
tf->device |= scsicmd[2];
tf->device |= scsicmd[6];
qc->nsect = scsicmd[13];
}
......
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