Пример #1
0
static inline void md_interrupt_update(MicroDriveState *s)
{
    PCMCIACardState *card = PCMCIA_CARD(s);

    if (card->slot == NULL) {
        return;
    }

    qemu_set_irq(card->slot->irq,
                    !(s->stat & STAT_INT) &&	/* Inverted */
                    !(s->ctrl & (CTRL_IEN | CTRL_SRST)) &&
                    !(s->opt & OPT_SRESET));
}
Пример #2
0
static int
bt3c_pccard_probe(device_t dev)
{
	static struct pccard_product const	bt3c_pccard_products[] = {
		PCMCIA_CARD(3COM, 3CRWB609),
		{ NULL, }
	};

	struct pccard_product const	*pp = NULL;

	pp = pccard_product_lookup(dev, bt3c_pccard_products,
			sizeof(bt3c_pccard_products[0]), NULL);
	if (pp == NULL)
		return (ENXIO);

	device_set_desc(dev, pp->pp_name);

	return (0);
} /* bt3c_pccard_probe */
Пример #3
0
 *	PC Card (PCMCIA) specific code.
 */
static int fe_pccard_probe(device_t);
static int fe_pccard_attach(device_t);
static int fe_pccard_detach(device_t);

static const struct fe_pccard_product {
    struct pccard_product mpp_product;
    int mpp_flags;
    int mpp_cfe;
#define MPP_MBH10302 1
#define MPP_ANYFUNC 2
#define MPP_SKIP_TO_CFE 4
} fe_pccard_products[] = {
    /* These need to be first */
    { PCMCIA_CARD(FUJITSU2, FMV_J181), MPP_MBH10302 },
    { PCMCIA_CARD(FUJITSU2, FMV_J182), 0 },
    { PCMCIA_CARD(FUJITSU2, FMV_J182A), 0 },
    { PCMCIA_CARD(FUJITSU2, ITCFJ182A), 0 },
    /* These need to be second */
    { PCMCIA_CARD(TDK, LAK_CD011), 0 },
    { PCMCIA_CARD(TDK, LAK_CD021BX), 0 },
    { PCMCIA_CARD(TDK, LAK_CF010), 0 },
#if 0 /* XXX 86960-based? */
    { PCMCIA_CARD(TDK, LAK_DFL9610), 0 },
#endif
    { PCMCIA_CARD(CONTEC, CNETPC), MPP_SKIP_TO_CFE, 2 },
    { PCMCIA_CARD(FUJITSU, LA501), 0 },
    { PCMCIA_CARD(FUJITSU, LA10S), 0 },
    { PCMCIA_CARD(FUJITSU, NE200T), MPP_MBH10302 },/* Sold by Eagle */
    { PCMCIA_CARD(HITACHI, HT_4840), MPP_MBH10302 | MPP_SKIP_TO_CFE, 10 },
Пример #4
0
#include <sys/lock.h>
#include <sys/module.h>
#include <sys/mutex.h>
#include <sys/rman.h>
#include <sys/systm.h>
#include <machine/bus.h>

#include <dev/fdc/fdcvar.h>
#include <dev/pccard/pccardvar.h>
#include "pccarddevs.h"

static int fdc_pccard_probe(device_t);
static int fdc_pccard_attach(device_t);

static const struct pccard_product fdc_pccard_products[] = {
	PCMCIA_CARD(YEDATA, EXTERNAL_FDD),
};
	
static int
fdc_pccard_alloc_resources(device_t dev, struct fdc_data *fdc)
{
	struct resource *res;
	int rid, i;

	rid = 0;
	res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0ul, ~0ul, 1,
	    RF_ACTIVE);
	if (res == NULL) {
		device_printf(dev, "cannot alloc I/O port range\n");
		return (ENXIO);
	}
Пример #5
0
#define KME_KXLC004_01 0x100
#define OFFSET_KME_KXLC004_01 0x10


#include "pccarddevs.h"

static int ncvprobe(device_t devi);
static int ncvattach(device_t devi);

static void	ncv_card_unload(device_t);

static const struct ncv_product {
	struct pccard_product	prod;
	int flags;
} ncv_products[] = {
	{ PCMCIA_CARD(EPSON, SC200), 0},
	{ PCMCIA_CARD(PANASONIC, KXLC002), 0xb4d00000 },
	{ PCMCIA_CARD(PANASONIC, KXLC003), 0xb4d00000 },	/* untested */
	{ PCMCIA_CARD(PANASONIC, KXLC004), 0xb4d00100 },
	{ PCMCIA_CARD(MACNICA, MPS100), 0xb6250000 },
	{ PCMCIA_CARD(MACNICA, MPS110), 0 },
	{ PCMCIA_CARD(NEC, PC9801N_J03R), 0 },
	{ PCMCIA_CARD(NEWMEDIA, BASICS_SCSI), 0 },
	{ PCMCIA_CARD(QLOGIC, PC05), 0x84d00000 },
#define FLAGS_REX5572 0x84d00000
	{ PCMCIA_CARD(RATOC, REX5572), FLAGS_REX5572 },
	{ PCMCIA_CARD(RATOC, REX9530), 0x84d00000 },
	{ { NULL }, 0 }
};

/*
Пример #6
0
#include <sys/param.h>
#include <sys/bus.h>
#include <sys/module.h>
#include <sys/nata.h>
#include <sys/rman.h>

#include <bus/pccard/pccard_cis.h>
#include <bus/pccard/pccardreg.h>
#include <bus/pccard/pccardvar.h>
#include <bus/pccard/pccarddevs.h>

#include "ata-all.h"
#include "ata_if.h"

static const struct pccard_product ata_pccard_products[] = {
	PCMCIA_CARD(FREECOM, PCCARDIDE, 0),
	PCMCIA_CARD(EXP, EXPMULTIMEDIA, 0),
	PCMCIA_CARD(IODATA3, CBIDE2, 0),
	PCMCIA_CARD(OEM2, CDROM1, 0),
	PCMCIA_CARD(OEM2, IDE, 0),
	PCMCIA_CARD(PANASONIC, KXLC005, 0),
	PCMCIA_CARD(TEAC, IDECARDII, 0),
	{NULL}
};

static int
ata_pccard_probe(device_t dev)
{
    const struct pccard_product *pp;
    u_int32_t fcn = PCCARD_FUNCTION_UNSPEC;
Пример #7
0
		lwkt_serialize_exit(ifp->if_serializer);
		return (0);
	}
	ifp->if_flags &= ~IFF_RUNNING; 
	sc->gone = 1;
	bus_teardown_intr(dev, sc->irq, sc->ep_intrhand);

	lwkt_serialize_exit(ifp->if_serializer);

	ether_ifdetach(&sc->arpcom.ac_if);
	ep_free(dev);
	return (0);
}

static const struct pccard_product ep_pccard_products[] = {
	PCMCIA_CARD(3COM, 3C1, 0),
	PCMCIA_CARD(3COM, 3C562, 0),
	PCMCIA_CARD(3COM, 3C574, 0),	/* ROADRUNNER */
	PCMCIA_CARD(3COM, 3C589, 0),
	PCMCIA_CARD(3COM, 3CCFEM556BI, 0),	/* ROADRUNNER */
	PCMCIA_CARD(3COM, 3CXEM556, 0),
	PCMCIA_CARD(3COM, 3CXEM556INT, 0),
	{NULL}
};

