From: Tony Lindgren <tony@atomide.com>
To: linux-kernel@vger.kernel.org
Cc: dhinds@zen.stanford.edu, marcelo@conectiva.com.br
Subject: [PATCH] Resend: 2.4 PCMCIA linear flash memory card fix
Date: Wed, 20 Mar 2002 19:38:24 -0800 [thread overview]
Message-ID: <20020321033824.GA8852@muru.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1082 bytes --]
Hi all,
Here's a resend of the patch to fix the 2.4 PCMCIA linear flash cards.
Looks like I was using the non-working sourceforge address for David
Hinds. CC:ing Marcelo Tosatti too.
The patch is against 2.4.17, but works on other recent kernels too.
(I just tested it against 2.4.19-pre4)
Linear flash card are rarely used, but are needed to boot some embedded
systems, like the AMD ELAN. They are also used in some Cisco routers.
Just FYI, here's some Linux related projects where linear flash cards
may be used:
Wireless access points running Linux:
http://opensource.instant802.com/
Alios boot loader for AMD ELAN:
http://www.telos.de/linux/alios/default_e.htm
Read Cisco flash cards from Linux:
ftp://ftp.bbc.co.uk/pub/ciscoflash/
Here's a short description of the fix:
Basically there were two problems; The RegisterMTD ioctl was
accidentally dropped at some point, so the flash cards would not
register. Then the reference to the flash card memory window was
incorrect, so the cards were not seen, and the flash drivers would
not unload after use.
Regards,
Tony
[-- Attachment #2: linux-2.4.17-pcmcia-mtd.patch --]
[-- Type: text/plain, Size: 1029 bytes --]
diff -urN -X ./dontdiff linux-2.4.17-vanilla/drivers/pcmcia/bulkmem.c linux-2.4.17-tony/drivers/pcmcia/bulkmem.c
--- linux-2.4.17-vanilla/drivers/pcmcia/bulkmem.c Sun Aug 12 17:37:53 2001
+++ linux-2.4.17-tony/drivers/pcmcia/bulkmem.c Sat Jan 26 21:41:49 2002
@@ -300,7 +300,7 @@
{
window_handle_t w;
int ret = pcmcia_request_window(a1, a2, &w);
- (window_handle_t *)a1 = w;
+ *(window_handle_t *)a1 = w;
return ret;
}
break;
diff -urN -X ./dontdiff linux-2.4.17-vanilla/drivers/pcmcia/cs.c linux-2.4.17-tony/drivers/pcmcia/cs.c
--- linux-2.4.17-vanilla/drivers/pcmcia/cs.c Fri Dec 21 09:41:55 2001
+++ linux-2.4.17-tony/drivers/pcmcia/cs.c Sat Jan 26 21:41:15 2002
@@ -2283,9 +2283,8 @@
*(eraseq_handle_t *)a1 = w;
return ret;
}
- break;
-/* return pcmcia_register_erase_queue(a1, a2); break; */
-
+ break;
+ case RegisterMTD:
return pcmcia_register_mtd(a1, a2); break;
case ReleaseConfiguration:
return pcmcia_release_configuration(a1); break;
reply other threads:[~2002-03-21 3:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20020321033824.GA8852@muru.com \
--to=tony@atomide.com \
--cc=dhinds@zen.stanford.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/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.