aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/pccard/pccard_cis.c
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2000-04-13 06:42:58 +0000
committerWarner Losh <imp@FreeBSD.org>2000-04-13 06:42:58 +0000
commit3a6352bdee43dcd06decd1287f1b3e2b6f20b02c (patch)
treefcf581cbccb9729b89b1400b17c4cd82ea759bfe /sys/dev/pccard/pccard_cis.c
parent193faf86551cd4a9a1a15c289b63bcb314e24503 (diff)
Notes
Diffstat (limited to 'sys/dev/pccard/pccard_cis.c')
-rw-r--r--sys/dev/pccard/pccard_cis.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/pccard/pccard_cis.c b/sys/dev/pccard/pccard_cis.c
index 344d26b1fd62..0628f0768932 100644
--- a/sys/dev/pccard/pccard_cis.c
+++ b/sys/dev/pccard/pccard_cis.c
@@ -47,8 +47,11 @@
#include <dev/pccard/pccardchip.h>
#include <dev/pccard/pccardvar.h>
+#include "card_if.h"
+
+#define PCCARDCISDEBUG
#ifdef PCCARDCISDEBUG
-int pccardcis_debug = 0;
+int pccardcis_debug = 1;
#define DPRINTF(arg) if (pccardcis_debug) printf arg
#define DEVPRINTF(arg) if (pccardcis_debug) device_printf arg
#else
@@ -92,6 +95,8 @@ pccard_read_cis(struct pccard_softc *sc)
state.pf = NULL;
+printf("Calling scan_cis\n");
+
if (pccard_scan_cis(sc->dev, pccard_parse_cis_tuple,
&state) == -1)
state.card->error++;
@@ -121,13 +126,13 @@ pccard_scan_cis(device_t dev, int (*fct)(struct pccard_tuple *, void *),
rid = 0;
res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, 0, ~0,
- PCCARD_CIS_SIZE, RF_ACTIVE /* | RF_PCCARD_ATTR */);
+ PCCARD_CIS_SIZE, RF_ACTIVE);
if (res == NULL) {
-#ifdef DIAGNOSTIC
device_printf(dev, "can't alloc memory to read attributes\n");
-#endif
return -1;
}
+ CARD_SET_RES_FLAGS(device_get_parent(dev), dev, SYS_RES_MEMORY,
+ rid, PCCARD_A_MEM_ATTR);
tuple.memt = rman_get_bustag(res);
tuple.memh = rman_get_bushandle(res);