aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ata
diff options
context:
space:
mode:
authorJustin Hibbits <jhibbits@FreeBSD.org>2016-02-27 03:38:01 +0000
committerJustin Hibbits <jhibbits@FreeBSD.org>2016-02-27 03:38:01 +0000
commitc47476d7e6801deffc8b3c057d0fbf7d2335a0c2 (patch)
treebc27bca5a9b117f27964de1fbd3efe2e2ec151d3 /sys/dev/ata
parentac6c1372f4ebb24615370e358640100e663f6746 (diff)
Notes
Diffstat (limited to 'sys/dev/ata')
-rw-r--r--sys/dev/ata/ata-card.c8
-rw-r--r--sys/dev/ata/ata-cbus.c8
-rw-r--r--sys/dev/ata/ata-isa.c16
3 files changed, 16 insertions, 16 deletions
diff --git a/sys/dev/ata/ata-card.c b/sys/dev/ata/ata-card.c
index 4b0a3d1335c6..5aa5a9b480f8 100644
--- a/sys/dev/ata/ata-card.c
+++ b/sys/dev/ata/ata-card.c
@@ -98,8 +98,8 @@ ata_pccard_attach(device_t dev)
/* allocate the io range to get start and length */
rid = ATA_IOADDR_RID;
- if (!(io = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0,
- ATA_IOSIZE, RF_ACTIVE)))
+ if (!(io = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &rid,
+ ATA_IOSIZE, RF_ACTIVE)))
return (ENXIO);
/* setup the resource vectors */
@@ -119,8 +119,8 @@ ata_pccard_attach(device_t dev)
}
else {
rid = ATA_CTLADDR_RID;
- if (!(ctlio = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0,
- ATA_CTLIOSIZE, RF_ACTIVE))) {
+ if (!(ctlio = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &rid,
+ ATA_CTLIOSIZE, RF_ACTIVE))) {
bus_release_resource(dev, SYS_RES_IOPORT, ATA_IOADDR_RID, io);
for (i = ATA_DATA; i < ATA_MAX_RES; i++)
ch->r_io[i].res = NULL;
diff --git a/sys/dev/ata/ata-cbus.c b/sys/dev/ata/ata-cbus.c
index 793601d092e4..4165ea6a947a 100644
--- a/sys/dev/ata/ata-cbus.c
+++ b/sys/dev/ata/ata-cbus.c
@@ -75,8 +75,8 @@ ata_cbus_probe(device_t dev)
/* allocate the ioport range */
rid = ATA_IOADDR_RID;
- if (!(io = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0,
- ATA_PC98_IOSIZE, RF_ACTIVE)))
+ if (!(io = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &rid,
+ ATA_PC98_IOSIZE, RF_ACTIVE)))
return ENOMEM;
/* calculate & set the altport range */
@@ -106,8 +106,8 @@ ata_cbus_attach(device_t dev)
/* allocate resources */
rid = ATA_IOADDR_RID;
- if (!(ctlr->io = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0,
- ATA_PC98_IOSIZE, RF_ACTIVE)))
+ if (!(ctlr->io = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &rid,
+ ATA_PC98_IOSIZE, RF_ACTIVE)))
return ENOMEM;
rid = ATA_PC98_CTLADDR_RID;
diff --git a/sys/dev/ata/ata-isa.c b/sys/dev/ata/ata-isa.c
index 43b8533bcfc9..b29851342b98 100644
--- a/sys/dev/ata/ata-isa.c
+++ b/sys/dev/ata/ata-isa.c
@@ -69,8 +69,8 @@ ata_isa_probe(device_t dev)
/* allocate the io port range */
rid = ATA_IOADDR_RID;
- if (!(io = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0,
- ATA_IOSIZE, RF_ACTIVE)))
+ if (!(io = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &rid,
+ ATA_IOSIZE, RF_ACTIVE)))
return ENXIO;
/* set the altport range */
@@ -81,8 +81,8 @@ ata_isa_probe(device_t dev)
/* allocate the altport range */
rid = ATA_CTLADDR_RID;
- if (!(ctlio = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0,
- ATA_CTLIOSIZE, RF_ACTIVE))) {
+ if (!(ctlio = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &rid,
+ ATA_CTLIOSIZE, RF_ACTIVE))) {
bus_release_resource(dev, SYS_RES_IOPORT, ATA_IOADDR_RID, io);
return ENXIO;
}
@@ -109,8 +109,8 @@ ata_isa_attach(device_t dev)
/* allocate the io port range */
rid = ATA_IOADDR_RID;
- if (!(io = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0,
- ATA_IOSIZE, RF_ACTIVE)))
+ if (!(io = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &rid,
+ ATA_IOSIZE, RF_ACTIVE)))
return ENXIO;
/* set the altport range */
@@ -121,8 +121,8 @@ ata_isa_attach(device_t dev)
/* allocate the altport range */
rid = ATA_CTLADDR_RID;
- if (!(ctlio = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0,
- ATA_CTLIOSIZE, RF_ACTIVE))) {
+ if (!(ctlio = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &rid,
+ ATA_CTLIOSIZE, RF_ACTIVE))) {
bus_release_resource(dev, SYS_RES_IOPORT, ATA_IOADDR_RID, io);
return ENXIO;
}