public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* possible bug in ide-disk.c (2.6.18.2 but also older)
@ 2006-11-20 14:51 Andreas Leitgeb
  2006-11-20 15:25 ` Alan
  0 siblings, 1 reply; 23+ messages in thread
From: Andreas Leitgeb @ 2006-11-20 14:51 UTC (permalink / raw)
  To: linux-kernel

Since I got not even a beep as answer, I'm trying again
to get this through to someone who cares:

The problem, I'm writing about is really a major nuissance
to whom it hits, because due to this problem the system turns
off dma for the harddisks, which makes the machine painfully slow.

However it seems to show up only for a limited set of 
harddisks, one of which happens to be in one of my machines.

Here is the complete previous attempt at submitting it
(with all the details I was able to come up with):

----- Forwarded message from Andreas Leitgeb <avl@logic.at> -----
From: Andreas Leitgeb <avl@logic.at>
Subject: possible bug in ide-disk.c (2.6.17.13 but also older)
To: B.Zolnierkiewicz@elka.pw.edu.pl
Cc: linux-ide@vger.kernel.org
Delivery-date: Tue, 19 Sep 2006 10:01:40 +0200
Reply-To: avl@logic.at

I noticed the bug only recently, but checking with older Knoppix
boot-cds, it seems to date back to about 2.6.9, where disk-access
was generally slower, and hpa probably not detected at all)

The symptom of the bug is, that an HPA is believed (by the kernel)
to exist, and the capacity is believed to be one sector larger.
When accessing that one last sector, the harddisk (rightly) reports
an error, which causes the kernel to retry a few times (getting
the same error each time) and finally the kernel switches off dma.

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.
My belief is, that what might need to be added instead is drive->sect0
or perhaps something completely different.

This belief is based on that the  addr++; works fine with some other
harddisks in my reach (so obviously, adding one isn't always wrong),
and that other people shared my problem as described in a newsgroup,
found at: <http://tinyurl.com/ee7me> which redirects to

<http://groups.google.com/group/linux.debian.user.german/browse_thread/thread/ab8980cb5ea0a9fb/7f475d3ce8f34211?tvc=2&q=linux+hpa+seagate+0x10>

(german-language, but the dmesg-excerpts and patches speak for themselves)
They suggest to comment out the "addr++;" altogether, which I don't think
is good, but at least doesn't hurt, because a too-small value is
ignored anyway lateron in idedisk_check_hpa(), so in worst case
the hpa is disabled only partially (up to one sector).

Please let me know what you think of it.
People on the list: please Cc: avl@logic.at in this thread.
----- End forwarded message -----

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2006-12-14 15:18 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-20 14:51 possible bug in ide-disk.c (2.6.18.2 but also older) Andreas Leitgeb
2006-11-20 15:25 ` Alan
2006-11-20 16:56   ` Andreas Leitgeb
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox