From: Mark Lord <liml@rtr.ca>
To: Guntsche Michael <mike@it-loops.com>
Cc: Tejun Heo <tj@kernel.org>,
Sergei Shtylyov <sshtylyov@ru.mvista.com>,
linux-ide@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>,
Jeff Garzik <jeff@garzik.org>
Subject: Re: [PATCH #upstream-fixes 1/4] libata: fix device iteration bugs
Date: Fri, 14 Nov 2008 23:13:31 -0500 [thread overview]
Message-ID: <491E4C6B.6030309@rtr.ca> (raw)
In-Reply-To: <C25CB239-E794-4183-9F9D-9AEFEC0FD77F@it-loops.com>
Guntsche Michael wrote:
>
> On Nov 14, 2008, at 18:24, Mark Lord wrote:
>
>> To clarify, the second number reported should NEVER be less than
>> the first number. If it is, then there's a bug in the low-level
>> libata driver for your SATA/IDE controller -- it's not returning
>> the high-order-bytes from the SAT command. Several drivers had
>> this bug until 2.6.27 or so, and some may still misbehave.
>>
>> A newer version of hdparm will verify that, and also show the correct
>> value (hopefully) obtained via a completely different mechanism.
>>
>> Thanks
>
> Here the new output, it still does not look right, or am I wrong?
>
> /dev/sda:
> max sectors = 66055248/15723600(66055248?), HPA setting seems invalid
> (buggy kernel device driver?)
..
Ahh, okay, no HPA in effect.
max sectors = 66055248/ ... (66055248)
That's the entire drive, ignoring the buggy libata driver
that reports 15723600 (returns zeros for hob_lba[mhl]).
Michael Guntsche wrote:
> On a side note, since we are already talking about old chipsets and mobos.
> Since this is a rather old hardware it was not possible to get the 40GB IBM
> disk running in the first place.
> What I did back then (2.4 kernel days) was to use "ibmsetmax" to clamp the
> disk to a smaller size and enabled the relevent option in the kernel. This
> way I got past the BIOS (it stopped if the harddisk was saying it was >
> 32GB??) but the linux kernel correctly saw the right size.
> Looking ad the dmesg output right now I think that it is only seeing the
> smaller size.
>
> sd 0:0:0:0: [sda] 66055248 512-byte hardware sectors (33820 MB)
..
Well, according to the drive, it *is* a 33GB drive, not a 40GB drive.
So whatever "ibmsetmax" did appears to be outside of the ATA standard
way of doing it. Unless I've got a bug in hdparm that I don't know about. :)
> /dev/sda:
>
> ATA device, with non-removable media
> powers-up in standby; SET FEATURES subcmd spins-up.
> Model Number: IC35L040AVER07-0
> Serial Number: SXPTXGK0136
> Firmware Revision: ER4OA45A
> Standards:
> Used: ATA/ATAPI-5 T13 1321D revision 1
> Supported: 5 4 3 & some of 6
> Configuration:
> Logical max current
> cylinders 16383 16383
> heads 16 16
> sectors/track 63 63
> --
> CHS current addressable sectors: 16514064
> LBA user addressable sectors: 66055248
> device size with M = 1024*1024: 32253 MBytes
> device size with M = 1000*1000: 33820 MBytes (33 GB)
..
> * Host Protected Area feature set
..
That last line bothers me -- the '*' indicates that an HPA is in effect,
but the -N output indicates otherwise.. mmm...
Let's see: 66055248 = 0x3efec50.
If we mask off all but the lower 24 bits,
we get 0xefec50 = 15723600,
which matches what the buggy device driver
returned when it dropped the top 24 bits.
So probably no bug in hdparm.
Which is odd, because google tells me that
the IC35L040AVER07-0 really is a 40GB drive.
Mmm..
next prev parent reply other threads:[~2008-11-15 4:12 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <6ca8fe89c868f95831328d31c27f9cdb@localhost>
2008-10-27 15:45 ` Fwd: [PATCH #upstream-fixes 1/4] libata: fix device iteration bugs Guntsche Michael
2008-11-10 6:52 ` Tejun Heo
2008-11-10 10:10 ` Michael Guntsche
2008-11-10 10:21 ` Tejun Heo
2008-11-10 15:07 ` Mark Lord
2008-11-11 2:45 ` Tejun Heo
2008-11-11 4:01 ` Mark Lord
2008-11-11 9:19 ` Sergei Shtylyov
2008-11-11 13:34 ` Michael Guntsche
2008-11-11 14:29 ` Mark Lord
2008-11-11 15:03 ` Guntsche Michael
2008-11-12 1:20 ` Mark Lord
2008-11-12 2:34 ` Tejun Heo
2008-11-12 7:22 ` Michael Guntsche
2008-11-12 8:15 ` Tejun Heo
2008-11-12 9:16 ` Michael Guntsche
2008-11-12 9:27 ` Tejun Heo
2008-11-12 9:43 ` Michael Guntsche
2008-11-12 9:48 ` Tejun Heo
2008-11-12 9:55 ` Michael Guntsche
2008-11-14 2:38 ` Mark Lord
2008-11-14 6:59 ` Michael Guntsche
2008-11-14 17:21 ` Mark Lord
2008-11-14 17:24 ` Mark Lord
2008-11-14 22:26 ` Guntsche Michael
2008-11-15 4:13 ` Mark Lord [this message]
2008-11-15 4:17 ` Mark Lord
2008-11-15 9:29 ` Guntsche Michael
2008-11-15 10:22 ` Guntsche Michael
2008-11-15 20:43 ` Mark Lord
2008-11-16 5:14 ` Tejun Heo
2008-11-16 5:49 ` Mark Lord
2008-11-16 8:41 ` Michael Guntsche
2008-11-16 9:15 ` Michael Guntsche
2008-11-16 10:48 ` Sergei Shtylyov
2008-11-16 11:23 ` Alan Cox
2008-11-11 14:27 ` Fwd: " Mark Lord
2008-11-11 14:34 ` Alan Cox
2008-11-12 1:18 ` Mark Lord
2008-10-26 6:50 Tejun Heo
2008-10-26 10:47 ` Sergei Shtylyov
2008-10-27 9:07 ` Tejun Heo
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=491E4C6B.6030309@rtr.ca \
--to=liml@rtr.ca \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=mike@it-loops.com \
--cc=sshtylyov@ru.mvista.com \
--cc=tj@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).