linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Correct the CIS recognition problem of orinoco_plx under x86_64 Kernel 2.6.10-rc1-mm2
@ 2004-11-21 18:22 Guillaume BINET
  0 siblings, 0 replies; only message in thread
From: Guillaume BINET @ 2004-11-21 18:22 UTC (permalink / raw)
  To: Andrew Morton; +Cc: orinoco-devel, linux-kernel

---

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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-11-21 18:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-21 18:22 [PATCH] Correct the CIS recognition problem of orinoco_plx under x86_64 Kernel 2.6.10-rc1-mm2 Guillaume BINET

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).