From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
linux-kernel mailing list <linux-kernel@vger.kernel.org>
Subject: [PATCH] Workaround bogus CF cards
Date: 04 May 2003 12:14:37 +0200 [thread overview]
Message-ID: <1052043277.4107.76.camel@gaston> (raw)
Hi !
I had a problem with an "APACER" Compact Flash card. It seems that
beast is allergic to WIN_READ_NATIVE_MAX.
I hacked this workaround that appear to work fine
--- a/drivers/ide/ide-disk.c Sun May 4 12:11:52 2003
+++ b/drivers/ide/ide-disk.c Sun May 4 12:11:52 2003
@@ -1160,12 +1160,16 @@
{
struct hd_driveid *id = drive->id;
unsigned long capacity = drive->cyl * drive->head * drive->sect;
- unsigned long set_max = idedisk_read_native_max_address(drive);
+ unsigned long set_max = 0;
unsigned long long capacity_2 = capacity;
unsigned long long set_max_ext;
drive->capacity48 = 0;
drive->select.b.lba = 0;
+
+ /* That stupid compact flash doesn't like the command */
+ if (strncmp(drive->id->model, "APACER_CF_", 10) != 0)
+ set_max = idedisk_read_native_max_address(drive);
(void) idedisk_supports_host_protected_area(drive);
next reply other threads:[~2003-05-04 10:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-04 10:14 Benjamin Herrenschmidt [this message]
2003-05-04 16:08 ` [PATCH] Workaround bogus CF cards Alan Cox
2003-05-04 17:10 ` Benjamin Herrenschmidt
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=1052043277.4107.76.camel@gaston \
--to=benh@kernel.crashing.org \
--cc=B.Zolnierkiewicz@elka.pw.edu.pl \
--cc=alan@lxorguk.ukuu.org.uk \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.