Date: Fri, 5 Mar 2010 16:16:56 -0800 From: Weongyo Jeong <weongyo.jeong@gmail.com> To: Joe Marcus Clarke <marcus@freebsd.org> Cc: current <current@freebsd.org> Subject: Re: Problem with new bwn driver on -CURRENT Message-ID: <20100306001656.GS1295@weongyo> In-Reply-To: <4B917B42.1060900@freebsd.org> References: <1267388668.39569.2410.camel@shumai.marcuscom.com> <20100301233706.GH1295@weongyo> <1267505443.35639.9.camel@shumai.marcuscom.com> <20100303220452.GL1295@weongyo> <4B8EE6B1.6030605@freebsd.org> <20100303231416.GN1295@weongyo> <1267679522.5324.20.camel@shumai.marcuscom.com> <20100305205349.GR1295@weongyo> <4B917B42.1060900@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--DqhR8hV3EnoxUkKN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Mar 05, 2010 at 04:44:34PM -0500, Joe Marcus Clarke wrote: > On 3/5/10 3:53 PM, Weongyo Jeong wrote: > > On Thu, Mar 04, 2010 at 12:12:02AM -0500, Joe Marcus Clarke wrote: > >> On Wed, 2010-03-03 at 15:14 -0800, Weongyo Jeong wrote: > >>>> When it occurs again, I will get you the details and the full dmesg. Do > >>>> you want a verbose dmesg, or a standard one? > >>> > >>> I think a standard one is enough. Thank you. > >> > >> Here you go. This is on -CURRENT from about 30 minutes ago. Thanks for > >> looking into this. > >> > >> http://www.marcuscom.com/downloads/salami.dmesg > > > > Thank you for dmesg. It looks using PIO mode is only a way to avoid > > this problem. > > > > I looked sources and problems of other Broadcom wireless driver for LP > > PHY users. They also encounters this issue and are trying to solve > > this but no luck and no perfect patch until now. > > > > Recently AFAIK wireless-test git of linux adopted a patch `gracefully > > convert DMA to PIO mode' to solve it. > > > > Additionally some guys tolds some success story when they disabled ACPI > > but it looks it's not a perfect solution. > > > > IIRC you said PIO worked for association with your AP but no further > > traffic. However I wonder that this is weird for me because paths of > > sending management frames and sending data frames are same. Could you > > please recheck whether PIO mode worked? I'll try to test PIO mode on my > > environment again. > > I can absolutely confirm PIO mode does NOT work with my card. I tested > on a clean power-up. The card associates, but does not pass any > traffic. I do not see the same decryption messages that I do with DMA mode. OK. I'd like to see some verbose message from bwn(4) after applying attached patch with email. Could you please test with it and show me dmesg? I tested 3 broadcom card whose revisions are 5 and 9 and it looks it's working. I have one LP PHY device, half MiniPCI-E for laptop, but could not test with this patch because I could not turn on RF; it's connected with desktop using converter MiniPCI-E to PCI-E though normally it looks MiniPCI-E devices are turned on using H/W RF switch. regards, Weongyo Jeong --DqhR8hV3EnoxUkKN Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="patch_bwn_20100305.diff" Index: if_bwn.c =================================================================== --- if_bwn.c (revision 204657) +++ if_bwn.c (working copy) @@ -73,6 +73,7 @@ #include <dev/bwn/if_bwnreg.h> #include <dev/bwn/if_bwnvar.h> +#define BWN_DEBUG SYSCTL_NODE(_hw, OID_AUTO, bwn, CTLFLAG_RD, 0, "Broadcom driver parameters"); /* @@ -102,6 +103,7 @@ BWN_DEBUG_FW = 0x00004000, /* firmware */ BWN_DEBUG_WME = 0x00008000, /* WME */ BWN_DEBUG_RF = 0x00010000, /* RF */ + BWN_DEBUG_PIO = 0x00020000, /* PIO */ BWN_DEBUG_FATAL = 0x80000000, /* fatal errors */ BWN_DEBUG_ANY = 0xffffffff }; @@ -124,7 +126,7 @@ "uses H/W power control"); static int bwn_msi_disable = 0; /* MSI disabled */ TUNABLE_INT("hw.bwn.msi_disable", &bwn_msi_disable); -static int bwn_usedma = 1; +static int bwn_usedma = 0; SYSCTL_INT(_hw_bwn, OID_AUTO, usedma, CTLFLAG_RD, &bwn_usedma, 0, "uses DMA"); TUNABLE_INT("hw.bwn.usedma", &bwn_usedma); @@ -936,8 +938,11 @@ sc->sc_sd = sd; #ifdef BWN_DEBUG sc->sc_debug = bwn_debug; + sc->sc_debug |= BWN_DEBUG_ANY; #endif + device_printf(dev, "DEBUG %#x\n", sc->sc_debug); + if ((sc->sc_flags & BWN_FLAG_ATTACHED) == 0) { error = bwn_attach_pre(sc); if (error != 0) @@ -1410,6 +1415,7 @@ struct bwn_pio_txqueue *tq = bwn_pio_select(mac, M_WME_GETAC(m)); struct bwn_softc *sc = mac->mac_sc; struct bwn_txhdr txhdr; + struct ieee80211_frame *wh; struct mbuf *m_new; uint32_t ctl32; int error; @@ -1434,6 +1440,12 @@ tq->tq_used += roundup(m->m_pkthdr.len + BWN_HDRSIZE(mac), 4); tq->tq_free--; + wh = mtod(m, struct ieee80211_frame *); + DPRINTF(sc, BWN_DEBUG_PIO, + "tx: used %d free %d (type %#x subtype %#x)\n", tq->tq_used, + tq->tq_free, wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK, + wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK); + if (mac->mac_sd->sd_id.sd_rev >= 8) { /* * XXX please removes m_defrag(9) @@ -9236,6 +9248,8 @@ m->m_pkthdr.rcvif = ifp; m->m_len = m->m_pkthdr.len = len + padding; + DPRINTF(sc, BWN_DEBUG_PIO, "rx: m %p len %d\n", m, m->m_pkthdr.len); + bwn_rxeof(prq->prq_mac, m, &rxhdr); return (1); @@ -9562,6 +9576,9 @@ tp->tp_m = NULL; TAILQ_INSERT_TAIL(&tq->tq_pktlist, tp, tp_list); + DPRINTF(sc, BWN_DEBUG_PIO, "txeof: used %d free %d\n", tq->tq_used, + tq->tq_free); + ifp->if_opackets++; sc->sc_watchdog_timer = 0; --DqhR8hV3EnoxUkKN--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100306001656.GS1295>