svn commit: r294992 - head/sys/arm64/cavium
Zbigniew Bodek
zbb at FreeBSD.org
Thu Jan 28 15:38:04 UTC 2016
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));
};
More information about the svn-src-all
mailing list