From owner-freebsd-current@FreeBSD.ORG Fri Sep 9 20:24:28 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 CF4F6106564A; Fri, 9 Sep 2011 20:24:28 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) by mx1.freebsd.org (Postfix) with ESMTP id 58C448FC12; Fri, 9 Sep 2011 20:24:27 +0000 (UTC) Received: from deuterium.andreas.nets (dhclient-91-190-8-131.flashcable.ch [91.190.8.131]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id p89JxUdH095797; Fri, 9 Sep 2011 21:59:31 +0200 (CEST) (envelope-from andreast@FreeBSD.org) Message-ID: <4E6A7022.4040708@FreeBSD.org> Date: Fri, 09 Sep 2011 21:59:30 +0200 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: Daniel Eischen References: <201109080942.03413.jhb@freebsd.org> <201109081359.56584.jhb@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 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: Fri, 09 Sep 2011 20:24:28 -0000 Hi Daniel! On 09.09.11 21:22, 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? THANK you very much! I was following this thread with big interest since last weekend. Here I found a Wireless card in the trash. An MSI card with a 'Ralink Technology RT2560, RT2525'. Under 8.2 it worked perfectly while under current I got a crappy ethernet address. Went back to 220194 and could prove that it was working there. During this process your message came in and I immediately tried the below patch: ral0: flags=8843 metric 0 mtu 2290 ether 00:13:d3:7f:f8:48 nd6 options=29 media: IEEE 802.11 Wireless Ethernet autoselect mode 11g status: associated Whee!!! Again, thanks a lot. I do not know if it is the right solution, but it works. Gruss, Andreas > > > 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); > } > } > > @@ -477,7 +478,11 @@ > } > > /* allocate the memory space to read CIS */ > +#if 0 > res = bus_alloc_resource_any(child, SYS_RES_MEMORY, rid, > +#else > + res = bus_alloc_resource(child, SYS_RES_MEMORY, rid, 0, ~0, 1, > +#endif > rman_make_alignment_flags(4096) | RF_ACTIVE); > if (res == NULL) { > device_printf(cbdev, "Unable to allocate resource " >