From owner-freebsd-usb@FreeBSD.ORG Sun Apr 29 13:25:10 2007 Return-Path: X-Original-To: freebsd-usb@FreeBSD.org Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D720C16A406 for ; Sun, 29 Apr 2007 13:25:10 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from halik.com.ua (halik.com.ua [193.178.146.121]) by mx1.freebsd.org (Postfix) with ESMTP id 266D313C45D for ; Sun, 29 Apr 2007 13:25:09 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from [192.168.1.103] (unknown [213.227.219.58]) by halik.com.ua (Postfix) with ESMTP id F14C65C06D; Sun, 29 Apr 2007 16:02:16 +0300 (EEST) Message-ID: <46349750.7060206@chikalov.dp.ua> Date: Sun, 29 Apr 2007 16:02:08 +0300 From: "Valery V.Chikalov" User-Agent: Thunderbird 1.5.0.9 (X11/20070315) MIME-Version: 1.0 To: Kevin Lo , freebsd-usb@FreeBSD.org References: <200704272330.l3RNU94X078095@freefall.freebsd.org> <1177767702.5804.7.camel@monet> In-Reply-To: <1177767702.5804.7.camel@monet> Content-Type: multipart/mixed; boundary="------------050105000400040604070109" Cc: Subject: Re: usb/107642: [patch]Ralink Technology RT2501USB/RT2601USB chipset driver X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Apr 2007 13:25:10 -0000 This is a multi-part message in MIME format. --------------050105000400040604070109 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Kevin Lo wrote: > Valery V.Chikalov wrote: >> The following reply was made to PR usb/107642; it has been noted by GNATS. >> >> From: "Valery V.Chikalov" >> To: bug-followup@FreeBSD.org, valera@chikalov.dp.ua >> Cc: >> Subject: Re: usb/107642: [patch]Ralink Technology RT2501USB/RT2601USB chipset >> driver >> Date: Sun, 22 Apr 2007 11:32:18 +0300 >> >> This is a multi-part message in MIME format. >> --------------030900090303000507070905 >> Content-Type: text/plain; charset=UTF-8 >> Content-Transfer-Encoding: 7bit >> >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> if_rum(4) for 7.0-CURRENT >> >> replaced amrr_* functions by "standard" ones already existed in >> net80211/ieee80211_amrr.c >> >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG v1.4.5 (MingW32) >> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org >> >> iD8DBQFGKx14760S3kDvEC4RAn8PAKCn990QJE0wZRKcwdxAZ61MY0JRgACeI2W5 >> ZosSlh6pIqi7JdZ5Wi1BUYc= >> =LvWZ >> -----END PGP SIGNATURE----- > > Hi Valery, > > I guess you wasn't aware that I've already ported rum(4) to FreeBSD. > The patch is available at: http://people.freebsd.org/~kevlo/patch-rum > Maybe you can test my patch? Thanks. > > Kevin > > Hi, Kevin, Your driver not working for me. Fortunately, the errors that I see exactly the same which i fight when I made my driver. $ uname -a FreeBSD tiger.novakom.dp.ua 7.0-CURRENT FreeBSD 7.0-CURRENT #6: Sun Apr 29 13:58:48 EEST 2007 root@tiger.novakom.dp.ua:/usr/obj/usr/src/sys/TIGER64 amd64 $ sysctl kern.osreldate kern.osreldate: 700037 cvsup'ed 29.04.2007 kernel with: makeoptions DEBUG=-g options KDB options DDB options INVARIANTS options INVARIANT_SUPPORT options WITNESS At first, when I make kldload if_rum, I get kernel panic. But I cant get saved core, as ddb just hangs during "call doadump" So I add #define RUM_LOCK(sc) do { ((sc) = (sc)); mtx_lock(&Giant); } while (0) #define RUM_UNLOCK(sc) mtx_unlock(&Giant) in if_rumvar.h I spend a lot of time in attempts get rid of Giant ant always got only panics. After that I get hangs, which i resolved by modifying rum_ioctl: - RUM_LOCK(sc); - switch (cmd) { case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { - if (ifp->if_drv_flags & IFF_DRV_RUNNING) + if (ifp->if_drv_flags & IFF_DRV_RUNNING){ + RUM_LOCK(sc); rum_update_promisc(sc); - else + RUM_UNLOCK(sc); + } else { + RUM_LOCK(sc); rum_init(sc); + RUM_UNLOCK(sc); + } } else { - if (ifp->if_drv_flags & IFF_DRV_RUNNING) + if (ifp->if_drv_flags & IFF_DRV_RUNNING){ + RUM_LOCK(sc); rum_stop(sc); + RUM_UNLOCK(sc); + } } break; default: @@ -1488,12 +1501,13 @@ if (error == ENETRESET) { if ((ifp->if_flags & IFF_UP) && (ifp->if_drv_flags & IFF_DRV_RUNNING) && - (ic->ic_roaming != IEEE80211_ROAMING_MANUAL)) - rum_init(sc); + (ic->ic_roaming != IEEE80211_ROAMING_MANUAL)){ + RUM_LOCK(sc); + rum_init(sc); + RUM_UNLOCK(sc); + } error = 0; } - - RUM_UNLOCK(sc); After that changes at first glance driver is working, but I getting the panic during "high load", for example trying to get by ftp relatively big file (about 200Mb) at this time I can even get the saved kernel coredump, so I can give your more information if you wish. And the next changes (I know it looks ugly), made the driver working. In function rum_start: + static int fbusy = 0; + + if (fbusy) return; + + fbusy = 1; for (;;) { IF_POLL(&ic->ic_mgtq, m0); @@ -1439,6 +1444,8 @@ sc->sc_tx_timer = 5; callout_reset(&sc->watchdog_ch, hz, rum_watchdog, sc); } + + fbusy = 0; I'm sure you can make the "right" patches which resolves this issues. Valery. --------------050105000400040604070109 Content-Type: text/plain; name="if_rum.c.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="if_rum.c.diff" --- if_rum.c.orig Sun Apr 29 15:32:28 2007 +++ if_rum.c Sun Apr 29 15:26:22 2007 @@ -1376,6 +1376,11 @@ struct ieee80211_node *ni; struct mbuf *m0; struct ether_header *eh; + static int fbusy = 0; + + if (fbusy) return; + + fbusy = 1; for (;;) { IF_POLL(&ic->ic_mgtq, m0); @@ -1439,6 +1444,8 @@ sc->sc_tx_timer = 5; callout_reset(&sc->watchdog_ch, hz, rum_watchdog, sc); } + + fbusy = 0; } static void @@ -1467,18 +1474,24 @@ struct ieee80211com *ic = &sc->sc_ic; int error = 0; - RUM_LOCK(sc); - switch (cmd) { case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { - if (ifp->if_drv_flags & IFF_DRV_RUNNING) + if (ifp->if_drv_flags & IFF_DRV_RUNNING){ + RUM_LOCK(sc); rum_update_promisc(sc); - else + RUM_UNLOCK(sc); + } else { + RUM_LOCK(sc); rum_init(sc); + RUM_UNLOCK(sc); + } } else { - if (ifp->if_drv_flags & IFF_DRV_RUNNING) + if (ifp->if_drv_flags & IFF_DRV_RUNNING){ + RUM_LOCK(sc); rum_stop(sc); + RUM_UNLOCK(sc); + } } break; default: @@ -1488,12 +1501,13 @@ if (error == ENETRESET) { if ((ifp->if_flags & IFF_UP) && (ifp->if_drv_flags & IFF_DRV_RUNNING) && - (ic->ic_roaming != IEEE80211_ROAMING_MANUAL)) - rum_init(sc); + (ic->ic_roaming != IEEE80211_ROAMING_MANUAL)){ + RUM_LOCK(sc); + rum_init(sc); + RUM_UNLOCK(sc); + } error = 0; } - - RUM_UNLOCK(sc); return error; } --------------050105000400040604070109 Content-Type: text/plain; name="if_rumvar.h.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="if_rumvar.h.diff" --- if_rumvar.h.orig Sun Apr 29 15:32:28 2007 +++ if_rumvar.h Sun Apr 29 15:19:42 2007 @@ -152,6 +152,6 @@ #define RUM_LOCK(sc) mtx_lock(&(sc)->sc_mtx) #define RUM_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) #else -#define RUM_LOCK(sc) -#define RUM_UNLOCK(sc) +#define RUM_LOCK(sc) do { ((sc) = (sc)); mtx_lock(&Giant); } while (0) +#define RUM_UNLOCK(sc) mtx_unlock(&Giant) #endif --------------050105000400040604070109-- From owner-freebsd-usb@FreeBSD.ORG Sun Apr 29 13:50:55 2007 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8232D16A404 for ; Sun, 29 Apr 2007 13:50:55 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe12.swip.net [212.247.155.97]) by mx1.freebsd.org (Postfix) with ESMTP id C300713C45A for ; Sun, 29 Apr 2007 13:50:54 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [193.71.38.142] (account mc467741@c2i.net HELO [10.42.11.147]) by mailfe12.swip.net (CommuniGate Pro SMTP 5.1.7) with ESMTPA id 306119022; Sun, 29 Apr 2007 15:50:28 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Sun, 29 Apr 2007 15:50:10 +0200 User-Agent: KMail/1.9.5 References: <200704272330.l3RNU94X078095@freefall.freebsd.org> <1177767702.5804.7.camel@monet> <46349750.7060206@chikalov.dp.ua> In-Reply-To: <46349750.7060206@chikalov.dp.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200704291550.10968.hselasky@c2i.net> Cc: Kevin Lo Subject: Re: usb/107642: [patch]Ralink Technology RT2501USB/RT2601USB chipset driver X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Apr 2007 13:50:55 -0000 On Sunday 29 April 2007 15:02, Valery V.Chikalov wrote: > Kevin Lo wrote: > > Valery V.Chikalov wrote: > >> The following reply was made to PR usb/107642; it has been noted by > >> GNATS. > >> > >> From: "Valery V.Chikalov" > >> To: bug-followup@FreeBSD.org, valera@chikalov.dp.ua > >> Cc: > >> Subject: Re: usb/107642: [patch]Ralink Technology RT2501USB/RT2601USB > >> chipset driver > >> Date: Sun, 22 Apr 2007 11:32:18 +0300 > >> > >> This is a multi-part message in MIME format. > >> --------------030900090303000507070905 > >> Content-Type: text/plain; charset=UTF-8 > >> Content-Transfer-Encoding: 7bit > >> > >> -----BEGIN PGP SIGNED MESSAGE----- > >> Hash: SHA1 > >> > >> if_rum(4) for 7.0-CURRENT > >> > >> replaced amrr_* functions by "standard" ones already existed in > >> net80211/ieee80211_amrr.c > >> > >> -----BEGIN PGP SIGNATURE----- > >> Version: GnuPG v1.4.5 (MingW32) > >> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > >> > >> iD8DBQFGKx14760S3kDvEC4RAn8PAKCn990QJE0wZRKcwdxAZ61MY0JRgACeI2W5 > >> ZosSlh6pIqi7JdZ5Wi1BUYc= > >> =LvWZ > >> -----END PGP SIGNATURE----- > > > > Hi Valery, > > > > I guess you wasn't aware that I've already ported rum(4) to FreeBSD. > > The patch is available at: http://people.freebsd.org/~kevlo/patch-rum > > Maybe you can test my patch? Thanks. > > > > Kevin > > Hi, Kevin, > > Your driver not working for me. Fortunately, the errors that I see > exactly the same which i fight when I made my driver. > > $ uname -a > FreeBSD tiger.novakom.dp.ua 7.0-CURRENT FreeBSD 7.0-CURRENT #6: Sun Apr > 29 13:58:48 EEST 2007 > root@tiger.novakom.dp.ua:/usr/obj/usr/src/sys/TIGER64 amd64 > > $ sysctl kern.osreldate > kern.osreldate: 700037 > > cvsup'ed 29.04.2007 > > kernel with: > > makeoptions DEBUG=-g > > options KDB > > options DDB > > > > options INVARIANTS > > options INVARIANT_SUPPORT > > options WITNESS > > At first, when I make kldload if_rum, I get kernel panic. > But I cant get saved core, as ddb just hangs during "call doadump" > I have a solution for all of this locking stuff! > So I add > > #define RUM_LOCK(sc) do { ((sc) = (sc)); mtx_lock(&Giant); } while > (0) > #define RUM_UNLOCK(sc) mtx_unlock(&Giant) > > in if_rumvar.h > > I spend a lot of time in attempts get rid of Giant ant always got only > panics. You _cannot_ do that with the old USB stack, because you must lock Giant before calling into the usbxxx functions. Then in the USB callback, Giant is locked, and then you cannot lock RUM_LOCK()! That means you will most likely end up with a deadlock pretty soon, if you see that. > After that I get hangs, > which i resolved by modifying rum_ioctl: I'm almost finished converting "if_rum.c()" to the new USB stack. In some hours I will update it with support for "if_rum". If you can test that and forget about the old USB stack, I will be very happy :-) --HPS http://www.turbocat.net/~hselasky/usb4bsd From owner-freebsd-usb@FreeBSD.ORG Sun Apr 29 14:23:45 2007 Return-Path: X-Original-To: freebsd-usb@FreeBSD.org Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8E6A616A406 for ; Sun, 29 Apr 2007 14:23:45 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from halik.com.ua (halik.com.ua [193.178.146.121]) by mx1.freebsd.org (Postfix) with ESMTP id E213E13C43E for ; Sun, 29 Apr 2007 14:23:44 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from [192.168.1.103] (unknown [213.227.219.58]) by halik.com.ua (Postfix) with ESMTP id BC1BA5C06D; Sun, 29 Apr 2007 17:23:43 +0300 (EEST) Message-ID: <4634AA65.5060101@chikalov.dp.ua> Date: Sun, 29 Apr 2007 17:23:33 +0300 From: "Valery V.Chikalov" User-Agent: Thunderbird 1.5.0.9 (X11/20070315) MIME-Version: 1.0 To: freebsd-usb@FreeBSD.org, Hans Petter Selasky References: <200704272330.l3RNU94X078095@freefall.freebsd.org> <1177767702.5804.7.camel@monet> <46349750.7060206@chikalov.dp.ua> <200704291550.10968.hselasky@c2i.net> In-Reply-To: <200704291550.10968.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: usb/107642: [patch]Ralink Technology RT2501USB/RT2601USB chipset driver X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Apr 2007 14:23:45 -0000 Hans Petter Selasky wrote: > On Sunday 29 April 2007 15:02, Valery V.Chikalov wrote: >> Kevin Lo wrote: >>> Valery V.Chikalov wrote: >>>> The following reply was made to PR usb/107642; it has been noted by >>>> GNATS. >>>> >>>> From: "Valery V.Chikalov" >>>> To: bug-followup@FreeBSD.org, valera@chikalov.dp.ua >>>> Cc: >>>> Subject: Re: usb/107642: [patch]Ralink Technology RT2501USB/RT2601USB >>>> chipset driver >>>> Date: Sun, 22 Apr 2007 11:32:18 +0300 >>>> >>>> This is a multi-part message in MIME format. >>>> --------------030900090303000507070905 >>>> Content-Type: text/plain; charset=UTF-8 >>>> Content-Transfer-Encoding: 7bit >>>> >>>> -----BEGIN PGP SIGNED MESSAGE----- >>>> Hash: SHA1 >>>> >>>> if_rum(4) for 7.0-CURRENT >>>> >>>> replaced amrr_* functions by "standard" ones already existed in >>>> net80211/ieee80211_amrr.c >>>> >>>> -----BEGIN PGP SIGNATURE----- >>>> Version: GnuPG v1.4.5 (MingW32) >>>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org >>>> >>>> iD8DBQFGKx14760S3kDvEC4RAn8PAKCn990QJE0wZRKcwdxAZ61MY0JRgACeI2W5 >>>> ZosSlh6pIqi7JdZ5Wi1BUYc= >>>> =LvWZ >>>> -----END PGP SIGNATURE----- >>> Hi Valery, >>> >>> I guess you wasn't aware that I've already ported rum(4) to FreeBSD. >>> The patch is available at: http://people.freebsd.org/~kevlo/patch-rum >>> Maybe you can test my patch? Thanks. >>> >>> Kevin >> Hi, Kevin, >> >> Your driver not working for me. Fortunately, the errors that I see >> exactly the same which i fight when I made my driver. >> >> $ uname -a >> FreeBSD tiger.novakom.dp.ua 7.0-CURRENT FreeBSD 7.0-CURRENT #6: Sun Apr >> 29 13:58:48 EEST 2007 >> root@tiger.novakom.dp.ua:/usr/obj/usr/src/sys/TIGER64 amd64 >> >> $ sysctl kern.osreldate >> kern.osreldate: 700037 >> >> cvsup'ed 29.04.2007 >> >> kernel with: >> >> makeoptions DEBUG=-g >> >> options KDB >> >> options DDB >> >> >> >> options INVARIANTS >> >> options INVARIANT_SUPPORT >> >> options WITNESS >> >> At first, when I make kldload if_rum, I get kernel panic. >> But I cant get saved core, as ddb just hangs during "call doadump" >> > > I have a solution for all of this locking stuff! > >> So I add >> >> #define RUM_LOCK(sc) do { ((sc) = (sc)); mtx_lock(&Giant); } while >> (0) >> #define RUM_UNLOCK(sc) mtx_unlock(&Giant) >> >> in if_rumvar.h >> >> I spend a lot of time in attempts get rid of Giant ant always got only >> panics. > > You _cannot_ do that with the old USB stack, because you must lock Giant > before calling into the usbxxx functions. Then in the USB callback, Giant is > locked, and then you cannot lock RUM_LOCK()! That means you will most likely > end up with a deadlock pretty soon, if you see that. > Thanks, for explanations. I suspected that thing are like that, and I have tried make porting by analogue with other drivers which I can find in dev/usb, but I was not can find the description of doing "right way" locking before. >> After that I get hangs, >> which i resolved by modifying rum_ioctl: > > I'm almost finished converting "if_rum.c()" to the new USB stack. > > In some hours I will update it with support for "if_rum". > > If you can test that and forget about the old USB stack, I will be very > happy :-) > I will do it with pleasure. I was almost ready to do it (converting to new USB stack) by myself, but I was stopped by the fact that I cant make it compiled under CURRENT. I have seen your mail that your are working on this. Is new the USB stack ready for CURRENT now? Valery. > --HPS > > http://www.turbocat.net/~hselasky/usb4bsd From owner-freebsd-usb@FreeBSD.ORG Sun Apr 29 16:07:59 2007 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1A8A416A406 for ; Sun, 29 Apr 2007 16:07:59 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from swip.net (mailfe08.swip.net [212.247.154.225]) by mx1.freebsd.org (Postfix) with ESMTP id 8596013C458 for ; Sun, 29 Apr 2007 16:07:58 +0000 (UTC) (envelope-from hselasky@freebsd.org) X-Cloudmark-Score: 0.000000 [] Received: from [193.71.38.142] (account mc467741@c2i.net HELO [10.42.11.147]) by mailfe08.swip.net (CommuniGate Pro SMTP 5.1.7) with ESMTPA id 475299985; Sun, 29 Apr 2007 17:07:26 +0200 From: Hans Petter Selasky To: "Valery V.Chikalov" Date: Sun, 29 Apr 2007 17:07:08 +0200 User-Agent: KMail/1.9.5 References: <200704272330.l3RNU94X078095@freefall.freebsd.org> <200704291550.10968.hselasky@c2i.net> <4634AA65.5060101@chikalov.dp.ua> In-Reply-To: <4634AA65.5060101@chikalov.dp.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200704291707.08749.hselasky@freebsd.org> Cc: freebsd-usb@freebsd.org Subject: Re: usb/107642: [patch]Ralink Technology RT2501USB/RT2601USB chipset driver X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Apr 2007 16:07:59 -0000 On Sunday 29 April 2007 16:23, Valery V.Chikalov wrote: > Hans Petter Selasky wrote: > > On Sunday 29 April 2007 15:02, Valery V.Chikalov wrote: > >> Kevin Lo wrote: > >>> Valery V.Chikalov wrote: > >>>> The following reply was made to PR usb/107642; it has been noted by > >>>> GNATS. > >>>> > >>>> From: "Valery V.Chikalov" > >>>> To: bug-followup@FreeBSD.org, valera@chikalov.dp.ua > >>>> Cc: > >>>> Subject: Re: usb/107642: [patch]Ralink Technology RT2501USB/RT2601USB > >>>> chipset driver > >>>> Date: Sun, 22 Apr 2007 11:32:18 +0300 > >>>> > >>>> This is a multi-part message in MIME format. > >>>> --------------030900090303000507070905 > >>>> Content-Type: text/plain; charset=UTF-8 > >>>> Content-Transfer-Encoding: 7bit > >>>> > >>>> -----BEGIN PGP SIGNED MESSAGE----- > >>>> Hash: SHA1 > >>>> > >>>> if_rum(4) for 7.0-CURRENT > >>>> > >>>> replaced amrr_* functions by "standard" ones already existed in > >>>> net80211/ieee80211_amrr.c > >>>> > >>>> -----BEGIN PGP SIGNATURE----- > >>>> Version: GnuPG v1.4.5 (MingW32) > >>>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > >>>> > >>>> iD8DBQFGKx14760S3kDvEC4RAn8PAKCn990QJE0wZRKcwdxAZ61MY0JRgACeI2W5 > >>>> ZosSlh6pIqi7JdZ5Wi1BUYc= > >>>> =LvWZ > >>>> -----END PGP SIGNATURE----- > >>> > >>> Hi Valery, > >>> > >>> I guess you wasn't aware that I've already ported rum(4) to FreeBSD. > >>> The patch is available at: http://people.freebsd.org/~kevlo/patch-rum > >>> Maybe you can test my patch? Thanks. > >>> > >>> Kevin > >> > >> Hi, Kevin, > >> > >> Your driver not working for me. Fortunately, the errors that I see > >> exactly the same which i fight when I made my driver. > >> > >> $ uname -a > >> FreeBSD tiger.novakom.dp.ua 7.0-CURRENT FreeBSD 7.0-CURRENT #6: Sun Apr > >> 29 13:58:48 EEST 2007 > >> root@tiger.novakom.dp.ua:/usr/obj/usr/src/sys/TIGER64 amd64 > >> > >> $ sysctl kern.osreldate > >> kern.osreldate: 700037 > >> > >> cvsup'ed 29.04.2007 > >> > >> kernel with: > >> > >> makeoptions DEBUG=-g > >> > >> options KDB > >> > >> options DDB > >> > >> > >> > >> options INVARIANTS > >> > >> options INVARIANT_SUPPORT > >> > >> options WITNESS > >> > >> At first, when I make kldload if_rum, I get kernel panic. > >> But I cant get saved core, as ddb just hangs during "call doadump" > > > > I have a solution for all of this locking stuff! > > > >> So I add > >> > >> #define RUM_LOCK(sc) do { ((sc) = (sc)); mtx_lock(&Giant); } while > >> (0) > >> #define RUM_UNLOCK(sc) mtx_unlock(&Giant) > >> > >> in if_rumvar.h > >> > >> I spend a lot of time in attempts get rid of Giant ant always got only > >> panics. > > > > You _cannot_ do that with the old USB stack, because you must lock Giant > > before calling into the usbxxx functions. Then in the USB callback, Giant > > is locked, and then you cannot lock RUM_LOCK()! That means you will most > > likely end up with a deadlock pretty soon, if you see that. > > Thanks, for explanations. I suspected that thing are like that, and I > have tried make porting by analogue with other drivers which I can find > in dev/usb, but I was not can find the description of doing "right way" > locking before. > > >> After that I get hangs, > >> which i resolved by modifying rum_ioctl: > > > > I'm almost finished converting "if_rum.c()" to the new USB stack. > > > > In some hours I will update it with support for "if_rum". > > > > If you can test that and forget about the old USB stack, I will be very > > happy :-) > > I will do it with pleasure. I was almost ready to do it (converting to > new USB stack) by myself, but I was stopped by the fact that I cant make > it compiled under CURRENT. I have seen your mail that your are working > on this. Is new the USB stack ready for CURRENT now? I updated the code yesterday. It should compile on current now. --HPS From owner-freebsd-usb@FreeBSD.ORG Mon Apr 30 01:44:56 2007 Return-Path: X-Original-To: freebsd-usb@FreeBSD.org Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9A5C516A400 for ; Mon, 30 Apr 2007 01:44:56 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from ns.kevlo.org (kevlo.org [220.128.136.52]) by mx1.freebsd.org (Postfix) with ESMTP id 3004E13C44B for ; Mon, 30 Apr 2007 01:44:55 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from [127.0.0.1] (kevlo.org [220.128.136.52]) by ns.kevlo.org (8.13.8/8.13.8) with ESMTP id l3U1kKjG003768; Mon, 30 Apr 2007 09:46:20 +0800 (CST) (envelope-from kevlo@FreeBSD.org) From: Kevin Lo To: Hans Petter Selasky In-Reply-To: <200704281720.25026.hselasky@freebsd.org> References: <200704272330.l3RNU94X078095@freefall.freebsd.org> <1177767702.5804.7.camel@monet> <200704281720.25026.hselasky@freebsd.org> Content-Type: text/plain Date: Mon, 30 Apr 2007 09:47:32 +0800 Message-Id: <1177897652.5557.1.camel@monet> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit Cc: freebsd-usb@FreeBSD.org Subject: Re: usb/107642: [patch]Ralink Technology RT2501USB/RT2601USB chipset driver X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2007 01:44:56 -0000 Hans Petter Selasky wrote: > On Saturday 28 April 2007 15:41, Kevin Lo wrote: > > Valery V.Chikalov wrote: > > > The following reply was made to PR usb/107642; it has been noted by > > > GNATS. > > > > > > From: "Valery V.Chikalov" > > > To: bug-followup@FreeBSD.org, valera@chikalov.dp.ua > > > Cc: > > > Subject: Re: usb/107642: [patch]Ralink Technology RT2501USB/RT2601USB > > > chipset driver > > > Date: Sun, 22 Apr 2007 11:32:18 +0300 > > > > > > This is a multi-part message in MIME format. > > > --------------030900090303000507070905 > > > Content-Type: text/plain; charset=UTF-8 > > > Content-Transfer-Encoding: 7bit > > > > > > -----BEGIN PGP SIGNED MESSAGE----- > > > Hash: SHA1 > > > > > > if_rum(4) for 7.0-CURRENT > > > > > > replaced amrr_* functions by "standard" ones already existed in > > > net80211/ieee80211_amrr.c > > > > > > -----BEGIN PGP SIGNATURE----- > > > Version: GnuPG v1.4.5 (MingW32) > > > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > > > > > iD8DBQFGKx14760S3kDvEC4RAn8PAKCn990QJE0wZRKcwdxAZ61MY0JRgACeI2W5 > > > ZosSlh6pIqi7JdZ5Wi1BUYc= > > > =LvWZ > > > -----END PGP SIGNATURE----- > > > > Hi Valery, > > > > I guess you wasn't aware that I've already ported rum(4) to FreeBSD. > > The patch is available at: http://people.freebsd.org/~kevlo/patch-rum > > Maybe you can test my patch? Thanks. > > > > Kevin > > This driver supports the RT73 chipset, right? Yes. > I will import this into the new USB stack. Maybe you can test that at the same > time. I will post an e-mail when I am finished with the import. That'd be great, thanks a lot :-) > --HPS Kevin From owner-freebsd-usb@FreeBSD.ORG Mon Apr 30 07:10:24 2007 Return-Path: X-Original-To: freebsd-usb@FreeBSD.org Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F21F716A401; Mon, 30 Apr 2007 07:10:24 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from ns.kevlo.org (kevlo.org [220.128.136.52]) by mx1.freebsd.org (Postfix) with ESMTP id 7BC0013C458; Mon, 30 Apr 2007 07:10:24 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from [127.0.0.1] (kevlo.org [220.128.136.52]) by ns.kevlo.org (8.13.8/8.13.8) with ESMTP id l3U7Brw6004905; Mon, 30 Apr 2007 15:11:55 +0800 (CST) (envelope-from kevlo@FreeBSD.org) From: Kevin Lo To: "Valery V.Chikalov" In-Reply-To: <4634AA65.5060101@chikalov.dp.ua> References: <200704272330.l3RNU94X078095@freefall.freebsd.org> <1177767702.5804.7.camel@monet> <46349750.7060206@chikalov.dp.ua> <200704291550.10968.hselasky@c2i.net> <4634AA65.5060101@chikalov.dp.ua> Content-Type: text/plain Date: Mon, 30 Apr 2007 15:13:08 +0800 Message-Id: <1177917188.11361.34.camel@monet> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit Cc: Hans Petter Selasky , freebsd-usb@FreeBSD.org Subject: Re: usb/107642: [patch]Ralink Technology RT2501USB/RT2601USB chipset driver X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2007 07:10:25 -0000 Valery V.Chikalov wrote: > Hans Petter Selasky wrote: > > On Sunday 29 April 2007 15:02, Valery V.Chikalov wrote: > >> Kevin Lo wrote: > >>> Valery V.Chikalov wrote: > >>>> The following reply was made to PR usb/107642; it has been noted by > >>>> GNATS. > >>>> > >>>> From: "Valery V.Chikalov" > >>>> To: bug-followup@FreeBSD.org, valera@chikalov.dp.ua > >>>> Cc: > >>>> Subject: Re: usb/107642: [patch]Ralink Technology RT2501USB/RT2601USB > >>>> chipset driver > >>>> Date: Sun, 22 Apr 2007 11:32:18 +0300 > >>>> > >>>> This is a multi-part message in MIME format. > >>>> --------------030900090303000507070905 > >>>> Content-Type: text/plain; charset=UTF-8 > >>>> Content-Transfer-Encoding: 7bit > >>>> > >>>> -----BEGIN PGP SIGNED MESSAGE----- > >>>> Hash: SHA1 > >>>> > >>>> if_rum(4) for 7.0-CURRENT > >>>> > >>>> replaced amrr_* functions by "standard" ones already existed in > >>>> net80211/ieee80211_amrr.c > >>>> > >>>> -----BEGIN PGP SIGNATURE----- > >>>> Version: GnuPG v1.4.5 (MingW32) > >>>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > >>>> > >>>> iD8DBQFGKx14760S3kDvEC4RAn8PAKCn990QJE0wZRKcwdxAZ61MY0JRgACeI2W5 > >>>> ZosSlh6pIqi7JdZ5Wi1BUYc= > >>>> =LvWZ > >>>> -----END PGP SIGNATURE----- > >>> Hi Valery, > >>> > >>> I guess you wasn't aware that I've already ported rum(4) to FreeBSD. > >>> The patch is available at: http://people.freebsd.org/~kevlo/patch-rum > >>> Maybe you can test my patch? Thanks. > >>> > >>> Kevin > >> Hi, Kevin, > >> > >> Your driver not working for me. Fortunately, the errors that I see > >> exactly the same which i fight when I made my driver. > >> > >> $ uname -a > >> FreeBSD tiger.novakom.dp.ua 7.0-CURRENT FreeBSD 7.0-CURRENT #6: Sun Apr > >> 29 13:58:48 EEST 2007 > >> root@tiger.novakom.dp.ua:/usr/obj/usr/src/sys/TIGER64 amd64 > >> > >> $ sysctl kern.osreldate > >> kern.osreldate: 700037 > >> > >> cvsup'ed 29.04.2007 > >> > >> kernel with: > >> > >> makeoptions DEBUG=-g > >> > >> options KDB > >> > >> options DDB > >> > >> > >> > >> options INVARIANTS > >> > >> options INVARIANT_SUPPORT > >> > >> options WITNESS > >> > >> At first, when I make kldload if_rum, I get kernel panic. > >> But I cant get saved core, as ddb just hangs during "call doadump" > >> > > > > I have a solution for all of this locking stuff! > > > >> So I add > >> > >> #define RUM_LOCK(sc) do { ((sc) = (sc)); mtx_lock(&Giant); } while > >> (0) > >> #define RUM_UNLOCK(sc) mtx_unlock(&Giant) > >> > >> in if_rumvar.h > >> > >> I spend a lot of time in attempts get rid of Giant ant always got only > >> panics. > > > > You _cannot_ do that with the old USB stack, because you must lock Giant > > before calling into the usbxxx functions. Then in the USB callback, Giant is > > locked, and then you cannot lock RUM_LOCK()! That means you will most likely > > end up with a deadlock pretty soon, if you see that. > > > > Thanks, for explanations. I suspected that thing are like that, and I > have tried make porting by analogue with other drivers which I can find > in dev/usb, but I was not can find the description of doing "right way" > locking before. Firstly, thanks for taking the time to test my patch. I think your issue is related to watchdog timers. The revised patch is at http://people.freebsd.org/~kevlo/patch-rum Besides, I don't get a panic during high load when getting a file about 400MB via ftp. > >> After that I get hangs, > >> which i resolved by modifying rum_ioctl: > > > > I'm almost finished converting "if_rum.c()" to the new USB stack. > > > > In some hours I will update it with support for "if_rum". > > > > If you can test that and forget about the old USB stack, I will be very > > happy :-) > > > > I will do it with pleasure. I was almost ready to do it (converting to > new USB stack) by myself, but I was stopped by the fact that I cant make > it compiled under CURRENT. I have seen your mail that your are working > on this. Is new the USB stack ready for CURRENT now? > > Valery. > > > --HPS > > > > http://www.turbocat.net/~hselasky/usb4bsd Kevin From owner-freebsd-usb@FreeBSD.ORG Mon Apr 30 11:08:33 2007 Return-Path: X-Original-To: freebsd-usb@FreeBSD.org Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7DEBA16A403 for ; Mon, 30 Apr 2007 11:08:33 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 66EA213C4AE for ; Mon, 30 Apr 2007 11:08:33 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l3UB8XJT007108 for ; Mon, 30 Apr 2007 11:08:33 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l3UB8VVh007104 for freebsd-usb@FreeBSD.org; Mon, 30 Apr 2007 11:08:31 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 30 Apr 2007 11:08:31 GMT Message-Id: <200704301108.l3UB8VVh007104@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: linimon set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-usb@FreeBSD.org Cc: Subject: Current problem reports assigned to you X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2007 11:08:33 -0000 Current FreeBSD problem reports Critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o usb/84750 usb [hang] 6-BETA2 reboot/shutdown with root_fs on externa o usb/91629 usb usbd_abort_pipe() may result in infinite loop 2 problems total. Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o usb/40792 usb signals lead to data loss on device ugen o usb/46176 usb [panic] umass causes kernel panic if device removed be o i386/46371 usb USB controller cannot be initialized on IBM Netfinity f usb/55555 usb [ums] system freezes with access to /dev/ums0 o bin/57255 usb usbd and multi-function devices o usb/62088 usb [usb] Logitech Cordless/Optical Mouse not working o usb/62309 usb [ugen] [panic] panic: ugen(4) driver o usb/63621 usb [usb] USB MemoryStick Reader stalls/crashes system o usb/69006 usb [patch] Apple Cinema Display hangs USB ports o usb/71155 usb [usb] misbehaving usb-printer hangs processes, causes o usb/73307 usb [panic] Kernel panics on USB disconnect o usb/74771 usb [umass] mounting write-protected umass device as read/ o usb/75705 usb [panic] da0 attach / Optio S4 (with backtrace) o usb/75797 usb 5.3-STABLE(2005 1/4) detect USB headset, But can not f f usb/76204 usb panic while using usb attached modem o usb/76395 usb USB printer does not work, usbdevs says "addr 0 should o usb/77184 usb kernel panic on USB device disconnect o usb/77294 usb ucom + ulpcom panic o usb/77940 usb [quirk] [patch] insertion of usb keyboard panics syste f i386/78218 usb [kue] kue not detected on Sony PCG-F370 VAIO o usb/78989 usb please add USB keyboard support to install CD's o usb/79140 usb WD Firewire/USB Combo hangs under load on USB interfac o usb/79269 usb USB ohci da0 plug/unplug causes crashes and lockups. o usb/79287 usb UHCI hang after interrupt transfer o usb/79524 usb printing to Minolta PagePro 1[23]xxW via USB fails wit f usb/79656 usb [usb] RHSC interrupts lost o usb/79722 usb [usb] wrong alignments in ehci.h o usb/80040 usb [hang] Use of sound mixer causes system freeze with ua f usb/80260 usb Travan USB tape drive fails to write o usb/80361 usb mounting of usb-stick fails o usb/80373 usb usb keyboard does not respond o usb/80829 usb possible panic when loading USB-modules o usb/80862 usb [patch] USB locking issues: missing some Giant calls o usb/81308 usb [ugen] [patch] polling a ugen(4) control endpoint caus f usb/82198 usb Panic on attaching of ONKI N-338 USB MP3 player f usb/82272 usb Can not recognize Casio camera EX-Z40 as a umass devic o usb/82350 usb [usb] null pointer dereference in USB stack o usb/82520 usb Reboot when USL101 connected o usb/82569 usb [usb] USB mass storage plug/unplug causes system panic o usb/82660 usb EHCI: I/O stuck in state 'physrd'/panic o usb/83504 usb [usb] SpeedTouch USB stop working on recent current (a o usb/83563 usb [panic] Page Fault while detaching Mpman Usb device o usb/83677 usb [usb] usb controller often not detected (Sun W2100z) o usb/83756 usb Microsoft Intellimouse Explorer 4.0A doesn't work. o usb/83977 usb [ucom] [panic] ucom1: open bulk out error (addr 2): IN o usb/84326 usb [umass] Panic trying to connect SCSI tape drive via US o usb/84336 usb [usb] [reboot] instant system reboot when unmounting a o usb/84936 usb install - usb keyboard not recognized o usb/86031 usb need support usb nic rt2500 in my 5.4 STABLE o usb/86767 usb [usb] bogus "slice starts beyond end of the disk:..." o usb/87099 usb panic: ohci_add_done: addr 0x000d1bf0 not found o usb/88743 usb [hang] USB makes kernel hang at boot (regression in 6. o usb/88966 usb kldunload ucom.ko returns "Device busy" error. o usb/89003 usb LaCie Firewire drive not properly supported under 6.0 o usb/89954 usb [usb] USB Disk driver race condition? f usb/89997 usb [umass] [panic] panic on iPod mini detach o usb/90162 usb [usb] [patch] Add support for the MS Wireless USB Mous o usb/90700 usb Kernel panic on connect/mount/use umass device o usb/91238 usb USB tape unit fails to write a second tape file to the o usb/91263 usb [patch] USB quirk needed for Logitec USB Hard disk LHD o usb/91283 usb booting very slow with usb devices connection (regress o usb/91538 usb Unable to print to EPSON CX3500 o usb/91906 usb FreeBSD hangs while booting with USB legacy support on o usb/92052 usb usbd causes defunct process with busy file-handle o kern/92083 usb [ural] [panic] panic using WPA on ural NIC in 6.0-RELE o usb/92142 usb SET_ADDR_FAILED and SHORT_XFER errors from usb drivers o usb/92171 usb [panic] panic unplugging Vodafone Mobile Connect (UMTS o usb/93155 usb [ulpt] /dev/ulpt0: device busy, USB printer does not w o usb/93408 usb hw.acpi.cpu.cx_lowest=C3 on AMD Turion causes choppy m f usb/93496 usb USB2.0 umass stalls on VIA o usb/93640 usb device ehci causes interrupt storm on this MSI amd64 m o usb/93828 usb ohci causes panic on boot (HP Pavillion d4100e) o usb/94166 usb btx halted with a flashcard plugged o usb/94384 usb kernel panic with usb2 hardware o usb/94717 usb [ulpt] Reading from /dev/ulpt can break work of a UHCI o usb/94742 usb [umass] [patch] umass driver does not recognise YANO e o usb/94813 usb mounting write-protected umass device freezes computer o usb/94897 usb Kernel Panic when cleanly unmounting USB disk o usb/95131 usb Boot/setup process does not accept key strokes o usb/95348 usb USB keyboard unplug causes noise on screen o usb/95562 usb Write Stress in USB Mass drive cause: [vinvalbuf: dir o usb/95636 usb [boot] 5 minute delay at boot when using VT6205 based o usb/96120 usb USB mouse not always detected o usb/96224 usb [usb] mount_msdosfs cause page fault in syncer process o usb/96457 usb fatback on umass = reboot o usb/97286 usb MS Wireless Intellimouse Explorer 2.0 doesn't work o usb/99431 usb FreeBSD on MSI 6566E (Intel 845E motherboards) doesn't o usb/101096 usb [if_ural] USB WLAN occasionally causes kernel-panics d o usb/101752 usb [panic] 6.1-RELEASE kernel panic on usb device inserti o usb/102066 usb [ukbd] usb keyboard and multimedia keys don't work o usb/102096 usb /usr/sbin/usbd does not handle multiple devices in one o usb/103025 usb [usb] wrong detection of USB device for FreeBSD 6.1 an o usb/104292 usb system lockup on forced umount of usb-storage device o usb/104830 usb system crashes when copying data to umass devices o usb/105186 usb USB 2.0/ehci on FreeBSD 6.2-PRE/AMD64 crashes box o usb/106615 usb [uftdi] uftdi module does not automatically load with o usb/106648 usb [hang] USB Floppy on D1950 10 min Hang on Insert w/o F o usb/106832 usb USB HP printer is not detected by kernel when ACPI ena o usb/107101 usb [umass] [patch] Quirk for Denver MP3 player o usb/107116 usb [usb] panic while accessing usb msdos pccard o usb/107128 usb [usb] panic while accessing usb msdos flashkey o usb/107248 usb [PATCH] scsi_da.c quirk for Cowon iAUDIO X5 MP3 player o usb/107446 usb [umass] umass problems (usb and fw disks) o usb/107827 usb [panic] ohci_add_done addr not found o usb/107848 usb problem with samsung flash o usb/107924 usb [patch] usbd(8) does not call detach o usb/108097 usb [usbgen] [patch] ADMtek 851X USB-to-LAN adapter o usb/108513 usb [umass] Creative MuVo TX FM fails in 6.2-RELEASE (regr o usb/109274 usb [usb] MCP55 USB Controller fails to attach in AMD64 Cu o usb/109397 usb [panic] on boot from USB flash o usb/110122 usb [ugen] [patch] usb_interrupt_read does not respect tim o usb/110856 usb [ugen] [patch] interrupt in msgs are truncated when bu o usb/110988 usb [umass] [patch] Handling of quirk IGNORE_RESIDUE is um o kern/111753 usb [uhid] Replicable system panic involving UHID driver 114 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o conf/30929 usb [usb] [patch] use usbd to initialize USB ADSL modem s usb/32653 usb Added patches to improve USB scanner supportOB o usb/40948 usb [usb] USB HP CDW8200 does not work f usb/41415 usb [usb] [patch] Some USB scanners cannot talk to uscanne o usb/48342 usb [PATCH] usbd dynamic device list. o kern/51958 usb [usb] [patch] update for urio driver o kern/52026 usb [usb] feature request: umass driver support for InSyst o usb/53025 usb [ugen] [patch] ugen does not allow O_NONBLOCK for inte o usb/56095 usb [usb] [patch] QUIRK: Apacer Pen Drive fails to work o kern/59698 usb [kbd] [patch] Rework of ukbd HID to AT code translatio f usb/60248 usb [patch] Problem with USB printer HP LaserJet 1300 o usb/61234 usb [usb] [patch] usbhidaction(1) doesn't support using an o usb/63837 usb [uhid] [patch] USB: hid_is_collection() only looks for o kern/65769 usb [usb] Call to tcflush(x, TCIFLUSH) stops input on usb- o kern/66547 usb [usb] Palm Tungsten T USB does not initialize correctl o usb/68232 usb [ugen] [patch] ugen(4) isochronous handling correction o usb/68412 usb [usb] [patch] QUIRK: Philips KEY013 USB MP3 player o usb/70523 usb [usb] [patch] umct sending/receiving wrong characters o usb/70942 usb [usb] Genius Wireless USB mouse: moused doesn't work c o usb/71416 usb [usb] Cryptoflex e-gate USB token (ugen0) detach is no o usb/71417 usb [usb] Cryptoflex e-gate USB token (ugen0) communicatio o usb/71455 usb [usb] Slow USB umass performance of 5.3 o usb/71605 usb [umass] [patch] umass doesn't recognize multiple slots o usb/72380 usb [usb] USB does not work [dual Celeron Abit] o usb/72732 usb [patch] Kyocera 7135 quirk. o usb/72733 usb Kyocera 7135 Palm OS connection problem. o usb/73056 usb [usb] Sun Microsystems Type 6 USB mouse not working in o usb/74211 usb USB flash drive causes CAM status 0x4 on 4.10Release f usb/74358 usb [umass] unplugging at boot time an umass device crashe o usb/74453 usb Q-lity CD-RW USB ECW-043 (ScanLogic SL11R chipset) doe o usb/74557 usb imation 500mb usb key can only be written halfway on f o usb/74609 usb [umodem] [patch] allowing cdma modems to work at full o usb/74849 usb [usbdevs] [patch] Samsung SPH-i500 does not attach pro o usb/74880 usb [usb] [patch] Samsung N400 cellphone/acm fails to atac o kern/75764 usb [umass] [patch] "umass0: Phase Error" - no device for o usb/75800 usb ucom1: init failed STALLED error in time of sync with o usb/75928 usb Cytronix SmartMedia card (SMC) reader has problems whe o usb/76461 usb [umass] disklabel of umass(4)-CAM(4)-da(4) not used by o usb/76732 usb Mouse problems with USB KVM Switch f usb/78371 usb Philips Wearable Audio Player (128) fails to attach f usb/78984 usb Creative MUVO umass failure o usb/79723 usb [usb] prepare for high speed isochronous transfers o usb/79725 usb [usb] [patch] USB device speed is not double-checked o usb/79893 usb [umass] [patch] new usbdevs/umass quirks derived from o usb/80010 usb [aue] [patch] add support for the AEI USB to LAN adapt f usb/80773 usb "usbd_get_string()" could have taken a length paramete o usb/80774 usb have "usbd_find_desc" in line with the other "usbd_fin o usb/80776 usb [udav] UDAV device driver shouldn't use usb_add_task o usb/80777 usb usb_rem_task() should wait for callback to complete? o usb/80854 usb suggestion for new iface-no-probe mechanism o usb/80935 usb uvisor.c is not work with CLIE TH55. o usb/81191 usb Support for Curitel HX-550C USB modem to 5.4 RELEASE. f usb/81621 usb external hd hangs under load on ehci o usb/82436 usb [usbdevs] [patch] USL101 Host-to-Host bridge support o o usb/83022 usb ALI USB 2.0 EHCI Controller is not detected o usb/83863 usb Communication problem between opensc/openct via USB wi o usb/85067 usb Cannot attach ScanJet 4300C to usb device o usb/85992 usb [uhid] [patch] USB stops working when trying to read f o usb/86195 usb [usbdevs] [patch] allow USB Ethernet Adaptor "ELECOM L o usb/86298 usb Known good USB mouse won't work with correct settings o usb/86438 usb Fix for non-working iPod over USB is in NetBSD CVS o usb/87224 usb Cannot mount USB Zip750 o usb/87648 usb [mouse] Logitech USB-optical mouse problem. o usb/88408 usb [axe] axe0 read PHY failed o usb/88939 usb [usbdevs] [patch] Fix cheapy Myson USB-IDE adapter f usb/89087 usb usb external harddrive hangs with BBB reset failed, TI f usb/91191 usb HP LaserJet 1020 (USB printer) not recognized f usb/91516 usb [umass] umass0 problems, with Freecom Classic SL Hard o usb/91546 usb [umodem] [patch] Nokia 6630 mobile phone does not work o usb/91811 usb Compact Flash in HP Photosmart 2610 return " Medium n o usb/91896 usb Serial Number of USB Memory Sticks is not passed throu o usb/92306 usb [quirk] [patch] Support for iRiver U10 USB media playe o usb/92403 usb [uplcom] uplcom.c needs new entry for 4.00 revision of o usb/92852 usb Vertical scroll not working properly on A4Tech WOP-49 o usb/93389 usb Digital Camera Pentax S60 don't work o usb/93872 usb [patch] SCSI quirk required for ELTA 8061 OL USB memor o usb/94132 usb [patch] quirk for CENTURY EX35QUAT disk enclosure o usb/94148 usb [usbdevs] [patch] Make if_cdce work with ARM linux han o usb/94311 usb [ugen][PATCH] allow interrupt IN transactions to be af o usb/94439 usb [patch] Add support for JNC MP3 Player o usb/94946 usb [uhub] [patch] code dynamic status size for status cha o usb/95037 usb USB disk didnt recognized on hot-plug. o usb/95173 usb [usb] cannot mount external usb harddisk VIA Technolog o usb/95241 usb [patch] add USB ID for OEM Pharos 360 GPS o usb/95803 usb [patch] Add support for AnyData ADU-E100H o usb/95805 usb [patch] Add Support for Siemens ES75 modem o usb/96381 usb [patch] add a quirk table entry for a flash ram usb st p usb/96546 usb [usb] [patch] Add support (quirk) for EasyMP3 EM732X U o usb/96714 usb [usbdevs] [patch] Update uvisor to support the Fossil o usb/97175 usb USB cardreader hangs system o usb/97472 usb [patch] add support for Olympus C150,D390 o usb/98343 usb BBB reset failed errors with Creative Muvo MP3 player; o usb/99419 usb external usb harddrive slow to accept o usb/99538 usb [kbd] while using USB keyboard default params of atkbd o usb/100746 usb [kbd] system does not boot due to USB keyboard problem o usb/101757 usb [patch] uhid.4: correct structure field names to match o usb/101761 usb [patch] usb.h: increase maximal size of report descrip o usb/101775 usb [libusbhid] [patch] possible error in report descripto o usb/102678 usb [kbd] Dell PowerEdge DRAC5 USB Keyboard does not work o usb/102976 usb Casio Exilim Digital Camera cause panic o usb/103046 usb [ulpt] [patch] ulpt event driven I/O with select(2) an o usb/103289 usb USB 2.0 problems on AMD LX-800 CPU and CS-5536 chipset o usb/103418 usb [usb] [patch] usbhidctl: add ability to write output a o usb/103917 usb USB driver reports "Addr 0 should never happen" o usb/104290 usb [patch] quirk: TOSHIBA DVD-RAM drive (libretto DVD Doc o usb/104352 usb [ural] ural driver doesnt work o usb/104645 usb Rave C-201 MP3 player does not communicate o usb/105065 usb [sata] SATA - USB Bridge o usb/105361 usb [panic] Kernel panic during unmounting mass storage (C o usb/105518 usb [patch] epson perfection 3490 usb scanner def o usb/106041 usb FreeBSD does not recognise Mustek BearPaw 2400TA usb s o usb/106070 usb devd recognizes ucom, but ttyU is the device actually o usb/106462 usb [usbdevs] Motorola U6 PEBL not recognized by system vi o usb/106538 usb [patch] Can not burn DVD on Sony DRX-820UL external US o usb/106621 usb [usb] DLINK DUB-E100 support broken o usb/106861 usb [PATCH]: usbdevs update: Add product ACER Zeevo BT-500 o usb/107243 usb [patch] Apacer USB Flash Drive quirk o usb/107388 usb [PATCH] Add utoppy device from NetBSD o usb/107496 usb USB device problem on RELENG_6_2 (SHORT_XFER) (regress o usb/107526 usb [usbdevs] Patch to support the Crystalfontz CFA-635 20 o usb/107642 usb [patch] add Ralink Technology RT2501USB/RT2601USB chip o kern/107665 usb [usb] [patch] uscanner support for epson stylus DX5050 o usb/107701 usb usbd ignores "detach" o usb/107935 usb [uplcom] panic while accessing /dev/cuaU0 o usb/108056 usb [ohci] Mouse gets powered off during device probe when o usb/108344 usb [panic] kernel with atausb panics when unplugging USB o usb/108427 usb [patch] quirk: Samsung MP0402H o usb/108509 usb [hang] FreeBSD hang at startup after ehci0 detected (C o usb/108810 usb [patch] quirk for I/O Magic USB flash drive "Giga Bank o usb/110197 usb [umass] Sony PSP umass device does not detach from EHC o usb/110477 usb [usbdevs] [patch] add Benq 3300U/4300U support to Free o usb/110681 usb [ukbd][patch] multiple keys will be repeated o usb/110991 usb [patch] QUIRK: Super Top IDE DEVICE (depends on usb/11 o usb/110992 usb [uftdi] [patch] Add Tactrix Openport support in uftdi o usb/111710 usb [patch] [usb] add support for Option GlobeTrotter 3G+ o usb/112161 usb [usbdevs] [patch] Option N.V. Fusion UMTS Quad-GPRS 136 problems total. From owner-freebsd-usb@FreeBSD.ORG Mon Apr 30 12:35:04 2007 Return-Path: X-Original-To: freebsd-usb@FreeBSD.org Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 45E6C16A406; Mon, 30 Apr 2007 12:35:04 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from halik.com.ua (halik.com.ua [193.178.146.121]) by mx1.freebsd.org (Postfix) with ESMTP id C00EE13C483; Mon, 30 Apr 2007 12:35:03 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from [127.0.0.1] (unknown [213.227.219.58]) by halik.com.ua (Postfix) with ESMTP id 1A31C5C06D; Mon, 30 Apr 2007 15:35:01 +0300 (EEST) Message-ID: <4635E26F.9090801@chikalov.dp.ua> Date: Mon, 30 Apr 2007 15:34:55 +0300 From: "Valery V.Chikalov" User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: Kevin Lo References: <200704272330.l3RNU94X078095@freefall.freebsd.org> <1177767702.5804.7.camel@monet> <46349750.7060206@chikalov.dp.ua> <200704291550.10968.hselasky@c2i.net> <4634AA65.5060101@chikalov.dp.ua> <1177917188.11361.34.camel@monet> In-Reply-To: <1177917188.11361.34.camel@monet> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 8bit X-Antivirus: avast! (VPS 000737-1, 30.04.2007), Outbound message X-Antivirus-Status: Clean Cc: Hans Petter Selasky , freebsd-usb@FreeBSD.org Subject: Re: usb/107642: [patch]Ralink Technology RT2501USB/RT2601USB chipset driver X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2007 12:35:04 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Kevin Lo ïèøåò: > Valery V.Chikalov wrote: >> Hans Petter Selasky wrote: >>> On Sunday 29 April 2007 15:02, Valery V.Chikalov wrote: >>>> Kevin Lo wrote: >>>>> Valery V.Chikalov wrote: >>>>>> The following reply was made to PR usb/107642; it has been noted by >>>>>> GNATS. >>>>>> >>>>>> From: "Valery V.Chikalov" >>>>>> To: bug-followup@FreeBSD.org, valera@chikalov.dp.ua >>>>>> Cc: >>>>>> Subject: Re: usb/107642: [patch]Ralink Technology RT2501USB/RT2601USB >>>>>> chipset driver >>>>>> Date: Sun, 22 Apr 2007 11:32:18 +0300 >>>>>> >>>>>> This is a multi-part message in MIME format. >>>>>> --------------030900090303000507070905 >>>>>> Content-Type: text/plain; charset=UTF-8 >>>>>> Content-Transfer-Encoding: 7bit >>>>>> > if_rum(4) for 7.0-CURRENT > > replaced amrr_* functions by "standard" ones already existed in > net80211/ieee80211_amrr.c > >>>>> Hi Valery, >>>>> >>>>> I guess you wasn't aware that I've already ported rum(4) to FreeBSD. >>>>> The patch is available at: http://people.freebsd.org/~kevlo/patch-rum >>>>> Maybe you can test my patch? Thanks. >>>>> >>>>> Kevin >>>> Hi, Kevin, >>>> >>>> Your driver not working for me. Fortunately, the errors that I see >>>> exactly the same which i fight when I made my driver. >>>> >>>> $ uname -a >>>> FreeBSD tiger.novakom.dp.ua 7.0-CURRENT FreeBSD 7.0-CURRENT #6: Sun Apr >>>> 29 13:58:48 EEST 2007 >>>> root@tiger.novakom.dp.ua:/usr/obj/usr/src/sys/TIGER64 amd64 >>>> >>>> $ sysctl kern.osreldate >>>> kern.osreldate: 700037 >>>> >>>> cvsup'ed 29.04.2007 >>>> >>>> kernel with: >>>> >>>> makeoptions DEBUG=-g >>>> >>>> options KDB >>>> >>>> options DDB >>>> >>>> >>>> >>>> options INVARIANTS >>>> >>>> options INVARIANT_SUPPORT >>>> >>>> options WITNESS >>>> >>>> At first, when I make kldload if_rum, I get kernel panic. >>>> But I cant get saved core, as ddb just hangs during "call doadump" >>>> >>> I have a solution for all of this locking stuff! >>> >>>> So I add >>>> >>>> #define RUM_LOCK(sc) do { ((sc) = (sc)); mtx_lock(&Giant); } while >>>> (0) >>>> #define RUM_UNLOCK(sc) mtx_unlock(&Giant) >>>> >>>> in if_rumvar.h >>>> >>>> I spend a lot of time in attempts get rid of Giant ant always got only >>>> panics. >>> You _cannot_ do that with the old USB stack, because you must lock Giant >>> before calling into the usbxxx functions. Then in the USB callback, Giant is >>> locked, and then you cannot lock RUM_LOCK()! That means you will most likely >>> end up with a deadlock pretty soon, if you see that. >>> >> Thanks, for explanations. I suspected that thing are like that, and I >> have tried make porting by analogue with other drivers which I can find >> in dev/usb, but I was not can find the description of doing "right way" >> locking before. > Firstly, thanks for taking the time to test my patch. > I think your issue is related to watchdog timers. The revised patch is > at http://people.freebsd.org/~kevlo/patch-rum > Besides, I don't get a panic during high load when getting a file about > 400MB via ftp. Sorry, but the error that I see the same, just after inserting dongle, or if it was inserted before - after kldload if_rum: panic: sleeping without a lock the top of stack: at usbd_transfer +0x1fe .... rum_ioctl And I cant get saved kernel coredump at the end. I have not serial console configured so it was just subscribed by hand. Of course I can reproduce it again and subscribe what you will ask. I have SMP kernel and use AMD64 architecture, maybe this are the reasons why we are getting different results. Can you please, explain me in two words(or give a reference) why you are dropping mtx_lock(&Giant). Yes I have seen the same in if_ural.c and as i have wrote before unsuccessfully have tried repeat it in if_rum. I know that current USB stack is not Giant free, and Hans noted that this is impossible (if I understand him right). Maybe exists some tunable or kernel option or another trick that allows drivers working without the Giant under current USB stack, which I must use. Thank you for your time and patience. Sorry for my english. Valery. >>>> After that I get hangs, >>>> which i resolved by modifying rum_ioctl: >>> I'm almost finished converting "if_rum.c()" to the new USB stack. >>> >>> In some hours I will update it with support for "if_rum". >>> >>> If you can test that and forget about the old USB stack, I will be very >>> happy :-) >>> >> I will do it with pleasure. I was almost ready to do it (converting to >> new USB stack) by myself, but I was stopped by the fact that I cant make >> it compiled under CURRENT. I have seen your mail that your are working >> on this. Is new the USB stack ready for CURRENT now? >> >> Valery. >> >>> --HPS >>> >>> http://www.turbocat.net/~hselasky/usb4bsd > Kevin -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGNeJv760S3kDvEC4RAgrVAJ4m/iXooa1Yt2txMVz0LOwmC+vqAwCgicKb xPMZsEyzAodOccQSjq6KL0A= =JVix -----END PGP SIGNATURE----- From owner-freebsd-usb@FreeBSD.ORG Mon Apr 30 15:56:30 2007 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8E03A16A400; Mon, 30 Apr 2007 15:56:30 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from swip.net (mailfe11.swip.net [212.247.155.65]) by mx1.freebsd.org (Postfix) with ESMTP id CECC013C459; Mon, 30 Apr 2007 15:56:29 +0000 (UTC) (envelope-from hselasky@freebsd.org) X-Cloudmark-Score: 0.000000 [] Received: from [193.71.38.142] (account mc467741@c2i.net HELO [10.42.11.147]) by mailfe11.swip.net (CommuniGate Pro SMTP 5.1.7) with ESMTPA id 308640080; Mon, 30 Apr 2007 17:56:05 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Mon, 30 Apr 2007 17:54:52 +0200 User-Agent: KMail/1.9.5 References: <200704272330.l3RNU94X078095@freefall.freebsd.org> <1177917188.11361.34.camel@monet> <4635E26F.9090801@chikalov.dp.ua> In-Reply-To: <4635E26F.9090801@chikalov.dp.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200704301754.53119.hselasky@freebsd.org> Cc: Kevin Lo Subject: Re: usb/107642: [patch]Ralink Technology RT2501USB/RT2601USB chipset driver X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2007 15:56:30 -0000 On Monday 30 April 2007 14:34, Valery V.Chikalov wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Kevin Lo =EF=E8=F8=E5=F2: > > Valery V.Chikalov wrote: > >> Hans Petter Selasky wrote: > >>> On Sunday 29 April 2007 15:02, Valery V.Chikalov wrote: > >>>> Kevin Lo wrote: > >>>>> Valery V.Chikalov wrote: > >>>>>> The following reply was made to PR usb/107642; it has been noted by > >>>>>> GNATS. > >>>>>> > >>>>>> From: "Valery V.Chikalov" > >>>>>> To: bug-followup@FreeBSD.org, valera@chikalov.dp.ua > >>>>>> Cc: > >>>>>> Subject: Re: usb/107642: [patch]Ralink Technology > >>>>>> RT2501USB/RT2601USB chipset driver > >>>>>> Date: Sun, 22 Apr 2007 11:32:18 +0300 > >>>>>> > >>>>>> This is a multi-part message in MIME format. > >>>>>> --------------030900090303000507070905 > >>>>>> Content-Type: text/plain; charset=3DUTF-8 > >>>>>> Content-Transfer-Encoding: 7bit > > > > if_rum(4) for 7.0-CURRENT > > > > replaced amrr_* functions by "standard" ones already existed in > > net80211/ieee80211_amrr.c > > > >>>>> Hi Valery, > >>>>> > >>>>> I guess you wasn't aware that I've already ported rum(4) to FreeBSD. > >>>>> The patch is available at: http://people.freebsd.org/~kevlo/patch-r= um > >>>>> Maybe you can test my patch? Thanks. > >>>>> > >>>>> Kevin > >>>> > >>>> Hi, Kevin, > >>>> > >>>> Your driver not working for me. Fortunately, the errors that I see > >>>> exactly the same which i fight when I made my driver. > >>>> > >>>> $ uname -a > >>>> FreeBSD tiger.novakom.dp.ua 7.0-CURRENT FreeBSD 7.0-CURRENT #6: Sun > >>>> Apr 29 13:58:48 EEST 2007 > >>>> root@tiger.novakom.dp.ua:/usr/obj/usr/src/sys/TIGER64 amd64 > >>>> > >>>> $ sysctl kern.osreldate > >>>> kern.osreldate: 700037 > >>>> > >>>> cvsup'ed 29.04.2007 > >>>> > >>>> kernel with: > >>>> > >>>> makeoptions DEBUG=3D-g > >>>> > >>>> options KDB > >>>> > >>>> options DDB > >>>> > >>>> > >>>> > >>>> options INVARIANTS > >>>> > >>>> options INVARIANT_SUPPORT > >>>> > >>>> options WITNESS > >>>> > >>>> At first, when I make kldload if_rum, I get kernel panic. > >>>> But I cant get saved core, as ddb just hangs during "call doadump" > >>> > >>> I have a solution for all of this locking stuff! > >>> > >>>> So I add > >>>> > >>>> #define RUM_LOCK(sc) do { ((sc) =3D (sc)); mtx_lock(&Giant); } wh= ile > >>>> (0) > >>>> #define RUM_UNLOCK(sc) mtx_unlock(&Giant) > >>>> > >>>> in if_rumvar.h > >>>> > >>>> I spend a lot of time in attempts get rid of Giant ant always got on= ly > >>>> panics. > >>> > >>> You _cannot_ do that with the old USB stack, because you must lock > >>> Giant before calling into the usbxxx functions. Then in the USB > >>> callback, Giant is locked, and then you cannot lock RUM_LOCK()! That > >>> means you will most likely end up with a deadlock pretty soon, if you > >>> see that. > >> > >> Thanks, for explanations. I suspected that thing are like that, and I > >> have tried make porting by analogue with other drivers which I can find > >> in dev/usb, but I was not can find the description of doing "right way" > >> locking before. > > > > Firstly, thanks for taking the time to test my patch. > > I think your issue is related to watchdog timers. The revised patch is > > at http://people.freebsd.org/~kevlo/patch-rum > > > > Besides, I don't get a panic during high load when getting a file about > > 400MB via ftp. > > Sorry, but the error that I see the same, just after inserting dongle, > or if it was inserted before - after kldload if_rum: > > panic: sleeping without a lock > > the top of stack: > at usbd_transfer +0x1fe > .... > rum_ioctl > > And I cant get saved kernel coredump at the end. > > I have not serial console configured so it was just subscribed by hand. > Of course I can reproduce it again and subscribe what you will ask. > > I have SMP kernel and use AMD64 architecture, maybe this are the reasons > why we are getting different results. > > Can you please, explain me in two words(or give a reference) why you are > dropping mtx_lock(&Giant). Yes I have seen the same in if_ural.c and as > i have wrote before unsuccessfully have tried repeat it in if_rum. I > know that current USB stack is not Giant free, and Hans noted that this > is impossible (if I understand him right). Maybe exists some tunable or > kernel option or another trick that allows drivers working without the > Giant under current USB stack, which I must use. > > Thank you for your time and patience. > Sorry for my english. > > Valery. > > >>>> After that I get hangs, > >>>> which i resolved by modifying rum_ioctl: > >>> > >>> I'm almost finished converting "if_rum.c()" to the new USB stack. > >>> > >>> In some hours I will update it with support for "if_rum". > >>> > >>> If you can test that and forget about the old USB stack, I will be ve= ry > >>> happy :-) > >> > >> I will do it with pleasure. I was almost ready to do it (converting to > >> new USB stack) by myself, but I was stopped by the fact that I cant ma= ke > >> it compiled under CURRENT. I have seen your mail that your are working > >> on this. Is new the USB stack ready for CURRENT now? > >> > >> Valery. > >> > >>> --HPS > >>> > >>> http://www.turbocat.net/~hselasky/usb4bsd > > > > Kevin Hi, I have just imported "if_rum.c" to SVN and my P4 tree. Just do a SVN update. Build a new USB package install that. cp -r i4b/trunk/i4b/src/sys/modules/rum /usr/src/sys/modules/rum make -C /usr/src/sys/modules/rum all install Hope it works. =2D-HPS http://www.turbocat.net/~hselasky/usb4bsd From owner-freebsd-usb@FreeBSD.ORG Mon Apr 30 16:42:03 2007 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F203116A401; Mon, 30 Apr 2007 16:42:02 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from halik.com.ua (halik.com.ua [193.178.146.121]) by mx1.freebsd.org (Postfix) with ESMTP id 4826213C4B7; Mon, 30 Apr 2007 16:42:02 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from [192.168.1.103] (unknown [213.227.219.58]) by halik.com.ua (Postfix) with ESMTP id 569BA5C06D; Mon, 30 Apr 2007 19:42:00 +0300 (EEST) Message-ID: <46361C50.6020502@chikalov.dp.ua> Date: Mon, 30 Apr 2007 19:41:52 +0300 From: "Valery V.Chikalov" User-Agent: Thunderbird 1.5.0.9 (X11/20070315) MIME-Version: 1.0 To: Hans Petter Selasky References: <200704272330.l3RNU94X078095@freefall.freebsd.org> <1177917188.11361.34.camel@monet> <4635E26F.9090801@chikalov.dp.ua> <200704301754.53119.hselasky@freebsd.org> In-Reply-To: <200704301754.53119.hselasky@freebsd.org> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 8bit Cc: Kevin Lo , freebsd-usb@freebsd.org Subject: Re: usb/107642: [patch]Ralink Technology RT2501USB/RT2601USB chipset driver X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2007 16:42:03 -0000 Hans Petter Selasky wrote: > On Monday 30 April 2007 14:34, Valery V.Chikalov wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Kevin Lo ïèøåò: >>> Valery V.Chikalov wrote: >>>> Hans Petter Selasky wrote: >>>>> On Sunday 29 April 2007 15:02, Valery V.Chikalov wrote: >>>>>> Kevin Lo wrote: >>>>>>> Valery V.Chikalov wrote: >>>>>>>> The following reply was made to PR usb/107642; it has been noted by >>>>>>>> GNATS. >>>>>>>> >>>>>>>> From: "Valery V.Chikalov" >>>>>>>> To: bug-followup@FreeBSD.org, valera@chikalov.dp.ua >>>>>>>> Cc: >>>>>>>> Subject: Re: usb/107642: [patch]Ralink Technology >>>>>>>> RT2501USB/RT2601USB chipset driver >>>>>>>> Date: Sun, 22 Apr 2007 11:32:18 +0300 >>>>>>>> >>>>>>>> This is a multi-part message in MIME format. >>>>>>>> --------------030900090303000507070905 >>>>>>>> Content-Type: text/plain; charset=UTF-8 >>>>>>>> Content-Transfer-Encoding: 7bit >>> if_rum(4) for 7.0-CURRENT >>> >>> replaced amrr_* functions by "standard" ones already existed in >>> net80211/ieee80211_amrr.c >>> >>>>>>> Hi Valery, >>>>>>> >>>>>>> I guess you wasn't aware that I've already ported rum(4) to FreeBSD. >>>>>>> The patch is available at: http://people.freebsd.org/~kevlo/patch-rum >>>>>>> Maybe you can test my patch? Thanks. >>>>>>> >>>>>>> Kevin >>>>>> Hi, Kevin, >>>>>> >>>>>> Your driver not working for me. Fortunately, the errors that I see >>>>>> exactly the same which i fight when I made my driver. >>>>>> >>>>>> $ uname -a >>>>>> FreeBSD tiger.novakom.dp.ua 7.0-CURRENT FreeBSD 7.0-CURRENT #6: Sun >>>>>> Apr 29 13:58:48 EEST 2007 >>>>>> root@tiger.novakom.dp.ua:/usr/obj/usr/src/sys/TIGER64 amd64 >>>>>> >>>>>> $ sysctl kern.osreldate >>>>>> kern.osreldate: 700037 >>>>>> >>>>>> cvsup'ed 29.04.2007 >>>>>> >>>>>> kernel with: >>>>>> >>>>>> makeoptions DEBUG=-g >>>>>> >>>>>> options KDB >>>>>> >>>>>> options DDB >>>>>> >>>>>> >>>>>> >>>>>> options INVARIANTS >>>>>> >>>>>> options INVARIANT_SUPPORT >>>>>> >>>>>> options WITNESS >>>>>> >>>>>> At first, when I make kldload if_rum, I get kernel panic. >>>>>> But I cant get saved core, as ddb just hangs during "call doadump" >>>>> I have a solution for all of this locking stuff! >>>>> >>>>>> So I add >>>>>> >>>>>> #define RUM_LOCK(sc) do { ((sc) = (sc)); mtx_lock(&Giant); } while >>>>>> (0) >>>>>> #define RUM_UNLOCK(sc) mtx_unlock(&Giant) >>>>>> >>>>>> in if_rumvar.h >>>>>> >>>>>> I spend a lot of time in attempts get rid of Giant ant always got only >>>>>> panics. >>>>> You _cannot_ do that with the old USB stack, because you must lock >>>>> Giant before calling into the usbxxx functions. Then in the USB >>>>> callback, Giant is locked, and then you cannot lock RUM_LOCK()! That >>>>> means you will most likely end up with a deadlock pretty soon, if you >>>>> see that. >>>> Thanks, for explanations. I suspected that thing are like that, and I >>>> have tried make porting by analogue with other drivers which I can find >>>> in dev/usb, but I was not can find the description of doing "right way" >>>> locking before. >>> Firstly, thanks for taking the time to test my patch. >>> I think your issue is related to watchdog timers. The revised patch is >>> at http://people.freebsd.org/~kevlo/patch-rum >>> >>> Besides, I don't get a panic during high load when getting a file about >>> 400MB via ftp. >> Sorry, but the error that I see the same, just after inserting dongle, >> or if it was inserted before - after kldload if_rum: >> >> panic: sleeping without a lock >> >> the top of stack: >> at usbd_transfer +0x1fe >> .... >> rum_ioctl >> >> And I cant get saved kernel coredump at the end. >> >> I have not serial console configured so it was just subscribed by hand. >> Of course I can reproduce it again and subscribe what you will ask. >> >> I have SMP kernel and use AMD64 architecture, maybe this are the reasons >> why we are getting different results. >> >> Can you please, explain me in two words(or give a reference) why you are >> dropping mtx_lock(&Giant). Yes I have seen the same in if_ural.c and as >> i have wrote before unsuccessfully have tried repeat it in if_rum. I >> know that current USB stack is not Giant free, and Hans noted that this >> is impossible (if I understand him right). Maybe exists some tunable or >> kernel option or another trick that allows drivers working without the >> Giant under current USB stack, which I must use. >> >> Thank you for your time and patience. >> Sorry for my english. >> >> Valery. >> >>>>>> After that I get hangs, >>>>>> which i resolved by modifying rum_ioctl: >>>>> I'm almost finished converting "if_rum.c()" to the new USB stack. >>>>> >>>>> In some hours I will update it with support for "if_rum". >>>>> >>>>> If you can test that and forget about the old USB stack, I will be very >>>>> happy :-) >>>> I will do it with pleasure. I was almost ready to do it (converting to >>>> new USB stack) by myself, but I was stopped by the fact that I cant make >>>> it compiled under CURRENT. I have seen your mail that your are working >>>> on this. Is new the USB stack ready for CURRENT now? >>>> >>>> Valery. >>>> >>>>> --HPS >>>>> >>>>> http://www.turbocat.net/~hselasky/usb4bsd >>> Kevin > > Hi, > > I have just imported "if_rum.c" to SVN and my P4 tree. > > Just do a SVN update. Build a new USB package install that. > > cp -r i4b/trunk/i4b/src/sys/modules/rum /usr/src/sys/modules/rum > > make -C /usr/src/sys/modules/rum all install > > Hope it works. If you can read this message, then it definitely works :-) Thank you, great work! Only one issue: during kernel load, and later after kldload if_rum I got a bunch of messages usbd_fill_iface_data: invalid wMaxPacketSize=0x0000, addr=125! usbd_fill_iface_data: invalid wMaxPacketSize=0x0000, addr=125! usbd_fill_iface_data: invalid wMaxPacketSize=0x0000, addr=125! usbd_fill_iface_data: invalid wMaxPacketSize=0x0000, addr=125! I will test other my usb devices under the new USB stack and will report you if I reveal something. Thank you again. Valery. > > --HPS > > http://www.turbocat.net/~hselasky/usb4bsd From owner-freebsd-usb@FreeBSD.ORG Mon Apr 30 19:03:18 2007 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 50C7D16A400; Mon, 30 Apr 2007 19:03:18 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from swip.net (mailfe09.swip.net [212.247.155.1]) by mx1.freebsd.org (Postfix) with ESMTP id 7782813C459; Mon, 30 Apr 2007 19:03:17 +0000 (UTC) (envelope-from hselasky@freebsd.org) X-Cloudmark-Score: 0.000000 [] Received: from [193.71.38.142] (account mc467741@c2i.net HELO [10.42.11.147]) by mailfe09.swip.net (CommuniGate Pro SMTP 5.1.7) with ESMTPA id 308874120; Mon, 30 Apr 2007 21:02:58 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Mon, 30 Apr 2007 20:57:27 +0200 User-Agent: KMail/1.9.5 References: <200704272330.l3RNU94X078095@freefall.freebsd.org> <200704301754.53119.hselasky@freebsd.org> <46361C50.6020502@chikalov.dp.ua> In-Reply-To: <46361C50.6020502@chikalov.dp.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200704302057.27212.hselasky@freebsd.org> Cc: Kevin Lo Subject: Re: usb/107642: [patch]Ralink Technology RT2501USB/RT2601USB chipset driver X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2007 19:03:18 -0000 On Monday 30 April 2007 18:41, Valery V.Chikalov wrote: > Hans Petter Selasky wrote: > > On Monday 30 April 2007 14:34, Valery V.Chikalov wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- > >> Hash: SHA1 > >> > >> Kevin Lo =EF=E8=F8=E5=F2: > >>> Valery V.Chikalov wrote: > >>>> Hans Petter Selasky wrote: > >>>>> On Sunday 29 April 2007 15:02, Valery V.Chikalov wrote: > >>>>>> Kevin Lo wrote: > >>>>>>> Valery V.Chikalov wrote: > >>>>>>>> The following reply was made to PR usb/107642; it has been noted > >>>>>>>> by GNATS. > >>>>>>>> > >>>>>>>> From: "Valery V.Chikalov" > >>>>>>>> To: bug-followup@FreeBSD.org, valera@chikalov.dp.ua > >>>>>>>> Cc: > >>>>>>>> Subject: Re: usb/107642: [patch]Ralink Technology > >>>>>>>> RT2501USB/RT2601USB chipset driver > >>>>>>>> Date: Sun, 22 Apr 2007 11:32:18 +0300 > >>>>>>>> > >>>>>>>> This is a multi-part message in MIME format. > >>>>>>>> --------------030900090303000507070905 > >>>>>>>> Content-Type: text/plain; charset=3DUTF-8 > >>>>>>>> Content-Transfer-Encoding: 7bit > >>> > >>> if_rum(4) for 7.0-CURRENT > >>> > >>> replaced amrr_* functions by "standard" ones already existed in > >>> net80211/ieee80211_amrr.c > >>> > >>>>>>> Hi Valery, > >>>>>>> > >>>>>>> I guess you wasn't aware that I've already ported rum(4) to > >>>>>>> FreeBSD. The patch is available at: > >>>>>>> http://people.freebsd.org/~kevlo/patch-rum Maybe you can test my > >>>>>>> patch? Thanks. > >>>>>>> > >>>>>>> Kevin > >>>>>> > >>>>>> Hi, Kevin, > >>>>>> > >>>>>> Your driver not working for me. Fortunately, the errors that I see > >>>>>> exactly the same which i fight when I made my driver. > >>>>>> > >>>>>> $ uname -a > >>>>>> FreeBSD tiger.novakom.dp.ua 7.0-CURRENT FreeBSD 7.0-CURRENT #6: Sun > >>>>>> Apr 29 13:58:48 EEST 2007 > >>>>>> root@tiger.novakom.dp.ua:/usr/obj/usr/src/sys/TIGER64 amd64 > >>>>>> > >>>>>> $ sysctl kern.osreldate > >>>>>> kern.osreldate: 700037 > >>>>>> > >>>>>> cvsup'ed 29.04.2007 > >>>>>> > >>>>>> kernel with: > >>>>>> > >>>>>> makeoptions DEBUG=3D-g > >>>>>> > >>>>>> options KDB > >>>>>> > >>>>>> options DDB > >>>>>> > >>>>>> > >>>>>> > >>>>>> options INVARIANTS > >>>>>> > >>>>>> options INVARIANT_SUPPORT > >>>>>> > >>>>>> options WITNESS > >>>>>> > >>>>>> At first, when I make kldload if_rum, I get kernel panic. > >>>>>> But I cant get saved core, as ddb just hangs during "call doadump" > >>>>> > >>>>> I have a solution for all of this locking stuff! > >>>>> > >>>>>> So I add > >>>>>> > >>>>>> #define RUM_LOCK(sc) do { ((sc) =3D (sc)); mtx_lock(&Giant); } > >>>>>> while (0) > >>>>>> #define RUM_UNLOCK(sc) mtx_unlock(&Giant) > >>>>>> > >>>>>> in if_rumvar.h > >>>>>> > >>>>>> I spend a lot of time in attempts get rid of Giant ant always got > >>>>>> only panics. > >>>>> > >>>>> You _cannot_ do that with the old USB stack, because you must lock > >>>>> Giant before calling into the usbxxx functions. Then in the USB > >>>>> callback, Giant is locked, and then you cannot lock RUM_LOCK()! That > >>>>> means you will most likely end up with a deadlock pretty soon, if y= ou > >>>>> see that. > >>>> > >>>> Thanks, for explanations. I suspected that thing are like that, and I > >>>> have tried make porting by analogue with other drivers which I can > >>>> find in dev/usb, but I was not can find the description of doing > >>>> "right way" locking before. > >>> > >>> Firstly, thanks for taking the time to test my patch. > >>> I think your issue is related to watchdog timers. The revised patch is > >>> at http://people.freebsd.org/~kevlo/patch-rum > >>> > >>> Besides, I don't get a panic during high load when getting a file abo= ut > >>> 400MB via ftp. > >> > >> Sorry, but the error that I see the same, just after inserting dongle, > >> or if it was inserted before - after kldload if_rum: > >> > >> panic: sleeping without a lock > >> > >> the top of stack: > >> at usbd_transfer +0x1fe > >> .... > >> rum_ioctl > >> > >> And I cant get saved kernel coredump at the end. > >> > >> I have not serial console configured so it was just subscribed by hand. > >> Of course I can reproduce it again and subscribe what you will ask. > >> > >> I have SMP kernel and use AMD64 architecture, maybe this are the reaso= ns > >> why we are getting different results. > >> > >> Can you please, explain me in two words(or give a reference) why you a= re > >> dropping mtx_lock(&Giant). Yes I have seen the same in if_ural.c and as > >> i have wrote before unsuccessfully have tried repeat it in if_rum. I > >> know that current USB stack is not Giant free, and Hans noted that this > >> is impossible (if I understand him right). Maybe exists some tunable or > >> kernel option or another trick that allows drivers working without the > >> Giant under current USB stack, which I must use. > >> > >> Thank you for your time and patience. > >> Sorry for my english. > >> > >> Valery. > >> > >>>>>> After that I get hangs, > >>>>>> which i resolved by modifying rum_ioctl: > >>>>> > >>>>> I'm almost finished converting "if_rum.c()" to the new USB stack. > >>>>> > >>>>> In some hours I will update it with support for "if_rum". > >>>>> > >>>>> If you can test that and forget about the old USB stack, I will be > >>>>> very happy :-) > >>>> > >>>> I will do it with pleasure. I was almost ready to do it (converting = to > >>>> new USB stack) by myself, but I was stopped by the fact that I cant > >>>> make it compiled under CURRENT. I have seen your mail that your are > >>>> working on this. Is new the USB stack ready for CURRENT now? > >>>> > >>>> Valery. > >>>> > >>>>> --HPS > >>>>> > >>>>> http://www.turbocat.net/~hselasky/usb4bsd > >>> > >>> Kevin > > > > Hi, > > > > I have just imported "if_rum.c" to SVN and my P4 tree. > > > > Just do a SVN update. Build a new USB package install that. > > > > cp -r i4b/trunk/i4b/src/sys/modules/rum /usr/src/sys/modules/rum > > > > make -C /usr/src/sys/modules/rum all install > > > > Hope it works. > > If you can read this message, then it definitely works :-) > Thank you, great work! > > Only one issue: > during kernel load, and later after kldload if_rum I got a bunch of > messages > > usbd_fill_iface_data: invalid wMaxPacketSize=3D0x0000, addr=3D125! > usbd_fill_iface_data: invalid wMaxPacketSize=3D0x0000, addr=3D125! > usbd_fill_iface_data: invalid wMaxPacketSize=3D0x0000, addr=3D125! > usbd_fill_iface_data: invalid wMaxPacketSize=3D0x0000, addr=3D125! Ok. Do you have USB Bluetooth devices ? =2D-HPS From owner-freebsd-usb@FreeBSD.ORG Mon Apr 30 19:19:40 2007 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DBFE216A400; Mon, 30 Apr 2007 19:19:40 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from halik.com.ua (halik.com.ua [193.178.146.121]) by mx1.freebsd.org (Postfix) with ESMTP id 1691E13C44B; Mon, 30 Apr 2007 19:19:40 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from [192.168.1.103] (unknown [213.227.219.58]) by halik.com.ua (Postfix) with ESMTP id 4A6FB5C06D; Mon, 30 Apr 2007 22:19:38 +0300 (EEST) Message-ID: <46364142.1070108@chikalov.dp.ua> Date: Mon, 30 Apr 2007 22:19:30 +0300 From: "Valery V.Chikalov" User-Agent: Thunderbird 1.5.0.9 (X11/20070315) MIME-Version: 1.0 To: Hans Petter Selasky References: <200704272330.l3RNU94X078095@freefall.freebsd.org> <200704301754.53119.hselasky@freebsd.org> <46361C50.6020502@chikalov.dp.ua> <200704302057.27212.hselasky@freebsd.org> In-Reply-To: <200704302057.27212.hselasky@freebsd.org> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-usb@freebsd.org Subject: Re: usb/107642: [patch]Ralink Technology RT2501USB/RT2601USB chipset driver X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2007 19:19:41 -0000 Hans Petter Selasky wrote: > On Monday 30 April 2007 18:41, Valery V.Chikalov wrote: >> Hans Petter Selasky wrote: >>> On Monday 30 April 2007 14:34, Valery V.Chikalov wrote: >>>> -----BEGIN PGP SIGNED MESSAGE----- >>>> Hash: SHA1 >>>> >>>> Kevin Lo ïèøåò: >>>>> Valery V.Chikalov wrote: >>>>>> Hans Petter Selasky wrote: >>>>>>> On Sunday 29 April 2007 15:02, Valery V.Chikalov wrote: >>>>>>>> Kevin Lo wrote: >>>>>>>>> Valery V.Chikalov wrote: >>>>>>>>>> The following reply was made to PR usb/107642; it has been noted >>>>>>>>>> by GNATS. >>>>>>>>>> >>>>>>>>>> From: "Valery V.Chikalov" >>>>>>>>>> To: bug-followup@FreeBSD.org, valera@chikalov.dp.ua >>>>>>>>>> Cc: >>>>>>>>>> Subject: Re: usb/107642: [patch]Ralink Technology >>>>>>>>>> RT2501USB/RT2601USB chipset driver >>>>>>>>>> Date: Sun, 22 Apr 2007 11:32:18 +0300 >>>>>>>>>> >>>>>>>>>> This is a multi-part message in MIME format. >>>>>>>>>> --------------030900090303000507070905 >>>>>>>>>> Content-Type: text/plain; charset=UTF-8 >>>>>>>>>> Content-Transfer-Encoding: 7bit >>>>> if_rum(4) for 7.0-CURRENT >>>>> >>>>> replaced amrr_* functions by "standard" ones already existed in >>>>> net80211/ieee80211_amrr.c >>>>> >>>>>>>>> Hi Valery, >>>>>>>>> >>>>>>>>> I guess you wasn't aware that I've already ported rum(4) to >>>>>>>>> FreeBSD. The patch is available at: >>>>>>>>> http://people.freebsd.org/~kevlo/patch-rum Maybe you can test my >>>>>>>>> patch? Thanks. >>>>>>>>> >>>>>>>>> Kevin >>>>>>>> Hi, Kevin, >>>>>>>> >>>>>>>> Your driver not working for me. Fortunately, the errors that I see >>>>>>>> exactly the same which i fight when I made my driver. >>>>>>>> >>>>>>>> $ uname -a >>>>>>>> FreeBSD tiger.novakom.dp.ua 7.0-CURRENT FreeBSD 7.0-CURRENT #6: Sun >>>>>>>> Apr 29 13:58:48 EEST 2007 >>>>>>>> root@tiger.novakom.dp.ua:/usr/obj/usr/src/sys/TIGER64 amd64 >>>>>>>> >>>>>>>> $ sysctl kern.osreldate >>>>>>>> kern.osreldate: 700037 >>>>>>>> >>>>>>>> cvsup'ed 29.04.2007 >>>>>>>> >>>>>>>> kernel with: >>>>>>>> >>>>>>>> makeoptions DEBUG=-g >>>>>>>> >>>>>>>> options KDB >>>>>>>> >>>>>>>> options DDB >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> options INVARIANTS >>>>>>>> >>>>>>>> options INVARIANT_SUPPORT >>>>>>>> >>>>>>>> options WITNESS >>>>>>>> >>>>>>>> At first, when I make kldload if_rum, I get kernel panic. >>>>>>>> But I cant get saved core, as ddb just hangs during "call doadump" >>>>>>> I have a solution for all of this locking stuff! >>>>>>> >>>>>>>> So I add >>>>>>>> >>>>>>>> #define RUM_LOCK(sc) do { ((sc) = (sc)); mtx_lock(&Giant); } >>>>>>>> while (0) >>>>>>>> #define RUM_UNLOCK(sc) mtx_unlock(&Giant) >>>>>>>> >>>>>>>> in if_rumvar.h >>>>>>>> >>>>>>>> I spend a lot of time in attempts get rid of Giant ant always got >>>>>>>> only panics. >>>>>>> You _cannot_ do that with the old USB stack, because you must lock >>>>>>> Giant before calling into the usbxxx functions. Then in the USB >>>>>>> callback, Giant is locked, and then you cannot lock RUM_LOCK()! That >>>>>>> means you will most likely end up with a deadlock pretty soon, if you >>>>>>> see that. >>>>>> Thanks, for explanations. I suspected that thing are like that, and I >>>>>> have tried make porting by analogue with other drivers which I can >>>>>> find in dev/usb, but I was not can find the description of doing >>>>>> "right way" locking before. >>>>> Firstly, thanks for taking the time to test my patch. >>>>> I think your issue is related to watchdog timers. The revised patch is >>>>> at http://people.freebsd.org/~kevlo/patch-rum >>>>> >>>>> Besides, I don't get a panic during high load when getting a file about >>>>> 400MB via ftp. >>>> Sorry, but the error that I see the same, just after inserting dongle, >>>> or if it was inserted before - after kldload if_rum: >>>> >>>> panic: sleeping without a lock >>>> >>>> the top of stack: >>>> at usbd_transfer +0x1fe >>>> .... >>>> rum_ioctl >>>> >>>> And I cant get saved kernel coredump at the end. >>>> >>>> I have not serial console configured so it was just subscribed by hand. >>>> Of course I can reproduce it again and subscribe what you will ask. >>>> >>>> I have SMP kernel and use AMD64 architecture, maybe this are the reasons >>>> why we are getting different results. >>>> >>>> Can you please, explain me in two words(or give a reference) why you are >>>> dropping mtx_lock(&Giant). Yes I have seen the same in if_ural.c and as >>>> i have wrote before unsuccessfully have tried repeat it in if_rum. I >>>> know that current USB stack is not Giant free, and Hans noted that this >>>> is impossible (if I understand him right). Maybe exists some tunable or >>>> kernel option or another trick that allows drivers working without the >>>> Giant under current USB stack, which I must use. >>>> >>>> Thank you for your time and patience. >>>> Sorry for my english. >>>> >>>> Valery. >>>> >>>>>>>> After that I get hangs, >>>>>>>> which i resolved by modifying rum_ioctl: >>>>>>> I'm almost finished converting "if_rum.c()" to the new USB stack. >>>>>>> >>>>>>> In some hours I will update it with support for "if_rum". >>>>>>> >>>>>>> If you can test that and forget about the old USB stack, I will be >>>>>>> very happy :-) >>>>>> I will do it with pleasure. I was almost ready to do it (converting to >>>>>> new USB stack) by myself, but I was stopped by the fact that I cant >>>>>> make it compiled under CURRENT. I have seen your mail that your are >>>>>> working on this. Is new the USB stack ready for CURRENT now? >>>>>> >>>>>> Valery. >>>>>> >>>>>>> --HPS >>>>>>> >>>>>>> http://www.turbocat.net/~hselasky/usb4bsd >>>>> Kevin >>> Hi, >>> >>> I have just imported "if_rum.c" to SVN and my P4 tree. >>> >>> Just do a SVN update. Build a new USB package install that. >>> >>> cp -r i4b/trunk/i4b/src/sys/modules/rum /usr/src/sys/modules/rum >>> >>> make -C /usr/src/sys/modules/rum all install >>> >>> Hope it works. >> If you can read this message, then it definitely works :-) >> Thank you, great work! >> >> Only one issue: >> during kernel load, and later after kldload if_rum I got a bunch of >> messages >> >> usbd_fill_iface_data: invalid wMaxPacketSize=0x0000, addr=125! >> usbd_fill_iface_data: invalid wMaxPacketSize=0x0000, addr=125! >> usbd_fill_iface_data: invalid wMaxPacketSize=0x0000, addr=125! >> usbd_fill_iface_data: invalid wMaxPacketSize=0x0000, addr=125! > > Ok. Do you have USB Bluetooth devices ? > > --HPS Yes. tiger# usbdevs addr 127: UHCI root hub, Intel addr 127: UHCI root hub, Intel addr 127: UHCI root hub, Intel addr 127: UHCI root hub, Intel addr 124: 802.11 bg WLAN, Ralink addr 125: TrueMobile 350 Bluetooth USB Adapter, Dell addr 126: product 0xa005, Dell addr 125: TrueMobile 350 Bluetooth USB Adapter, Dell addr 127: EHCI root hub, Intel addr 126: product 0xa005, Dell addr 125: TrueMobile 350 Bluetooth USB Adapter, Dell addr 124: 802.11 bg WLAN, Ralink of course I have only /one/ USB Adapter, not three. Valery. From owner-freebsd-usb@FreeBSD.ORG Mon Apr 30 19:30:20 2007 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B0E0E16A402 for ; Mon, 30 Apr 2007 19:30:20 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from swip.net (mailfe06.swip.net [212.247.154.161]) by mx1.freebsd.org (Postfix) with ESMTP id 0089D13C447 for ; Mon, 30 Apr 2007 19:30:19 +0000 (UTC) (envelope-from hselasky@freebsd.org) X-Cloudmark-Score: 0.000000 [] Received: from [193.71.38.142] (account mc467741@c2i.net HELO [10.42.11.147]) by mailfe06.swip.net (CommuniGate Pro SMTP 5.1.7) with ESMTPA id 478323391; Mon, 30 Apr 2007 21:30:18 +0200 From: Hans Petter Selasky To: "Valery V.Chikalov" Date: Mon, 30 Apr 2007 21:25:34 +0200 User-Agent: KMail/1.9.5 References: <200704272330.l3RNU94X078095@freefall.freebsd.org> <200704302057.27212.hselasky@freebsd.org> <46364142.1070108@chikalov.dp.ua> In-Reply-To: <46364142.1070108@chikalov.dp.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200704302125.34381.hselasky@freebsd.org> Cc: freebsd-usb@freebsd.org Subject: Re: usb/107642: [patch]Ralink Technology RT2501USB/RT2601USB chipset driver X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2007 19:30:20 -0000 On Monday 30 April 2007 21:19, Valery V.Chikalov wrote: > Hans Petter Selasky wrote: > > On Monday 30 April 2007 18:41, Valery V.Chikalov wrote: > >> Hans Petter Selasky wrote: > >>> On Monday 30 April 2007 14:34, Valery V.Chikalov wrote: > >>>> -----BEGIN PGP SIGNED MESSAGE----- > >>>> Hash: SHA1 > >>>> > >>>> Kevin Lo =EF=E8=F8=E5=F2: > >>>>> Valery V.Chikalov wrote: > >>>>>> Hans Petter Selasky wrote: > >>>>>>> On Sunday 29 April 2007 15:02, Valery V.Chikalov wrote: > >>>>>>>> Kevin Lo wrote: > >>>>>>>>> Valery V.Chikalov wrote: > >>>>>>>>>> The following reply was made to PR usb/107642; it has been not= ed > >>>>>>>>>> by GNATS. > >>>>>>>>>> > >>>>>>>>>> From: "Valery V.Chikalov" > >>>>>>>>>> To: bug-followup@FreeBSD.org, valera@chikalov.dp.ua > >>>>>>>>>> Cc: > >>>>>>>>>> Subject: Re: usb/107642: [patch]Ralink Technology > >>>>>>>>>> RT2501USB/RT2601USB chipset driver > >>>>>>>>>> Date: Sun, 22 Apr 2007 11:32:18 +0300 > >>>>>>>>>> > >>>>>>>>>> This is a multi-part message in MIME format. > >>>>>>>>>> --------------030900090303000507070905 > >>>>>>>>>> Content-Type: text/plain; charset=3DUTF-8 > >>>>>>>>>> Content-Transfer-Encoding: 7bit > >>>>> > >>>>> if_rum(4) for 7.0-CURRENT > >>>>> > >>>>> replaced amrr_* functions by "standard" ones already existed in > >>>>> net80211/ieee80211_amrr.c > >>>>> > >>>>>>>>> Hi Valery, > >>>>>>>>> > >>>>>>>>> I guess you wasn't aware that I've already ported rum(4) to > >>>>>>>>> FreeBSD. The patch is available at: > >>>>>>>>> http://people.freebsd.org/~kevlo/patch-rum Maybe you can test my > >>>>>>>>> patch? Thanks. > >>>>>>>>> > >>>>>>>>> Kevin > >>>>>>>> > >>>>>>>> Hi, Kevin, > >>>>>>>> > >>>>>>>> Your driver not working for me. Fortunately, the errors that I s= ee > >>>>>>>> exactly the same which i fight when I made my driver. > >>>>>>>> > >>>>>>>> $ uname -a > >>>>>>>> FreeBSD tiger.novakom.dp.ua 7.0-CURRENT FreeBSD 7.0-CURRENT #6: > >>>>>>>> Sun Apr 29 13:58:48 EEST 2007 > >>>>>>>> root@tiger.novakom.dp.ua:/usr/obj/usr/src/sys/TIGER64 amd64 > >>>>>>>> > >>>>>>>> $ sysctl kern.osreldate > >>>>>>>> kern.osreldate: 700037 > >>>>>>>> > >>>>>>>> cvsup'ed 29.04.2007 > >>>>>>>> > >>>>>>>> kernel with: > >>>>>>>> > >>>>>>>> makeoptions DEBUG=3D-g > >>>>>>>> > >>>>>>>> options KDB > >>>>>>>> > >>>>>>>> options DDB > >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> options INVARIANTS > >>>>>>>> > >>>>>>>> options INVARIANT_SUPPORT > >>>>>>>> > >>>>>>>> options WITNESS > >>>>>>>> > >>>>>>>> At first, when I make kldload if_rum, I get kernel panic. > >>>>>>>> But I cant get saved core, as ddb just hangs during "call doadum= p" > >>>>>>> > >>>>>>> I have a solution for all of this locking stuff! > >>>>>>> > >>>>>>>> So I add > >>>>>>>> > >>>>>>>> #define RUM_LOCK(sc) do { ((sc) =3D (sc)); mtx_lock(&Giant); } > >>>>>>>> while (0) > >>>>>>>> #define RUM_UNLOCK(sc) mtx_unlock(&Giant) > >>>>>>>> > >>>>>>>> in if_rumvar.h > >>>>>>>> > >>>>>>>> I spend a lot of time in attempts get rid of Giant ant always got > >>>>>>>> only panics. > >>>>>>> > >>>>>>> You _cannot_ do that with the old USB stack, because you must lock > >>>>>>> Giant before calling into the usbxxx functions. Then in the USB > >>>>>>> callback, Giant is locked, and then you cannot lock RUM_LOCK()! > >>>>>>> That means you will most likely end up with a deadlock pretty soo= n, > >>>>>>> if you see that. > >>>>>> > >>>>>> Thanks, for explanations. I suspected that thing are like that, and > >>>>>> I have tried make porting by analogue with other drivers which I c= an > >>>>>> find in dev/usb, but I was not can find the description of doing > >>>>>> "right way" locking before. > >>>>> > >>>>> Firstly, thanks for taking the time to test my patch. > >>>>> I think your issue is related to watchdog timers. The revised patch > >>>>> is at http://people.freebsd.org/~kevlo/patch-rum > >>>>> > >>>>> Besides, I don't get a panic during high load when getting a file > >>>>> about 400MB via ftp. > >>>> > >>>> Sorry, but the error that I see the same, just after inserting dongl= e, > >>>> or if it was inserted before - after kldload if_rum: > >>>> > >>>> panic: sleeping without a lock > >>>> > >>>> the top of stack: > >>>> at usbd_transfer +0x1fe > >>>> .... > >>>> rum_ioctl > >>>> > >>>> And I cant get saved kernel coredump at the end. > >>>> > >>>> I have not serial console configured so it was just subscribed by > >>>> hand. Of course I can reproduce it again and subscribe what you will > >>>> ask. > >>>> > >>>> I have SMP kernel and use AMD64 architecture, maybe this are the > >>>> reasons why we are getting different results. > >>>> > >>>> Can you please, explain me in two words(or give a reference) why you > >>>> are dropping mtx_lock(&Giant). Yes I have seen the same in if_ural.c > >>>> and as i have wrote before unsuccessfully have tried repeat it in > >>>> if_rum. I know that current USB stack is not Giant free, and Hans > >>>> noted that this is impossible (if I understand him right). Maybe > >>>> exists some tunable or kernel option or another trick that allows > >>>> drivers working without the Giant under current USB stack, which I > >>>> must use. > >>>> > >>>> Thank you for your time and patience. > >>>> Sorry for my english. > >>>> > >>>> Valery. > >>>> > >>>>>>>> After that I get hangs, > >>>>>>>> which i resolved by modifying rum_ioctl: > >>>>>>> > >>>>>>> I'm almost finished converting "if_rum.c()" to the new USB stack. > >>>>>>> > >>>>>>> In some hours I will update it with support for "if_rum". > >>>>>>> > >>>>>>> If you can test that and forget about the old USB stack, I will be > >>>>>>> very happy :-) > >>>>>> > >>>>>> I will do it with pleasure. I was almost ready to do it (converting > >>>>>> to new USB stack) by myself, but I was stopped by the fact that I > >>>>>> cant make it compiled under CURRENT. I have seen your mail that yo= ur > >>>>>> are working on this. Is new the USB stack ready for CURRENT now? > >>>>>> > >>>>>> Valery. > >>>>>> > >>>>>>> --HPS > >>>>>>> > >>>>>>> http://www.turbocat.net/~hselasky/usb4bsd > >>>>> > >>>>> Kevin > >>> > >>> Hi, > >>> > >>> I have just imported "if_rum.c" to SVN and my P4 tree. > >>> > >>> Just do a SVN update. Build a new USB package install that. > >>> > >>> cp -r i4b/trunk/i4b/src/sys/modules/rum /usr/src/sys/modules/rum > >>> > >>> make -C /usr/src/sys/modules/rum all install > >>> > >>> Hope it works. > >> > >> If you can read this message, then it definitely works :-) > >> Thank you, great work! > >> > >> Only one issue: > >> during kernel load, and later after kldload if_rum I got a bunch of > >> messages > >> > >> usbd_fill_iface_data: invalid wMaxPacketSize=3D0x0000, addr=3D125! > >> usbd_fill_iface_data: invalid wMaxPacketSize=3D0x0000, addr=3D125! > >> usbd_fill_iface_data: invalid wMaxPacketSize=3D0x0000, addr=3D125! > >> usbd_fill_iface_data: invalid wMaxPacketSize=3D0x0000, addr=3D125! > > > > Ok. Do you have USB Bluetooth devices ? > > > > --HPS > > Yes. > > tiger# usbdevs > addr 127: UHCI root hub, Intel > addr 127: UHCI root hub, Intel > addr 127: UHCI root hub, Intel > addr 127: UHCI root hub, Intel > addr 124: 802.11 bg WLAN, Ralink > addr 125: TrueMobile 350 Bluetooth USB Adapter, Dell > addr 126: product 0xa005, Dell > addr 125: TrueMobile 350 Bluetooth USB Adapter, Dell > addr 127: EHCI root hub, Intel > addr 126: product 0xa005, Dell > addr 125: TrueMobile 350 Bluetooth USB Adapter, Dell > addr 124: 802.11 bg WLAN, Ralink > > of course I have only /one/ USB Adapter, not three. > > Valery. The warnings you get can just be ignored. They come from a dummy alternate= =20 setting on your USB Bluetooth adapter. =2D-HPS From owner-freebsd-usb@FreeBSD.ORG Mon Apr 30 20:08:33 2007 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BFB2016A402; Mon, 30 Apr 2007 20:08:33 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from halik.com.ua (halik.com.ua [193.178.146.121]) by mx1.freebsd.org (Postfix) with ESMTP id D6C8013C457; Mon, 30 Apr 2007 20:08:32 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from [192.168.1.103] (unknown [213.227.219.58]) by halik.com.ua (Postfix) with ESMTP id 538B45C06D; Mon, 30 Apr 2007 23:08:31 +0300 (EEST) Message-ID: <46364CB6.9050401@chikalov.dp.ua> Date: Mon, 30 Apr 2007 23:08:22 +0300 From: "Valery V.Chikalov" User-Agent: Thunderbird 1.5.0.9 (X11/20070315) MIME-Version: 1.0 To: Hans Petter Selasky References: <200704272330.l3RNU94X078095@freefall.freebsd.org> <200704302057.27212.hselasky@freebsd.org> <46364142.1070108@chikalov.dp.ua> <200704302125.34381.hselasky@freebsd.org> In-Reply-To: <200704302125.34381.hselasky@freebsd.org> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-usb@freebsd.org Subject: Re: usb/107642: [patch]Ralink Technology RT2501USB/RT2601USB chipset driver X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2007 20:08:33 -0000 Hans Petter Selasky wrote: > On Monday 30 April 2007 21:19, Valery V.Chikalov wrote: >> Hans Petter Selasky wrote: >>> On Monday 30 April 2007 18:41, Valery V.Chikalov wrote: >>>> Hans Petter Selasky wrote: >>>>> On Monday 30 April 2007 14:34, Valery V.Chikalov wrote: >>>>>> -----BEGIN PGP SIGNED MESSAGE----- >>>>>> Hash: SHA1 >>>>>> >>>>>> Kevin Lo ïèøåò: >>>>>>> Valery V.Chikalov wrote: >>>>>>>> Hans Petter Selasky wrote: >>>>>>>>> On Sunday 29 April 2007 15:02, Valery V.Chikalov wrote: >>>>>>>>>> Kevin Lo wrote: >>>>>>>>>>> Valery V.Chikalov wrote: >>>>>>>>>>>> The following reply was made to PR usb/107642; it has been noted >>>>>>>>>>>> by GNATS. >>>>>>>>>>>> >>>>>>>>>>>> From: "Valery V.Chikalov" >>>>>>>>>>>> To: bug-followup@FreeBSD.org, valera@chikalov.dp.ua >>>>>>>>>>>> Cc: >>>>>>>>>>>> Subject: Re: usb/107642: [patch]Ralink Technology >>>>>>>>>>>> RT2501USB/RT2601USB chipset driver >>>>>>>>>>>> Date: Sun, 22 Apr 2007 11:32:18 +0300 >>>>>>>>>>>> >>>>>>>>>>>> This is a multi-part message in MIME format. >>>>>>>>>>>> --------------030900090303000507070905 >>>>>>>>>>>> Content-Type: text/plain; charset=UTF-8 >>>>>>>>>>>> Content-Transfer-Encoding: 7bit >>>>>>> if_rum(4) for 7.0-CURRENT >>>>>>> >>>>>>> replaced amrr_* functions by "standard" ones already existed in >>>>>>> net80211/ieee80211_amrr.c >>>>>>> >>>>>>>>>>> Hi Valery, >>>>>>>>>>> >>>>>>>>>>> I guess you wasn't aware that I've already ported rum(4) to >>>>>>>>>>> FreeBSD. The patch is available at: >>>>>>>>>>> http://people.freebsd.org/~kevlo/patch-rum Maybe you can test my >>>>>>>>>>> patch? Thanks. >>>>>>>>>>> >>>>>>>>>>> Kevin >>>>>>>>>> Hi, Kevin, >>>>>>>>>> >>>>>>>>>> Your driver not working for me. Fortunately, the errors that I see >>>>>>>>>> exactly the same which i fight when I made my driver. >>>>>>>>>> >>>>>>>>>> $ uname -a >>>>>>>>>> FreeBSD tiger.novakom.dp.ua 7.0-CURRENT FreeBSD 7.0-CURRENT #6: >>>>>>>>>> Sun Apr 29 13:58:48 EEST 2007 >>>>>>>>>> root@tiger.novakom.dp.ua:/usr/obj/usr/src/sys/TIGER64 amd64 >>>>>>>>>> >>>>>>>>>> $ sysctl kern.osreldate >>>>>>>>>> kern.osreldate: 700037 >>>>>>>>>> >>>>>>>>>> cvsup'ed 29.04.2007 >>>>>>>>>> >>>>>>>>>> kernel with: >>>>>>>>>> >>>>>>>>>> makeoptions DEBUG=-g >>>>>>>>>> >>>>>>>>>> options KDB >>>>>>>>>> >>>>>>>>>> options DDB >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> options INVARIANTS >>>>>>>>>> >>>>>>>>>> options INVARIANT_SUPPORT >>>>>>>>>> >>>>>>>>>> options WITNESS >>>>>>>>>> >>>>>>>>>> At first, when I make kldload if_rum, I get kernel panic. >>>>>>>>>> But I cant get saved core, as ddb just hangs during "call doadump" >>>>>>>>> I have a solution for all of this locking stuff! >>>>>>>>> >>>>>>>>>> So I add >>>>>>>>>> >>>>>>>>>> #define RUM_LOCK(sc) do { ((sc) = (sc)); mtx_lock(&Giant); } >>>>>>>>>> while (0) >>>>>>>>>> #define RUM_UNLOCK(sc) mtx_unlock(&Giant) >>>>>>>>>> >>>>>>>>>> in if_rumvar.h >>>>>>>>>> >>>>>>>>>> I spend a lot of time in attempts get rid of Giant ant always got >>>>>>>>>> only panics. >>>>>>>>> You _cannot_ do that with the old USB stack, because you must lock >>>>>>>>> Giant before calling into the usbxxx functions. Then in the USB >>>>>>>>> callback, Giant is locked, and then you cannot lock RUM_LOCK()! >>>>>>>>> That means you will most likely end up with a deadlock pretty soon, >>>>>>>>> if you see that. >>>>>>>> Thanks, for explanations. I suspected that thing are like that, and >>>>>>>> I have tried make porting by analogue with other drivers which I can >>>>>>>> find in dev/usb, but I was not can find the description of doing >>>>>>>> "right way" locking before. >>>>>>> Firstly, thanks for taking the time to test my patch. >>>>>>> I think your issue is related to watchdog timers. The revised patch >>>>>>> is at http://people.freebsd.org/~kevlo/patch-rum >>>>>>> >>>>>>> Besides, I don't get a panic during high load when getting a file >>>>>>> about 400MB via ftp. >>>>>> Sorry, but the error that I see the same, just after inserting dongle, >>>>>> or if it was inserted before - after kldload if_rum: >>>>>> >>>>>> panic: sleeping without a lock >>>>>> >>>>>> the top of stack: >>>>>> at usbd_transfer +0x1fe >>>>>> .... >>>>>> rum_ioctl >>>>>> >>>>>> And I cant get saved kernel coredump at the end. >>>>>> >>>>>> I have not serial console configured so it was just subscribed by >>>>>> hand. Of course I can reproduce it again and subscribe what you will >>>>>> ask. >>>>>> >>>>>> I have SMP kernel and use AMD64 architecture, maybe this are the >>>>>> reasons why we are getting different results. >>>>>> >>>>>> Can you please, explain me in two words(or give a reference) why you >>>>>> are dropping mtx_lock(&Giant). Yes I have seen the same in if_ural.c >>>>>> and as i have wrote before unsuccessfully have tried repeat it in >>>>>> if_rum. I know that current USB stack is not Giant free, and Hans >>>>>> noted that this is impossible (if I understand him right). Maybe >>>>>> exists some tunable or kernel option or another trick that allows >>>>>> drivers working without the Giant under current USB stack, which I >>>>>> must use. >>>>>> >>>>>> Thank you for your time and patience. >>>>>> Sorry for my english. >>>>>> >>>>>> Valery. >>>>>> >>>>>>>>>> After that I get hangs, >>>>>>>>>> which i resolved by modifying rum_ioctl: >>>>>>>>> I'm almost finished converting "if_rum.c()" to the new USB stack. >>>>>>>>> >>>>>>>>> In some hours I will update it with support for "if_rum". >>>>>>>>> >>>>>>>>> If you can test that and forget about the old USB stack, I will be >>>>>>>>> very happy :-) >>>>>>>> I will do it with pleasure. I was almost ready to do it (converting >>>>>>>> to new USB stack) by myself, but I was stopped by the fact that I >>>>>>>> cant make it compiled under CURRENT. I have seen your mail that your >>>>>>>> are working on this. Is new the USB stack ready for CURRENT now? >>>>>>>> >>>>>>>> Valery. >>>>>>>> >>>>>>>>> --HPS >>>>>>>>> >>>>>>>>> http://www.turbocat.net/~hselasky/usb4bsd >>>>>>> Kevin >>>>> Hi, >>>>> >>>>> I have just imported "if_rum.c" to SVN and my P4 tree. >>>>> >>>>> Just do a SVN update. Build a new USB package install that. >>>>> >>>>> cp -r i4b/trunk/i4b/src/sys/modules/rum /usr/src/sys/modules/rum >>>>> >>>>> make -C /usr/src/sys/modules/rum all install >>>>> >>>>> Hope it works. >>>> If you can read this message, then it definitely works :-) >>>> Thank you, great work! >>>> >>>> Only one issue: >>>> during kernel load, and later after kldload if_rum I got a bunch of >>>> messages >>>> >>>> usbd_fill_iface_data: invalid wMaxPacketSize=0x0000, addr=125! >>>> usbd_fill_iface_data: invalid wMaxPacketSize=0x0000, addr=125! >>>> usbd_fill_iface_data: invalid wMaxPacketSize=0x0000, addr=125! >>>> usbd_fill_iface_data: invalid wMaxPacketSize=0x0000, addr=125! >>> Ok. Do you have USB Bluetooth devices ? >>> >>> --HPS >> Yes. >> >> tiger# usbdevs >> addr 127: UHCI root hub, Intel >> addr 127: UHCI root hub, Intel >> addr 127: UHCI root hub, Intel >> addr 127: UHCI root hub, Intel >> addr 124: 802.11 bg WLAN, Ralink >> addr 125: TrueMobile 350 Bluetooth USB Adapter, Dell >> addr 126: product 0xa005, Dell >> addr 125: TrueMobile 350 Bluetooth USB Adapter, Dell >> addr 127: EHCI root hub, Intel >> addr 126: product 0xa005, Dell >> addr 125: TrueMobile 350 Bluetooth USB Adapter, Dell >> addr 124: 802.11 bg WLAN, Ralink >> >> of course I have only /one/ USB Adapter, not three. >> >> Valery. > > The warnings you get can just be ignored. They come from a dummy alternate > setting on your USB Bluetooth adapter. > > --HPS > First regression. Inserting any of umass devices(I have tried three different ones) lead to panic: mutex UMASS lock not owned at /usr/src/sys/cam/cam_xpt.c:4329 Part of backtrace, i have coredump with debug symbols included, so I can give you more information if you need. Situation 100% reproducible. #11 0xffffffff80289f8a in panic ( fmt=0xffffffff8050f820 "mutex %s not owned at %s:%d") at /usr/src/sys/kern/kern_shutdown.c:547 #12 0xffffffff8027d878 in _mtx_assert (m=0xffffff0017816010, what=1, file=0xffffffff804e2801 "/usr/src/sys/cam/cam_xpt.c", line=4329) at /usr/src/sys/kern/kern_mutex.c:607 #13 0xffffffff801557ab in xpt_bus_register (sim=0xffffff0014faa300, bus=0) at /usr/src/sys/cam/cam_xpt.c:4329 #14 0xffffffff808e40dd in umass_attach (dev=0xffffff0014faac00) at /usr/src/sys/modules/umass/../../dev/usb/umass.c:2289 #15 0xffffffff802b161b in DEVICE_ATTACH (dev=0xffffff0014faac00) at device_if.h:178 #16 0xffffffff802b150e in device_attach (dev=0xffffff0014faac00) at /usr/src/sys/kern/subr_bus.c:2379 #17 0xffffffff802b143f in device_probe_and_attach (dev=0xffffff0014faac00) at /usr/src/sys/kern/subr_bus.c:2347 #18 0xffffffff804819cb in usbd_probe_and_attach (parent=0xffffff0000d29200, port=4, up=0xffffff001e276898) at /usr/src/sys/dev/usb/usb_subr.c:1071 #19 0xffffffff804823ab in usbd_new_device (parent=0xffffff0000d29200, bus=0xffffffff80a48030, depth=1, speed=3, port=4, up=0xffffff001e276898) at /usr/src/sys/dev/usb/usb_subr.c:1388 #20 0xffffffff8020e319 in uhub_explore (udev=0xffffff0000c11800) at /usr/src/sys/dev/usb/uhub.c:293 ---Type to continue, or q to quit--- #21 0xffffffff8047d407 in usb_discover (bus=0xffffffff80a48030) at /usr/src/sys/dev/usb/usb.c:165 #22 0xffffffff8047d489 in usb_event_thread (bus=0xffffffff80a48030) at /usr/src/sys/dev/usb/usb.c:195 #23 0xffffffff80268d78 in fork_exit ( callout=0xffffffff8047d43e , arg=0xffffffff80a48030, frame=0xffffffff91947c80) at /usr/src/sys/kern/kern_fork.c:814 Valery. From owner-freebsd-usb@FreeBSD.ORG Mon Apr 30 21:59:57 2007 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 947C316A400; Mon, 30 Apr 2007 21:59:57 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from halik.com.ua (halik.com.ua [193.178.146.121]) by mx1.freebsd.org (Postfix) with ESMTP id E0A5913C45E; Mon, 30 Apr 2007 21:59:56 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from [192.168.1.103] (unknown [213.227.219.58]) by halik.com.ua (Postfix) with ESMTP id 111645C06D; Tue, 1 May 2007 00:59:56 +0300 (EEST) Message-ID: <463666D3.4050900@chikalov.dp.ua> Date: Tue, 01 May 2007 00:59:47 +0300 From: "Valery V.Chikalov" User-Agent: Thunderbird 1.5.0.9 (X11/20070315) MIME-Version: 1.0 References: <200704272330.l3RNU94X078095@freefall.freebsd.org> <200704302057.27212.hselasky@freebsd.org> <46364142.1070108@chikalov.dp.ua> <200704302125.34381.hselasky@freebsd.org> <46364CB6.9050401@chikalov.dp.ua> In-Reply-To: <46364CB6.9050401@chikalov.dp.ua> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 8bit Cc: Hans Petter Selasky , freebsd-usb@freebsd.org Subject: Re: usb/107642: [patch]Ralink Technology RT2501USB/RT2601USB chipset driver X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2007 21:59:57 -0000 Valery V.Chikalov wrote: > Hans Petter Selasky wrote: >> On Monday 30 April 2007 21:19, Valery V.Chikalov wrote: >>> Hans Petter Selasky wrote: >>>> On Monday 30 April 2007 18:41, Valery V.Chikalov wrote: >>>>> Hans Petter Selasky wrote: >>>>>> On Monday 30 April 2007 14:34, Valery V.Chikalov wrote: >>>>>>> -----BEGIN PGP SIGNED MESSAGE----- >>>>>>> Hash: SHA1 >>>>>>> >>>>>>> Kevin Lo ïèøåò: >>>>>>>> Valery V.Chikalov wrote: >>>>>>>>> Hans Petter Selasky wrote: >>>>>>>>>> On Sunday 29 April 2007 15:02, Valery V.Chikalov wrote: >>>>>>>>>>> Kevin Lo wrote: >>>>>>>>>>>> Valery V.Chikalov wrote: >>>>>>>>>>>>> The following reply was made to PR usb/107642; it has been >>>>>>>>>>>>> noted >>>>>>>>>>>>> by GNATS. >>>>>>>>>>>>> >>>>>>>>>>>>> From: "Valery V.Chikalov" >>>>>>>>>>>>> To: bug-followup@FreeBSD.org, valera@chikalov.dp.ua >>>>>>>>>>>>> Cc: >>>>>>>>>>>>> Subject: Re: usb/107642: [patch]Ralink Technology >>>>>>>>>>>>> RT2501USB/RT2601USB chipset driver >>>>>>>>>>>>> Date: Sun, 22 Apr 2007 11:32:18 +0300 >>>>>>>>>>>>> >>>>>>>>>>>>> This is a multi-part message in MIME format. >>>>>>>>>>>>> --------------030900090303000507070905 >>>>>>>>>>>>> Content-Type: text/plain; charset=UTF-8 >>>>>>>>>>>>> Content-Transfer-Encoding: 7bit >>>>>>>> if_rum(4) for 7.0-CURRENT >>>>>>>> >>>>>>>> replaced amrr_* functions by "standard" ones already existed in >>>>>>>> net80211/ieee80211_amrr.c >>>>>>>> >>>>>>>>>>>> Hi Valery, >>>>>>>>>>>> >>>>>>>>>>>> I guess you wasn't aware that I've already ported rum(4) to >>>>>>>>>>>> FreeBSD. The patch is available at: >>>>>>>>>>>> http://people.freebsd.org/~kevlo/patch-rum Maybe you can >>>>>>>>>>>> test my >>>>>>>>>>>> patch? Thanks. >>>>>>>>>>>> >>>>>>>>>>>> Kevin >>>>>>>>>>> Hi, Kevin, >>>>>>>>>>> >>>>>>>>>>> Your driver not working for me. Fortunately, the errors that >>>>>>>>>>> I see >>>>>>>>>>> exactly the same which i fight when I made my driver. >>>>>>>>>>> >>>>>>>>>>> $ uname -a >>>>>>>>>>> FreeBSD tiger.novakom.dp.ua 7.0-CURRENT FreeBSD 7.0-CURRENT #6: >>>>>>>>>>> Sun Apr 29 13:58:48 EEST 2007 >>>>>>>>>>> root@tiger.novakom.dp.ua:/usr/obj/usr/src/sys/TIGER64 amd64 >>>>>>>>>>> >>>>>>>>>>> $ sysctl kern.osreldate >>>>>>>>>>> kern.osreldate: 700037 >>>>>>>>>>> >>>>>>>>>>> cvsup'ed 29.04.2007 >>>>>>>>>>> >>>>>>>>>>> kernel with: >>>>>>>>>>> >>>>>>>>>>> makeoptions DEBUG=-g >>>>>>>>>>> >>>>>>>>>>> options KDB >>>>>>>>>>> >>>>>>>>>>> options DDB >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> options INVARIANTS >>>>>>>>>>> >>>>>>>>>>> options INVARIANT_SUPPORT >>>>>>>>>>> >>>>>>>>>>> options WITNESS >>>>>>>>>>> >>>>>>>>>>> At first, when I make kldload if_rum, I get kernel panic. >>>>>>>>>>> But I cant get saved core, as ddb just hangs during "call >>>>>>>>>>> doadump" >>>>>>>>>> I have a solution for all of this locking stuff! >>>>>>>>>> >>>>>>>>>>> So I add >>>>>>>>>>> >>>>>>>>>>> #define RUM_LOCK(sc) do { ((sc) = (sc)); mtx_lock(&Giant); } >>>>>>>>>>> while (0) >>>>>>>>>>> #define RUM_UNLOCK(sc) mtx_unlock(&Giant) >>>>>>>>>>> >>>>>>>>>>> in if_rumvar.h >>>>>>>>>>> >>>>>>>>>>> I spend a lot of time in attempts get rid of Giant ant always >>>>>>>>>>> got >>>>>>>>>>> only panics. >>>>>>>>>> You _cannot_ do that with the old USB stack, because you must >>>>>>>>>> lock >>>>>>>>>> Giant before calling into the usbxxx functions. Then in the USB >>>>>>>>>> callback, Giant is locked, and then you cannot lock RUM_LOCK()! >>>>>>>>>> That means you will most likely end up with a deadlock pretty >>>>>>>>>> soon, >>>>>>>>>> if you see that. >>>>>>>>> Thanks, for explanations. I suspected that thing are like that, >>>>>>>>> and >>>>>>>>> I have tried make porting by analogue with other drivers which >>>>>>>>> I can >>>>>>>>> find in dev/usb, but I was not can find the description of doing >>>>>>>>> "right way" locking before. >>>>>>>> Firstly, thanks for taking the time to test my patch. >>>>>>>> I think your issue is related to watchdog timers. The revised patch >>>>>>>> is at http://people.freebsd.org/~kevlo/patch-rum >>>>>>>> >>>>>>>> Besides, I don't get a panic during high load when getting a file >>>>>>>> about 400MB via ftp. >>>>>>> Sorry, but the error that I see the same, just after inserting >>>>>>> dongle, >>>>>>> or if it was inserted before - after kldload if_rum: >>>>>>> >>>>>>> panic: sleeping without a lock >>>>>>> >>>>>>> the top of stack: >>>>>>> at usbd_transfer +0x1fe >>>>>>> .... >>>>>>> rum_ioctl >>>>>>> >>>>>>> And I cant get saved kernel coredump at the end. >>>>>>> >>>>>>> I have not serial console configured so it was just subscribed by >>>>>>> hand. Of course I can reproduce it again and subscribe what you will >>>>>>> ask. >>>>>>> >>>>>>> I have SMP kernel and use AMD64 architecture, maybe this are the >>>>>>> reasons why we are getting different results. >>>>>>> >>>>>>> Can you please, explain me in two words(or give a reference) why you >>>>>>> are dropping mtx_lock(&Giant). Yes I have seen the same in if_ural.c >>>>>>> and as i have wrote before unsuccessfully have tried repeat it in >>>>>>> if_rum. I know that current USB stack is not Giant free, and Hans >>>>>>> noted that this is impossible (if I understand him right). Maybe >>>>>>> exists some tunable or kernel option or another trick that allows >>>>>>> drivers working without the Giant under current USB stack, which I >>>>>>> must use. >>>>>>> >>>>>>> Thank you for your time and patience. >>>>>>> Sorry for my english. >>>>>>> >>>>>>> Valery. >>>>>>> >>>>>>>>>>> After that I get hangs, >>>>>>>>>>> which i resolved by modifying rum_ioctl: >>>>>>>>>> I'm almost finished converting "if_rum.c()" to the new USB stack. >>>>>>>>>> >>>>>>>>>> In some hours I will update it with support for "if_rum". >>>>>>>>>> >>>>>>>>>> If you can test that and forget about the old USB stack, I >>>>>>>>>> will be >>>>>>>>>> very happy :-) >>>>>>>>> I will do it with pleasure. I was almost ready to do it >>>>>>>>> (converting >>>>>>>>> to new USB stack) by myself, but I was stopped by the fact that I >>>>>>>>> cant make it compiled under CURRENT. I have seen your mail that >>>>>>>>> your >>>>>>>>> are working on this. Is new the USB stack ready for CURRENT now? >>>>>>>>> >>>>>>>>> Valery. >>>>>>>>> >>>>>>>>>> --HPS >>>>>>>>>> >>>>>>>>>> http://www.turbocat.net/~hselasky/usb4bsd >>>>>>>> Kevin >>>>>> Hi, >>>>>> >>>>>> I have just imported "if_rum.c" to SVN and my P4 tree. >>>>>> >>>>>> Just do a SVN update. Build a new USB package install that. >>>>>> >>>>>> cp -r i4b/trunk/i4b/src/sys/modules/rum /usr/src/sys/modules/rum >>>>>> >>>>>> make -C /usr/src/sys/modules/rum all install >>>>>> >>>>>> Hope it works. >>>>> If you can read this message, then it definitely works :-) >>>>> Thank you, great work! >>>>> >>>>> Only one issue: >>>>> during kernel load, and later after kldload if_rum I got a bunch of >>>>> messages >>>>> >>>>> usbd_fill_iface_data: invalid wMaxPacketSize=0x0000, addr=125! >>>>> usbd_fill_iface_data: invalid wMaxPacketSize=0x0000, addr=125! >>>>> usbd_fill_iface_data: invalid wMaxPacketSize=0x0000, addr=125! >>>>> usbd_fill_iface_data: invalid wMaxPacketSize=0x0000, addr=125! >>>> Ok. Do you have USB Bluetooth devices ? >>>> >>>> --HPS >>> Yes. >>> >>> tiger# usbdevs >>> addr 127: UHCI root hub, Intel >>> addr 127: UHCI root hub, Intel >>> addr 127: UHCI root hub, Intel >>> addr 127: UHCI root hub, Intel >>> addr 124: 802.11 bg WLAN, Ralink >>> addr 125: TrueMobile 350 Bluetooth USB Adapter, Dell >>> addr 126: product 0xa005, Dell >>> addr 125: TrueMobile 350 Bluetooth USB Adapter, Dell >>> addr 127: EHCI root hub, Intel >>> addr 126: product 0xa005, Dell >>> addr 125: TrueMobile 350 Bluetooth USB Adapter, Dell >>> addr 124: 802.11 bg WLAN, Ralink >>> >>> of course I have only /one/ USB Adapter, not three. >>> >>> Valery. >> >> The warnings you get can just be ignored. They come from a dummy >> alternate setting on your USB Bluetooth adapter. >> >> --HPS >> > > First regression. > Inserting any of umass devices(I have tried three different ones) lead to > > panic: mutex UMASS lock not owned at /usr/src/sys/cam/cam_xpt.c:4329 > > Part of backtrace, i have coredump with debug symbols included, so I can > give you more information if you need. Situation 100% reproducible. > > #11 0xffffffff80289f8a in panic ( > fmt=0xffffffff8050f820 "mutex %s not owned at %s:%d") > at /usr/src/sys/kern/kern_shutdown.c:547 > #12 0xffffffff8027d878 in _mtx_assert (m=0xffffff0017816010, what=1, > file=0xffffffff804e2801 "/usr/src/sys/cam/cam_xpt.c", line=4329) > at /usr/src/sys/kern/kern_mutex.c:607 > #13 0xffffffff801557ab in xpt_bus_register (sim=0xffffff0014faa300, bus=0) > at /usr/src/sys/cam/cam_xpt.c:4329 > #14 0xffffffff808e40dd in umass_attach (dev=0xffffff0014faac00) > at /usr/src/sys/modules/umass/../../dev/usb/umass.c:2289 > #15 0xffffffff802b161b in DEVICE_ATTACH (dev=0xffffff0014faac00) > at device_if.h:178 > #16 0xffffffff802b150e in device_attach (dev=0xffffff0014faac00) > at /usr/src/sys/kern/subr_bus.c:2379 > #17 0xffffffff802b143f in device_probe_and_attach (dev=0xffffff0014faac00) > at /usr/src/sys/kern/subr_bus.c:2347 > #18 0xffffffff804819cb in usbd_probe_and_attach (parent=0xffffff0000d29200, > port=4, up=0xffffff001e276898) at /usr/src/sys/dev/usb/usb_subr.c:1071 > #19 0xffffffff804823ab in usbd_new_device (parent=0xffffff0000d29200, > bus=0xffffffff80a48030, depth=1, speed=3, port=4, > up=0xffffff001e276898) > at /usr/src/sys/dev/usb/usb_subr.c:1388 > #20 0xffffffff8020e319 in uhub_explore (udev=0xffffff0000c11800) > at /usr/src/sys/dev/usb/uhub.c:293 > ---Type to continue, or q to quit--- > #21 0xffffffff8047d407 in usb_discover (bus=0xffffffff80a48030) > at /usr/src/sys/dev/usb/usb.c:165 > #22 0xffffffff8047d489 in usb_event_thread (bus=0xffffffff80a48030) > at /usr/src/sys/dev/usb/usb.c:195 > #23 0xffffffff80268d78 in fork_exit ( > callout=0xffffffff8047d43e , arg=0xffffffff80a48030, > frame=0xffffffff91947c80) at /usr/src/sys/kern/kern_fork.c:814 > > Valery. > _______________________________________________ > freebsd-usb@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-usb > To unsubscribe, send any mail to "freebsd-usb-unsubscribe@freebsd.org" > Just for the record. This issue was successfully resolved in SVN revision 482 of the new USB stack. Thanks to Hans Petter Selasky. Valery. From owner-freebsd-usb@FreeBSD.ORG Tue May 1 07:47:56 2007 Return-Path: X-Original-To: freebsd-usb@FreeBSD.org Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 842C816A403; Tue, 1 May 2007 07:47:56 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from ns.kevlo.org (kevlo.org [220.128.136.52]) by mx1.freebsd.org (Postfix) with ESMTP id 0714513C447; Tue, 1 May 2007 07:47:55 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from [127.0.0.1] (kevlo.org [220.128.136.52]) by ns.kevlo.org (8.13.8/8.13.8) with ESMTP id l417nTbK013263; Tue, 1 May 2007 15:49:29 +0800 (CST) (envelope-from kevlo@FreeBSD.org) From: Kevin Lo To: Hans Petter Selasky In-Reply-To: <200704301754.53119.hselasky@freebsd.org> References: <200704272330.l3RNU94X078095@freefall.freebsd.org> <1177917188.11361.34.camel@monet> <4635E26F.9090801@chikalov.dp.ua> <200704301754.53119.hselasky@freebsd.org> Content-Type: text/plain; charset=utf-8 Date: Tue, 01 May 2007 15:47:53 +0800 Message-Id: <1178005673.5681.11.camel@monet> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 8bit Cc: freebsd-usb@FreeBSD.org Subject: Re: usb/107642: [patch]Ralink Technology RT2501USB/RT2601USB chipset driver X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2007 07:47:56 -0000 Hans Petter Selasky wrote: > On Monday 30 April 2007 14:34, Valery V.Chikalov wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > Kevin Lo пишет: > > > Valery V.Chikalov wrote: > > >> Hans Petter Selasky wrote: > > >>> On Sunday 29 April 2007 15:02, Valery V.Chikalov wrote: > > >>>> Kevin Lo wrote: > > >>>>> Valery V.Chikalov wrote: > > >>>>>> The following reply was made to PR usb/107642; it has been noted by > > >>>>>> GNATS. > > >>>>>> > > >>>>>> From: "Valery V.Chikalov" > > >>>>>> To: bug-followup@FreeBSD.org, valera@chikalov.dp.ua > > >>>>>> Cc: > > >>>>>> Subject: Re: usb/107642: [patch]Ralink Technology > > >>>>>> RT2501USB/RT2601USB chipset driver > > >>>>>> Date: Sun, 22 Apr 2007 11:32:18 +0300 > > >>>>>> > > >>>>>> This is a multi-part message in MIME format. > > >>>>>> --------------030900090303000507070905 > > >>>>>> Content-Type: text/plain; charset=UTF-8 > > >>>>>> Content-Transfer-Encoding: 7bit > > > > > > if_rum(4) for 7.0-CURRENT > > > > > > replaced amrr_* functions by "standard" ones already existed in > > > net80211/ieee80211_amrr.c > > > > > >>>>> Hi Valery, > > >>>>> > > >>>>> I guess you wasn't aware that I've already ported rum(4) to FreeBSD. > > >>>>> The patch is available at: http://people.freebsd.org/~kevlo/patch-rum > > >>>>> Maybe you can test my patch? Thanks. > > >>>>> > > >>>>> Kevin > > >>>> > > >>>> Hi, Kevin, > > >>>> > > >>>> Your driver not working for me. Fortunately, the errors that I see > > >>>> exactly the same which i fight when I made my driver. > > >>>> > > >>>> $ uname -a > > >>>> FreeBSD tiger.novakom.dp.ua 7.0-CURRENT FreeBSD 7.0-CURRENT #6: Sun > > >>>> Apr 29 13:58:48 EEST 2007 > > >>>> root@tiger.novakom.dp.ua:/usr/obj/usr/src/sys/TIGER64 amd64 > > >>>> > > >>>> $ sysctl kern.osreldate > > >>>> kern.osreldate: 700037 > > >>>> > > >>>> cvsup'ed 29.04.2007 > > >>>> > > >>>> kernel with: > > >>>> > > >>>> makeoptions DEBUG=-g > > >>>> > > >>>> options KDB > > >>>> > > >>>> options DDB > > >>>> > > >>>> > > >>>> > > >>>> options INVARIANTS > > >>>> > > >>>> options INVARIANT_SUPPORT > > >>>> > > >>>> options WITNESS > > >>>> > > >>>> At first, when I make kldload if_rum, I get kernel panic. > > >>>> But I cant get saved core, as ddb just hangs during "call doadump" > > >>> > > >>> I have a solution for all of this locking stuff! > > >>> > > >>>> So I add > > >>>> > > >>>> #define RUM_LOCK(sc) do { ((sc) = (sc)); mtx_lock(&Giant); } while > > >>>> (0) > > >>>> #define RUM_UNLOCK(sc) mtx_unlock(&Giant) > > >>>> > > >>>> in if_rumvar.h > > >>>> > > >>>> I spend a lot of time in attempts get rid of Giant ant always got only > > >>>> panics. > > >>> > > >>> You _cannot_ do that with the old USB stack, because you must lock > > >>> Giant before calling into the usbxxx functions. Then in the USB > > >>> callback, Giant is locked, and then you cannot lock RUM_LOCK()! That > > >>> means you will most likely end up with a deadlock pretty soon, if you > > >>> see that. > > >> > > >> Thanks, for explanations. I suspected that thing are like that, and I > > >> have tried make porting by analogue with other drivers which I can find > > >> in dev/usb, but I was not can find the description of doing "right way" > > >> locking before. > > > > > > Firstly, thanks for taking the time to test my patch. > > > I think your issue is related to watchdog timers. The revised patch is > > > at http://people.freebsd.org/~kevlo/patch-rum > > > > > > Besides, I don't get a panic during high load when getting a file about > > > 400MB via ftp. > > > > Sorry, but the error that I see the same, just after inserting dongle, > > or if it was inserted before - after kldload if_rum: > > > > panic: sleeping without a lock > > > > the top of stack: > > at usbd_transfer +0x1fe > > .... > > rum_ioctl > > > > And I cant get saved kernel coredump at the end. > > > > I have not serial console configured so it was just subscribed by hand. > > Of course I can reproduce it again and subscribe what you will ask. > > > > I have SMP kernel and use AMD64 architecture, maybe this are the reasons > > why we are getting different results. > > > > Can you please, explain me in two words(or give a reference) why you are > > dropping mtx_lock(&Giant). Yes I have seen the same in if_ural.c and as > > i have wrote before unsuccessfully have tried repeat it in if_rum. I > > know that current USB stack is not Giant free, and Hans noted that this > > is impossible (if I understand him right). Maybe exists some tunable or > > kernel option or another trick that allows drivers working without the > > Giant under current USB stack, which I must use. > > > > Thank you for your time and patience. > > Sorry for my english. > > > > Valery. > > > > >>>> After that I get hangs, > > >>>> which i resolved by modifying rum_ioctl: > > >>> > > >>> I'm almost finished converting "if_rum.c()" to the new USB stack. > > >>> > > >>> In some hours I will update it with support for "if_rum". > > >>> > > >>> If you can test that and forget about the old USB stack, I will be very > > >>> happy :-) > > >> > > >> I will do it with pleasure. I was almost ready to do it (converting to > > >> new USB stack) by myself, but I was stopped by the fact that I cant make > > >> it compiled under CURRENT. I have seen your mail that your are working > > >> on this. Is new the USB stack ready for CURRENT now? > > >> > > >> Valery. > > >> > > >>> --HPS > > >>> > > >>> http://www.turbocat.net/~hselasky/usb4bsd > > > > > > Kevin > > Hi, Hi, > I have just imported "if_rum.c" to SVN and my P4 tree. > > Just do a SVN update. Build a new USB package install that. > > cp -r i4b/trunk/i4b/src/sys/modules/rum /usr/src/sys/modules/rum > > make -C /usr/src/sys/modules/rum all install > > Hope it works. Tested, it works like a charm. Thanks :-) > > --HPS > > http://www.turbocat.net/~hselasky/usb4bsd Kevin From owner-freebsd-usb@FreeBSD.ORG Tue May 1 12:13:17 2007 Return-Path: X-Original-To: freebsd-usb@hub.freebsd.org Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0AD6A16A407; Tue, 1 May 2007 12:13:17 +0000 (UTC) (envelope-from alexbl@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id DB5C613C45A; Tue, 1 May 2007 12:13:16 +0000 (UTC) (envelope-from alexbl@FreeBSD.org) Received: from freefall.freebsd.org (alexbl@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l41CDGha009698; Tue, 1 May 2007 12:13:16 GMT (envelope-from alexbl@freefall.freebsd.org) Received: (from alexbl@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l41CDGOi009694; Tue, 1 May 2007 12:13:16 GMT (envelope-from alexbl) Date: Tue, 1 May 2007 12:13:16 GMT From: Alexander Botero-Lowry Message-Id: <200705011213.l41CDGOi009694@freefall.freebsd.org> To: nehalmistry@gmx.net, alexbl@FreeBSD.org, freebsd-usb@FreeBSD.org Cc: Subject: Re: usb/80373: usb keyboard does not respond X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2007 12:13:17 -0000 Synopsis: usb keyboard does not respond State-Changed-From-To: open->closed State-Changed-By: alexbl State-Changed-When: Tue May 1 12:12:52 UTC 2007 State-Changed-Why: Submitter resolved problem http://www.freebsd.org/cgi/query-pr.cgi?pr=80373 From owner-freebsd-usb@FreeBSD.ORG Thu May 3 15:28:40 2007 Return-Path: X-Original-To: usb@freebsd.org Delivered-To: freebsd-usb@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 008E916A400; Thu, 3 May 2007 15:28:40 +0000 (UTC) (envelope-from alex.kovalenko@verizon.net) Received: from vms040pub.verizon.net (vms040pub.verizon.net [206.46.252.40]) by mx1.freebsd.org (Postfix) with ESMTP id D890B13C455; Thu, 3 May 2007 15:28:39 +0000 (UTC) (envelope-from alex.kovalenko@verizon.net) Received: from [10.0.3.231] ([70.21.141.166]) by vms040.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JHH000171NHQ3W3@vms040.mailsrvcs.net>; Thu, 03 May 2007 10:28:30 -0500 (CDT) Date: Thu, 03 May 2007 11:27:36 -0400 From: "Alexandre \"Sunny\" Kovalenko" In-reply-to: <20070501224545.84C6945042@ptavv.es.net> To: Kevin Oberman Message-id: <1178206056.97564.9.camel@RabbitsDen> MIME-version: 1.0 X-Mailer: Evolution 2.10.1 FreeBSD GNOME Team Port Content-type: text/plain Content-transfer-encoding: 7bit References: <20070501224545.84C6945042@ptavv.es.net> Cc: usb@freebsd.org, acpi@freebsd.org Subject: Re: cpu.cx usage no longer available? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2007 15:28:40 -0000 On Tue, 2007-05-01 at 15:45 -0700, Kevin Oberman wrote: > > I am VERY pleased to see that Hans Petter's new USB drivers do allow the > system to drop into C3! It will require a bit more testing, but I hope > to be able to leave USB in my kernel without serious battery life > impact. > > I have heard that the new USB drivers are unlikely to make it into V7.0 > due to lack of testing. I really hope a few more people give it a whirl > and report back on the results, good or bad, so that the drivers can > either be fixed or added to current. I have not seen it in your original E-mail... was this -CURRENT? I was under the impression that new USB stack patch is RELENG_6 only ATM. usb@ CC'ed. Alexandre "Sunny" Kovalenko. From owner-freebsd-usb@FreeBSD.ORG Thu May 3 15:49:26 2007 Return-Path: X-Original-To: usb@freebsd.org Delivered-To: freebsd-usb@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 97C2016A400 for ; Thu, 3 May 2007 15:49:26 +0000 (UTC) (envelope-from SRS1=498b995e2b54a3af8ea87816bd6d159beb46b984=es.net==498b995e2b54a3af8ea87816bd6d159beb46b984=324=es.net=oberman@es.net) Received: from postal1.es.net (postal1.es.net [198.128.3.205]) by mx1.freebsd.org (Postfix) with ESMTP id 7B29413C458 for ; Thu, 3 May 2007 15:49:26 +0000 (UTC) (envelope-from SRS1=498b995e2b54a3af8ea87816bd6d159beb46b984=es.net==498b995e2b54a3af8ea87816bd6d159beb46b984=324=es.net=oberman@es.net) Received: from postal1.es.net (postal4.es.net [198.124.252.66]) by postal1.es.net (Postal Node 1) with ESMTP (SSL) id IUK90334 for ; Thu, 03 May 2007 08:33:34 -0700 Received: from postal1.es.net (postal2.es.net [198.128.3.206]) by postal4.es.net (Postal Node 4) with ESMTP (SSL) id IUK49832 for ; Thu, 03 May 2007 08:33:32 -0700 Received: from ptavv.es.net (ptavv.es.net [198.128.4.29]) by postal2.es.net (Postal Node 2) with ESMTP (SSL) id IUK41130; Thu, 03 May 2007 08:33:30 -0700 Received: from ptavv.es.net (ptavv.es.net [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id 3A13D45042; Thu, 3 May 2007 08:33:30 -0700 (PDT) To: "Alexandre \"Sunny\" Kovalenko" In-Reply-To: Your message of "Thu, 03 May 2007 11:27:36 EDT." <1178206056.97564.9.camel@RabbitsDen> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1178206410_36305P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Thu, 03 May 2007 08:33:30 -0700 From: "Kevin Oberman" Message-Id: <20070503153330.3A13D45042@ptavv.es.net> Cc: usb@freebsd.org Subject: Re: cpu.cx usage no longer available? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2007 15:49:26 -0000 --==_Exmh_1178206410_36305P Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > Date: Thu, 03 May 2007 11:27:36 -0400 > From: "Alexandre \"Sunny\" Kovalenko" > > On Tue, 2007-05-01 at 15:45 -0700, Kevin Oberman wrote: > > > > > I am VERY pleased to see that Hans Petter's new USB drivers do allow the > > system to drop into C3! It will require a bit more testing, but I hope > > to be able to leave USB in my kernel without serious battery life > > impact. > > > > I have heard that the new USB drivers are unlikely to make it into V7.0 > > due to lack of testing. I really hope a few more people give it a whirl > > and report back on the results, good or bad, so that the drivers can > > either be fixed or added to current. > > I have not seen it in your original E-mail... was this -CURRENT? I was > under the impression that new USB stack patch is RELENG_6 only ATM. > > usb@ CC'ed. > > Alexandre "Sunny" Kovalenko. > It was only V6, but the trivial fix to deal with the different API in current has now been added and it is working very nicely for me on current. (I had previously patched the V6-only version for current at Hans Petter's direction. It was just one or two lines.) I think the message that it could be applied to current went out to the current mailer earlier this week. acpi@ removed from distribution. -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634 Key fingerprint:059B 2DDF 031C 9BA3 14A4 EADA 927D EBB3 987B 3751 --==_Exmh_1178206410_36305P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) Comment: Exmh version 2.5 06/03/2002 iD8DBQFGOgDKkn3rs5h7N1ERAoC1AJ9ybRiU5nIwaeMpwEQ+I+9p4z0H8QCfb4wk bR/Eo+6ko3EeP8z+iO+gNEQ= =r0cU -----END PGP SIGNATURE----- --==_Exmh_1178206410_36305P-- From owner-freebsd-usb@FreeBSD.ORG Thu May 3 17:15:36 2007 Return-Path: X-Original-To: freebsd-usb@hub.freebsd.org Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7BCB916A406; Thu, 3 May 2007 17:15:36 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 537F213C448; Thu, 3 May 2007 17:15:36 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from freefall.freebsd.org (maxim@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l43HFadi020697; Thu, 3 May 2007 17:15:36 GMT (envelope-from maxim@freefall.freebsd.org) Received: (from maxim@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l43HFZrb020693; Thu, 3 May 2007 17:15:35 GMT (envelope-from maxim) Date: Thu, 3 May 2007 17:15:35 GMT From: Maxim Konovalov Message-Id: <200705031715.l43HFZrb020693@freefall.freebsd.org> To: maxim@azarov.com, maxim@FreeBSD.org, freebsd-usb@FreeBSD.org Cc: Subject: Re: usb/81191: Support for Curitel HX-550C USB modem to 5.4 RELEASE. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2007 17:15:36 -0000 Synopsis: Support for Curitel HX-550C USB modem to 5.4 RELEASE. State-Changed-From-To: open->closed State-Changed-By: maxim State-Changed-When: Thu May 3 17:15:07 UTC 2007 State-Changed-Why: Support for Curitel HX-550C USB modem was committed to HEAD and RELENG_6. http://www.freebsd.org/cgi/query-pr.cgi?pr=81191 From owner-freebsd-usb@FreeBSD.ORG Thu May 3 21:02:14 2007 Return-Path: X-Original-To: freebsd-usb@hub.freebsd.org Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3B4C616A401; Thu, 3 May 2007 21:02:14 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 13B6D13C448; Thu, 3 May 2007 21:02:14 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l43L2DOn034864; Thu, 3 May 2007 21:02:13 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l43L2D3E034860; Thu, 3 May 2007 21:02:13 GMT (envelope-from linimon) Date: Thu, 3 May 2007 21:02:13 GMT From: Mark Linimon Message-Id: <200705032102.l43L2D3E034860@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-usb@FreeBSD.org Cc: Subject: Re: usb/112392: [usbdevs] [patch] Make Epson Perfection 3490 recognized X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2007 21:02:14 -0000 Old Synopsis: Make Epson Perfection 3490 recognized New Synopsis: [usbdevs] [patch] Make Epson Perfection 3490 recognized Responsible-Changed-From-To: freebsd-bugs->freebsd-usb Responsible-Changed-By: linimon Responsible-Changed-When: Thu May 3 21:01:22 UTC 2007 Responsible-Changed-Why: Reclassify and reassign. http://www.freebsd.org/cgi/query-pr.cgi?pr=112392 From owner-freebsd-usb@FreeBSD.ORG Fri May 4 18:22:04 2007 Return-Path: X-Original-To: usb@freebsd.org Delivered-To: freebsd-usb@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 06B9716A401 for ; Fri, 4 May 2007 18:22:04 +0000 (UTC) (envelope-from SRS1=6e1181dfb39ff452706ea619164e15f9da1ab086=es.net==6e1181dfb39ff452706ea619164e15f9da1ab086=325=es.net=oberman@es.net) Received: from postal1.es.net (postal1.es.net [198.128.3.205]) by mx1.freebsd.org (Postfix) with ESMTP id E036B13C457 for ; Fri, 4 May 2007 18:22:03 +0000 (UTC) (envelope-from SRS1=6e1181dfb39ff452706ea619164e15f9da1ab086=es.net==6e1181dfb39ff452706ea619164e15f9da1ab086=325=es.net=oberman@es.net) Received: from postal1.es.net (postal4.es.net [198.124.252.66]) by postal1.es.net (Postal Node 1) with ESMTP (SSL) id JXK27731 for ; Fri, 04 May 2007 11:06:31 -0700 Received: from ptavv.es.net (ptavv.es.net [198.128.4.29]) by postal4.es.net (Postal Node 4) with ESMTP (SSL) id JXK74829 for ; Fri, 04 May 2007 11:06:29 -0700 Received: from ptavv.es.net (ptavv.es.net [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id B14D845042 for ; Fri, 4 May 2007 11:06:28 -0700 (PDT) To: usb@freebsd.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1178301988_49832P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Fri, 04 May 2007 11:06:28 -0700 From: "Kevin Oberman" Message-Id: <20070504180628.B14D845042@ptavv.es.net> Cc: Subject: New USB drivers X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2007 18:22:04 -0000 --==_Exmh_1178301988_49832P Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I have now been running the Hans Petter's USB drivers for about a week and they have been working pretty well. That said, I have seen two things that concern me. 1. Today I connected a USB disk to the system. It ran fine, but then I dismounted it (using nautilus and hald), the window informing me that the device could be safely removed popped up and I unplugged the drive. At that point, my system live-locked. I did see some updates to windows, but I could not change focus to a different window nor could I move to a different desktop. I tried CTRL-ALT-BS to kill X, but it would not work. I tried CTRL-ALT-DEL to reboot the system. No joy. The system was at least partly alive as the disk activity LED would flash now and then. I eventually had to power-cycle it. :-( As a result I have pretty much no information to help track this one down. 2. I use dd to mirror my system disk on a weekly basis. I track the performance of dd during this operation and, with no other changes than the USB stack being added to the kernel, the average transfer rate dropped from 17.43 MB to 17.15 MB. Not huge, but quite noticeable when copying an 80 GB drive. I run this in single-user mode with no partitions mounted (except root mounted read-only), so USB previously had not even been loaded, so the old drivers may have had even a greater impact. And the difference may not be the USB stack, but nothing else was changed. It will take more time to tell if there is a real problem here, but I wanted to provide a little (very little, I admit) information on my experience. Thanks, Hans, for all of your work on this. -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634 Key fingerprint:059B 2DDF 031C 9BA3 14A4 EADA 927D EBB3 987B 3751 --==_Exmh_1178301988_49832P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) Comment: Exmh version 2.5 06/03/2002 iD8DBQFGO3Ykkn3rs5h7N1ERAudYAJ4ycSrdkOHGO4Bf8NnTZSPHucoFbACgn3N2 DHzcmiRqvuzhJFZWPHSb9Tc= =Q+iA -----END PGP SIGNATURE----- --==_Exmh_1178301988_49832P-- From owner-freebsd-usb@FreeBSD.ORG Sat May 5 13:10:56 2007 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EE67216A402 for ; Sat, 5 May 2007 13:10:56 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.swip.net [212.247.154.1]) by mx1.freebsd.org (Postfix) with ESMTP id 8E42F13C459 for ; Sat, 5 May 2007 13:10:56 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [81.191.58.152] (account mc467741@c2i.net HELO [192.168.1.123]) by mailfe01.swip.net (CommuniGate Pro SMTP 5.1.7) with ESMTPA id 461994153; Sat, 05 May 2007 15:10:54 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Sat, 5 May 2007 15:10:38 +0200 User-Agent: KMail/1.9.5 References: <20070504180628.B14D845042@ptavv.es.net> In-Reply-To: <20070504180628.B14D845042@ptavv.es.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200705051510.39046.hselasky@c2i.net> Cc: Scott Long , Kevin Oberman Subject: Re: New USB drivers X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2007 13:10:57 -0000 On Friday 04 May 2007 20:06, Kevin Oberman wrote: > I have now been running the Hans Petter's USB drivers for about a week > and they have been working pretty well. > > That said, I have seen two things that concern me. > > 1. Today I connected a USB disk to the system. It ran fine, but then I > dismounted it (using nautilus and hald), the window informing me that > the device could be safely removed popped up and I unplugged the > drive. > > At that point, my system live-locked. I did see some updates to > windows, but I could not change focus to a different window nor could > I move to a different desktop. I tried CTRL-ALT-BS to kill X, but it > would not work. I tried CTRL-ALT-DEL to reboot the system. No joy. > > The system was at least partly alive as the disk activity LED would > flash now and then. I eventually had to power-cycle it. :-( As a > result I have pretty much no information to help track this one down. This is a problem in the CAM layer. It does not really support detaching the SIM I think. Scott: When will this issue be fixed ? > > 2. I use dd to mirror my system disk on a weekly basis. I track the > performance of dd during this operation and, with no other changes > than the USB stack being added to the kernel, the average transfer > rate dropped from 17.43 MB to 17.15 MB. Not huge, but quite > noticeable when copying an 80 GB drive. > > I run this in single-user mode with no partitions mounted (except > root mounted read-only), so USB previously had not even been loaded, > so the old drivers may have had even a greater impact. And the > difference may not be the USB stack, but nothing else was changed. > > It will take more time to tell if there is a real problem here, but I > wanted to provide a little (very little, I admit) information on my > experience. Ok. > > Thanks, Hans, for all of your work on this. You're welcome. There will be more USB stack changes coming soon. --HPS From owner-freebsd-usb@FreeBSD.ORG Sat May 5 15:45:51 2007 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 62B5F16A402 for ; Sat, 5 May 2007 15:45:51 +0000 (UTC) (envelope-from buckaroo@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id B6A7713C447 for ; Sat, 5 May 2007 15:45:50 +0000 (UTC) (envelope-from buckaroo@gmx.de) Received: (qmail invoked by alias); 05 May 2007 15:19:09 -0000 Received: from i53879F32.versanet.de (EHLO [192.168.0.4]) [83.135.159.50] by mail.gmx.net (mp053) with SMTP; 05 May 2007 17:19:09 +0200 X-Authenticated: #171259 X-Provags-ID: V01U2FsdGVkX1/q1vgf8KDqqp1Sy/RDMKJ9cUhBz/OGrDHd1K5Q3U qm+2kynlK5gy3V From: Mark Nowiasz To: freebsd-usb@freebsd.org Content-Type: text/plain; charset=UTF-8 Organization: Privat Date: Sat, 05 May 2007 17:19:09 +0200 Message-Id: <1178378349.1273.4.camel@tower> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 8bit X-Y-GMX-Trusted: 0 Subject: Microsoft Natural Ergonomic Keyboard question X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2007 15:45:51 -0000 Hi all, I've got myself a Microsoft Natural Ergonomic Keyboard 4000 and it works just fine – besides the additional keys not being found on a normal keyboard (like favorites, calculator, the zoom wheel, etc.). xev doesn't receive any events from this keys, neither does lineak and so on so I guess it's an usb issue. Is there anything I can do to activate these keys? And if not, could you give me a hint which source file to play around with? Thanks in advance, Mark -- Q: How many marketing people does it take to change a lightbulb? A: I'll have to get back to you on that. From owner-freebsd-usb@FreeBSD.ORG Sat May 5 17:00:14 2007 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CB04116A404 for ; Sat, 5 May 2007 17:00:14 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 845C613C455 for ; Sat, 5 May 2007 17:00:14 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id l45H00IN078761; Sat, 5 May 2007 11:00:00 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <463CB80B.10003@samsco.org> Date: Sat, 05 May 2007 10:59:55 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.2pre) Gecko/20070111 SeaMonkey/1.1 MIME-Version: 1.0 To: Hans Petter Selasky References: <20070504180628.B14D845042@ptavv.es.net> <200705051510.39046.hselasky@c2i.net> In-Reply-To: <200705051510.39046.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Sat, 05 May 2007 11:00:01 -0600 (MDT) X-Spam-Status: No, score=-1.4 required=5.5 tests=ALL_TRUSTED autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: freebsd-usb@freebsd.org, Kevin Oberman Subject: Re: New USB drivers X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2007 17:00:14 -0000 Hans Petter Selasky wrote: > On Friday 04 May 2007 20:06, Kevin Oberman wrote: >> I have now been running the Hans Petter's USB drivers for about a week >> and they have been working pretty well. >> >> That said, I have seen two things that concern me. >> >> 1. Today I connected a USB disk to the system. It ran fine, but then I >> dismounted it (using nautilus and hald), the window informing me that >> the device could be safely removed popped up and I unplugged the >> drive. >> >> At that point, my system live-locked. I did see some updates to >> windows, but I could not change focus to a different window nor could >> I move to a different desktop. I tried CTRL-ALT-BS to kill X, but it >> would not work. I tried CTRL-ALT-DEL to reboot the system. No joy. >> >> The system was at least partly alive as the disk activity LED would >> flash now and then. I eventually had to power-cycle it. :-( As a >> result I have pretty much no information to help track this one down. > > This is a problem in the CAM layer. It does not really support detaching the > SIM I think. > > Scott: When will this issue be fixed ? > I've tested pulling USB drives in the MPSAFE CAM stack in 7-CURRENT. It's not as solid as I would like, but it does work most of the time. I'll continue to work on it, but it's not my highest priority unfortunately. And, I'll say it again, what needs to happen is for the umass driver to be split into a SIM that attaches to each USB bus, and a target that attaches when the umass device is inserted. If no one else does it, I'll probably wind up rewriting the driver myself to do that. Scott From owner-freebsd-usb@FreeBSD.ORG Sat May 5 17:31:34 2007 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9E83416A402; Sat, 5 May 2007 17:31:34 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id D5E4F13C468; Sat, 5 May 2007 17:31:33 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [81.191.58.152] (account mc467741@c2i.net HELO [192.168.1.123]) by mailfe05.swip.net (CommuniGate Pro SMTP 5.1.7) with ESMTPA id 381785588; Sat, 05 May 2007 19:31:31 +0200 From: Hans Petter Selasky To: freebsd-current@freebsd.org, freebsd-usb@freebsd.org Date: Sat, 5 May 2007 19:31:12 +0200 User-Agent: KMail/1.9.5 References: <20070505165443.GA20239@ceid.upatras.gr> In-Reply-To: <20070505165443.GA20239@ceid.upatras.gr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200705051931.13033.hselasky@c2i.net> Cc: Marinos Ilias Subject: Re: ural && HPS usb stack X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2007 17:31:34 -0000 On Saturday 05 May 2007 18:54, Marinos Ilias wrote: > Hello people, > I have a Dell XPS m1210 and because it has intel wireless 3945ABG, which > doesn't work for me using the wpi driver, I decided to buy a Gigabyte > GN-WBKG wireless usb adapter.It is recognized normally with ural driver. > The last 3 weeks I had some weird problems using this usb adapter.While I > was surfing or listening to radio (from internet) the laptop many times > suddenly rebooted(a reboot like a hardware reset , which didn't give me the > chance to catch the errors).Also I am not sure how can I reproduce the > error in a way that I can understand what crashes. So I decided , to test > the HPS usb stack .Now I don't have these "reboots" any more but sometimes > after a lot of use it seems the device does not respond.Something has to do > with the ural driver.At such a moment I get the interface down and detach > and re-attach the stick but kernel does not see it anymore and I have to > reboot the whole system.I paste to you some messages : > > > marinosi@lucifer:~$ dmesg | grep ural > ural0: 126> ural0: at uhub4 port 2 (addr 126) disconnected > ural0: MAC/BBP RT2570 (rev 0x05), RF RT2526 > ural0: Ethernet address: 00:16:e6:3e:b3:f8 > ural0: detached > ural0: 126> ural0: MAC/BBP RT2570 (rev 0x05), RF RT2526 > ural0: Ethernet address: 00:16:e6:3e:b3:f8 > ural0: link state changed to UP > ural0: at uhub4 port 2 (addr 126) disconnected > ural0: link state changed to DOWN > ural0: detached > ural0: 126> ural0: MAC/BBP RT2570 (rev 0x05), RF RT2526 > ural0: Ethernet address: 00:16:e6:3e:b3:f8 > ural0: at uhub4 port 2 (addr 126) disconnected > ural0: detached > ural0: 126> ural0: MAC/BBP RT2570 (rev 0x05), RF RT2526 > ural0: Ethernet address: 00:16:e6:3e:b3:f8 > ural0: at uhub4 port 2 (addr 126) disconnected > ural0: detached > ural0: 126> ural0: could not set configuration number, err=USBD_TIMEOUT! > device_attach: ural0 attach returned 6 > > > > marinosi@lucifer:~$ sudo wpa_supplicant -i ural0 -c > /etc/wpa_supplicant.conf Failed to initialize driver interface > > IIRC , after this incident the usb port is fully disabled.I want to note , > that this happens without moving the usb adapter at all. > It might be that your adapter is drawing too much power, and that some fuse goes off. What rates are you using? Is the behaviour the same no matter what USB port you use? It is possible to turn on USB debugging using various "sysctl" commands, but it might flood your computer with messages. How time is it between the re-attach events ? --HPS