diff options
author | ru <ru@FreeBSD.org> | 2006-10-17 10:26:11 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2006-10-17 10:26:11 +0000 |
commit | 7715a1bf6318443c346da2c7b4c4485eb2dff9b5 (patch) | |
tree | f56453fc2c267cd289071207a0ea4ec95b070d37 /sys/pci | |
parent | b2fcf1a24fc751b509c8cbaa555cf35a14b74d3c (diff) | |
download | FreeBSD-src-7715a1bf6318443c346da2c7b4c4485eb2dff9b5.zip FreeBSD-src-7715a1bf6318443c346da2c7b4c4485eb2dff9b5.tar.gz |
Older incarnations of the device used non-standard BARs.
Reported by: Andriy Gapon
Confirmed by: many (including lm-sensors-2.10.1)
MFC after: 3 days
Diffstat (limited to 'sys/pci')
-rw-r--r-- | sys/pci/nfsmb.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/sys/pci/nfsmb.c b/sys/pci/nfsmb.c index 1511121..b7cbca7 100644 --- a/sys/pci/nfsmb.c +++ b/sys/pci/nfsmb.c @@ -144,8 +144,14 @@ nfsmbsub_attach(device_t dev) nfsmbsub_sc->res = bus_alloc_resource_any(parent, SYS_RES_IOPORT, &nfsmbsub_sc->rid, RF_ACTIVE); if (nfsmbsub_sc->res == NULL) { - device_printf(dev, "could not map i/o space\n"); - return (ENXIO); + /* Older incarnations of the device used non-standard BARs. */ + nfsmbsub_sc->rid = 0x54; + nfsmbsub_sc->res = bus_alloc_resource_any(parent, + SYS_RES_IOPORT, &nfsmbsub_sc->rid, RF_ACTIVE); + if (nfsmbsub_sc->res == NULL) { + device_printf(dev, "could not map i/o space\n"); + return (ENXIO); + } } nfsmbsub_sc->smbst = rman_get_bustag(nfsmbsub_sc->res); nfsmbsub_sc->smbsh = rman_get_bushandle(nfsmbsub_sc->res); @@ -171,8 +177,14 @@ nfsmb_attach(device_t dev) &nfsmb_sc->rid, RF_ACTIVE); if (nfsmb_sc->res == NULL) { - device_printf(dev, "could not map i/o space\n"); - return (ENXIO); + /* Older incarnations of the device used non-standard BARs. */ + nfsmb_sc->rid = 0x50; + nfsmb_sc->res = bus_alloc_resource_any(dev, + SYS_RES_IOPORT, &nfsmb_sc->rid, RF_ACTIVE); + if (nfsmb_sc->res == NULL) { + device_printf(dev, "could not map i/o space\n"); + return (ENXIO); + } } nfsmb_sc->smbst = rman_get_bustag(nfsmb_sc->res); |