Date: Sun, 20 Mar 2016 14:21:07 +0000 (UTC) From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297065 - head/sys/dev/ahci Message-ID: <201603201421.u2KEL7uX040823@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhibbits Date: Sun Mar 20 14:21:07 2016 New Revision: 297065 URL: https://svnweb.freebsd.org/changeset/base/297065 Log: 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 Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Sun Mar 20 14:11:37 2016 (r297064) +++ head/sys/dev/ahci/ahci.c Sun Mar 20 14:21:07 2016 (r297065) @@ -527,7 +527,7 @@ ahci_alloc_resource(device_t dev, device { 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603201421.u2KEL7uX040823>