linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mikko Rapeli <mikko.rapeli@iki.fi>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-ide@vger.kernel.org
Subject: Re: ST340823A disk size issue
Date: Thu, 2 Aug 2007 15:35:11 +0300	[thread overview]
Message-ID: <20070802123510.GA1374@nalle> (raw)
In-Reply-To: <20070801140556.136ed130@the-village.bc.nu>

On Wed, Aug 01, 2007 at 02:05:56PM +0100, Alan Cox wrote:
> You've got an odd sized disk. If you have that, old IDE, and you also have
> anything which tries to read the last sector (eg GPT partitioning) it'll
> break as it tries to read 1K block sizes.
>
> Vendors normally clip the drive to an even size which seems to be the
> case on your box with the HPA left alone.

Sorry, but I don't quite get the odd size and 1k block thing.

Drive manual (
http://www.seagate.com/support/disc/manuals/ata/u5pmb01.pdf ) says on
page 12 that the drive has 78165360 sectors of size 512 bytes of which 
0 to 78165359 are addressable in LBA mode.

The drive reports its size as 78165360 and falsely, according to kernels
addr++, with HPA as 78165361. So instead of reporting the maximum
addressable sector 78165359, the drive reports its size 78165360.

Kernel now picks the larger value 78165361 as the drive size and thinks 
sector 78165360 should exist, but it doesn't. Partition code tries to
read the last sector 78165360 and fails:

hdd: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hdd: dma_intr: error=0x10 { SectorIdNotFound }, LBAsect=78165360,
sector=78165360
ide: failed opcode was: unknown

Shouldn't the partition code also try to read 78165361 if there was a 1k
read issued?

> It *should* all "just work" with the libata drivers but needs more
> testing of odd sizes to be 100% sure

The drive just worked with libata and 2.6.22.1, but I'd like to get a
back protable fix to ide-disk.c, so distro kernels like 2.6.18 could be
made to work too.

-Mikko

  reply	other threads:[~2007-08-02 12:35 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-01  9:29 ST340823A disk size issue Mikko Rapeli
2007-08-01 13:05 ` Alan Cox
2007-08-02 12:35   ` Mikko Rapeli [this message]
2007-08-01 20:34 ` Bartlomiej Zolnierkiewicz
2007-08-01 21:50   ` Mikko Rapeli
2007-08-01 22:19     ` Bartlomiej Zolnierkiewicz
2007-08-01 22:32       ` Alan Cox
2007-08-01 23:17         ` Bartlomiej Zolnierkiewicz
2007-08-02 11:33           ` Alan Cox
2007-08-02 12:27             ` Bartlomiej Zolnierkiewicz
2007-08-02 13:09               ` Alan Cox
2007-08-02 20:03           ` Mikko Rapeli
2007-08-02 20:42             ` Alan Cox
2007-08-02 22:34               ` Bartlomiej Zolnierkiewicz
2007-08-02 23:11                 ` Mikko Rapeli
2007-08-02 23:35                   ` Bartlomiej Zolnierkiewicz
2007-08-05 19:06                     ` [PATCH] ST340823A, HPA and libata Mikko Rapeli
2007-08-05 19:32                       ` Alan Cox
2007-08-08 13:25                       ` Alan Cox
2007-08-15 13:56                         ` Mikko Rapeli
2007-09-20 21:37                         ` Jeff Garzik
2007-08-02  0:33       ` ST340823A disk size issue Bartlomiej Zolnierkiewicz
2007-08-02 12:17     ` Sergei Shtylyov
2007-08-02 12:38       ` Sergei Shtylyov
2007-08-01 22:25   ` Alan Cox

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=20070802123510.GA1374@nalle \
    --to=mikko.rapeli@iki.fi \
    --cc=alan@lxorguk.ukuu.org.uk \
    --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).