lkml.org 
[lkml]   [2004]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Correct the CIS recognition problem of orinoco_plx under x86_64 Kernel 2.6.10-rc1-mm2
---

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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.024 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site