From owner-freebsd-current@FreeBSD.ORG Sat Sep 10 04:14:34 2011 Return-Path: Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7565E1065674; Sat, 10 Sep 2011 04:14:34 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 13C628FC0A; Sat, 10 Sep 2011 04:14:33 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p8A4BKLd006174; Fri, 9 Sep 2011 22:11:23 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Fri, 9 Sep 2011 22:11:10 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <054D42C8-E7CD-4F4A-88CB-40841CF972EE@bsdimp.com> References: <201109080942.03413.jhb@freebsd.org> <201109081359.56584.jhb@freebsd.org> To: Daniel Eischen X-Mailer: Apple Mail (2.1084) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [127.0.0.1]); Fri, 09 Sep 2011 22:11:30 -0600 (MDT) Cc: adrian@FreeBSD.ORG, freebsd-current@FreeBSD.ORG, Warner Losh , John Baldwin Subject: Re: ath0 no longer attaches, cardbus problems? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Sep 2011 04:14:34 -0000 On Sep 9, 2011, at 1:22 PM, Daniel Eischen wrote: > I found the commit that broke ath for me, r222753, > specifically, the change to /dev/cardbus/cardbus_cis.c. >=20 > To be sure, I updated to head using svn, and applied > the patch included below. ath attaches and works. Without > the patch, ath does not attach. >=20 > On another note, I've no idea why updating from a local > CVS repo lead me down a wrong path. It seems wrong that > a 'cvs update -P -d -A -D "31 Mar 2011"' works and > a 'cvs update -P -d -A -D "1 Apr 2011"' does not work. > r222753 did not occur until much later (June 6). > Once John asked me to try r220195, I switched to using > svn. When that worked, it seemed strange to me because > nothing else committed after that on Mar 31 should have > broke ath. >=20 > Anyway, culprit found. Now what is the correct fix? Do you need both chunks? The second one seems redundant given the = definition of bus_alloc_reosurce_any does exactly that. Warner >=20 >=20 > Index: sys/dev/cardbus/cardbus_cis.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sys/dev/cardbus/cardbus_cis.c (revision 225463) > +++ sys/dev/cardbus/cardbus_cis.c (working copy) > @@ -441,6 +441,7 @@ > { > if (res !=3D CIS_CONFIG_SPACE) { > bus_release_resource(child, SYS_RES_MEMORY, rid, res); > + bus_delete_resource(child, SYS_RES_MEMORY, rid); > } > } >=20 > @@ -477,7 +478,11 @@ > } >=20 > /* allocate the memory space to read CIS */ > +#if 0 > res =3D bus_alloc_resource_any(child, SYS_RES_MEMORY, rid, > +#else > + res =3D bus_alloc_resource(child, SYS_RES_MEMORY, rid, 0, ~0, 1, > +#endif > rman_make_alignment_flags(4096) | RF_ACTIVE); > if (res =3D=3D NULL) { > device_printf(cbdev, "Unable to allocate resource " >=20 > --=20 > DE >=20 >=20