Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jan 2004 10:57:40 +0100
From:      Rudolf Cejka <cejkar@fit.vutbr.cz>
To:        Bill Paul <wpaul@FreeBSD.ORG>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: Project Evil: The Evil Continues
Message-ID:  <20040127095740.GA74677@fit.vutbr.cz>
In-Reply-To: <20040126005327.7285816A4CF@hub.freebsd.org>
References:  <20040126005327.7285816A4CF@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Bill Paul wrote (2004/01/25):
> Now, is anyone going to actually test Project Evil with their
> cards like I asked, or is everyone just going to use this as an excuse
> to ask me questions?

Hello, I have tested six pccard/cardbus cards with following results.
However, first I had to find, why kernel crashes, when some cards are
inserted - the problem is that cbb0 process does not set p->p_fd->fd_rdir
and p->p_fd->fd_cdir, but namei() called from vn_open() called from
ndis_open_file() unconditionally references them. Following patch helped
me - the idea is stolen from /sys/dev/raidframe/rf_freebsdkintf.c.
Furthermore, some debug output with reporting missing files helped me
too.

/sys/compat/ndis/subr_ndis.c,v 1.38 2004/01/18 22:57:11

--- subr_ndis.c.orig	Tue Jan 27 00:05:15 2004
+++ subr_ndis.c	Tue Jan 27 09:07:43 2004
@@ -65,6 +65,7 @@
 #include <sys/smp.h>
 #include <sys/queue.h>
 #include <sys/proc.h>
+#include <sys/filedesc.h>
 #include <sys/namei.h>
 #include <sys/fcntl.h>
 #include <sys/vnode.h>
@@ -2303,6 +2304,7 @@
 {
 	char			*afilename = NULL;
 	struct thread		*td = curthread;
+	struct proc		*p;
 	struct nameidata	nd;
 	int			flags, error;
 	struct vattr		vat;
@@ -2323,6 +2325,16 @@
 	}
 
 	mtx_lock(&Giant);
+
+	/* Sanity check the p_fd fields.  This is really just a hack */
+	p = td->td_proc;
+	if (!p->p_fd->fd_rdir || !p->p_fd->fd_cdir)
+		printf("p_fd fields are not set\n");
+	if (!td->td_proc->p_fd->fd_rdir)
+		p->p_fd->fd_rdir = rootvnode;
+	if (!p->p_fd->fd_cdir)
+		p->p_fd->fd_cdir = rootvnode;
+
 	NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, path, td);
 
 	flags = FREAD;
@@ -2331,6 +2343,7 @@
 		mtx_unlock(&Giant);
 		*status = NDIS_STATUS_FILE_NOT_FOUND;
 		free(fh, M_TEMP);
+		printf("error opening file %s\n", path);
 		return;
 	}
 
And here are the results:

*) Buffalo AirStation WLI-CB-G54A (802.11b/g)

cbg0: <BUFFALO WLI-CB-G54 Wireless LAN Adapter> mem 0x88002000-0x88003fff irq 11 at device 0.0 on cardbus0
cbg0: NDIS API version: 5.0
cbg0: 802.11 address: 00:07:40:c1:b1:88
cbg0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
cbg0: 11g rates: 6Mbps 9Mbps 12Mbps 18Mbps 36Mbps 48Mbps 54Mbps

... Unstable, but works. If I download some files, use ssh or browse the
web, everything seems to be good. However, when I try
    cd /usr/src ; make update # supfile is for src & ports
my notebook after some time always crashes. Sometimes already in src
tree, sometimes in the ports tree. Panic is reproducible and kernel
stops on
0xc086b709 <drv_data+19253>:    andl   $0x0,0x20(%edi)
I have a crash dump, but do not know, what to do and debug here.
Do you have any ideas? It would be really great to have this card
stable, because this is my primary card.

*) Belkin F5D7010 (802.11b/g)

bel0: <Belkin Wireless 54Mbps Notebook Adapter> mem 0x88002000-0x88003fff irq 11 at device 0.0 on cardbus0
bel0: NDIS API version: 5.0
bel0: 802.11 address: 00:30:bd:9c:d5:fb
bel0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
bel0: 11g rates: 6Mbps 9Mbps 12Mbps 18Mbps 36Mbps 48Mbps 54Mbps

