Re: [PATCH #upstream-fixes 1/4] libata: fix device iteration bugs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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..

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux