[libata] SCSI-to-ATA translation fixes

Linux Kernel Mailing List <[email protected]>
Newsgroups gmane.linux.kernel.commits.2-4
Message-ID <[email protected]>
ChangeSet 1.1543, 2005/02/02 04:10:25-05:00, [email protected]

	[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: Albert Lee <[email protected]>



 libata-scsi.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


diff -Nru a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
--- a/drivers/scsi/libata-scsi.c	2005-02-07 13:03:32 -08:00
+++ b/drivers/scsi/libata-scsi.c	2005-02-07 13:03:32 -08:00
@@ -460,9 +460,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;
 }
@@ -562,7 +562,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];
 		}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.