diff options
author | jhibbits <jhibbits@FreeBSD.org> | 2016-01-27 02:23:54 +0000 |
---|---|---|
committer | jhibbits <jhibbits@FreeBSD.org> | 2016-01-27 02:23:54 +0000 |
commit | 31bb8ee5bdf9a6332a86e4774ebdccba877ce42e (patch) | |
tree | 5ac500b634909ff3fe2556201aef7e16d85316d2 /sys/dev/ata | |
parent | d2ca0a07825355904475b1fe585efdd49eeae0b3 (diff) | |
download | FreeBSD-src-31bb8ee5bdf9a6332a86e4774ebdccba877ce42e.zip FreeBSD-src-31bb8ee5bdf9a6332a86e4774ebdccba877ce42e.tar.gz |
Convert rman to use rman_res_t instead of u_long
Summary:
Migrate to using the semi-opaque type rman_res_t to specify rman resources. For
now, this is still compatible with u_long.
This is step one in migrating rman to use uintmax_t for resources instead of
u_long.
Going forward, this could feasibly be used to specify architecture-specific
definitions of resource ranges, rather than baking a specific integer type into
the API.
This change has been broken out to facilitate MFC'ing drivers back to 10 without
breaking ABI.
Reviewed By: jhb
Sponsored by: Alex Perez/Inertial Computing
Differential Revision: https://reviews.freebsd.org/D5075
Diffstat (limited to 'sys/dev/ata')
-rw-r--r-- | sys/dev/ata/ata-cbus.c | 5 | ||||
-rw-r--r-- | sys/dev/ata/ata-isa.c | 4 | ||||
-rw-r--r-- | sys/dev/ata/ata-pci.c | 3 | ||||
-rw-r--r-- | sys/dev/ata/ata-pci.h | 2 |
4 files changed, 8 insertions, 6 deletions
diff --git a/sys/dev/ata/ata-cbus.c b/sys/dev/ata/ata-cbus.c index 489391d..793601d 100644 --- a/sys/dev/ata/ata-cbus.c +++ b/sys/dev/ata/ata-cbus.c @@ -67,7 +67,7 @@ ata_cbus_probe(device_t dev) { struct resource *io; int rid; - u_long tmp; + rman_res_t tmp; /* dont probe PnP devices */ if (isa_get_vendorid(dev)) @@ -168,7 +168,8 @@ ata_cbus_attach(device_t dev) static struct resource * ata_cbus_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, + u_int flags) { struct ata_cbus_controller *ctlr = device_get_softc(dev); diff --git a/sys/dev/ata/ata-isa.c b/sys/dev/ata/ata-isa.c index c94d262..43b8533 100644 --- a/sys/dev/ata/ata-isa.c +++ b/sys/dev/ata/ata-isa.c @@ -60,7 +60,7 @@ static int ata_isa_probe(device_t dev) { struct resource *io = NULL, *ctlio = NULL; - u_long tmp; + rman_res_t tmp; int rid; /* check isapnp ids */ @@ -100,7 +100,7 @@ ata_isa_attach(device_t dev) { struct ata_channel *ch = device_get_softc(dev); struct resource *io = NULL, *ctlio = NULL; - u_long tmp; + rman_res_t tmp; int i, rid; if (ch->attached) diff --git a/sys/dev/ata/ata-pci.c b/sys/dev/ata/ata-pci.c index 00ad6c7..74df044 100644 --- a/sys/dev/ata/ata-pci.c +++ b/sys/dev/ata/ata-pci.c @@ -217,7 +217,8 @@ ata_pci_write_config(device_t dev, device_t child, int reg, struct resource * ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, + u_int flags) { struct ata_pci_controller *controller = device_get_softc(dev); struct resource *res = NULL; diff --git a/sys/dev/ata/ata-pci.h b/sys/dev/ata/ata-pci.h index 7872e95..101d6c6 100644 --- a/sys/dev/ata/ata-pci.h +++ b/sys/dev/ata/ata-pci.h @@ -535,7 +535,7 @@ void ata_pci_write_config(device_t dev, device_t child, int reg, int ata_pci_print_child(device_t dev, device_t child); int ata_pci_child_location_str(device_t dev, device_t child, char *buf, size_t buflen); -struct resource * ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags); +struct resource * ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); int ata_pci_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r); int ata_pci_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, driver_filter_t *filter, driver_intr_t *function, void *argument, void **cookiep); int ata_pci_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie); |