From: Andreas Leitgeb <avl@logic.at>
To: Alan <alan@lxorguk.ukuu.org.uk>
Cc: avl@logic.at, linux-kernel@vger.kernel.org
Subject: Re: possible bug in ide-disk.c (2.6.18.2 but also older)
Date: Mon, 20 Nov 2006 17:56:01 +0100 [thread overview]
Message-ID: <20061120165601.GS6851@gamma.logic.tuwien.ac.at> (raw)
In-Reply-To: <20061120152505.5d0ba6c5@localhost.localdomain>
On Mon, Nov 20, 2006 at 03:25:05PM +0000, Alan wrote:
> On Mon, 20 Nov 2006 15:51:48 +0100
> Andreas Leitgeb <avl@logic.at> wrote:
> > Since I got not even a beep as answer, I'm trying again
> > to get this through to someone who cares:
> Sounds like the Knoppix kernel is built with GPT partition handling and
> your disk has an odd number of sectors ?
While I used Knoppix to determine the age of the bug, it does also
appear with a plain vanilla 2.6.18.2 kernel from www.kernel.org.
The ChangeLog for 2.6.18.3 also doesn't mention ide-disk.
I must admit, I don't know about GPT. My system's bios
is old enough to not know about EFI, and the partition-scheme
on that harddisk dates back quite a few years, so it's unlikely
to be anything than the good ol' MBR.
The original reported number of sectors was an even number.
After HPA-correction it was an odd number. I cannot tell
if the original even number wasn't actually "odd" in the
sense of "strange". It was, at least, plausible in so far
as access to the last sector went ok, whereas access to the
hpa-corrected (with addr++) last sector failed.
> > The problem is in idedisk_read_native_max_address()
> > and equivalently in idedisk_read_native_max_address_ext()
> > in a line like this (near the end):
> > addr++; /* since the return value is (maxlba - 1), we add 1 */
> > I believe that this is wrong, in so far as it is device-specific.
> Which part of the standard are you referring to here ?
I must also admit that I do know nothing about drive hardware specs.
All I know is, that the current code works for some(most?) disks,
and triggers turning off dma on some other drives and, that changing
"addr++;" to "addr+=drive->sect0;" (or removing the line completely)
solved the problem for my particular drive.
I hope that someone who understands the ide-driver better than I do,
would evaluate my proposed solution, and either confirm the bug,
or say that this affects just a few broken drives, and that these
don't justify any fixing of the driver.
I could live with either, and I'm glad when this issue is at least
taken care of. If this has been discussed already in the past, then
please give me a pointer, since my googling failed to give me anything
but archives of other people complaining about the same problem.
For the while being, I currently patch out the hpa-detection entirely
before compiling a new kernel for that particular machine, until either
the bug is corrected for me (and others with an equal harddisk), or
until I replace my affected 40GB disk with a newer/larger one for
which the "addr++" then again might happen to be the right thing.
Alternatively, a kernel-option to manually disable hpa-checking
would be a good step to solve the problem even for drives like mine.
next prev parent reply other threads:[~2006-11-20 16:56 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-20 14:51 Andreas Leitgeb
2006-11-20 15:25 ` Alan
2006-11-20 16:56 ` Andreas Leitgeb [this message]
2006-11-20 17:28 ` Alan
2006-11-20 17:57 ` Andreas Leitgeb
2006-11-20 18:12 ` Alan
2006-11-21 11:51 ` Andreas Leitgeb
2006-11-21 12:06 ` Alan
2006-11-22 10:57 ` Andreas Leitgeb
2006-11-23 17:05 ` Andreas Leitgeb
2006-11-27 13:09 ` hpa-problem in ide-disk.c - new insights Andreas Leitgeb
2006-11-27 13:30 ` Alan
2006-11-27 16:01 ` Allow turning off hpa-checking Andreas Leitgeb
2006-11-27 16:33 ` Alan
2006-11-27 17:56 ` Andreas Leitgeb
2006-11-27 18:10 ` Alan
2006-11-27 18:29 ` Andreas Leitgeb
2006-11-27 19:59 ` Alan
2006-11-28 9:29 ` Andreas Leitgeb
2006-11-28 9:46 ` Tejun Heo
2006-11-28 12:09 ` Andreas Leitgeb
2006-11-28 12:24 ` Tejun Heo
2006-12-14 14:45 ` Andreas Leitgeb
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=20061120165601.GS6851@gamma.logic.tuwien.ac.at \
--to=avl@logic.at \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®