Date: Mon, 20 Jan 2014 17:55:22 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260912 - head/sys/x86/x86 Message-ID: <201401201755.s0KHtMh6093630@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Mon Jan 20 17:55:22 2014 New Revision: 260912 URL: http://svnweb.freebsd.org/changeset/base/260912 Log: - Only check the ivars for direct descendants. - A couple of whitespace fixes. Modified: head/sys/x86/x86/nexus.c Modified: head/sys/x86/x86/nexus.c ============================================================================== --- head/sys/x86/x86/nexus.c Mon Jan 20 17:45:36 2014 (r260911) +++ head/sys/x86/x86/nexus.c Mon Jan 20 17:55:22 2014 (r260912) @@ -368,12 +368,13 @@ nexus_alloc_resource(device_t bus, devic int needactivate = flags & RF_ACTIVE; /* - * If this is an allocation of the "default" range for a given RID, and - * we know what the resources for this device are (ie. they aren't maintained - * by a child bus), then work out the start/end values. + * If this is an allocation of the "default" range for a given + * RID, and we know what the resources for this device are + * (ie. they aren't maintained by a child bus), then work out + * the start/end values. */ if ((start == 0UL) && (end == ~0UL) && (count == 1)) { - if (ndev == NULL) + if (device_get_parent(child) != bus || ndev == NULL) return(NULL); rle = resource_list_find(&ndev->nx_resources, type, *rid); if (rle == NULL) @@ -492,6 +493,7 @@ static int nexus_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r) { + if (rman_get_flags(r) & RF_ACTIVE) { int error = bus_deactivate_resource(child, type, rid, r); if (error)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401201755.s0KHtMh6093630>