Home | History | Annotate | Line # | Download | only in pcmcia
com_pcmcia.c revision 1.21.16.4
      1  1.21.16.4  jdolecek /*	$NetBSD: com_pcmcia.c,v 1.21.16.4 2002/10/10 18:41:22 jdolecek Exp $	 */
      2       1.13   mycroft 
      3       1.13   mycroft /*-
      4       1.13   mycroft  * Copyright (c) 1998 The NetBSD Foundation, Inc.
      5       1.13   mycroft  * All rights reserved.
      6       1.13   mycroft  *
      7       1.13   mycroft  * This code is derived from software contributed to The NetBSD Foundation
      8       1.13   mycroft  * by Charles M. Hannum.
      9       1.13   mycroft  *
     10       1.13   mycroft  * Redistribution and use in source and binary forms, with or without
     11       1.13   mycroft  * modification, are permitted provided that the following conditions
     12       1.13   mycroft  * are met:
     13       1.13   mycroft  * 1. Redistributions of source code must retain the above copyright
     14       1.13   mycroft  *    notice, this list of conditions and the following disclaimer.
     15       1.13   mycroft  * 2. Redistributions in binary form must reproduce the above copyright
     16       1.13   mycroft  *    notice, this list of conditions and the following disclaimer in the
     17       1.13   mycroft  *    documentation and/or other materials provided with the distribution.
     18       1.13   mycroft  * 3. All advertising materials mentioning features or use of this software
     19       1.13   mycroft  *    must display the following acknowledgement:
     20       1.13   mycroft  *        This product includes software developed by the NetBSD
     21       1.13   mycroft  *        Foundation, Inc. and its contributors.
     22       1.13   mycroft  * 4. Neither the name of The NetBSD Foundation nor the names of its
     23       1.13   mycroft  *    contributors may be used to endorse or promote products derived
     24       1.13   mycroft  *    from this software without specific prior written permission.
     25       1.13   mycroft  *
     26       1.13   mycroft  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     27       1.13   mycroft  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     28       1.13   mycroft  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     29       1.13   mycroft  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     30       1.13   mycroft  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     31       1.13   mycroft  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     32       1.13   mycroft  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     33       1.13   mycroft  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     34       1.13   mycroft  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     35       1.13   mycroft  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     36       1.13   mycroft  * POSSIBILITY OF SUCH DAMAGE.
     37       1.13   mycroft  */
     38        1.2   thorpej 
     39        1.2   thorpej /*-
     40        1.2   thorpej  * Copyright (c) 1991 The Regents of the University of California.
     41        1.2   thorpej  * All rights reserved.
     42        1.2   thorpej  *
     43        1.2   thorpej  * Redistribution and use in source and binary forms, with or without
     44        1.2   thorpej  * modification, are permitted provided that the following conditions
     45        1.2   thorpej  * are met:
     46        1.2   thorpej  * 1. Redistributions of source code must retain the above copyright
     47        1.2   thorpej  *    notice, this list of conditions and the following disclaimer.
     48        1.2   thorpej  * 2. Redistributions in binary form must reproduce the above copyright
     49        1.2   thorpej  *    notice, this list of conditions and the following disclaimer in the
     50        1.2   thorpej  *    documentation and/or other materials provided with the distribution.
     51        1.2   thorpej  * 3. All advertising materials mentioning features or use of this software
     52        1.2   thorpej  *    must display the following acknowledgement:
     53        1.2   thorpej  *	This product includes software developed by the University of
     54        1.2   thorpej  *	California, Berkeley and its contributors.
     55        1.2   thorpej  * 4. Neither the name of the University nor the names of its contributors
     56        1.2   thorpej  *    may be used to endorse or promote products derived from this software
     57        1.2   thorpej  *    without specific prior written permission.
     58        1.2   thorpej  *
     59        1.2   thorpej  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     60        1.2   thorpej  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     61        1.2   thorpej  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     62        1.2   thorpej  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     63        1.2   thorpej  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     64        1.2   thorpej  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     65        1.2   thorpej  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     66        1.2   thorpej  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     67        1.2   thorpej  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     68        1.2   thorpej  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     69        1.2   thorpej  * SUCH DAMAGE.
     70        1.2   thorpej  *
     71        1.2   thorpej  *	@(#)com.c	7.5 (Berkeley) 5/16/91
     72        1.2   thorpej  */
     73        1.2   thorpej 
     74  1.21.16.1   thorpej #include <sys/cdefs.h>
     75  1.21.16.4  jdolecek __KERNEL_RCSID(0, "$NetBSD: com_pcmcia.c,v 1.21.16.4 2002/10/10 18:41:22 jdolecek Exp $");
     76  1.21.16.1   thorpej 
     77        1.2   thorpej #include <sys/param.h>
     78        1.2   thorpej #include <sys/systm.h>
     79        1.2   thorpej #include <sys/ioctl.h>
     80        1.2   thorpej #include <sys/select.h>
     81        1.2   thorpej #include <sys/tty.h>
     82        1.2   thorpej #include <sys/proc.h>
     83        1.2   thorpej #include <sys/user.h>
     84        1.2   thorpej #include <sys/conf.h>
     85        1.2   thorpej #include <sys/file.h>
     86        1.2   thorpej #include <sys/uio.h>
     87        1.2   thorpej #include <sys/kernel.h>
     88        1.2   thorpej #include <sys/syslog.h>
     89        1.2   thorpej #include <sys/device.h>
     90        1.2   thorpej 
     91        1.2   thorpej #include <machine/intr.h>
     92        1.2   thorpej #include <machine/bus.h>
     93        1.2   thorpej 
     94        1.2   thorpej #include <dev/pcmcia/pcmciavar.h>
     95        1.2   thorpej #include <dev/pcmcia/pcmciareg.h>
     96        1.9  christos #include <dev/pcmcia/pcmciadevs.h>
     97        1.2   thorpej 
     98        1.2   thorpej #include <dev/ic/comreg.h>
     99        1.2   thorpej #include <dev/ic/comvar.h>
    100        1.2   thorpej 
    101        1.2   thorpej #include <dev/isa/isareg.h>
    102        1.2   thorpej 
    103        1.5  christos struct com_dev {
    104       1.20  christos 	char	*name;
    105       1.20  christos 	char	*cis1_info[4];
    106        1.5  christos };
    107        1.5  christos 
    108       1.14   nathanw /* Devices that we need to match by CIS strings */
    109        1.5  christos static struct com_dev com_devs[] = {
    110       1.20  christos 	{ PCMCIA_STR_MEGAHERTZ_XJ2288, PCMCIA_CIS_MEGAHERTZ_XJ2288 },
    111        1.5  christos };
    112        1.5  christos 
    113        1.5  christos 
    114        1.5  christos static int com_devs_size = sizeof(com_devs) / sizeof(com_devs[0]);
    115        1.5  christos static struct com_dev *com_dev_match __P((struct pcmcia_card *));
    116        1.5  christos 
    117        1.2   thorpej int com_pcmcia_match __P((struct device *, struct cfdata *, void *));
    118        1.2   thorpej void com_pcmcia_attach __P((struct device *, struct device *, void *));
    119       1.16   thorpej int com_pcmcia_detach __P((struct device *, int));
    120        1.2   thorpej void com_pcmcia_cleanup __P((void *));
    121        1.2   thorpej 
    122        1.3      marc int com_pcmcia_enable __P((struct com_softc *));
    123        1.3      marc void com_pcmcia_disable __P((struct com_softc *));
    124        1.5  christos int com_pcmcia_enable1 __P((struct com_softc *));
    125        1.5  christos void com_pcmcia_disable1 __P((struct com_softc *));
    126        1.3      marc 
    127        1.2   thorpej struct com_pcmcia_softc {
    128        1.2   thorpej 	struct com_softc sc_com;		/* real "com" softc */
    129        1.2   thorpej 
    130        1.2   thorpej 	/* PCMCIA-specific goo */
    131        1.2   thorpej 	struct pcmcia_io_handle sc_pcioh;	/* PCMCIA i/o space info */
    132        1.2   thorpej 	int sc_io_window;			/* our i/o window */
    133        1.2   thorpej 	struct pcmcia_function *sc_pf;		/* our PCMCIA function */
    134        1.2   thorpej 	void *sc_ih;				/* interrupt handler */
    135        1.2   thorpej };
    136        1.2   thorpej 
    137  1.21.16.4  jdolecek CFATTACH_DECL(com_pcmcia, sizeof(struct com_pcmcia_softc),
    138  1.21.16.4  jdolecek     com_pcmcia_match, com_pcmcia_attach, com_pcmcia_detach, com_activate);
    139        1.2   thorpej 
    140       1.14   nathanw /* Look for pcmcia cards with particular CIS strings */
    141        1.5  christos static struct com_dev *
    142        1.5  christos com_dev_match(card)
    143        1.5  christos 	struct pcmcia_card *card;
    144        1.5  christos {
    145       1.14   nathanw 	int i, j;
    146        1.5  christos 
    147        1.5  christos 	for (i = 0; i < com_devs_size; i++) {
    148       1.14   nathanw 		for (j = 0; j < 4; j++)
    149       1.20  christos 			if (com_devs[i].cis1_info[j] &&
    150       1.14   nathanw 			    strcmp(com_devs[i].cis1_info[j],
    151       1.20  christos 			    card->cis1_info[j]) != 0)
    152       1.14   nathanw 				break;
    153       1.14   nathanw 		if (j == 4)
    154       1.14   nathanw 			return &com_devs[i];
    155        1.5  christos 	}
    156        1.5  christos 
    157        1.5  christos 	return NULL;
    158        1.5  christos }
    159        1.3      marc 
    160        1.3      marc 
    161        1.2   thorpej int
    162        1.2   thorpej com_pcmcia_match(parent, match, aux)
    163        1.2   thorpej 	struct device *parent;
    164        1.2   thorpej 	struct cfdata *match;
    165        1.2   thorpej 	void *aux;
    166        1.2   thorpej {
    167       1.11   nathanw 	int comportmask;
    168        1.2   thorpej 	struct pcmcia_attach_args *pa = aux;
    169        1.2   thorpej 	struct pcmcia_config_entry *cfe;
    170        1.2   thorpej 
    171       1.11   nathanw 	/* 1. Does it claim to be a serial device? */
    172       1.11   nathanw 	if (pa->pf->function == PCMCIA_FUNCTION_SERIAL)
    173       1.20  christos 		return 1;
    174       1.11   nathanw 
    175       1.11   nathanw 	/* 2. Does it have all four 'standard' port ranges? */
    176       1.11   nathanw 	comportmask = 0;
    177  1.21.16.3  jdolecek 	SIMPLEQ_FOREACH(cfe, &pa->pf->cfe_head, cfe_list) {
    178       1.20  christos 		switch (cfe->iospace[0].start) {
    179       1.20  christos 		case IO_COM1:
    180       1.20  christos 			comportmask |= 1;
    181       1.20  christos 			break;
    182       1.20  christos 		case IO_COM2:
    183       1.20  christos 			comportmask |= 2;
    184       1.20  christos 			break;
    185       1.20  christos 		case IO_COM3:
    186       1.20  christos 			comportmask |= 4;
    187       1.20  christos 			break;
    188       1.20  christos 		case IO_COM4:
    189       1.20  christos 			comportmask |= 8;
    190       1.20  christos 			break;
    191       1.20  christos 		}
    192       1.11   nathanw 	}
    193       1.11   nathanw 
    194       1.11   nathanw 	if (comportmask == 15)
    195       1.20  christos 		return 1;
    196       1.11   nathanw 
    197       1.11   nathanw 	/* 3. Is this a card we know about? */
    198       1.11   nathanw 	if (com_dev_match(pa->card) != NULL)
    199       1.20  christos 		return 1;
    200        1.2   thorpej 
    201       1.11   nathanw 	return 0;
    202        1.2   thorpej }
    203        1.2   thorpej 
    204        1.2   thorpej void
    205        1.2   thorpej com_pcmcia_attach(parent, self, aux)
    206       1.20  christos 	struct device  *parent, *self;
    207        1.2   thorpej 	void *aux;
    208        1.2   thorpej {
    209        1.2   thorpej 	struct com_pcmcia_softc *psc = (void *) self;
    210        1.2   thorpej 	struct com_softc *sc = &psc->sc_com;
    211        1.2   thorpej 	struct pcmcia_attach_args *pa = aux;
    212        1.2   thorpej 	struct pcmcia_config_entry *cfe;
    213       1.20  christos 	int             autoalloc = 0;
    214        1.2   thorpej 
    215        1.2   thorpej 	psc->sc_pf = pa->pf;
    216        1.2   thorpej 
    217  1.21.16.3  jdolecek 	psc->sc_io_window = -1;
    218  1.21.16.3  jdolecek 
    219       1.15   msaitoh retry:
    220        1.2   thorpej 	/* find a cfe we can use */
    221        1.2   thorpej 
    222  1.21.16.3  jdolecek 	SIMPLEQ_FOREACH(cfe, &pa->pf->cfe_head, cfe_list) {
    223       1.12   thorpej #if 0
    224       1.12   thorpej 		/*
    225       1.12   thorpej 		 * Some modem cards (e.g. Xircom CM33) also have
    226       1.12   thorpej 		 * mem space.  Don't bother with this check.
    227       1.12   thorpej 		 */
    228        1.2   thorpej 		if (cfe->num_memspace != 0)
    229        1.2   thorpej 			continue;
    230       1.12   thorpej #endif
    231       1.12   thorpej 
    232        1.2   thorpej 		if (cfe->num_iospace != 1)
    233        1.2   thorpej 			continue;
    234        1.2   thorpej 
    235       1.18   nathanw 		if (autoalloc == 0) {
    236       1.20  christos 			/*
    237       1.20  christos 			 * cfe->iomask == 3 is our test for the "generic"
    238       1.20  christos 			 * config table entry, which we want to avoid on the
    239       1.20  christos 			 * first pass and use exclusively on the second pass.
    240       1.18   nathanw 			 */
    241       1.20  christos 			if ((cfe->iomask != 3) &&
    242       1.20  christos 			    (cfe->iospace[0].start != 0)) {
    243       1.20  christos 				if (!pcmcia_io_alloc(pa->pf,
    244       1.20  christos 				    cfe->iospace[0].start,
    245       1.20  christos 				    cfe->iospace[0].length, 0,
    246       1.20  christos 				    &psc->sc_pcioh)) {
    247       1.15   msaitoh 					goto found;
    248       1.15   msaitoh 				}
    249        1.2   thorpej 			}
    250        1.2   thorpej 		} else {
    251       1.20  christos 			if (cfe->iomask == 3) {
    252       1.20  christos 				if (!pcmcia_io_alloc(pa->pf, 0,
    253       1.20  christos 				    cfe->iospace[0].length,
    254       1.20  christos 				    cfe->iospace[0].length, &psc->sc_pcioh)) {
    255       1.18   nathanw 					goto found;
    256       1.18   nathanw 				}
    257        1.2   thorpej 			}
    258        1.2   thorpej 		}
    259        1.2   thorpej 	}
    260       1.15   msaitoh 	if (autoalloc == 0) {
    261       1.15   msaitoh 		autoalloc = 1;
    262       1.15   msaitoh 		goto retry;
    263       1.15   msaitoh 	} else if (!cfe) {
    264        1.2   thorpej 		printf(": can't allocate i/o space\n");
    265        1.2   thorpej 		return;
    266        1.2   thorpej 	}
    267       1.15   msaitoh found:
    268        1.2   thorpej 	/* Enable the card. */
    269        1.2   thorpej 	pcmcia_function_init(pa->pf, cfe);
    270        1.5  christos 	if (com_pcmcia_enable1(sc))
    271        1.2   thorpej 		printf(": function enable failed\n");
    272        1.2   thorpej 
    273        1.3      marc 	sc->enabled = 1;
    274        1.2   thorpej 
    275        1.2   thorpej 	/* map in the io space */
    276        1.2   thorpej 
    277        1.2   thorpej 	if (pcmcia_io_map(pa->pf, ((cfe->flags & PCMCIA_CFE_IO16) ?
    278        1.2   thorpej 	    PCMCIA_WIDTH_IO16 : PCMCIA_WIDTH_IO8), 0, psc->sc_pcioh.size,
    279        1.2   thorpej 	    &psc->sc_pcioh, &psc->sc_io_window)) {
    280        1.2   thorpej 		printf(": can't map i/o space\n");
    281        1.2   thorpej 		return;
    282        1.2   thorpej 	}
    283  1.21.16.2  jdolecek 	sc->sc_iot = psc->sc_pcioh.iot;
    284  1.21.16.2  jdolecek 	sc->sc_ioh = psc->sc_pcioh.ioh;
    285  1.21.16.2  jdolecek 
    286        1.2   thorpej 	sc->sc_iobase = -1;
    287        1.2   thorpej 	sc->sc_frequency = COM_FREQ;
    288        1.2   thorpej 
    289        1.3      marc 	sc->enable = com_pcmcia_enable;
    290        1.3      marc 	sc->disable = com_pcmcia_disable;
    291       1.20  christos 
    292       1.17   thorpej 	printf(": serial device\n%s", sc->sc_dev.dv_xname);
    293        1.5  christos 
    294        1.2   thorpej 	com_attach_subr(sc);
    295        1.2   thorpej 
    296        1.3      marc 	sc->enabled = 0;
    297       1.20  christos 
    298        1.5  christos 	com_pcmcia_disable1(sc);
    299       1.16   thorpej }
    300       1.16   thorpej 
    301       1.16   thorpej int
    302       1.16   thorpej com_pcmcia_detach(self, flags)
    303       1.20  christos 	struct device  *self;
    304       1.16   thorpej 	int flags;
    305       1.16   thorpej {
    306       1.20  christos 	struct com_pcmcia_softc *psc = (struct com_pcmcia_softc *) self;
    307       1.16   thorpej 	int error;
    308  1.21.16.3  jdolecek 
    309  1.21.16.3  jdolecek 	/* Unmap our i/o window. */
    310  1.21.16.3  jdolecek 	if (psc->sc_io_window == -1) {
    311  1.21.16.3  jdolecek 		printf("%s: I/O window not allocated.",
    312  1.21.16.3  jdolecek 		    psc->sc_com.sc_dev.dv_xname);
    313  1.21.16.3  jdolecek 		return 0;
    314  1.21.16.3  jdolecek 	}
    315       1.16   thorpej 
    316       1.16   thorpej 	if ((error = com_detach(self, flags)) != 0)
    317       1.20  christos 		return error;
    318       1.16   thorpej 
    319       1.16   thorpej 	/* Unmap our i/o window. */
    320       1.16   thorpej 	pcmcia_io_unmap(psc->sc_pf, psc->sc_io_window);
    321       1.16   thorpej 
    322       1.16   thorpej 	/* Free our i/o space. */
    323       1.16   thorpej 	pcmcia_io_free(psc->sc_pf, &psc->sc_pcioh);
    324       1.16   thorpej 
    325       1.20  christos 	return 0;
    326        1.3      marc }
    327        1.3      marc 
    328        1.5  christos int
    329        1.5  christos com_pcmcia_enable(sc)
    330        1.5  christos 	struct com_softc *sc;
    331        1.3      marc {
    332        1.3      marc 	struct com_pcmcia_softc *psc = (struct com_pcmcia_softc *) sc;
    333        1.3      marc 	struct pcmcia_function *pf = psc->sc_pf;
    334  1.21.16.1   thorpej 	int error;
    335  1.21.16.1   thorpej 
    336  1.21.16.1   thorpej 	if ((error = com_pcmcia_enable1(sc)) != 0)
    337  1.21.16.1   thorpej 		return error;
    338        1.2   thorpej 
    339        1.2   thorpej 	/* establish the interrupt. */
    340        1.3      marc 	psc->sc_ih = pcmcia_intr_establish(pf, IPL_SERIAL, comintr, sc);
    341        1.2   thorpej 	if (psc->sc_ih == NULL) {
    342        1.2   thorpej 		printf("%s: couldn't establish interrupt\n",
    343       1.20  christos 		    sc->sc_dev.dv_xname);
    344  1.21.16.1   thorpej 		com_pcmcia_disable1(sc);
    345       1.20  christos 		return 1;
    346        1.3      marc 	}
    347  1.21.16.1   thorpej 	return 0;
    348        1.5  christos }
    349        1.5  christos 
    350        1.5  christos int
    351        1.5  christos com_pcmcia_enable1(sc)
    352        1.5  christos 	struct com_softc *sc;
    353        1.5  christos {
    354        1.5  christos 	struct com_pcmcia_softc *psc = (struct com_pcmcia_softc *) sc;
    355        1.5  christos 	struct pcmcia_function *pf = psc->sc_pf;
    356        1.5  christos 	int ret;
    357        1.3      marc 
    358       1.20  christos 	if ((ret = pcmcia_function_enable(pf)) != 0)
    359       1.20  christos 		return ret;
    360        1.3      marc 
    361       1.19      marc 	if ((psc->sc_pf->sc->card.product == PCMCIA_PRODUCT_3COM_3C562) ||
    362       1.21      tron 	    (psc->sc_pf->sc->card.product == PCMCIA_PRODUCT_3COM_3CXEM556) ||
    363       1.21      tron 	    (psc->sc_pf->sc->card.product == PCMCIA_PRODUCT_3COM_3CXEM556INT)) {
    364        1.3      marc 		int reg;
    365        1.3      marc 
    366        1.3      marc 		/* turn off the ethernet-disable bit */
    367        1.3      marc 
    368        1.3      marc 		reg = pcmcia_ccr_read(pf, PCMCIA_CCR_OPTION);
    369        1.3      marc 		if (reg & 0x08) {
    370       1.20  christos 			reg &= ~0x08;
    371       1.20  christos 			pcmcia_ccr_write(pf, PCMCIA_CCR_OPTION, reg);
    372        1.3      marc 		}
    373        1.2   thorpej 	}
    374       1.20  christos 	return ret;
    375        1.3      marc }
    376        1.3      marc 
    377        1.5  christos void
    378        1.5  christos com_pcmcia_disable(sc)
    379        1.5  christos 	struct com_softc *sc;
    380        1.5  christos {
    381        1.5  christos 	struct com_pcmcia_softc *psc = (struct com_pcmcia_softc *) sc;
    382        1.5  christos 
    383        1.5  christos 	pcmcia_intr_disestablish(psc->sc_pf, psc->sc_ih);
    384  1.21.16.1   thorpej 	com_pcmcia_disable1(sc);
    385        1.5  christos }
    386        1.5  christos 
    387        1.5  christos void
    388        1.5  christos com_pcmcia_disable1(sc)
    389        1.5  christos 	struct com_softc *sc;
    390        1.3      marc {
    391        1.3      marc 	struct com_pcmcia_softc *psc = (struct com_pcmcia_softc *) sc;
    392        1.3      marc 
    393        1.3      marc 	pcmcia_function_disable(psc->sc_pf);
    394        1.2   thorpej }
    395