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
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;
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[email protected]"