Subject: Re: Sierra Wireless Aircard A555
To: Charles M. Hannum <abuse@spamalicious.com>
From: Michael Graff <explorer@flame.org>
List: current-users
Date: 09/27/2004 13:10:10
--Boundary-00=_iOHWB5I7ly+Bn+T
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Sorry, I thought I attached this...

Note that I don't know how to add all the possible IO ranges in, since I'm not 
even certain if there is a way to more or less replace the CIS structure like 
the hack-that-is-a-linux-driver does.

--Michael

--Boundary-00=_iOHWB5I7ly+Bn+T
Content-Type: text/x-diff;
  charset="iso-8859-1";
  name="pcmcia.diffs"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="pcmcia.diffs"

Index: com_pcmcia.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pcmcia/com_pcmcia.c,v
retrieving revision 1.49
diff -u -r1.49 com_pcmcia.c
--- com_pcmcia.c	11 Aug 2004 04:25:28 -0000	1.49
+++ com_pcmcia.c	27 Sep 2004 20:08:24 -0000
@@ -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_AC750,
+	  PCMCIA_CIS_INVALID },
 };
 static const size_t com_pcmcia_nproducts =
     sizeof(com_pcmcia_products) / sizeof(com_pcmcia_products[0]);
Index: pcmcia_cis_quirks.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pcmcia/pcmcia_cis_quirks.c,v
retrieving revision 1.21
diff -u -r1.21 pcmcia_cis_quirks.c
--- pcmcia_cis_quirks.c	10 Aug 2004 19:22:10 -0000	1.21
+++ pcmcia_cis_quirks.c	27 Sep 2004 20:08:24 -0000
@@ -218,7 +218,35 @@
 	0,			/* maxtwins */
 };
 