... The same name of Windows driver as for Buffalo, the same problems
as with Buffalo card.

*) Cisco AIR-CB20A / AIR-CB20A-A-K9 (802.11a)

cardbus0: Resource not specified in CIS: id=10, size=100
cardbus0: Resource not specified in CIS: id=14, size=4000
cardbus0: Resource not specified in CIS: id=18, size=40000
cba0: <Cisco Systems AIR-CB20A 802.11a Wireless LAN Adapter> port 0x1000-0x10ff mem 0x88040000-0x8807ffff,0x88080000-0x88083fff irq 11 at device 0.0 on cardbus0
can't re-use a leaf (NodeName)!
can't re-use a leaf (InfrastructureMode)!
can't re-use a leaf (PowerSaveMode)!
can't re-use a leaf (SupportedRates)!
can't re-use a leaf (SSID1)!
cba0: NDIS API version: 5.0
cba0: 802.11 address: 00:00:48:9a:1b:cd
cba0: couldn't retrieve channel info: 19
cba0: 11b rates: 

... Card is detected, but I could not establish any connection

*) Cisco AIR-PCM350 / AIR-PCM352 (802.11b)

pccard0: <unknown card> (manufacturer=0x015f, product=0x000a) at function 0
pccard0:    CIS info: Cisco Systems, 350 Series Wireless LAN Adapter, (null)

... This card seems to be big killer for ndiscvt - I had to edit the inf
file by hand, so it could be converted. Furhtermore, the card is not
detected at all and I do not know, what to do more, because ndis_probe
has sufficient items, but it is not called at all. And executing pccardd
ends with
pccardd[1323]: fatal error: no PC-CARD slots

If you are interested, here is the patch, I had to do to the *.inf file.
ISAPNP could be easy to filter, but IOConfig and LoadOrderGroup seem
to be harded to recognize.

--- netX500.inf.orig	Tue Jan 13 22:07:02 2004
+++ netX500.inf	Tue Jan 27 10:46:47 2004
@@ -52,32 +52,32 @@
 ; ---------------               --------------          ---------------------------
 %PC2500.DevDesc%                = PC2500.ndi,           PCMCIA\AIRONET-PC2500-5313
 %PCI2500.DevDesc%               = PCI2500.ndi,          PCI\VEN_14B9&DEV_2500    
-%ISA2500.DevDesc%               = ISA2500.ndi,          ISAPNP\AWL2500 
+;%ISA2500.DevDesc%               = ISA2500.ndi,          ISAPNP\AWL2500 
 
 %PC3100.DevDesc%                = PC3100.ndi,           PCMCIA\AIRONET-PC3100-25CA
 %PCI3100.DevDesc%               = PCI3100.ndi,          PCI\VEN_14B9&DEV_3100    
 %PCI3100.DevDesc%               = PCI3100.ndi,          PCI\VEN_14B9&DEV_3101    
-%ISA3100.DevDesc%               = ISA3100.ndi,          ISAPNP\AWL3100 
-%ISA3100.DevDesc%               = ISA3100.ndi,          ISAPNP\AWL3101 
+;%ISA3100.DevDesc%               = ISA3100.ndi,          ISAPNP\AWL3100 
+;%ISA3100.DevDesc%               = ISA3100.ndi,          ISAPNP\AWL3101 
 
 %PC3500.DevDesc%                = PC3500.ndi,           PCMCIA\AIRONET-PC3500-D29B
 %PC3500.DevDesc%                = PC3500.ndi,           PCMCIA\AIRONET-PC3500-1492
 %PCI3500.DevDesc%               = PCI3500.ndi,          PCI\VEN_14B9&DEV_3500    
-%ISA3500.DevDesc%               = ISA3500.ndi,          ISAPNP\AWL3500        
+;%ISA3500.DevDesc%               = ISA3500.ndi,          ISAPNP\AWL3500        
 
 %PC4500.DevDesc%                = PC4500.ndi,           PCMCIA\AIRONET-PC4500-13ED
-%PC4500.DevDesc%                = PC4500.ndi,           PCMCIA\AIRONET-PC4500-D4C4
+;%PC4500.DevDesc%                = PC4500.ndi,           PCMCIA\AIRONET-PC4500-D4C4
 %PCI4500.DevDesc%               = PCI4500.ndi,          PCI\VEN_14B9&DEV_4500 
