We should not pass the size of the memory to bus_alloc_resource().
We should use 1 to request default iomem. Pointed-out-by: imp
This commit is contained in:
parent
6f44e24e14
commit
48856b5fc7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=82922
@ -198,7 +198,7 @@ ncv_alloc_resource(DEVPORT_PDEVICE dev)
|
||||
|
||||
sc->mem_rid = 0;
|
||||
sc->mem_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->mem_rid,
|
||||
0, ~0, msize, RF_ACTIVE);
|
||||
0, ~0, 1, RF_ACTIVE);
|
||||
if (sc->mem_res == NULL) {
|
||||
ncv_release_resource(dev);
|
||||
return(ENOMEM);
|
||||
|
@ -175,7 +175,7 @@ nsp_alloc_resource(DEVPORT_PDEVICE dev)
|
||||
|
||||
sc->mem_rid = 0;
|
||||
sc->mem_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->mem_rid,
|
||||
0, ~0, msize, RF_ACTIVE);
|
||||
0, ~0, 1, RF_ACTIVE);
|
||||
if (sc->mem_res == NULL) {
|
||||
nsp_release_resource(dev);
|
||||
return(ENOMEM);
|
||||
|
@ -149,7 +149,7 @@ stg_alloc_resource(device_t dev)
|
||||
|
||||
sc->mem_rid = 0;
|
||||
sc->mem_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->mem_rid,
|
||||
0, ~0, msize, RF_ACTIVE);
|
||||
0, ~0, 1, RF_ACTIVE);
|
||||
if (sc->mem_res == NULL) {
|
||||
stg_release_resource(dev);
|
||||
return(ENOMEM);
|
||||
|
@ -174,7 +174,7 @@ stg_alloc_resource(DEVPORT_PDEVICE dev)
|
||||
|
||||
sc->mem_rid = 0;
|
||||
sc->mem_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->mem_rid,
|
||||
0, ~0, msize, RF_ACTIVE);
|
||||
0, ~0, 1, RF_ACTIVE);
|
||||
if (sc->mem_res == NULL) {
|
||||
stg_release_resource(dev);
|
||||
return(ENOMEM);
|
||||
|
Loading…
Reference in New Issue
Block a user