From owner-freebsd-wireless@FreeBSD.ORG Tue Mar 20 03:30:07 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D06C106564A; Tue, 20 Mar 2012 03:30:07 +0000 (UTC) (envelope-from erichfreebsdlist@ovitrap.com) Received: from alogreentechnologies.com (alogreentechnologies.com [67.212.226.44]) by mx1.freebsd.org (Postfix) with ESMTP id 61E308FC12; Tue, 20 Mar 2012 03:30:07 +0000 (UTC) Received: from amd620.ovitrap.com ([49.128.188.2]) (authenticated bits=0) by alogreentechnologies.com (8.13.1/8.13.1) with ESMTP id q2K36A3Y007539; Mon, 19 Mar 2012 21:06:12 -0600 From: Erich Dollansky To: PseudoCylon Date: Tue, 20 Mar 2012 10:06:22 +0700 User-Agent: KMail/1.13.7 (FreeBSD/8.3-PRERELEASE; KDE/4.7.4; amd64; ; ) References: <201112171258.56891.erichfreebsdlist@ovitrap.com> <201112180759.03722.erichfreebsdlist@ovitrap.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201203201006.22954.erichfreebsdlist@ovitrap.com> Cc: freebsd-wireless@freebsd.org, Bernhard Schmidt Subject: Regression 8.2 --> 8.3 PRERELEASE Re: Zyxel NWD210N not accepted at boot time but after plugging it in again X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Mar 2012 03:30:07 -0000 Hi, I have upgraded the machine recently and the interface was not seen at boot time as before. AMD620:///home/erich (root) > uname -a FreeBSD AMD620.ovitrap.com 8.3-PRERELEASE FreeBSD 8.3-PRERELEASE #31: Thu Mar 8 18:29:47 WIT 2012 erich@AMD620.ovitrap.com:/usr/obj/usr/src/sys/AsusAMD620 amd64 I am not able to tell when the problem came up again as I use this stick only when I am at the client's side. Erich On Sunday 18 December 2011 12:32:46 PseudoCylon wrote: > On Sat, Dec 17, 2011 at 5:59 PM, Erich Dollansky > wrote: > > Hi, > > > > On Sunday 18 December 2011 06:45:18 PseudoCylon wrote: > >> On Sat, Dec 17, 2011 at 6:11 AM, Bernhard Schmidt wrote: > >> > On Saturday 17 December 2011 06:58:56 Erich Dollansky wrote: > >> > > >> > run(4) tries to load the firmware on attach at which point the root > >> > filesystem isn't yet mounted. Actually I think the prefered behaviour > >> > is to load it during init, not sure this is possible for run(4) > >> > though. Someone should check this. :) > >> > > >> mmm... It seems "someone" is me. > >> > >> At the quick look, the firmware could be loaded during the init. Give > >> me a few days, I will try to change. > >> > > if you need more information, just ask me. Please do not wonder if you do not get them at the spot. I am in a very remote location where electricity is cut off during the day. > > > Actually, it was quite straight forward. The patch follows. > > Also, a tarball is attached which include patch to man.4/run.4 and new > firmware. I don't know what has been changed, but I'd appreciate if > you try new firmware out. > > > AK > > ## begin patch ## > > diff --git a/dev/usb/wlan/if_run.c b/dev/usb/wlan/if_run.c > index b2c3c19..ef7c62c 100644 > --- a/dev/usb/wlan/if_run.c > +++ b/dev/usb/wlan/if_run.c > @@ -17,7 +17,7 @@ > */ > > #include > -__FBSDID("$FreeBSD: src/sys/dev/usb/wlan/if_run.c,v 1.29 2011/12/17 > 10:23:17 bschmidt Exp $"); > +__FBSDID("$FreeBSD$"); > > /*- > * Ralink Technology RT2700U/RT2800U/RT3000U chipset driver. > @@ -600,12 +600,6 @@ run_attach(device_t self) > sc->mac_ver, sc->mac_rev, run_get_rf(sc->rf_rev), > sc->ntxchains, sc->nrxchains, ether_sprintf(sc->sc_bssid)); > > - if ((error = run_load_microcode(sc)) != 0) { > - device_printf(sc->sc_dev, "could not load 8051 microcode\n"); > - RUN_UNLOCK(sc); > - goto detach; > - } > - > RUN_UNLOCK(sc); > > ifp = sc->sc_ifp = if_alloc(IFT_IEEE80211); > @@ -1050,8 +1044,9 @@ run_load_microcode(struct run_softc *sc) > error = ETIMEDOUT; > goto fail; > } > - device_printf(sc->sc_dev, "firmware %s loaded\n", > - (base == fw->data) ? "RT2870" : "RT3071"); > + device_printf(sc->sc_dev, "firmware %s ver. %u.%u loaded\n", > + (base == fw->data) ? "RT2870" : "RT3071", > + *(base + 4092), *(base + 4093)); > > fail: > firmware_put(fw, FIRMWARE_UNLOAD); > @@ -4677,6 +4672,11 @@ run_init_locked(struct run_softc *sc) > > run_stop(sc); > > + if (run_load_microcode(sc) != 0) { > + device_printf(sc->sc_dev, "could not load 8051 microcode\n"); > + goto fail; > + } > + > for (ntries = 0; ntries < 100; ntries++) { > if (run_read(sc, RT2860_ASIC_VER_ID, &tmp) != 0) > goto fail; >