mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 17:22:46 -04:00
Set the value of rid variable for bus_alloc_resource(dev, SYS_RES_IOPORT,...)
to PCI_BASE_ADDR0 (== 0x10). Tested by: Brian Somers <brian@Awfulhak.org>
This commit is contained in:
parent
49a8300403
commit
f3e2cba02f
2 changed files with 8 additions and 4 deletions
|
|
@ -2251,9 +2251,10 @@ amd_init(device_t dev)
|
|||
{
|
||||
struct amd_softc *amd = device_get_softc(dev);
|
||||
struct resource *iores;
|
||||
int i, rid = 0;
|
||||
int i, rid;
|
||||
u_int bval;
|
||||
|
||||
rid = PCI_BASE_ADDR0;
|
||||
iores = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0, 1,
|
||||
RF_ACTIVE);
|
||||
if (iores == NULL) {
|
||||
|
|
@ -2356,7 +2357,7 @@ amd_attach(device_t dev)
|
|||
u_int8_t intstat;
|
||||
struct amd_softc *amd = device_get_softc(dev);
|
||||
int unit = device_get_unit(dev);
|
||||
int rid = 0;
|
||||
int rid;
|
||||
void *ih;
|
||||
struct resource *irqres;
|
||||
|
||||
|
|
@ -2370,6 +2371,7 @@ amd_attach(device_t dev)
|
|||
intstat = amd_read8(amd, INTSTATREG);
|
||||
|
||||
/* After setting up the adapter, map our interrupt */
|
||||
rid = 0;
|
||||
irqres = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0, 1,
|
||||
RF_SHAREABLE | RF_ACTIVE);
|
||||
if (irqres == NULL ||
|
||||
|
|
|
|||
|
|
@ -2251,9 +2251,10 @@ amd_init(device_t dev)
|
|||
{
|
||||
struct amd_softc *amd = device_get_softc(dev);
|
||||
struct resource *iores;
|
||||
int i, rid = 0;
|
||||
int i, rid;
|
||||
u_int bval;
|
||||
|
||||
rid = PCI_BASE_ADDR0;
|
||||
iores = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0, 1,
|
||||
RF_ACTIVE);
|
||||
if (iores == NULL) {
|
||||
|
|
@ -2356,7 +2357,7 @@ amd_attach(device_t dev)
|
|||
u_int8_t intstat;
|
||||
struct amd_softc *amd = device_get_softc(dev);
|
||||
int unit = device_get_unit(dev);
|
||||
int rid = 0;
|
||||
int rid;
|
||||
void *ih;
|
||||
struct resource *irqres;
|
||||
|
||||
|
|
@ -2370,6 +2371,7 @@ amd_attach(device_t dev)
|
|||
intstat = amd_read8(amd, INTSTATREG);
|
||||
|
||||
/* After setting up the adapter, map our interrupt */
|
||||
rid = 0;
|
||||
irqres = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0, 1,
|
||||
RF_SHAREABLE | RF_ACTIVE);
|
||||
if (irqres == NULL ||
|
||||
|
|
|
|||
Loading…
Reference in a new issue