From: Brett Russ <russb@emc.com>
To: linux-ide@vger.kernel.org
Cc: B.Zolnierkiewicz@elka.pw.edu.pl
Subject: [PATCH] bug fix to restore access to low order LBA
Date: Thu, 22 Jul 2004 19:30:12 -0400 [thread overview]
Message-ID: <41004E04.6050407@emc.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 365 bytes --]
I discovered this after running a custom kernel with support for ATA
read verify command, when I encountered sector errors and saw them
reported in syslog and on an ATA analyzer but when I tried to read the
LBA registers I got zero... problem was this one liner, which applies to
2.6.8-rc2 as well as 2.6.7, and I've also included a 2.4.26 version.
Thanks,
BR
[-- Attachment #2: 2.4.26-ide-restore-low.diff --]
[-- Type: text/plain, Size: 484 bytes --]
--- linux-2.4.26/drivers/ide/ide.c 2004-02-18 08:36:31.000000000 -0500
+++ linux-2.4.26-ide-restore-low/drivers/ide/ide.c 2004-07-22 19:17:23.000000000 -0400
@@ -409,6 +409,9 @@
u32 low = read_24(drive);
hwif->OUTB(drive->ctl|0x80, IDE_CONTROL_REG);
high = read_24(drive);
+ /* Restore access to low order LBA */
+ OUT_BYTE(drive->ctl&0x7F,
+ IDE_CONTROL_REG);
sectors = ((u64)high << 24) | low;
printk(", LBAsect=%llu, high=%d, low=%d",
[-- Attachment #3: 2.6.7-ide-restore-low.diff --]
[-- Type: text/plain, Size: 495 bytes --]
--- linux-2.6.7/drivers/ide/ide.c 2004-06-16 01:19:03.000000000 -0400
+++ linux-2.6.7-ide-restore-low/drivers/ide/ide.c 2004-07-22 19:20:59.000000000 -0400
@@ -409,6 +409,9 @@
u32 low = ide_read_24(drive);
hwif->OUTB(drive->ctl|0x80, IDE_CONTROL_REG);
high = ide_read_24(drive);
+ /* Restore access to low order LBA */
+ hwif->OUTB(drive->ctl&0x7F,
+ IDE_CONTROL_REG);
sectors = ((u64)high << 24) | low;
printk(", LBAsect=%llu, high=%d, low=%d",
reply other threads:[~2004-07-22 23:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=41004E04.6050407@emc.com \
--to=russb@emc.com \
--cc=B.Zolnierkiewicz@elka.pw.edu.pl \
--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).