From: Geert Uytterhoeven <geert@linux-m68k.org>
To: "André Hedrick" <andre@linux-ide.org>,
"Bartlomiej Zolnierkiewicz" <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: Lionel Bergeret <lbergeret@swing.be>,
JunHyeok Heo <jhheo@idis.co.kr>,
Linux Kernel Development <linux-kernel@vger.kernel.org>,
linux-ide@vger.kernel.org
Subject: Re: [PATCH] Bogus LBA48 drives
Date: Tue, 30 Mar 2004 17:28:12 +0200 (MEST) [thread overview]
Message-ID: <Pine.GSO.4.58.0403301726540.9767@waterleaf.sonytel.be> (raw)
In-Reply-To: <Pine.GSO.4.58.0403301654300.9765@waterleaf.sonytel.be>
On Tue, 30 Mar 2004, Geert Uytterhoeven wrote:
> Apparently some IDE drives (e.g. a pile of 80 GB ST380020ACE drives I have
> access to) advertise to support LBA48, but don't, causing kernels that support
> LBA48 (i.e. anything newer than 2.4.18, including 2.4.25 and 2.6.4) to fail on
> them. Older kernels (including 2.2.20 on the Debian woody CDs) work fine.
>
> One problem with those drives is that the lba_capacity_2 field in their drive
> identification is set to 0, making the IDE driver think the disk is 0 bytes
> large. At first I tried modifying the driver to use lba_capacity if
> lba_capacity_2 is set to 0, but this caused disk errors. So it looks like those
> drives don't support the increased transfer size of LBA48 neither.
>
> I added a workaround for these drives to both 2.4.25 and 2.6.4. I'll send
> patches in follow-up emails.
Patch for 2.6.4 (and 2.6.5-rc3):
- Check for lba_capacity_2 being non-zero in idedisk_supports_lba48()
--- linux-2.6.4/drivers/ide/ide-disk.c.orig 2004-03-12 12:02:53.000000000 +0100
+++ linux-2.6.4/drivers/ide/ide-disk.c 2004-03-26 13:54:39.000000000 +0100
@@ -1058,7 +1058,8 @@
*/
static inline int idedisk_supports_lba48(const struct hd_driveid *id)
{
- return (id->command_set_2 & 0x0400) && (id->cfs_enable_2 & 0x0400);
+ return (id->command_set_2 & 0x0400) && (id->cfs_enable_2 & 0x0400)
+ && id->lba_capacity_2;
}
static inline void idedisk_check_hpa(ide_drive_t *drive)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2004-03-30 15:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-30 15:22 Geert Uytterhoeven
2004-03-30 15:26 ` Geert Uytterhoeven
2004-03-30 15:28 ` Geert Uytterhoeven [this message]
2004-03-30 15:51 ` Bartlomiej Zolnierkiewicz
2004-03-30 16:38 ` Andre Hedrick
2004-03-30 16:50 ` Jeff Garzik
2004-03-31 18:34 ` Andries Brouwer
2004-03-31 18:58 ` Jeff Garzik
2004-04-01 9:06 ` Geert Uytterhoeven
2004-04-01 18:24 ` Jeff Garzik
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=Pine.GSO.4.58.0403301726540.9767@waterleaf.sonytel.be \
--to=geert@linux-m68k.org \
--cc=B.Zolnierkiewicz@elka.pw.edu.pl \
--cc=andre@linux-ide.org \
--cc=jhheo@idis.co.kr \
--cc=lbergeret@swing.be \
--cc=linux-ide@vger.kernel.org \
--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®