From: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
To: Jan Niehusmann <jan@gondor.com>
Cc: Andries Brouwer <aebr@win.tue.nl>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: IDE bug - was: Re: uncorrectable ext2 errors
Date: Thu, 14 Aug 2003 00:32:00 +0200 [thread overview]
Message-ID: <200308140032.00632.bzolnier@elka.pw.edu.pl> (raw)
In-Reply-To: <20030813220532.GA1799@gondor.com>
On Thursday 14 of August 2003 00:05, Jan Niehusmann wrote:
> On Wed, Aug 13, 2003 at 03:27:33PM +0200, Andries Brouwer wrote:
> > Ah, yes, it was that one. Yes, my patch turned into a mess of rejects
> > after your layout changes of earlier patches from that series.
>
> Here is the most important part (limiting the disk capacity to 137GB if
> LBA48 is not available) as a patch agains 2.4.21. The goto is not nice,
> but I didn't want to do a major rewrite.
Major rewrite is already present in 2.6.0-test3 and there is more to go.
> Note that the function contains a bogous if-clause:
>
> if (id->cfs_enable_2 & 0x0400) {
> [...]
> return;
> }
> [...]
> if ((id->command_set_2 & 0x0400) && (id->cfs_enable_2 & 0x0400)) {
> [...]
>
> The second if-condition can never be true. But I didn't want to touch
> that stuff.
Already removed from 2.6.
> --- linux-2.4.21/drivers/ide/ide-disk.c.orig 2003-08-13 23:14:32.000000000
> +0200 +++ linux-2.4.21/drivers/ide/ide-disk.c 2003-08-13 23:14:34.000000000
> +0200 @@ -1196,7 +1196,7 @@
> drive->bios_cyl = drive->cyl;
> drive->capacity48 = capacity_2;
> drive->capacity = (unsigned long) capacity_2;
> - return;
> + goto check_capacity48;
> /* Determine capacity, and use LBA if the drive properly supports it */
> } else if ((id->capability & 2) && lba_capacity_is_ok(id)) {
> capacity = id->lba_capacity;
> @@ -1228,6 +1228,15 @@
> drive->sect = 63;
> drive->cyl = (unsigned long)(drive->capacity48) / (drive->head *
> drive->sect); }
> +
> +check_capacity48:
> + /* Limit disk size to 137GB if LBA48 addressing is not supported */
> + if (drive->addressing == 0 && drive->capacity48 > (1ULL)<<28) {
> + printk("%s: cannot use LBA48 - capacity reset "
> + "from %llu to %llu\n",
> + drive->name, drive->capacity48, (1ULL)<<28);
> + drive->capacity48 = (1ULL)<<28;
> + }
> }
>
> static unsigned long idedisk_capacity (ide_drive_t *drive)
Yep, thats basically it.
Have you already tried doing LBA-48 as previously suggested
(after applying hang-fix of course)?
--bartlomiej
next prev parent reply other threads:[~2003-08-13 22:31 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-06 15:03 Jan Niehusmann
2003-08-06 17:06 ` Andreas Dilger
2003-08-06 18:38 ` Jan Niehusmann
2003-08-06 18:52 ` Mike Fedyk
2003-08-06 19:50 ` Jan Niehusmann
2003-08-07 11:06 ` Jan Niehusmann
2003-08-07 12:27 ` LBA48 on Promise 20265 Jan Niehusmann
2003-08-07 21:12 ` uncorrectable ext2 errors Andries Brouwer
2003-08-10 20:55 ` Jan Niehusmann
2003-08-10 21:19 ` Andries Brouwer
2003-08-10 21:34 ` Jan Niehusmann
2003-08-10 21:58 ` Andries Brouwer
2003-08-10 22:10 ` Jan Niehusmann
2003-08-10 22:33 ` IDE bug - was: " Andries Brouwer
2003-08-12 15:36 ` Alan Cox
2003-08-12 16:32 ` Bartlomiej Zolnierkiewicz
2003-08-12 22:50 ` Andries Brouwer
2003-08-13 0:21 ` Bartlomiej Zolnierkiewicz
2003-08-13 8:03 ` Jan Niehusmann
2003-08-13 9:25 ` Jan Niehusmann
2003-08-13 11:16 ` Alan Cox
2003-08-13 11:20 ` Jan Niehusmann
2003-08-13 12:12 ` Jan Niehusmann
2003-08-13 16:31 ` Jan Niehusmann
2003-08-13 18:38 ` Alan Cox
2003-08-13 12:21 ` Bartlomiej Zolnierkiewicz
2003-08-13 13:27 ` Andries Brouwer
2003-08-13 22:05 ` Jan Niehusmann
2003-08-13 22:32 ` Bartlomiej Zolnierkiewicz [this message]
2003-08-13 22:36 ` Jan Niehusmann
2003-08-13 23:14 ` Bartlomiej Zolnierkiewicz
2003-08-14 6:37 ` Jan Niehusmann
2003-08-10 23:01 ` Bartlomiej Zolnierkiewicz
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=200308140032.00632.bzolnier@elka.pw.edu.pl \
--to=b.zolnierkiewicz@elka.pw.edu.pl \
--cc=aebr@win.tue.nl \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jan@gondor.com \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®