diff options
Diffstat (limited to 'sys/dev/pccard/pccard_cis.c')
-rw-r--r-- | sys/dev/pccard/pccard_cis.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/pccard/pccard_cis.c b/sys/dev/pccard/pccard_cis.c index 344d26b..0628f07 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); |