Correct parsing of the grackle and uninorthpci ranges property.
Approved by: nwhitehorn (mentor)
This commit is contained in:
parent
6d8a904d49
commit
ad366db201
@ -199,11 +199,14 @@ grackle_attach(device_t dev)
|
||||
return (ENXIO);
|
||||
}
|
||||
|
||||
sc->sc_nrange /= sizeof(sc->sc_range[0]);
|
||||
|
||||
sc->sc_range[6].pci_hi = 0;
|
||||
io = NULL;
|
||||
nmem = 0;
|
||||
|
||||
for (rp = sc->sc_range; rp->pci_hi != 0; rp++) {
|
||||
for (rp = sc->sc_range; rp < sc->sc_range + sc->sc_nrange &&
|
||||
rp->pci_hi != 0; rp++) {
|
||||
switch (rp->pci_hi & OFW_PCI_PHYS_HI_SPACEMASK) {
|
||||
case OFW_PCI_PHYS_HI_SPACE_CONFIG:
|
||||
break;
|
||||
|
@ -45,7 +45,7 @@ struct grackle_softc {
|
||||
vm_offset_t sc_addr;
|
||||
vm_offset_t sc_data;
|
||||
int sc_bus;
|
||||
struct grackle_range sc_range[6];
|
||||
struct grackle_range sc_range[7];
|
||||
int sc_nrange;
|
||||
int sc_iostart;
|
||||
struct rman sc_io_rman;
|
||||
|
@ -231,11 +231,14 @@ uninorth_attach(device_t dev)
|
||||
return (ENXIO);
|
||||
}
|
||||
|
||||
sc->sc_nrange /= sizeof(sc->sc_range[0]);
|
||||
|
||||
sc->sc_range[6].pci_hi = 0;
|
||||
io = NULL;
|
||||
nmem = 0;
|
||||
|
||||
for (rp = sc->sc_range; rp->pci_hi != 0; rp++) {
|
||||
for (rp = sc->sc_range; rp < sc->sc_range + sc->sc_nrange &&
|
||||
rp->pci_hi != 0; rp++) {
|
||||
switch (rp->pci_hi & OFW_PCI_PHYS_HI_SPACEMASK) {
|
||||
case OFW_PCI_PHYS_HI_SPACE_CONFIG:
|
||||
break;
|
||||
|
@ -53,7 +53,7 @@ struct uninorth_softc {
|
||||
vm_offset_t sc_addr;
|
||||
vm_offset_t sc_data;
|
||||
int sc_bus;
|
||||
struct uninorth_range sc_range[6];
|
||||
struct uninorth_range sc_range[7];
|
||||
int sc_nrange;
|
||||
int sc_iostart;
|
||||
struct rman sc_io_rman;
|
||||
|
Loading…
Reference in New Issue
Block a user