-%ISA4500.DevDesc%               = ISA4500.ndi,          ISAPNP\AWL4500
+;%ISA4500.DevDesc%               = ISA4500.ndi,          ISAPNP\AWL4500
  
 %PC4800.DevDesc%                = PC4800.ndi,           PCMCIA\AIRONET-PC4800-D913
 %PCI4800.DevDesc%               = PCI4800.ndi,          PCI\VEN_14B9&DEV_4800    
-%ISA4800.DevDesc%               = ISA4800.ndi,          ISAPNP\AWL4800 
+;%ISA4800.DevDesc%               = ISA4800.ndi,          ISAPNP\AWL4800 
 
 %PC340.DevDesc%                 = PC340.ndi,            PCMCIA\CISCO_SYSTEMS-340_SERIES_WIRELESS_LAN_ADAPTER-5FE9
 %PCI340.DevDesc%                = PCI340.ndi,           PCI\VEN_14B9&DEV_0340
 
-%PC350.DevDesc%                 = PC350.ndi,            PCMCIA\CISCO_SYSTEMS-350_SERIES_WIRELESS_LAN_ADAPTER-512A
+%PC350.DevDesc%                 = PC350.ndi,            PCI\VEN_14B9&DEV_0350
 %PCI350.DevDesc%                = PCI350.ndi,           PCI\VEN_14B9&DEV_0350
 
 
@@ -86,32 +86,32 @@
 ; ---------------               --------------          ---------------------------
 %PC2500.DevDesc%                = PC2500.ndi.XP,        PCMCIA\AIRONET-PC2500-5313
 %PCI2500.DevDesc%               = PCI2500.ndi.XP,       PCI\VEN_14B9&DEV_2500
-%ISA2500.DevDesc%               = ISA2500.ndi.XP,       ISAPNP\AWL2500
+;%ISA2500.DevDesc%               = ISA2500.ndi.XP,       ISAPNP\AWL2500
 
 %PC3100.DevDesc%                = PC3100.ndi.XP,        PCMCIA\AIRONET-PC3100-25CA
 %PCI3100.DevDesc%               = PCI3100.ndi.XP,       PCI\VEN_14B9&DEV_3100
 %PCI3100.DevDesc%               = PCI3100.ndi.XP,       PCI\VEN_14B9&DEV_3101
-%ISA3100.DevDesc%               = ISA3100.ndi.XP,       ISAPNP\AWL3100 
-%ISA3100.DevDesc%               = ISA3100.ndi.XP,       ISAPNP\AWL3101 
+;%ISA3100.DevDesc%               = ISA3100.ndi.XP,       ISAPNP\AWL3100 
+;%ISA3100.DevDesc%               = ISA3100.ndi.XP,       ISAPNP\AWL3101 
 
 %PC3500.DevDesc%                = PC3500.ndi.XP,        PCMCIA\AIRONET-PC3500-D29B
 %PC3500.DevDesc%                = PC3500.ndi.XP,        PCMCIA\AIRONET-PC3500-1492
 %PCI3500.DevDesc%               = PCI3500.ndi.XP,       PCI\VEN_14B9&DEV_3500
-%ISA3500.DevDesc%               = ISA3500.ndi.XP,       ISAPNP\AWL3500
+;%ISA3500.DevDesc%               = ISA3500.ndi.XP,       ISAPNP\AWL3500
 
 %PC4500.DevDesc%                = PC4500.ndi.XP,        PCMCIA\AIRONET-PC4500-13ED
 %PC4500.DevDesc%                = PC4500.ndi.XP,        PCMCIA\AIRONET-PC4500-D4C4
 %PCI4500.DevDesc%               = PCI4500.ndi.XP,       PCI\VEN_14B9&DEV_4500
-%ISA4500.DevDesc%               = ISA4500.ndi.XP,       ISAPNP\AWL4500
+;%ISA4500.DevDesc%               = ISA4500.ndi.XP,       ISAPNP\AWL4500
  
 %PC4800.DevDesc%                = PC4800.ndi.XP,        PCMCIA\AIRONET-PC4800-D913
 %PCI4800.DevDesc%               = PCI4800.ndi.XP,       PCI\VEN_14B9&DEV_4800
