Subject: Re: Sierra Wireless Aircard A555
To: Charles M. Hannum <abuse@spamalicious.com>
From: John Nemeth <jnemeth@victoria.tc.ca>
List: current-users
Date: 04/10/2005 23:22:43
On Sep 26 2004,  4:28pm, "Charles M. Hannum" wrote:
} On Sunday 26 September 2004 19:28, John Nemeth wrote:
} > pcmcia0: CIS version PC Card Standard 7.0
} > pcmcia0: CIS info: Sierra Wireless, AirCard 555, A555, Rev 1
} > pcmcia0: Manufacturer code 0x192, product 0xa555
} > pcmcia0: function 0: network adapter, ccr addr 700 mask 73
} > pcmcia0: function 0, config table entry 1: I/O card; irq mask fff8; iomask
} > 6, iospace 0-3f; rdybsy_active io8 io16 irqlevel com2 at pcmcia0 function
} > 0: <Sierra Wireless, AirCard 555, A555, Rev 1> com2: ns8250 or ns16450, no
} > fifo
} 
} Hmmm, the large I/O range and the "network adapter" are kind of interesting.  
} It's worth noting that the Linux instructions include a replacement CIS, 
} which should parse more like:
} 
} pcmcia0: CIS version PC Card Standard 7.0
} pcmcia0: CIS info: Sierra Wireless, AirCard 555, A555, Rev 1
} pcmcia0: Manufacturer code 0x13f, product 0x710
} pcmcia0: function 0: serial adapter, ccr addr 700 mask 73
} pcmcia0: function 0, config table entry 32: I/O card; irq mask 3fbc; iomask 3, 
} iospace 3f8-3ff; io8 irqlevel
} pcmcia0: function 0, config table entry 33: I/O card; irq mask 3fbc; iomask 3, 
} iospace 3e8-3ef; io8 irqlevel
} pcmcia0: function 0, config table entry 34: I/O card; irq mask 3fbc; iomask 3, 
} iospace 2f8-2ff; io8 irqlevel
} pcmcia0: function 0, config table entry 35: I/O card; irq mask 3fbc; iomask 3, 
} iospace 2e8-2ef; io8 irqlevel
} pcmcia0: function 0, config table entry 36: I/O card; irq mask 3fbc; iomask 3, 
} iospace 0-7; io8 irqlevel
} 
} I'm guessing that bit 5 of the config index is actually what puts it into 
} serial port emulation.  You should be able to add some stuff to 
} pcmcia_cis_quirks.c to emulate this.
} 
} (Oddly, the "last config index" value in the replacement CIS is wrong -- but I 
} don't think anything actually uses that.)

     I haven't had a chance to deal with this for a while, but I'm
taking another look at it.  I did a test on a 3.99.1 system based on
20050327 sources.  It is found, but using cu, I don't get any response
from the card.  Does anybody see anything wrong?  Here is the dmesg
(with irrelevant devices trimmed) followed by the patches I created
based on the earlier messages in this thread:


NetBSD 3.99.1 (GENERIC) #2: Sun Apr 10 21:48:36 PDT 2005
	jnemeth@laptop:/sys/arch/i386/compile/GENERIC
total memory = 255 MB
avail memory = 242 MB
BIOS32 rev. 0 found at 0xfd7a0
mainbus0 (root)
cpu0 at mainbus0: (uniprocessor)
cpu0: Intel Mobile Pentium II (686-class), 298.56 MHz, id 0x66a
cpu0: features 183f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR>
cpu0: features 183f9ff<PGE,MCA,CMOV,PAT,PSE36,MMX>
cpu0: features 183f9ff<FXSR>
cpu0: I-cache 16 KB 32B/line 4-way, D-cache 16 KB 32B/line 4-way
cpu0: L2 cache 256 KB 32B/line 4-way
cpu0: ITLB 32 4 KB entries 4-way, 2 4 MB entries fully associative
cpu0: DTLB 64 4 KB entries 4-way, 8 4 MB entries 4-way
cpu0: 16 page colors
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: Intel 82443BX Host Bridge/Controller (rev. 0x03)
agp0 at pchb0: aperture at 0xf8000000, size 0x4000000
ppb0 at pci0 dev 1 function 0: Intel 82443BX AGP Interface (rev. 0x03)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
pcib0 at pci0 dev 2 function 0
pcib0: Intel 82371AB (PIIX4) PCI-ISA Bridge (rev. 0x02)
cbb0 at pci0 dev 3 function 0: Texas Instruments PCI1251 PCI-CardBus Bridge (rev. 0x01)
cbb1 at pci0 dev 3 function 1: Texas Instruments PCI1251 PCI-CardBus Bridge (rev. 0x01)
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
cbb0: interrupting at irq 11
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 129 device 0
pcmcia0 at cardslot0
cbb1: interrupting at irq 11
cardslot1 at cbb1 slot 1 flags 0
cardbus1 at cardslot1: bus 130 device 0
pcmcia1 at cardslot1
cbb0: wait took 0.009065s
com3 at pcmcia0 function 0: <Sierra Wireless, AirCard 555, A555, Rev 1>
com3: ns8250 or ns16450, no fifo
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
cbb0: wait took 0.009723s


