Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Sep 2011 08:13:23 -0400 (EDT)
From:      Daniel Eischen <deischen@freebsd.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        adrian@freebsd.org, freebsd-current@freebsd.org, Warner Losh <imp@freebsd.org>
Subject:   Re: ath0 no longer attaches, cardbus problems?
Message-ID:  <Pine.GSO.4.64.1109100805520.19909@sea.ntplx.net>
In-Reply-To: <054D42C8-E7CD-4F4A-88CB-40841CF972EE@bsdimp.com>
References:  <Pine.GSO.4.64.1108242007100.23746@sea.ntplx.net> <201109080942.03413.jhb@freebsd.org> <Pine.GSO.4.64.1109081243320.10252@sea.ntplx.net> <201109081359.56584.jhb@freebsd.org> <Pine.GSO.4.64.1109081638370.10964@sea.ntplx.net> <Pine.GSO.4.64.1109091511450.16436@sea.ntplx.net> <054D42C8-E7CD-4F4A-88CB-40841CF972EE@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 9 Sep 2011, Warner Losh wrote:

>
> 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.
>>
>> 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.
>>
>> 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.
>>
>> 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.

I tried it separately with the 2 chunks, and only the first
chunk is needed.  To be pedantic, this was the change that
made ath work again.

Index: sys/dev/cardbus/cardbus_cis.c
===================================================================
--- sys/dev/cardbus/cardbus_cis.c	(revision 225463)
+++ sys/dev/cardbus/cardbus_cis.c	(working copy)
@@ -441,6 +441,7 @@
  {
  	if (res != CIS_CONFIG_SPACE) {
  		bus_release_resource(child, SYS_RES_MEMORY, rid, res);
+		bus_delete_resource(child, SYS_RES_MEMORY, rid);
  	}
  }

While debugging the problem a couple of weeks ago, I did
seem to notice ath was trying to attach twice.  I seem to
recall it was at different addresses.  Could this possibly
cause the problem without the above patch?

-- 
DE



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.64.1109100805520.19909>