From: Jeff Garzik <jeff@garzik.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Mikko Rapeli <mikko.rapeli@iki.fi>,
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
linux-ide@vger.kernel.org, akpm@osdl.org
Subject: Re: [PATCH] ST340823A, HPA and libata
Date: Thu, 20 Sep 2007 17:37:41 -0400 [thread overview]
Message-ID: <46F2E825.3000606@garzik.org> (raw)
In-Reply-To: <20070808142505.3213a1a6@the-village.bc.nu>
Alan Cox wrote:
> Ok this is a different approach to handling it - knowing it is an off by
> one so we can handle the drive if clipped
>
> Signed-off-by: Alan Cox <alan@redhat.com>
>
> diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.23rc1-mm1/drivers/ata/libata-core.c linux-2.6.23rc1-mm1/drivers/ata/libata-core.c
> --- linux.vanilla-2.6.23rc1-mm1/drivers/ata/libata-core.c 2007-07-26 15:02:57.000000000 +0100
> +++ linux-2.6.23rc1-mm1/drivers/ata/libata-core.c 2007-08-08 13:38:39.257549616 +0100
> @@ -988,6 +992,10 @@
> else
> hpa_sectors = ata_read_native_max_address(dev);
>
> + /* Reports one sector too many */
> + if (hpa_sectors && (dev->horkage & ATA_HORKAGE_HPA_SIZE))
> + hpa_sectors--;
> +
> if (hpa_sectors > sectors) {
> ata_dev_printk(dev, KERN_INFO,
> "Host Protected Area detected:\n"
> @@ -3858,6 +3926,9 @@
>
> /* Devices with NCQ limits */
>
> + /* Devices which report 1 sector over size HPA */
> + { "ST340823A", NULL, ATA_HORKAGE_HPA_SIZE, },
> +
> /* End Marker */
> { }
> };
> diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.23rc1-mm1/include/linux/libata.h linux-2.6.23rc1-mm1/include/linux/libata.h
> --- linux.vanilla-2.6.23rc1-mm1/include/linux/libata.h 2007-07-26 15:02:58.000000000 +0100
> +++ linux-2.6.23rc1-mm1/include/linux/libata.h 2007-08-08 13:38:09.000000000 +0100
> @@ -314,6 +314,7 @@
> ATA_HORKAGE_NONCQ = (1 << 2), /* Don't use NCQ */
> ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */
> ATA_HORKAGE_ALPM = (1 << 4), /* ALPM problems */
> + ATA_HORKAGE_HPA_SIZE = (1 << 5), /* Reports native size off by one */
the horkage patch I sent upstream to Linus just now for 2.6.23-rc
included some of the HPA size blacklist entries, so I dropped that
not-for-2.6.23 patch chunk.
If this issue has settled, let's roll everything into a single patch,
and I'll apply that.
next prev parent reply other threads:[~2007-09-20 21:37 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
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 [this message]
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=46F2E825.3000606@garzik.org \
--to=jeff@garzik.org \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=mikko.rapeli@iki.fi \
/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).