cardbusvar.h revision 141412
1272343Sngie/*-
2272343Sngie * Copyright (c) 2000,2001 Jonathan Chen.
3272343Sngie * All rights reserved.
4272343Sngie *
5272343Sngie * Redistribution and use in source and binary forms, with or without
6272343Sngie * modification, are permitted provided that the following conditions
7272343Sngie * are met:
8272343Sngie * 1. Redistributions of source code must retain the above copyright
9272343Sngie *    notice, this list of conditions and the following disclaimer.
10272343Sngie * 2. Redistributions in binary form must reproduce the above copyright
11272343Sngie *    notice, this list of conditions and the following disclaimer in the
12272343Sngie *    documentation and/or other materials provided with the distribution.
13272343Sngie *
14272343Sngie * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15272343Sngie * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16272343Sngie * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17272343Sngie * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18272343Sngie * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19272343Sngie * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20272343Sngie * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21272343Sngie * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22272343Sngie * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23272343Sngie * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24272343Sngie * SUCH DAMAGE.
25272343Sngie *
26272343Sngie * $FreeBSD: head/sys/dev/cardbus/cardbusvar.h 141412 2005-02-06 21:03:13Z imp $
27272343Sngie */
28272343Sngie
29272343Sngie/*
30272343Sngie * Structure definitions for the Cardbus Bus driver
31272343Sngie */
32272343Sngiestruct cardbus_devinfo {
33272343Sngie	struct pci_devinfo pci;
34272343Sngie	uint8_t        mprefetchable; /* bit mask of prefetchable BARs */
35272343Sngie	uint8_t        mbelow1mb; /* bit mask of BARs which require below 1Mb */
36272343Sngie	uint8_t        ibelow1mb; /* bit mask of BARs which require below 1Mb */
37272343Sngie#define        BARBIT(RID) (1<<(((RID)-CARDBUS_BASE0_REG)/4))
38272343Sngie	uint16_t	mfrid;		/* manufacturer id */
39272343Sngie	uint16_t	prodid;		/* product id */
40272343Sngie	u_int		funcid;		/* function id */
41272343Sngie	union {
42272343Sngie		struct {
43272343Sngie			uint8_t	nid[6];		/* MAC address */
44272343Sngie		} lan;
45272343Sngie	} funce;
46272343Sngie	uint32_t	fepresent;	/* bit mask of funce values present */
47272343Sngie};
48272343Sngie