summaryrefslogtreecommitdiffstats
path: root/sys/dev/hptnr
diff options
context:
space:
mode:
authorjhibbits <jhibbits@FreeBSD.org>2016-02-27 03:34:01 +0000
committerjhibbits <jhibbits@FreeBSD.org>2016-02-27 03:34:01 +0000
commita299546def9ced6d3125373164a42978f6f56f5b (patch)
tree9e95619450dade04a441482adba314c650089f3f /sys/dev/hptnr
parent34c3628c07bca32d9add2d9555d38148a0089cfc (diff)
downloadFreeBSD-src-a299546def9ced6d3125373164a42978f6f56f5b.zip
FreeBSD-src-a299546def9ced6d3125373164a42978f6f56f5b.tar.gz
Replace several bus_alloc_resource() calls with bus_alloc_resource_any()
Most of these are BARs, and we allocate them in their entirety. The one outlier in this is amdsbwd, which calls bus_set_resource() prior. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D5370 (partial)
Diffstat (limited to 'sys/dev/hptnr')
-rw-r--r--sys/dev/hptnr/hptnr_os_bsd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/hptnr/hptnr_os_bsd.c b/sys/dev/hptnr/hptnr_os_bsd.c
index b019a7c..36f0c3c 100644
--- a/sys/dev/hptnr/hptnr_os_bsd.c
+++ b/sys/dev/hptnr/hptnr_os_bsd.c
@@ -106,13 +106,13 @@ void *os_map_pci_bar(
if (base & 1) {
hba->pcibar[index].type = SYS_RES_IOPORT;
- hba->pcibar[index].res = bus_alloc_resource(hba->pcidev,
- hba->pcibar[index].type, &hba->pcibar[index].rid, 0, ~0, length, RF_ACTIVE);
+ hba->pcibar[index].res = bus_alloc_resource_any(hba->pcidev,
+ hba->pcibar[index].type, &hba->pcibar[index].rid, RF_ACTIVE);
hba->pcibar[index].base = (void *)(unsigned long)(base & ~0x1);
} else {
hba->pcibar[index].type = SYS_RES_MEMORY;
- hba->pcibar[index].res = bus_alloc_resource(hba->pcidev,
- hba->pcibar[index].type, &hba->pcibar[index].rid, 0, ~0, length, RF_ACTIVE);
+ hba->pcibar[index].res = bus_alloc_resource_any(hba->pcidev,
+ hba->pcibar[index].type, &hba->pcibar[index].rid, RF_ACTIVE);
hba->pcibar[index].base = (char *)rman_get_virtual(hba->pcibar[index].res) + offset;
}
OpenPOWER on IntegriCloud