Re: Problem with new bwn driver on -CURRENT
On Mon, 2010-03-08 at 17:33 -0800, Weongyo Jeong wrote: Thank you for dmesg. It looks you are right that your device in PIO mode doesn't work. Specially RX path is weird that it was good until the status is changed to RUN but after querying DHCP requests (or another) there were no more RX events (seems no more frames ready). I think it'd be better to file a PR because I could not test LP PHY easily and it looks that it takes time to solve this problem. Could you please do that? Done. http://www.freebsd.org/cgi/query-pr.cgi?pr=144724 Thanks for looking into it. Joe -- PGP Key : http://www.marcuscom.com/pgp.asc signature.asc Description: This is a digitally signed message part
Re: Problem with new bwn driver on -CURRENT
On Sun, Mar 07, 2010 at 12:05:43AM -0500, Joe Marcus Clarke wrote: On Fri, 2010-03-05 at 16:16 -0800, Weongyo Jeong wrote: 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. Here are two dmesg outputs. Both were taken with this patch. One is with PIO mode, and the other is with (working) DMA mode. The names indicate which is which. http://www.marcuscom.com/downloads/salami_pio.dmesg http://www.marcuscom.com/downloads/salami_dma.dmesg Thank you for dmesg. It looks you are right that your device in PIO mode doesn't work. Specially RX path is weird that it was good until the status is changed to RUN but after querying DHCP requests (or another) there were no more RX events (seems no more frames ready). I think it'd be better to file a PR because I could not test LP PHY easily and it looks that it takes time to solve this problem. Could you please do that? regards, Weongyo Jeong ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Problem with new bwn driver on -CURRENT
On Fri, 2010-03-05 at 16:16 -0800, Weongyo Jeong wrote: 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. Here are two dmesg outputs. Both were taken with this patch. One is with PIO mode, and the other is with (working) DMA mode. The names indicate which is which. http://www.marcuscom.com/downloads/salami_pio.dmesg http://www.marcuscom.com/downloads/salami_dma.dmesg Joe -- PGP Key : http://www.marcuscom.com/pgp.asc signature.asc Description: This is a digitally signed message part
Re: Problem with new bwn driver on -CURRENT
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. regards, Weongyo Jeong ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Problem with new bwn driver on -CURRENT
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. Joe -- Joe Marcus Clarke FreeBSD GNOME Team :: gn...@freebsd.org FreeNode / #freebsd-gnome http://www.FreeBSD.org/gnome ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Problem with new bwn driver on -CURRENT
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 = 0x4000, /* firmware */ BWN_DEBUG_WME = 0x8000, /* WME */ BWN_DEBUG_RF = 0x0001, /* RF */ + BWN_DEBUG_PIO = 0x0002, /* PIO */ BWN_DEBUG_FATAL = 0x8000, /* fatal errors */ BWN_DEBUG_ANY = 0x }; @@ -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; ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Problem with new bwn driver on -CURRENT
On Mon, Mar 01, 2010 at 11:50:43PM -0500, Joe Marcus Clarke wrote: On Mon, 2010-03-01 at 15:37 -0800, Weongyo Jeong wrote: On Sun, Feb 28, 2010 at 03:24:28PM -0500, Joe Marcus Clarke wrote: I was extremely pleased to see this driver, so I could get off of the flaky NDIS version. I have a Dell Vostra 2510 with a LP bwn mini-PCI card. I have set if_bwn_load=YES in /boot/loader.conf. I also have bwn_v4_lp_ucode_load=YES set. The firmware and driver loads. However, if_bwn doesn't attach to the card. Once the OS is fully booted, I kldunload if_bwn, then reload it, and the driver attaches just fine. This issue is reported by some people and I'm looking codes. Good to know. This issue is solved in r204657. Thank you for reporting! Once it is attached, however, I can pass traffic just fine, but I get a large number of these messages on the console, and the traffic rate is not what it was with the NDIS driver: Could you please elaborate the traffic rate? You mean the traffic rate is lower or higher than NDIS driver? The throughput with the if_bwn driver is less than with the ndis driver. It associates at 11g (36 Mbps), but the RTT is longer. This is noticeable with apps like VNC. The redraw is noticeably slower (line by line) than it was ndis. Low throughput apps like SSH work more or less the same. bwn0: out of bounds of the square-root table (-770884) bwn0: out of bounds of the square-root table (-225625) bwn0: out of bounds of the square-root table (-240100) Patch is attached with email and it'll fix this message. Could you please test with it? Yes, the patch removes those messages. Thanks! Was it successful to associate with AP? Yes, in DMA mode. In PIO mode, it associates, but does not pass any traffic. After a while, there was a critical DMA error, and the driver looped forever trying to communicate with the card. Are there any messages from bwn(4) related with DMA error? If yes and you reproduce DMA error easily could you please show me the full dmesg? regards, Weongyo Jeong ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Problem with new bwn driver on -CURRENT
On 3/3/10 5:04 PM, Weongyo Jeong wrote: On Mon, Mar 01, 2010 at 11:50:43PM -0500, Joe Marcus Clarke wrote: On Mon, 2010-03-01 at 15:37 -0800, Weongyo Jeong wrote: On Sun, Feb 28, 2010 at 03:24:28PM -0500, Joe Marcus Clarke wrote: I was extremely pleased to see this driver, so I could get off of the flaky NDIS version. I have a Dell Vostra 2510 with a LP bwn mini-PCI card. I have set if_bwn_load=YES in /boot/loader.conf. I also have bwn_v4_lp_ucode_load=YES set. The firmware and driver loads. However, if_bwn doesn't attach to the card. Once the OS is fully booted, I kldunload if_bwn, then reload it, and the driver attaches just fine. This issue is reported by some people and I'm looking codes. Good to know. This issue is solved in r204657. Thank you for reporting! Saw that, thanks! bwn0: out of bounds of the square-root table (-770884) bwn0: out of bounds of the square-root table (-225625) bwn0: out of bounds of the square-root table (-240100) Patch is attached with email and it'll fix this message. Could you please test with it? Yes, the patch removes those messages. Thanks! Was this patch committed? I don't recall seeing an svn notice. Was it successful to associate with AP? Yes, in DMA mode. In PIO mode, it associates, but does not pass any traffic. After a while, there was a critical DMA error, and the driver looped forever trying to communicate with the card. Are there any messages from bwn(4) related with DMA error? If yes and you reproduce DMA error easily could you please show me the full dmesg? When it occurs, it is a fatal DMA error, and this streams on the console until reboot. In order to get the card to work again (with either bwn or ndis), I need to power-cycle the laptop. When it occurs again, I will get you the details and the full dmesg. Do you want a verbose dmesg, or a standard one? Joe -- Joe Marcus Clarke FreeBSD GNOME Team :: gn...@freebsd.org FreeNode / #freebsd-gnome http://www.FreeBSD.org/gnome ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Problem with new bwn driver on -CURRENT
On Wed, Mar 03, 2010 at 05:46:09PM -0500, Joe Marcus Clarke wrote: On 3/3/10 5:04 PM, Weongyo Jeong wrote: On Mon, Mar 01, 2010 at 11:50:43PM -0500, Joe Marcus Clarke wrote: On Mon, 2010-03-01 at 15:37 -0800, Weongyo Jeong wrote: On Sun, Feb 28, 2010 at 03:24:28PM -0500, Joe Marcus Clarke wrote: I was extremely pleased to see this driver, so I could get off of the flaky NDIS version. I have a Dell Vostra 2510 with a LP bwn mini-PCI card. I have set if_bwn_load=YES in /boot/loader.conf. I also have bwn_v4_lp_ucode_load=YES set. The firmware and driver loads. However, if_bwn doesn't attach to the card. Once the OS is fully booted, I kldunload if_bwn, then reload it, and the driver attaches just fine. This issue is reported by some people and I'm looking codes. Good to know. This issue is solved in r204657. Thank you for reporting! Saw that, thanks! bwn0: out of bounds of the square-root table (-770884) bwn0: out of bounds of the square-root table (-225625) bwn0: out of bounds of the square-root table (-240100) Patch is attached with email and it'll fix this message. Could you please test with it? Yes, the patch removes those messages. Thanks! Was this patch committed? I don't recall seeing an svn notice. Yes at r204542. Was it successful to associate with AP? Yes, in DMA mode. In PIO mode, it associates, but does not pass any traffic. After a while, there was a critical DMA error, and the driver looped forever trying to communicate with the card. Are there any messages from bwn(4) related with DMA error? If yes and you reproduce DMA error easily could you please show me the full dmesg? When it occurs, it is a fatal DMA error, and this streams on the console until reboot. In order to get the card to work again (with either bwn or ndis), I need to power-cycle the laptop. 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. regards, Weongyo Jeong ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Problem with new bwn driver on -CURRENT
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 Joe -- Joe Marcus Clarke FreeBSD GNOME Team :: gn...@freebsd.org FreeNode / #freebsd-gnome http://www.FreeBSD.org/gnome signature.asc Description: This is a digitally signed message part
Re: Problem with new bwn driver on -CURRENT
On Sun, Feb 28, 2010 at 03:24:28PM -0500, Joe Marcus Clarke wrote: I was extremely pleased to see this driver, so I could get off of the flaky NDIS version. I have a Dell Vostra 2510 with a LP bwn mini-PCI card. I have set if_bwn_load=YES in /boot/loader.conf. I also have bwn_v4_lp_ucode_load=YES set. The firmware and driver loads. However, if_bwn doesn't attach to the card. Once the OS is fully booted, I kldunload if_bwn, then reload it, and the driver attaches just fine. This issue is reported by some people and I'm looking codes. Once it is attached, however, I can pass traffic just fine, but I get a large number of these messages on the console, and the traffic rate is not what it was with the NDIS driver: Could you please elaborate the traffic rate? You mean the traffic rate is lower or higher than NDIS driver? bwn0: out of bounds of the square-root table (-770884) bwn0: out of bounds of the square-root table (-225625) bwn0: out of bounds of the square-root table (-240100) Patch is attached with email and it'll fix this message. Could you please test with it? Was it successful to associate with AP? When I boot with verbose mode, I only see the siba driver attach to the card: siba_bwn0: Broadcom BCM4312 802.11b/g Wireless mem 0xf400-0xf4003fff irq 19 at device 0.0 on pci6 My pciconf output is: siba_b...@pci0:6:0:0: class=0x028000 card=0x000b1028 chip=0x431514e4 rev=0x01 hdr=0x00 vendor = 'Broadcom Corporation' device = 'Broadcom Wireless b/g (BCM4315/BCM22062000)' class = network When the driver does attach, I see: bwn0 on siba_bwn0 bwn0: WLAN (chipid 0x4312 rev 15) PHY (analog 6 type 5 rev 1) RADIO (manuf 0x17f bwn0: DMA (64 bits) bwn0: MSI count : 1 siba_bwn0: attempting to allocate 1 MSI vectors (1 supported) msi: routing MSI IRQ 258 to local APIC 1 vector 54 siba_bwn0: using IRQ 258 for MSI bwn0: Using 1 MSI messages bwn0: [MPSAFE] bwn0: [FILTER] bwn0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps bwn0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36M bps 48Mbps 54Mbps wlan0: bpf attached wlan0: bpf attached Am I missing anything to get this to attach at boot time? Thanks. Maybe nothing. It looks there's a bug to attach bwn on boot time. One thing FYI is that bwn(4)'s LP implementation has some problems to calibrate TX so sometimes TX speed could be unstable and fluctuate. regards, Weongyo Jeong Index: if_bwn.c === --- if_bwn.c (revision 204437) +++ if_bwn.c (working copy) @@ -12846,7 +12846,6 @@ static unsigned int bwn_sqrt(struct bwn_mac *mac, unsigned int x) { - struct bwn_softc *sc = mac-mac_sc; /* Table holding (10 * sqrt(x)) for x between 1 and 256. */ static uint8_t sqrt_table[256] = { 10, 14, 17, 20, 22, 24, 26, 28, @@ -12886,9 +12885,11 @@ if (x == 0) return (0); if (x = 256) { - device_printf(sc-sc_dev, - out of bounds of the square-root table (%d)\n, x); - return (16); + unsigned int tmp; + + for (tmp = 0; x = (2 * tmp) + 1; x -= (2 * tmp++) + 1) + /* do nothing */ ; + return (tmp); } return (sqrt_table[x - 1] / 10); } ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Problem with new bwn driver on -CURRENT
On Mon, 2010-03-01 at 15:37 -0800, Weongyo Jeong wrote: On Sun, Feb 28, 2010 at 03:24:28PM -0500, Joe Marcus Clarke wrote: I was extremely pleased to see this driver, so I could get off of the flaky NDIS version. I have a Dell Vostra 2510 with a LP bwn mini-PCI card. I have set if_bwn_load=YES in /boot/loader.conf. I also have bwn_v4_lp_ucode_load=YES set. The firmware and driver loads. However, if_bwn doesn't attach to the card. Once the OS is fully booted, I kldunload if_bwn, then reload it, and the driver attaches just fine. This issue is reported by some people and I'm looking codes. Good to know. Once it is attached, however, I can pass traffic just fine, but I get a large number of these messages on the console, and the traffic rate is not what it was with the NDIS driver: Could you please elaborate the traffic rate? You mean the traffic rate is lower or higher than NDIS driver? The throughput with the if_bwn driver is less than with the ndis driver. It associates at 11g (36 Mbps), but the RTT is longer. This is noticeable with apps like VNC. The redraw is noticeably slower (line by line) than it was ndis. Low throughput apps like SSH work more or less the same. bwn0: out of bounds of the square-root table (-770884) bwn0: out of bounds of the square-root table (-225625) bwn0: out of bounds of the square-root table (-240100) Patch is attached with email and it'll fix this message. Could you please test with it? Yes, the patch removes those messages. Thanks! Was it successful to associate with AP? Yes, in DMA mode. In PIO mode, it associates, but does not pass any traffic. After a while, there was a critical DMA error, and the driver looped forever trying to communicate with the card. Joe -- PGP Key : http://www.marcuscom.com/pgp.asc signature.asc Description: This is a digitally signed message part
Problem with new bwn driver on -CURRENT
I was extremely pleased to see this driver, so I could get off of the flaky NDIS version. I have a Dell Vostra 2510 with a LP bwn mini-PCI card. I have set if_bwn_load=YES in /boot/loader.conf. I also have bwn_v4_lp_ucode_load=YES set. The firmware and driver loads. However, if_bwn doesn't attach to the card. Once the OS is fully booted, I kldunload if_bwn, then reload it, and the driver attaches just fine. Once it is attached, however, I can pass traffic just fine, but I get a large number of these messages on the console, and the traffic rate is not what it was with the NDIS driver: bwn0: out of bounds of the square-root table (-770884) bwn0: out of bounds of the square-root table (-225625) bwn0: out of bounds of the square-root table (-240100) When I boot with verbose mode, I only see the siba driver attach to the card: siba_bwn0: Broadcom BCM4312 802.11b/g Wireless mem 0xf400-0xf4003fff irq 19 at device 0.0 on pci6 My pciconf output is: siba_b...@pci0:6:0:0: class=0x028000 card=0x000b1028 chip=0x431514e4 rev=0x01 hdr=0x00 vendor = 'Broadcom Corporation' device = 'Broadcom Wireless b/g (BCM4315/BCM22062000)' class = network When the driver does attach, I see: bwn0 on siba_bwn0 bwn0: WLAN (chipid 0x4312 rev 15) PHY (analog 6 type 5 rev 1) RADIO (manuf 0x17f bwn0: DMA (64 bits) bwn0: MSI count : 1 siba_bwn0: attempting to allocate 1 MSI vectors (1 supported) msi: routing MSI IRQ 258 to local APIC 1 vector 54 siba_bwn0: using IRQ 258 for MSI bwn0: Using 1 MSI messages bwn0: [MPSAFE] bwn0: [FILTER] bwn0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps bwn0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36M bps 48Mbps 54Mbps wlan0: bpf attached wlan0: bpf attached Am I missing anything to get this to attach at boot time? Thanks. Joe -- Joe Marcus Clarke FreeBSD GNOME Team :: gn...@freebsd.org FreeNode / #freebsd-gnome http://www.FreeBSD.org/gnome signature.asc Description: This is a digitally signed message part