libata: SCSI to ATA translation fix
PATCH 1/1 libata: SCSI to ATA translation fix
Hi Jeff,
Attached please find the patch against libata-2.6 for your review.
Changes:
#1. ata_scsi_rw_xlat():
Fix incorrect SCSI to ATA translation for 16 bytes SCSI Read/Write commands.
(Already submitted in the previous patch. Merged with change #2 and resubmitted again.)
#2. Fix ata_scsi_verify_xlat():
Fix incorrect tf->hob_lbax translation.
Albert
----------------------------------------------------------------------------------------------
drivers/scsi/libata-scsi.c 2005-01-27 18:10:20.261707752 +0800 renamed from drivers/scsi/libata-scsi.c 2005-01-27 10:41:46.000000000 +0800 +4 -4
@@ -497,9 +497,9 @@ 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; }
@@ -599,7 +599,7 @@ return 1; /* stores LBA27:24 in lower 4 bits of device reg */ - tf->device |= scsicmd[2]; + tf->device |= scsicmd[6]; qc->nsect = scsicmd[13]; }
drivers/scsi/libata-scsi.c +4 -4
@@ -497,9 +497,9 @@ 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 ; }
@@ -599,7 +599,7 @@return 1 ;/* stores LBA27:24 in lower 4 bits of device reg */ - tf->device |= scsicmd[2 ]; + tf->device |= scsicmd[6 ]; qc->nsect = scsicmd[13 ]; }
Jeff Garzik
AppliedQuoted 11 lines · Albert Lee
Hi Jeff,
Attached please find the patch against libata-2.6 for your review.
Changes:
#1.ata_scsi_rw_xlat():
Fix incorrect SCSI to ATA translation for 16 bytes SCSI Read/Write commands.
(Already submitted in the previous patch. Merged with change #2 and resubmitted again.)#2. Fix
ata_scsi_verify_xlat():Fix incorrect tf->hob_lbax translation.
applied