From: "Albert Lee" <albertcc@tw.ibm.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
Doug Maxey <dwm@maxeymade.com>,
IDE Linux <linux-ide@vger.kernel.org>
Subject: [PATCH] libata: SCSI to ATA translation fix
Date: Thu, 27 Jan 2005 18:30:10 +0800 [thread overview]
Message-ID: <007101c5045b$b8ec0de0$6401a8c0@tw.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1137 bytes --]
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
Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
----------------------------------------------------------------------------------------------
--- libata-2.6/drivers/scsi/libata-scsi.c 2005-01-27 10:41:46.000000000 +0800
+++ libata-2.6-mod/drivers/scsi/libata-scsi.c 2005-01-27 18:10:20.261707752 +0800
@@ -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];
}
[-- Attachment #2: ata_xlat.patch --]
[-- Type: application/octet-stream, Size: 641 bytes --]
--- libata-2.6/drivers/scsi/libata-scsi.c 2005-01-27 10:41:46.000000000 +0800
+++ libata-2.6-mod/drivers/scsi/libata-scsi.c 2005-01-27 18:10:20.261707752 +0800
@@ -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];
}
next reply other threads:[~2005-01-27 10:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-27 10:30 Albert Lee [this message]
2005-02-02 3:26 ` [PATCH] libata: SCSI to ATA translation fix Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='007101c5045b$b8ec0de0$6401a8c0@tw.ibm.com' \
--to=albertcc@tw.ibm.com \
--cc=bzolnier@gmail.com \
--cc=dwm@maxeymade.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).