From: Guillaume BINET <gbin-lkml@gootz.net>
To: Andrew Morton <akpm@osdl.org>
Cc: orinoco-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: [PATCH] Correct the CIS recognition problem of orinoco_plx under x86_64 Kernel 2.6.10-rc1-mm2
Date: Sun, 21 Nov 2004 19:22:10 +0100 [thread overview]
Message-ID: <41A0DCD2.8090803@gootz.net> (raw)
---
This patch correct the orinoco_plx CIS magic number detection. This bug
has been observed and corected under x84_64.
Output before the patch :
Nov 21 17:52:06 sal orinoco_plx: CIS:
4E01:F403:2300:B000:2DFF:D017:1404:5467:465
A:2F08:19FF:5D1D:4005:B701:2E67:A85A:
Nov 21 17:52:06 sal orinoco_plx: The CIS value of Prism2 PC card is invalid.
Nov 21 17:52:06 sal orinoco_plx: init_one(), FAIL!
Signed-off-by: Guillaume BINET <gbin-lkml@gootz.net>
---
diff -Naur linux-2.6.10-rc2-mm2/drivers/net/wireless/orinoco_plx.c
linux-2.6.10-rc2-mm2-gb1/drivers/net/wireless/orinoco_plx.c
--- linux-2.6.10-rc2-mm2/drivers/net/wireless/orinoco_plx.c
2004-11-21 18:44:06.000000000 +0100
+++ linux-2.6.10-rc2-mm2-gb1/drivers/net/wireless/orinoco_plx.c
2004-11-21 18:38:34.000000000 +0100
@@ -175,15 +175,22 @@
if (!attr_mem)
goto out;
+
+ /* Verify whether PC card is present */
+ /* FIXME: we probably need to be smarted about this */
+ memcpy_fromio(magic, attr_mem, 16);
+
+ /* only lower bits seem significant */
+ for (i = 0; i < 8; i++) {
+ magic[i] = magic[i] & 0x00ff;
+ }
+
printk(KERN_DEBUG "orinoco_plx: CIS: ");
for (i = 0; i < 16; i++) {
- printk("%02X:", readw(attr_mem+i));
+ printk("%02X:", readw(magic+i));
}
printk("\n");
- /* Verify whether PC card is present */
- /* FIXME: we probably need to be smarted about this */
- memcpy_fromio(magic, attr_mem, 16);
if (memcmp(magic, cis_magic, 16) != 0) {
printk(KERN_ERR "orinoco_plx: The CIS value of Prism2 PC card
is invalid.\n");
err = -EIO;
reply other threads:[~2004-11-21 18:24 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=41A0DCD2.8090803@gootz.net \
--to=gbin-lkml@gootz.net \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=orinoco-devel@lists.sourceforge.net \
/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).