Date: Thu, 28 Jan 2016 15:38:03 +0000 (UTC) From: Zbigniew Bodek <zbb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r294992 - head/sys/arm64/cavium Message-ID: <201601281538.u0SFc3M6018299@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: zbb Date: Thu Jan 28 15:38:02 2016 New Revision: 294992 URL: https://svnweb.freebsd.org/changeset/base/294992 Log: Correct alloc_ and release_resource methods in thunder_pcie driver - Avoid using BUS_ macros as bus_generic_ functions should be used instead. - Fix mistaken device_t pointers in thunder_pcie_alloc_resource. Should use dev->parent method and allocate resource for child device Reviewed by: wma Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D5068 Modified: head/sys/arm64/cavium/thunder_pcie.c Modified: head/sys/arm64/cavium/thunder_pcie.c ============================================================================== --- head/sys/arm64/cavium/thunder_pcie.c Thu Jan 28 15:34:13 2016 (r294991) +++ head/sys/arm64/cavium/thunder_pcie.c Thu Jan 28 15:38:02 2016 (r294992) @@ -268,7 +268,7 @@ thunder_pcie_release_resource(device_t d { if (type != SYS_RES_MEMORY) - return (BUS_RELEASE_RESOURCE(device_get_parent(dev), child, + return (bus_generic_release_resource(dev, child, type, rid, res)); return (rman_release_resource(res)); @@ -291,7 +291,7 @@ thunder_pcie_alloc_resource(device_t dev rm = &sc->mem_rman; break; default: - return (BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, + return (bus_generic_alloc_resource(dev, child, type, rid, start, end, count, flags)); };
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601281538.u0SFc3M6018299>