diff -ru usr/src/nv/nv-linux.h usr/src/nv.336672/nv-linux.h --- usr/src/nv/nv-linux.h 2007-06-13 18:59:58.000000000 -0700 +++ usr/src/nv.336672/nv-linux.h 2007-07-27 19:04:39.174241056 -0700 @@ -1075,6 +1075,7 @@ nv_stack_t *timer_sp; nv_stack_t *isr_sp; + nv_stack_t *pci_cfgchk_sp; nv_stack_t *isr_bh_sp; /* keep track of any pending bottom halfes */ @@ -1172,7 +1173,7 @@ if (nv->flags & NV_FLAG_USE_BAR0_CFG) \ rm_check_pci_config_space(sp, nv, do_the_bars, NULL); \ else \ - nv_verify_pci_config(nv, do_the_bars); \ + nv_check_pci_config_space(nv, do_the_bars); \ } /* diff -ru usr/src/nv/nv.c usr/src/nv.336672/nv.c --- usr/src/nv/nv.c 2007-06-13 18:59:58.000000000 -0700 +++ usr/src/nv.336672/nv.c 2007-07-27 19:04:39.178241284 -0700 @@ -215,7 +215,7 @@ } -void NV_API_CALL nv_verify_pci_config(nv_state_t *nv, BOOL do_the_bars) +static void nv_check_pci_config_space(nv_state_t *nv, BOOL do_the_bars) { nv_linux_state_t *nvl = NV_GET_NVL_FROM_NV_STATE(nv); unsigned short cmd, flag = 0; @@ -246,6 +246,14 @@ verify_pci_bars(nv, nvl->dev); } +void NV_API_CALL nv_verify_pci_config(nv_state_t *nv, BOOL do_the_bars) +{ + nv_linux_state_t *nvl = NV_GET_NVL_FROM_NV_STATE(nv); + nv_stack_t *sp = nvl->pci_cfgchk_sp; + + NV_CHECK_PCI_CONFIG_SPACE(sp, nv, do_the_bars); +} + /*** *** STATIC functions, only in this file ***/ @@ -1959,6 +1967,14 @@ goto failed; } + NV_KMEM_CACHE_ALLOC_STACK(nvl->pci_cfgchk_sp); + if (nvl->pci_cfgchk_sp == NULL) + { + rc = -ENOMEM; + nv_printf(NV_DBG_ERRORS, "NVRM: failed to allocate stack!\n"); + goto failed; + } + NV_KMEM_CACHE_ALLOC_STACK(nvl->isr_bh_sp); if (nvl->isr_bh_sp == NULL) { @@ -2045,6 +2061,12 @@ nvl->isr_bh_sp = NULL; } + if (nvl->pci_cfgchk_sp != NULL) + { + NV_KMEM_CACHE_FREE_STACK(nvl->pci_cfgchk_sp); + nvl->pci_cfgchk_sp = NULL; + } + if (nvl->isr_sp != NULL) { NV_KMEM_CACHE_FREE_STACK(nvl->isr_sp); @@ -2126,6 +2148,7 @@ NV_KMEM_CACHE_FREE_STACK(nvl->timer_sp); NV_KMEM_CACHE_FREE_STACK(nvl->isr_bh_sp); + NV_KMEM_CACHE_FREE_STACK(nvl->pci_cfgchk_sp); NV_KMEM_CACHE_FREE_STACK(nvl->isr_sp); /*