-%ISA4800.DevDesc%               = ISA4800.ndi.XP,       ISAPNP\AWL4800 
+;%ISA4800.DevDesc%               = ISA4800.ndi.XP,       ISAPNP\AWL4800 
 
 %PC340.DevDesc%                 = PC340.ndi.XP,         PCMCIA\CISCO_SYSTEMS-340_SERIES_WIRELESS_LAN_ADAPTER-5FE9
 %PCI340.DevDesc%                = PCI340.ndi.XP,        PCI\VEN_14B9&DEV_0340
 
-%PC350.DevDesc%                 = PC350.ndi.XP,         PCMCIA\CISCO_SYSTEMS-350_SERIES_WIRELESS_LAN_ADAPTER-512A
+%PC350.DevDesc%                 = PC350.ndi.XP,         PCI\VEN_14B9&DEV_0350
 %PCI350.DevDesc%                = PCI350.ndi.XP,        PCI\VEN_14B9&DEV_0350
 
 ;*****************************************************************
@@ -942,7 +942,7 @@
 ;*****************************************************************
 [ISA.LogConfig]
 IRQConfig=3,4,5,6,7,8,9,10,11,12,13,14,15
-IOConfig=40@100-3FF(3FF::)
+IOConfig="40@100-3FF(3FF::)"
 ConfigPriority=HARDRECONFIG
 
 [CoInstaller.NT.AddReg]
@@ -1209,7 +1209,7 @@
 StartType      = 3 ;%SERVICE_DEMAND_START%
 ErrorControl   = 0 ;%SERVICE_ERROR_IGNORE%
 ServiceBinary  = %12%\pcx500mp.sys
-LoadOrderGroup = extended base
+LoadOrderGroup = "extended base"
 
 [PCX500.EventLog]
 AddReg = PCX500.EventLog.Add

*) Proxim Orinoco 8471-WD (802.11a/b/g)

ath0: <Atheros 5212> mem 0x88010000-0x8801ffff irq 11 at device 0.0 on cardbus0
ath0: mac 5.6 phy 4.1 5ghz radio 1.7 2ghz radio 2.3
ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
ath0: 802.11 address: 00:20:a6:4e:d6:64

... Standard kernel driver, just for reference - I have problem with
setting for one access point without wep. The second with wep seems
to be accessible and network does work over it.

ori0: <ORiNOCO 802.11bg ComboCard Silver> mem 0x88010000-0x8801ffff irq 11 at device 0.0 on cardbus0
can't re-use a leaf (sleepMode)!
can't re-use a leaf (shortPreamble)!
can't re-use a leaf (radioEnable)!
can't re-use a leaf (BusType)!
ori0: NDIS API version: 5.1
error opening file /compat/ndis/regAdd.txt
ori0: 802.11 address: 00:20:a6:4e:d6:64
ori0: 11a rates: 6Mbps 12Mbps 24Mbps 36Mbps 36Mbps 48Mbps 54Mbps
ori0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
ori0: 11g rates: 6Mbps 12Mbps 24Mbps 36Mbps 36Mbps 48Mbps 54Mbps

... I'm able to do ssh and other basic network connections, but
    cd /usr/src ; make update
halts system very fastly without any message and without any panic

*) SMC EZ Connect g SMC2835W (802.11b/g)

smc0: <SMC2835W 2.4GHz 54 Mbps Wireless Cardbus Adapter> mem 0x88002000-0x88003fff irq 11 at device 0.0 on cardbus0
can't re-use a leaf (SSID)!
can't re-use a leaf (NetworkType)!
can't re-use a leaf (DSChannel)!
can't re-use a leaf (TxRate)!
can't re-use a leaf (WepReq)!
can't re-use a leaf (LongPreamble)!
can't re-use a leaf (11dMode)!
can't re-use a leaf (BusType)!
smc0: NDIS API version: 5.0
smc0: Ethernet address: 80:8a:bf:c2:64:9c

... Card is detected, but I could not establish any connection

-- 
Rudolf Cejka <cejkar at fit.vutbr.cz> http://www.fit.vutbr.cz/~cejkar
Brno University of Technology, Faculty of Information Technology
Bozetechova 2, 612 66  Brno, Czech Republic



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040127095740.GA74677>