diff options
| author | Warner Losh <imp@FreeBSD.org> | 2000-08-26 00:07:40 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2000-08-26 00:07:40 +0000 |
| commit | 925c6cf689424b05a7f05aad43bc5d0cff9441b9 (patch) | |
| tree | 76cf9463e5305f3e1d3eae1c042b1a17dbb143a0 | |
| parent | 9579e8c145060077d6bf7a308b254a4a28be8a8e (diff) | |
Notes
| -rw-r--r-- | sys/dev/pccard/pccard.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c index 4b2c4a3cfe95..49394128df57 100644 --- a/sys/dev/pccard/pccard.c +++ b/sys/dev/pccard/pccard.c @@ -139,9 +139,10 @@ pccard_attach_card(device_t dev) pf->ih_arg = NULL; pf->dev = NULL; } - +#if 0 DEVPRINTF((dev, "chip_socket_disable\n")); POWER_DISABLE_SOCKET(device_get_parent(dev), dev); +#endif STAILQ_FOREACH(pf, &sc->card.pf_head, pf_list) { if (STAILQ_EMPTY(&pf->cfe_head)) @@ -267,7 +268,6 @@ pccard_function_enable(struct pccard_function *pf) * it's possible for different functions' CCRs to be in the same * underlying page. Check for that. */ - STAILQ_FOREACH(tmp, &pf->sc->card.pf_head, pf_list) { if ((tmp->pf_flags & PFF_ENABLED) && (pf->ccr_base >= (tmp->ccr_base - tmp->pf_ccr_offset)) && @@ -293,12 +293,15 @@ pccard_function_enable(struct pccard_function *pf) if (tmp == NULL) { pf->ccr_rid = 0; pf->ccr_res = bus_alloc_resource(dev, SYS_RES_MEMORY, - &pf->ccr_rid, pf->ccr_base, pf->ccr_base + PCCARD_CCR_SIZE, - PCCARD_CCR_SIZE, RF_ACTIVE); - if (!pf->ccr_res) + &pf->ccr_rid, 0xa0000, 0xdffff, 1 << 10, RF_ACTIVE); + if (!pf->ccr_res) { + DEVPRINTF((dev, "ccr_res == 0\n")); goto bad; + } CARD_SET_RES_FLAGS(device_get_parent(dev), dev, SYS_RES_MEMORY, pf->ccr_rid, PCCARD_A_MEM_ATTR); + CARD_SET_MEMORY_OFFSET(device_get_parent(dev), dev, + pf->ccr_rid, (pf->ccr_rid >> 10) << 10); pf->pf_ccrt = rman_get_bustag(pf->ccr_res); pf->pf_ccrh = rman_get_bushandle(pf->ccr_res); pf->pf_ccr_offset = rman_get_start(pf->ccr_res); @@ -375,7 +378,7 @@ pccard_function_enable(struct pccard_function *pf) */ if (--pf->sc->sc_enabled_count == 0) POWER_DISABLE_SOCKET(device_get_parent(dev), dev); - DEVPRINTF((dev, "--enabled_count = %d\n", pf->sc->sc_enabled_count)); + DEVPRINTF((dev, "bad --enabled_count = %d\n", pf->sc->sc_enabled_count)); return (1); } |
