Donc recompute the io port address if it's already the good one.

This commit is contained in:
Olivier Houchard 2006-01-23 14:03:14 +00:00
parent 50385af97a
commit 2eff8c6814
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154712

View File

@ -368,15 +368,17 @@ i80321_pci_alloc_resource(device_t bus, device_t child, int type, int *rid,
rm = &sc->sc_io_rman;
bt = sc->sc_pciio;
bh = sc->sc_io;
start = start - 0x90000000 + sc->sc_io;
end = end - 0x90000000 + sc->sc_io;
if (start < sc->sc_io) {
start = start - 0x90000000 + sc->sc_io;
end = end - 0x90000000 + sc->sc_io;
}
break;
default:
return (NULL);
}
rv = rman_reserve_resource(rm, start, end, count, flags, child);
if (rv == NULL)
if (rv == NULL)
return (NULL);
if (type != SYS_RES_IRQ) {
bh += (rman_get_start(rv));