From owner-freebsd-mobile Mon Aug 5 19:39:43 2002 Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 35D9D37B400 for ; Mon, 5 Aug 2002 19:39:39 -0700 (PDT) Received: from ambrisko.com (adsl-64-174-51-42.dsl.snfc21.pacbell.net [64.174.51.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6FB7743E65 for ; Mon, 5 Aug 2002 19:39:38 -0700 (PDT) (envelope-from ambrisko@ambrisko.com) Received: (from ambrisko@localhost) by ambrisko.com (8.11.6/8.11.6) id g762dTG33822; Mon, 5 Aug 2002 19:39:29 -0700 (PDT) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <200208060239.g762dTG33822@ambrisko.com> Subject: Re: an driver with cisco aironet mini-pci 350 In-Reply-To: <20020727164749.GA48515@harlem.foo.bar> To: Hudson Lee Date: Mon, 5 Aug 2002 19:39:29 -0700 (PDT) Cc: freebsd-mobile@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL94b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Since the latest Linux from Cisco has code to drive this card it shouldn't be to hard to add support assuming they added the PCI attachment in a reasonable way. It's now very difficult to get programing information directly from Cisco :-( I have a mini-PCI to PCI adapter so I can plug it into a couple of test systems including a Soekris box. I have an older PCI version here. Hopefully we just have to update the attachment and it should just work. Can you dump the the PCI registers 0x10 & 0x14 via pciconf -l. We can probably just skip over the indirection of the PLX chip and go straight into attaching the Aironet driver to the rid. You can try this guess at a patch for kicks. Index: if_an_pci.c =================================================================== RCS file: /cvs/src/sys/dev/an/if_an_pci.c,v retrieving revision 1.2.2.6 diff -u -r1.2.2.6 if_an_pci.c --- if_an_pci.c 26 Sep 2001 01:02:01 -0000 1.2.2.6 +++ if_an_pci.c 6 Aug 2002 02:38:48 -0000 @@ -100,6 +100,7 @@ #define AIRONET_DEVICEID_4500 0x4500 #define AIRONET_DEVICEID_4800 0x4800 #define AIRONET_DEVICEID_4xxx 0x0001 +#define AIRONET_DEVICEID_MPI350 0xA504 #define AN_PCI_PLX_LOIO 0x14 /* PLX chip iobase */ #define AN_PCI_LOIO 0x18 /* Aironet iobase */ @@ -131,6 +132,12 @@ t++; } + if (pci_get_vendor(dev) == AIRONET_VENDORID && + pci_get_device(dev) == AIRONET_DEVICEID_MPI350) { + device_set_desc(dev, "Cisco Aironet MPI350"); + return(0); + } + return(ENXIO); } @@ -150,21 +157,24 @@ flags = device_get_flags(dev); bzero(sc, sizeof(struct an_softc)); - /* - * Map control/status registers. - */ - command = pci_read_config(dev, PCIR_COMMAND, 4); - command |= PCIM_CMD_PORTEN; - pci_write_config(dev, PCIR_COMMAND, command, 4); - command = pci_read_config(dev, PCIR_COMMAND, 4); - - if (!(command & PCIM_CMD_PORTEN)) { - printf("an%d: failed to enable I/O ports!\n", unit); - error = ENXIO; - goto fail; + if (pci_get_device(dev) == AIRONET_DEVICEID_MPI350) { + sc->port_rid = AN_PCI_PLX_LOIO; + } else { + /* + * Map control/status registers. + */ + command = pci_read_config(dev, PCIR_COMMAND, 4); + command |= PCIM_CMD_PORTEN; + pci_write_config(dev, PCIR_COMMAND, command, 4); + command = pci_read_config(dev, PCIR_COMMAND, 4); + + if (!(command & PCIM_CMD_PORTEN)) { + printf("an%d: failed to enable I/O ports!\n", unit); + error = ENXIO; + goto fail; + } + sc->port_rid = AN_PCI_LOIO; } - - sc->port_rid = AN_PCI_LOIO; error = an_alloc_port(dev, sc->port_rid, 1); if (error) { To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message