From d6f8b9168fd92f588e43d84a5c0809380aaee5b6 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Sun, 20 Mar 2016 14:21:07 +0000 Subject: [PATCH] Convert a long to rman_res_t, fixing a sign extension bug. ahci.c had one signed long, which was passed into rman, rather than u_long. After the switch of rman_res_t from size u_long to size uintmax_t, the sign extension caused ranges to get messed up, and ahcich* to not attach. There may be more signed longs used in this way, which will be fixed as they're reported. Reported by: pho --- sys/dev/ahci/ahci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c index 25ebbf716a1..8341f662dd5 100644 --- a/sys/dev/ahci/ahci.c +++ b/sys/dev/ahci/ahci.c @@ -527,7 +527,7 @@ ahci_alloc_resource(device_t dev, device_t child, int type, int *rid, { struct ahci_controller *ctlr = device_get_softc(dev); struct resource *res; - long st; + rman_res_t st; int offset, size, unit; unit = (intptr_t)device_get_ivars(child);