+static const struct pcmcia_function pcmcia_sierrawireless_ac750_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_ac750_cfe0 = {
+	0xc,			/* cfe number */
+	PCMCIA_CFE_IO8 | PCMCIA_CFE_IO16 | 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_SIERRAWIRELESS, PCMCIA_PRODUCT_SIERRAWIRELESS_AC750,
+	  PCMCIA_CIS_INVALID,
+	  &pcmcia_sierrawireless_ac750_func0, &pcmcia_sierrawireless_ac750_cfe0 },
 	{ PCMCIA_VENDOR_3COM, PCMCIA_PRODUCT_3COM_3CXEM556, PCMCIA_CIS_INVALID, 
 	  &pcmcia_3cxem556_func0, &pcmcia_3cxem556_func0_cfe0 },
 	{ PCMCIA_VENDOR_3COM, PCMCIA_PRODUCT_3COM_3CXEM556, PCMCIA_CIS_INVALID,
@@ -261,17 +289,17 @@
 
 	for (i=0; i<pcmcia_cis_nquirks; i++) {
 		if ((sc->card.manufacturer == pcmcia_cis_quirks[i].manufacturer) &&
-			(sc->card.product == pcmcia_cis_quirks[i].product) &&
-			(((sc->card.manufacturer != PCMCIA_VENDOR_INVALID) &&
-			  (sc->card.product != PCMCIA_PRODUCT_INVALID)) ||
-			 ((sc->card.manufacturer == PCMCIA_VENDOR_INVALID) &&
-			  (sc->card.product == PCMCIA_PRODUCT_INVALID) &&
-			  sc->card.cis1_info[0] &&
-			  (strcmp(sc->card.cis1_info[0],
-					  pcmcia_cis_quirks[i].cis1_info[0]) == 0) &&
-			  sc->card.cis1_info[1] &&
-			  (strcmp(sc->card.cis1_info[1],
-					  pcmcia_cis_quirks[i].cis1_info[1]) == 0)))) {
+		    (sc->card.product == pcmcia_cis_quirks[i].product) &&
+		    (((sc->card.manufacturer != PCMCIA_VENDOR_INVALID) &&
+		      (sc->card.product != PCMCIA_PRODUCT_INVALID)) ||
+		     ((sc->card.manufacturer == PCMCIA_VENDOR_INVALID) &&
+		      (sc->card.product == PCMCIA_PRODUCT_INVALID) &&
+		      sc->card.cis1_info[0] &&
+		      (strcmp(sc->card.cis1_info[0],
+			      pcmcia_cis_quirks[i].cis1_info[0]) == 0) &&
+		      sc->card.cis1_info[1] &&
+		      (strcmp(sc->card.cis1_info[1],
+			      pcmcia_cis_quirks[i].cis1_info[1]) == 0)))) {
 			if (!wiped) {
 				if (pcmcia_verbose) {
 					printf("%s: using CIS quirks for ", sc->dev.dv_xname);
Index: pcmciadevs
===================================================================
RCS file: /cvsroot/src/sys/dev/pcmcia/pcmciadevs,v
retrieving revision 1.207
diff -u -r1.207 pcmciadevs
--- pcmciadevs	10 Aug 2004 18:45:25 -0000	1.207
+++ pcmciadevs	27 Sep 2004 20:08:24 -0000
@@ -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
@@ -350,6 +351,9 @@
 /* Sharp Products */
 product	SHARP	PALDIO611S	0x0000	PALDIO 611S PC CARD
 
+/* Sierra Wireless Products */
+product	SIERRAWIRELESS	AC750	0x0710	GPRS Network Adapter
+
 /* Simple Technology Products */
 product SIMPLETECH COMMUNICATOR288 0x0100 Simple Technology 28.8 Communicator
 /* Simpletech ID also used by Symbol */
Index: pcmciadevs.h
===================================================================
RCS file: /cvsroot/src/sys/dev/pcmcia/pcmciadevs.h,v
retrieving revision 1.208
diff -u -r1.208 pcmciadevs.h
--- pcmciadevs.h	10 Aug 2004 18:45:36 -0000	1.208
+++ pcmciadevs.h	27 Sep 2004 20:08:24 -0000
@@ -85,6 +85,7 @@
 #define	PCMCIA_VENDOR_PSION	0x016c	/* Psion */
 #define	PCMCIA_VENDOR_COMPAQ2	0x0183	/* Compaq */
 #define	PCMCIA_VENDOR_KINGSTON	0x0186	/* Kingston */
+#define	PCMCIA_VENDOR_SIERRAWIRELESS	0x0192	/* Sierra Wireless */
 #define	PCMCIA_VENDOR_DAYNA	0x0194	/* Dayna Corporation */
 #define	PCMCIA_VENDOR_RAYTHEON	0x01a6	/* Raytheon */
 #define	PCMCIA_VENDOR_IODATA	0x01bf	/* I-O DATA */
@@ -482,6 +483,11 @@
 #define	PCMCIA_CIS_SHARP_PALDIO611S	{ NULL, NULL, NULL, NULL }
 #define	PCMCIA_PRODUCT_SHARP_PALDIO611S	0x0000
 
+/* Sierra Wireless Products */
+#define	PCMCIA_CIS_SIERRAWIRELESS_AC750	{ NULL, NULL, NULL, NULL }
+#define	PCMCIA_PRODUCT_SIERRAWIRELESS_AC750	0x0710
+#define	PCMCIA_STR_SIERRAWIRELESS_AC750	"GPRS Network Adapter"
+
 /* Simple Technology Products */
 #define	PCMCIA_CIS_SIMPLETECH_COMMUNICATOR288	{ NULL, NULL, NULL, NULL }
 #define	PCMCIA_PRODUCT_SIMPLETECH_COMMUNICATOR288	0x0100
Index: pcmciadevs_data.h
===================================================================
RCS file: /cvsroot/src/sys/dev/pcmcia/pcmciadevs_data.h,v
retrieving revision 1.208
diff -u -r1.208 pcmciadevs_data.h
--- pcmciadevs_data.h	10 Aug 2004 18:45:36 -0000	1.208
+++ pcmciadevs_data.h	27 Sep 2004 20:08:24 -0000
@@ -939,6 +939,13 @@
 	    "PALDIO 611S PC CARD",	}
 	,
 	{
+	    PCMCIA_VENDOR_SIERRAWIRELESS, PCMCIA_PRODUCT_SIERRAWIRELESS_AC750,
+	    PCMCIA_CIS_SIERRAWIRELESS_AC750,
+	    0,
+	    "Sierra Wireless",
+	    "GPRS Network Adapter",	}
+	,
+	{
 	    PCMCIA_VENDOR_SIMPLETECH, PCMCIA_PRODUCT_SIMPLETECH_COMMUNICATOR288,
 	    PCMCIA_CIS_SIMPLETECH_COMMUNICATOR288,
 	    0,
@@ -1956,6 +1963,14 @@
 	    NULL,
 	},
 	{
+	    PCMCIA_VENDOR_SIERRAWIRELESS,
+	    PCMCIA_KNOWNDEV_NOPROD,
+	    PCMCIA_CIS_INVALID,
+	    0,
+	    "Sierra Wireless",
+	    NULL,
+	},
+	{
 	    PCMCIA_VENDOR_DAYNA,
 	    PCMCIA_KNOWNDEV_NOPROD,
 	    PCMCIA_CIS_INVALID,

--Boundary-00=_iOHWB5I7ly+Bn+T--