diff options
author | silby <silby@FreeBSD.org> | 2003-03-19 01:48:14 +0000 |
---|---|---|
committer | silby <silby@FreeBSD.org> | 2003-03-19 01:48:14 +0000 |
commit | d5aaad74dc97ba47b165ab4490d284b9fa526ce5 (patch) | |
tree | 46660d13bad28cff49fa4b1c1eb7af774e51f1cb | |
parent | fe604951dbf2fbd17d784c76896295716308e5db (diff) | |
download | FreeBSD-src-d5aaad74dc97ba47b165ab4490d284b9fa526ce5.zip FreeBSD-src-d5aaad74dc97ba47b165ab4490d284b9fa526ce5.tar.gz |
Make sure to free the correct resources when the card fails to attach
properly. (Broken in the previous commit.)
Noticed by: "Niels Chr. Bank-Pedersen" <ncbp@bank-pedersen.dk>
-rw-r--r-- | sys/pci/if_xl.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/pci/if_xl.c b/sys/pci/if_xl.c index 2077c3c..e7a11bf 100644 --- a/sys/pci/if_xl.c +++ b/sys/pci/if_xl.c @@ -1738,6 +1738,14 @@ fail_fres: bus_release_resource(dev, SYS_RES_MEMORY, XL_PCI_FUNCMEM, sc->xl_fres); fail_res: + if (sc->xl_flags & XL_FLAG_USE_MMIO) { + rid = XL_PCI_LOMEM; + res = SYS_RES_MEMORY; + } else { + rid = XL_PCI_LOIO; + res = SYS_RES_IOPORT; + } + bus_release_resource(dev, res, rid, sc->xl_res); fail: XL_UNLOCK(sc); |