--- pcmciadevs.orig	2005-04-10 19:59:34.000000000 -0700
+++ pcmciadevs	2005-04-10 21:45:42.000000000 -0700
@@ -78,6 +78,7 @@
 vendor PSION			0x016c	Psion
 vendor COMPAQ2			0x0183	Compaq
 vendor KINGSTON			0x0186	Kingston
+vendor SIERRAWIRELESS		0x0192	Sierra Wireless
 vendor DAYNA			0x0194	Dayna Corporation
 vendor RAYTHEON			0x01a6	Raytheon
 vendor IODATA			0x01bf	I-O DATA
@@ -365,6 +366,9 @@
 /* Simpletech ID also used by Symbol */
 product SIMPLETECH SPECTRUM24 0x801 Symbol Spectrum24 WLAN Adapter
 
+/* Sierra Wireless Products */
+product	SIERRAWIRELESS  AC555	0xa555	1xRTT Network Adapter
+
 /* Standard Microsystems Corporation Products */
 product SMC 8016		0x0105 SMC 8016 EtherCard
 product SMC EZCARD		0x8022 SMC EZCard 10 PCMCIA


--- com_pcmcia.c.orig	2005-04-10 19:59:26.000000000 -0700
+++ com_pcmcia.c	2005-04-10 19:41:14.000000000 -0700
@@ -120,6 +120,8 @@
 static const struct pcmcia_product com_pcmcia_products[] = {
 	{ PCMCIA_VENDOR_INVALID, PCMCIA_PRODUCT_INVALID,
 	  PCMCIA_CIS_MEGAHERTZ_XJ2288 },
+	{ PCMCIA_VENDOR_SIERRAWIRELESS, PCMCIA_PRODUCT_SIERRAWIRELESS_AC555,
+	  PCMCIA_CIS_INVALID },
 };
 static const size_t com_pcmcia_nproducts =
     sizeof(com_pcmcia_products) / sizeof(com_pcmcia_products[0]);


--- pcmcia_cis_quirks.c.orig	2005-04-10 19:50:39.000000000 -0700
+++ pcmcia_cis_quirks.c	2005-04-10 21:41:40.000000000 -0700
@@ -219,6 +219,29 @@
 	0,			/* maxtwins */
 };
 
+static const struct pcmcia_function pcmcia_sierrawireless_ac555_func0 = {
+	0,			/* function number */
+	PCMCIA_FUNCTION_SERIAL,
+	0x24,			/* last cfe number */
+	0x700,			/* ccr_base */
+	0x73,			/* ccr_mask */
+};
+
+static const struct pcmcia_config_entry pcmcia_sierrawireless_ac555_cfe0 = {
+	0x20,			/* cfe number */
+	PCMCIA_CFE_IO8 | PCMCIA_CFE_IRQLEVEL,
+	PCMCIA_IFTYPE_IO,
+	1,			/* num iospace */
+	10,			/* iomask */
+	{	/* iospace */
+		{ 0x8, 0x2e8 },
+	},
+	0xfff6,			/* irqmask */
+	0,			/* num_memspace */
+	{ { 0 } },		/* memspace */
+	0,			/* maxtwins */
+};
+
 static const struct pcmcia_cis_quirk pcmcia_cis_quirks[] = {
 	{ PCMCIA_VENDOR_3COM, PCMCIA_PRODUCT_3COM_3CXEM556, PCMCIA_CIS_INVALID,
 	  &pcmcia_3cxem556_func0, &pcmcia_3cxem556_func0_cfe0 },
@@ -243,6 +266,10 @@
 	{ PCMCIA_VENDOR_INVALID, PCMCIA_PRODUCT_INVALID,
 	  PCMCIA_CIS_FUJITSU_FMV_J181,
 	  &pcmcia_fujitsu_j181_func0, &pcmcia_fujitsu_j181_func0_cfe0 },
+	{ PCMCIA_VENDOR_SIERRAWIRELESS, PCMCIA_PRODUCT_SIERRAWIRELESS_AC555,
+	  PCMCIA_CIS_INVALID,
+	  &pcmcia_sierrawireless_ac555_func0, &pcmcia_sierrawireless_ac555_cfe0
+	},
 };
 
 static const int pcmcia_cis_nquirks =


}-- End of excerpt from "Charles M. Hannum"