static int
ep_pccard_match(device_t dev)
{
	const struct pccard_product *pp;

	if ((pp = pccard_product_lookup(dev, ep_pccard_products,
Пример #8
0
#include <net/ethernet.h>
#include <net/if.h>
#include <net/if_arp.h>
#include <net/if_media.h>

#include <dev/snc/dp83932var.h>
#include <dev/snc/if_sncvar.h>
#include <dev/snc/if_sncreg.h>

#include <dev/pccard/pccardvar.h>
#include <dev/pccard/pccard_cis.h>
#include "pccarddevs.h"

static const struct pccard_product snc_pccard_products[] = {
	PCMCIA_CARD(NEC, PC9801N_J02),
	PCMCIA_CARD(NEC, PC9801N_J02R),
	{ NULL }
};

/*
 *      PC Card (PCMCIA) specific code.
 */
static int	snc_pccard_probe(device_t);
static int	snc_pccard_attach(device_t);
static int	snc_pccard_detach(device_t);


static device_method_t snc_pccard_methods[] = {
	/* Device interface */
	DEVMETHOD(device_probe,		snc_pccard_probe),
Пример #9
0
#include <dev/nsp/nspreg.h>
#include <dev/nsp/nspvar.h>

#define	NSP_HOSTID	7

#include "pccarddevs.h"

#define	PIO_MODE 0x100		/* pd_flags */

static int nspprobe(device_t devi);
static int nspattach(device_t devi);

static	void	nsp_card_unload	(device_t);

const struct pccard_product nsp_products[] = {
  	PCMCIA_CARD(IODATA3, CBSC16),
  	PCMCIA_CARD(PANASONIC, KME),
	PCMCIA_CARD(WORKBIT2, NINJA_SCSI3),
	PCMCIA_CARD(WORKBIT, ULTRA_NINJA_16),
  	{ NULL }
};

/*
 * Additional code for FreeBSD new-bus PC Card frontend
 */

static void
nsp_pccard_intr(void * arg)
{
	nspintr(arg);
}
Пример #10
0
#include <sys/socket.h>
#include <sys/module.h>
#include <sys/bus.h>

#include <net/ethernet.h> 
#include <net/if.h> 
#include <net/if_arp.h>

#include "if_csvar.h"
#include <bus/pccard/pccardvar.h>

#include "card_if.h"
#include "pccarddevs.h"

static const struct pccard_product cs_pccard_products[] = {
	PCMCIA_CARD(IBM, ETHERJET, 0),
	{ NULL }
};
static int
cs_pccard_match(device_t dev)
{
	const struct pccard_product *pp;

	if ((pp = pccard_product_lookup(dev, cs_pccard_products,
	    sizeof(cs_pccard_products[0]), NULL)) != NULL) {
		if (pp->pp_name != NULL)
			device_set_desc(dev, pp->pp_name);
		return 0;
	}
	return EIO;
}
Пример #11
0
#include <net/ethernet.h> 
#include <net/if.h> 
#include <net/if_arp.h>
#include <net/if_media.h>

#include <machine/clock.h>

#include "if_snreg.h"
#include "if_snvar.h"
#include <bus/pccard/pccardvar.h>
#include <bus/pccard/pccarddevs.h>

#include "card_if.h"

static const struct pccard_product sn_pccard_products[] = {
	PCMCIA_CARD(DSPSI, XJACK, 0),
	PCMCIA_CARD(NEWMEDIA, BASICS, 0),
#if 0
	PCMCIA_CARD(SMC, 8020BT, 0),
#endif
	{ NULL }
};

static int
sn_pccard_match(device_t dev)
{
	const struct pccard_product *pp;

	if ((pp = pccard_product_lookup(dev, sn_pccard_products,
	    sizeof(sn_pccard_products[0]), NULL)) != NULL) {
		if (pp->pp_name != NULL)
Пример #12
0
#include <sys/rman.h>
#include <sys/serialize.h>

#include <net/if.h>
#include <net/if_arp.h>
#include <net/if_media.h> 
#include <net/ifq_var.h>

#include "if_exreg.h"
#include "if_exvar.h"

#include <bus/pccard/pccardvar.h>
#include <bus/pccard/pccarddevs.h>

static const struct pccard_product ex_pccard_products[] = {
	PCMCIA_CARD(OLICOM, OC2220, 0),
	{ NULL }
};

/* Bus Front End Functions */
static int	ex_pccard_match		(device_t);
static int	ex_pccard_probe		(device_t);
static int	ex_pccard_attach	(device_t);
static int	ex_pccard_detach	(device_t);

static device_method_t ex_pccard_methods[] = {
	/* Device interface */
	DEVMETHOD(device_probe,		pccard_compat_probe),
	DEVMETHOD(device_attach,	pccard_compat_attach),
	DEVMETHOD(device_detach,	ex_pccard_detach),
Пример #13
0
#include <pccard/cardinfo.h>

/*
 *	PC-Card (PCMCIA) specific code.
 */
static int fe_pccard_probe(device_t);
static int fe_pccard_attach(device_t);
static int fe_pccard_detach(device_t);
static int fe_pccard_match(device_t);

static const struct fe_pccard_product {
        struct pccard_product mpp_product;
        u_int32_t mpp_ioalign;                  /* required alignment */
        int mpp_enet_maddr;
} fe_pccard_products[] = {
        { PCMCIA_CARD(TDK, LAK_CD021BX, 0), 0, -1 }, 
        { PCMCIA_CARD(TDK, LAK_CF010, 0), 0, -1 }, 
#if 0 /* XXX 86960-based? */
        { PCMCIA_CARD(TDK, LAK_DFL9610, 1), 0, -1 }, 
#endif
        { PCMCIA_CARD(CONTEC, CNETPC, 0), 0, -1 },
	{ PCMCIA_CARD(FUJITSU, LA501, 0), 0x20, -1 },
	{ PCMCIA_CARD(FUJITSU, LA10S, 0), 0, -1 },
	{ PCMCIA_CARD(RATOC, REX_R280, 0), 0, 0x1fc },
        { { NULL } }
};

static int
fe_pccard_match(device_t dev)
{
        const struct pccard_product *pp;
Пример #14
0
#include "card_if.h"
#include "pccarddevs.h"

#include "if_xereg.h"
#include "if_xevar.h"

#define XE_DEBUG

#ifdef XE_DEBUG
#define DEVPRINTF(level, arg)	if (xe_debug >= (level)) device_printf arg
#else
#define DEVPRINTF(level, arg)
#endif

static const struct pccard_product xe_pccard_products[] = {
	PCMCIA_CARD(COMPAQ, CPQ550, 0),
	PCMCIA_CARD(COMPAQ2, CPQ_10_100, 0),
	PCMCIA_CARD(INTEL, EEPRO100, 0),
	PCMCIA_CARD(RACORE, ACCTON_EN2226, 0),
	PCMCIA_CARD(XIRCOM, CE, 0),
	PCMCIA_CARD(XIRCOM, CE2, 0),
	PCMCIA_CARD(XIRCOM, CE3, 0),
	PCMCIA_CARD(XIRCOM, CEM, 0),
	PCMCIA_CARD(XIRCOM, CEM28, 0),
	PCMCIA_CARD(XIRCOM, CEM33, 0),
	PCMCIA_CARD(XIRCOM, CEM56, 0),
	PCMCIA_CARD(XIRCOM, REM56, 0),
	PCMCIA_CARD(XIRCOM, CNW_801, 0),
	PCMCIA_CARD(XIRCOM, CNW_802, 0),
        { NULL }
};
Пример #15
0
	return (error);
} /* ng_bt3c_rcvdata */

/****************************************************************************
 ****************************************************************************
 **                         PCMCIA driver specific
 ****************************************************************************
 ****************************************************************************/

/*
 * PC Card (PCMCIA) probe routine
 */

static struct pccard_product const	bt3c_pccard_products[] = {
	PCMCIA_CARD(3COM, 3CRWB609),
	{ NULL, }
};

static int
bt3c_pccard_probe(device_t dev)
{
	struct pccard_product const	*pp = NULL;

	pp = pccard_product_lookup(dev, bt3c_pccard_products,
			sizeof(bt3c_pccard_products[0]), NULL);
	if (pp == NULL)
		return (ENXIO);

	device_set_desc(dev, pp->pp_name);
Пример #16
0
#include <sys/taskqueue.h>
#include <vm/uma.h>
#include <machine/stdarg.h>
#include <machine/resource.h>
#include <machine/bus.h>
#include <sys/rman.h>
#include <dev/ata/ata-all.h>
#include <dev/pccard/pccard_cis.h>
#include <dev/pccard/pccardreg.h>
#include <dev/pccard/pccardvar.h>
#include <ata_if.h>

#include "pccarddevs.h"

static const struct pccard_product ata_pccard_products[] = {
    PCMCIA_CARD(FREECOM, PCCARDIDE),
    PCMCIA_CARD(EXP, EXPMULTIMEDIA),
    PCMCIA_CARD(IODATA3, CBIDE2),
    PCMCIA_CARD(OEM2, CDROM1),
    PCMCIA_CARD(OEM2, IDE),
    PCMCIA_CARD(PANASONIC, KXLC005),
    PCMCIA_CARD(TEAC, IDECARDII),
    {NULL}
};

static int
ata_pccard_probe(device_t dev)
{
    const struct pccard_product *pp;
    u_int32_t fcn = PCCARD_FUNCTION_UNSPEC;
    int error = 0;
Пример #17
0
#include <machine/resource.h>
 
#include <net/ethernet.h> 
#include <net/if.h> 
#include <net/if_arp.h>

#include <dev/cs/if_csvar.h>
#include <dev/cs/if_csreg.h>
#include <dev/pccard/pccardvar.h>
#include <dev/pccard/pccard_cis.h>

#include "card_if.h"
#include "pccarddevs.h"

static const struct pccard_product cs_pccard_products[] = {
	PCMCIA_CARD(IBM, ETHERJET),
	{ NULL }
};
static int
cs_pccard_probe(device_t dev)
{
	const struct pccard_product *pp;
	uint32_t	fcn = PCCARD_FUNCTION_UNSPEC;

	/* Make sure we're a network function */
	pccard_get_function(dev, &fcn);
	if (fcn != PCCARD_FUNCTION_NETWORK)
		return (ENXIO);

	if ((pp = pccard_product_lookup(dev, cs_pccard_products,
	    sizeof(cs_pccard_products[0]), NULL)) != NULL) {
Пример #18
0
#include <sys/device_port.h>

#include <dev/pccard/pccardvar.h>

#include <cam/scsi/scsi_low.h>
#include <cam/scsi/scsi_low_pisa.h>

#include <dev/stg/tmc18c30reg.h>
#include <dev/stg/tmc18c30var.h>
#include <dev/stg/tmc18c30.h>

#include "pccarddevs.h"

static const struct pccard_product stg_products[] = {
	PCMCIA_CARD(FUTUREDOMAIN, SCSI2GO),
	PCMCIA_CARD(IBM, SCSICARD),
	PCMCIA_CARD(RATOC, REX5536),
	PCMCIA_CARD(RATOC, REX5536AM),
	PCMCIA_CARD(RATOC, REX5536M),
	{ NULL }
};

/*
 * Additional code for FreeBSD new-bus PC Card frontend
 */
static int
stg_pccard_probe(device_t dev)
{
  	const struct pccard_product *pp;
Пример #19
0
	sn_pccard_normal_activate
};

static sn_get_enaddr_t sn_pccard_megahertz_get_mac;
static sn_activate_t sn_pccard_megahertz_activate;
const static struct sn_sw sn_mhz_sw = {
	SN_MEGAHERTZ, "Megahertz",
	sn_pccard_megahertz_get_mac,
	sn_pccard_megahertz_activate
};

static const struct sn_product {
	struct pccard_product prod;
	const struct sn_sw *sw;
} sn_pccard_products[] = {
	{ PCMCIA_CARD(DSPSI, XJEM1144), &sn_mhz_sw },
	{ PCMCIA_CARD(DSPSI, XJACK), &sn_normal_sw },
/*	{ PCMCIA_CARD(MOTOROLA, MARINER), SN_MOTO_MARINER }, */
	{ PCMCIA_CARD(NEWMEDIA, BASICS), &sn_normal_sw },
	{ PCMCIA_CARD(MEGAHERTZ, VARIOUS), &sn_mhz_sw},
	{ PCMCIA_CARD(MEGAHERTZ, XJEM3336), &sn_mhz_sw},
/*	{ PCMCIA_CARD(OSITECH, TRUMP_SOD), SN_OSI_SOD }, */
/*	{ PCMCIA_CARD(OSITECH, TRUMP_JOH), SN_OSITECH }, */
/*	{ PCMCIA_CARD(PSION, GOLDCARD), SN_OSITECH }, */
/*	{ PCMCIA_CARD(PSION, NETGLOBAL), SNI_OSI_SOD }, */
/*	{ PCMCIA_CARD(PSION, NETGLOBAL2), SN_OSITECH }, */
	{ PCMCIA_CARD(SMC, 8020BT), &sn_normal_sw },
	{ PCMCIA_CARD(SMC, SMC91C96), &sn_normal_sw },
	{ { NULL } }
	
};
Пример #20
0
 */
#define ED_DEFAULT_MAC_OFFSET	0xff0

static const struct ed_product {
	struct pccard_product	prod;
	int flags;
#define	NE2000DVF_DL100XX	0x0001		/* chip is D-Link DL10019/22 */
#define	NE2000DVF_AX88X90	0x0002		/* chip is ASIX AX88[17]90 */
#define NE2000DVF_TC5299J	0x0004		/* chip is Tamarack TC5299J */
#define NE2000DVF_TOSHIBA	0x0008		/* Toshiba DP83902A */
#define NE2000DVF_ENADDR	0x0100		/* Get MAC from attr mem */
#define NE2000DVF_ANYFUNC	0x0200		/* Allow any function type */
#define NE2000DVF_MODEM		0x0400		/* Has a modem/serial */
	int enoff;
} ed_pccard_products[] = {
	{ PCMCIA_CARD(ACCTON, EN2212), 0},
	{ PCMCIA_CARD(ACCTON, EN2216), 0},
	{ PCMCIA_CARD(ALLIEDTELESIS, LA_PCM), 0},
	{ PCMCIA_CARD(AMBICOM, AMB8002), 0},
	{ PCMCIA_CARD(AMBICOM, AMB8002T), 0},
	{ PCMCIA_CARD(AMBICOM, AMB8010), 0},
	{ PCMCIA_CARD(AMBICOM, AMB8010_ALT), 0},
	{ PCMCIA_CARD(AMBICOM, AMB8610), 0},
	{ PCMCIA_CARD(BILLIONTON, CFLT10N), 0},
	{ PCMCIA_CARD(BILLIONTON, LNA100B), NE2000DVF_AX88X90},
	{ PCMCIA_CARD(BILLIONTON, LNT10TB), 0},
	{ PCMCIA_CARD(BILLIONTON, LNT10TN), 0},
	{ PCMCIA_CARD(BROMAX, AXNET), NE2000DVF_AX88X90},
	{ PCMCIA_CARD(BROMAX, IPORT), 0},
	{ PCMCIA_CARD(BROMAX, IPORT2), 0},
	{ PCMCIA_CARD(BUFFALO, LPC2_CLT), 0},
Пример #21
0
	{ 0, 0 }
};

static driver_t an_pccard_driver = {
	"an",
	an_pccard_methods,
	sizeof(struct an_softc)
};

static devclass_t an_pccard_devclass;

DRIVER_MODULE(if_an, pccard, an_pccard_driver, an_pccard_devclass, NULL, NULL);

static const struct pccard_product an_pccard_products[] = {
	PCMCIA_CARD(AIRONET, PC4500, 0),
	PCMCIA_CARD(AIRONET, PC4800, 0),
	PCMCIA_CARD(AIRONET, 350, 0),
	PCMCIA_CARD(XIRCOM, CWE1130, 0), 
	{ NULL }
};

static int
an_pccard_match(device_t dev)
{
	const struct pccard_product *pp;

	if ((pp = pccard_product_lookup(dev, an_pccard_products,
	    sizeof(an_pccard_products[0]), NULL)) != NULL) {
		if (pp->pp_name != NULL)
			device_set_desc(dev, pp->pp_name);
Пример #22
0
#if !defined(__FreeBSD__) || __FreeBSD_version < 500014
#include	<sys/select.h>
#endif
#include	<pccard/cardinfo.h>
#include	<pccard/slot.h>

static int ncvprobe(DEVPORT_PDEVICE devi);
static int ncvattach(DEVPORT_PDEVICE devi);

static void	ncv_card_unload(DEVPORT_PDEVICE);

static const struct ncv_product {
	struct pccard_product	prod;
	int flags;
} ncv_products[] = {
	{ PCMCIA_CARD(EPSON, SC200, 0), 0}, 
	{ PCMCIA_CARD(PANASONIC, KXLC002, 0), 0xb4d00000 }, 
	{ PCMCIA_CARD(PANASONIC, KXLC004, 0), 0xb4d00100 }, 
	{ PCMCIA_CARD(MACNICA, MPS100, 0), 0xb6250000 }, 
	{ PCMCIA_CARD(MACNICA, MPS110, 0), 0 }, 
	{ PCMCIA_CARD(NEC, PC9801N_J03R, 0), 0 }, 
	{ PCMCIA_CARD(NEWMEDIA, BASICS_SCSI, 0), 0 }, 
	{ PCMCIA_CARD(QLOGIC, PC05, 0), 0x84d00000 }, 
#define FLAGS_REX5572 0x84d00000
	{ PCMCIA_CARD(RATOC, REX5572, 0), FLAGS_REX5572 }, 
	{ PCMCIA_CARD(RATOC, REX_R280, 0), 0x84d00000 }, 
	{ { NULL }, 0 }
};

/*
 * Additional code for FreeBSD new-bus PCCard frontend
Пример #23
0
#include <dev/pccard/pccard_cis.h>

#include "pccarddevs.h"

struct ep_pccard_product
{
	struct pccard_product prod;
	int chipset;
};

#define EP_CHIP_589	1	/* Classic 3c5x9 chipset */
#define EP_CHIP_574	2	/* Roadrunner */
#define EP_CHIP_C1	3	/* 3c1 */

static const struct ep_pccard_product ep_pccard_products[] = {
	{ PCMCIA_CARD(3COM, 3C1),		EP_CHIP_C1 },
	{ PCMCIA_CARD(3COM, 3C562),		EP_CHIP_589 },
	{ PCMCIA_CARD(3COM, 3C589),		EP_CHIP_589 },
	{ PCMCIA_CARD(3COM, 3CXEM556),		EP_CHIP_589 },
	{ PCMCIA_CARD(3COM, 3CXEM556INT),	EP_CHIP_589 },
	{ PCMCIA_CARD(3COM, 3C574),		EP_CHIP_574 },
	{ PCMCIA_CARD(3COM, 3CCFEM556BI),	EP_CHIP_574 },
	{ { NULL } }
};

static const struct ep_pccard_product *
ep_pccard_lookup(device_t dev)
{
	return ((const struct ep_pccard_product *)pccard_product_lookup(dev,
	    (const struct pccard_product *)ep_pccard_products,
	    sizeof(ep_pccard_products[0]), NULL));
Пример #24
0
#include <sys/module.h>
#include <sys/bus.h>

#include <machine/bus.h>
#include <machine/resource.h>
#include <sys/rman.h>

#include <dev/cmx/cmxvar.h>

#include <dev/pccard/pccardvar.h>
#include <dev/pccard/pccard_cis.h>

#include "pccarddevs.h"

static const struct pccard_product cmx_pccard_products[] = {
	PCMCIA_CARD(OMNIKEY, CM4040),
	{ NULL }
};

/*
 * Probe for the card.
 */
static int
cmx_pccard_probe(device_t dev)
{
	const struct pccard_product *pp;
	if ((pp = pccard_product_lookup(dev, cmx_pccard_products,
	    sizeof(cmx_pccard_products[0]), NULL)) != NULL) {
		if (pp->pp_name != NULL)
			device_set_desc(dev, pp->pp_name);
		return 0;
Пример #25
0
#include "pccarddevs.h"

struct aic_pccard_softc {
	struct	aic_softc sc_aic;
	struct	resource *sc_port;
	struct	resource *sc_irq;
	void	*sc_ih;
};

static int aic_pccard_alloc_resources(device_t);
static void aic_pccard_release_resources(device_t);
static int aic_pccard_probe(device_t);
static int aic_pccard_attach(device_t);

static const struct pccard_product aic_pccard_products[] = {
	PCMCIA_CARD(ADAPTEC, APA1460),
	PCMCIA_CARD(ADAPTEC, APA1460A),
	PCMCIA_CARD(NEWMEDIA, BUSTOASTER),
	PCMCIA_CARD(NEWMEDIA, BUSTOASTER2),
	PCMCIA_CARD(NEWMEDIA, BUSTOASTER3),
	{ NULL }
};

#define	AIC_PCCARD_PORTSIZE 0x20

static int
aic_pccard_alloc_resources(device_t dev)
{
	struct aic_pccard_softc *sc = device_get_softc(dev);
	int rid;
#include <machine/resource.h>
#include <sys/rman.h>

#include <net/if.h>
#include <net/if_arp.h>
#include <net/if_media.h> 

#include <dev/ex/if_exreg.h>
#include <dev/ex/if_exvar.h>

#include <dev/pccard/pccardvar.h>
#include <dev/pccard/pccard_cis.h>
#include "pccarddevs.h"

static const struct pccard_product ex_pccard_products[] = {
	PCMCIA_CARD(OLICOM, OC2220),
	PCMCIA_CARD(OLICOM, OC2231),
	PCMCIA_CARD(OLICOM, OC2232),
	PCMCIA_CARD(INTEL, ETHEREXPPRO),
	{ NULL }
};

/* Bus Front End Functions */
static int	ex_pccard_probe(device_t);
static int	ex_pccard_attach(device_t);

static int
ex_pccard_enet_ok(u_char *enaddr)
{
	int			i;
	u_char			sum;
Пример #27
0
#include "card_if.h"

struct aic_pccard_softc {
	struct	aic_softc sc_aic;
	struct	resource *sc_port;
	struct	resource *sc_irq;
	void	*sc_ih;
};

static int aic_pccard_alloc_resources(device_t);
static void aic_pccard_release_resources(device_t);
static int aic_pccard_probe(device_t);
static int aic_pccard_attach(device_t);

static const struct pccard_product aic_pccard_products[] = {
	PCMCIA_CARD(ADAPTEC, APA1460, 0),
	PCMCIA_CARD(ADAPTEC, APA1460A, 0),
	PCMCIA_CARD(NEWMEDIA, BUSTOASTER, 0),
	PCMCIA_CARD(NEWMEDIA, BUSTOASTER2, 0),
	PCMCIA_CARD(NEWMEDIA, BUSTOASTER3, 0),
	{ NULL }
};

#define	AIC_PCCARD_PORTSIZE 0x20

static int
aic_pccard_alloc_resources(device_t dev)
{
	struct aic_pccard_softc *sc = device_get_softc(dev);
	int rid;
Пример #28
0
	DEVMETHOD(device_shutdown,	wi_shutdown),

	{ 0, 0 }
};

static driver_t wi_pccard_driver = {
	"wi",
	wi_pccard_methods,
	sizeof(struct wi_softc)
};

DRIVER_MODULE(wi, pccard, wi_pccard_driver, wi_devclass, NULL, NULL);
MODULE_DEPEND(wi, wlan, 1, 1, 1);

static const struct pccard_product wi_pccard_products[] = {
	PCMCIA_CARD(3COM, 3CRWE737A),
	PCMCIA_CARD(3COM, 3CRWE777A),
	PCMCIA_CARD(ACTIONTEC, PRISM),
	PCMCIA_CARD(ADAPTEC2, ANW8030),
	PCMCIA_CARD(ADDTRON, AWP100),
	PCMCIA_CARD(AIRVAST, WN_100B),
	PCMCIA_CARD(AIRVAST, WN_100),
	PCMCIA_CARD(ALLIEDTELESIS, WR211PCM),
	PCMCIA_CARD(ARTEM, ONAIR),
 	PCMCIA_CARD(ASUS, WL100),
	PCMCIA_CARD(BAY, EMOBILITY_11B),
	PCMCIA_CARD(BROMAX, IWN),
	PCMCIA_CARD(BROMAX, IWN3),
	PCMCIA_CARD(BROMAX, WCF11),
	PCMCIA_CARD(BUFFALO, WLI_CF_S11G),
	PCMCIA_CARD(BUFFALO, WLI_PCM_S11),
Пример #29
0
#include <bus/pccard/pccarddevs.h>
#include <bus/pccard/pccardvar.h>

#include <bus/cam/scsi/scsi_low.h>
#include <bus/cam/scsi/scsi_low_pisa.h>

#include "tmc18c30reg.h"
#include "tmc18c30var.h"

#define	STG_HOSTID	7

#include	<sys/kernel.h>
#include	<sys/module.h>

static const struct pccard_product stg_products[] = {
	PCMCIA_CARD(FUTUREDOMAIN, SCSI2GO, 0),
	PCMCIA_CARD(IBM, SCSICARD, 0),
	PCMCIA_CARD(RATOC, REX5536, 0),
	PCMCIA_CARD(RATOC, REX5536AM, 0),
	PCMCIA_CARD(RATOC, REX5536M, 0),
	{ NULL }
};

static	int	stgprobe(DEVPORT_PDEVICE devi);
static	int	stgattach(DEVPORT_PDEVICE devi);

static	void	stg_card_unload	(DEVPORT_PDEVICE);

/*
 * Additional code for FreeBSD new-bus PCCard frontend
 */