Re: LP-PHY Fatal DMA error 0x00000800 on non-ULV Core 2 Duo?!?!!??!
2010/1/25 Lucas Thode > > > 2010/1/25 Lucas Thode > > >> >> 2010/1/25 Gábor Stefanik >> >> >>> >>> A few things to check: >>> >>> -Is this on PhoenixBios? >>> >> Indeed, the Vostro 1510 uses a (Dell branded) PhoenixBIOS. >> >>> -Does loading wl, doing a warm reboot and loading b43 make b43 work? >>> >> UPDATE 2: No, I tried loading my 2.6.30 kernel (which has working wireless using wl.ko) then Ctrl-Alt-Del-ing into my 2.6.32 kernel, and the Fatal DMA errors perisisted. (They seem to start happening shortly after system startup, too; no action on my part is needed to provoke them.) > -Try updating the firmware to v478. (AFAIK there was someone on the >>> list before with a DMA error on a non-ULV, and it was solved by >>> updating the firmware. Broadcom's wl.ko uses a v5xx firmware for the >>> record.) >>> >> I will attempt a firmware upgrade (manually downloading/compiling/running >> b43-fwcutter) when I have access to this laptop again (later today). Debian >> bug #561450 covers the fact that the Debian b43-fwcutter package is too old; >> I have added a post to that bug report mentioning the v478 firmware + the >> "Fatal DMA error" message (the original bug reporter did not check his >> dmesg). >> > > UPDATE: Upgraded firmware to v478. The original "Fatal DMA error" (the > code 0x800 one) no longer appears, replaced now by a code 0x400 one. Also, > the wireless-LAN light on my laptop will flicker off and back on every so > often, accompanied by a temporary system freeze. I assume that this is > occurring in synchrony with the card restarting. > > --Lucas > >> >> --Lucas >> >>> >>> >>> >>> -- >>> >>> Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-) >>> >> >> > ___ Bcm43xx-dev mailing list Bcm43xx-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/bcm43xx-dev
Re: LP-PHY Fatal DMA error 0x00000800 on non-ULV Core 2 Duo?!?!!??!
2010/1/25 Lucas Thode > > > 2010/1/25 Gábor Stefanik > > >> >> A few things to check: >> >> -Is this on PhoenixBios? >> > Indeed, the Vostro 1510 uses a (Dell branded) PhoenixBIOS. > >> -Does loading wl, doing a warm reboot and loading b43 make b43 work? >> -Try updating the firmware to v478. (AFAIK there was someone on the >> list before with a DMA error on a non-ULV, and it was solved by >> updating the firmware. Broadcom's wl.ko uses a v5xx firmware for the >> record.) >> > I will attempt a firmware upgrade (manually downloading/compiling/running > b43-fwcutter) when I have access to this laptop again (later today). Debian > bug #561450 covers the fact that the Debian b43-fwcutter package is too old; > I have added a post to that bug report mentioning the v478 firmware + the > "Fatal DMA error" message (the original bug reporter did not check his > dmesg). > UPDATE: Upgraded firmware to v478. The original "Fatal DMA error" (the code 0x800 one) no longer appears, replaced now by a code 0x400 one. Also, the wireless-LAN light on my laptop will flicker off and back on every so often, accompanied by a temporary system freeze. I assume that this is occurring in synchrony with the card restarting. --Lucas > > --Lucas > >> >> >> >> -- >> >> Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-) >> > > ___ Bcm43xx-dev mailing list Bcm43xx-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/bcm43xx-dev
Fwd: LP-PHY Fatal DMA error 0x00000800 on non-ULV Core 2 Duo?!?!!??!
Sorry, hit Reply instead of Reply All *d'oh* -- Forwarded message -- From: Lucas Thode Date: 2010/1/25 Subject: Re: LP-PHY Fatal DMA error 0x0800 on non-ULV Core 2 Duo?!?!!??! To: Gábor Stefanik 2010/1/25 Gábor Stefanik > > A few things to check: > > -Is this on PhoenixBios? > Indeed, the Vostro 1510 uses a (Dell branded) PhoenixBIOS. > -Does loading wl, doing a warm reboot and loading b43 make b43 work? > -Try updating the firmware to v478. (AFAIK there was someone on the > list before with a DMA error on a non-ULV, and it was solved by > updating the firmware. Broadcom's wl.ko uses a v5xx firmware for the > record.) > I will attempt a firmware upgrade (manually downloading/compiling/running b43-fwcutter) when I have access to this laptop again (later today). Debian bug #561450 covers the fact that the Debian b43-fwcutter package is too old; I have added a post to that bug report mentioning the v478 firmware + the "Fatal DMA error" message (the original bug reporter did not check his dmesg). --Lucas > > > > -- > > Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-) > ___ Bcm43xx-dev mailing list Bcm43xx-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/bcm43xx-dev
Re: [PATCH 2/4] b43: make cordic common (LP-PHY and N-PHY need it)
2010/1/25 John W. Linville : > On Mon, Jan 25, 2010 at 07:53:19PM +0100, Michael Buesch wrote: >> On Monday 25 January 2010 19:36:27 Rafał Miłecki wrote: >> > W dniu 25 stycznia 2010 19:35 użytkownik Rafał Miłecki >> > napisał: >> > > 2010/1/25 Michael Buesch : >> > >> On Monday 25 January 2010 18:59:59 Rafał Miłecki wrote: >> > >>> +/* Complex number using 2 32-bit signed integers */ >> > >>> +typedef struct { s32 i, q; } b43_c32; >> > >> >> > >> No typedef. ever. >> > > >> > > Well, I just copied (Gabor's?) code here. But of course I can fix this >> > > by the way, no problem :) >> >> Yeah, I saw that. We can fix it while we're at it. ;) >> >> > > Just read about typedef in Linux Kernel Coding Style, didn't know >> > > about this earlier. Thanks for pointing. >> > >> > Is this OK to fix this in separated patch? Or should I modify this set >> > of patches? >> >> Well, as you touch any reference to the typedef anyway (you renamed it), >> you can just put the keyword "struct" in front of the references and no >> separate patch is needed. >> It won't even grow your current patch in the number of changed lines. > > I took care of these modifications to the original patch... Hey, thank you! :) -- Rafał ___ Bcm43xx-dev mailing list Bcm43xx-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/bcm43xx-dev
Re: [PATCH 2/4] b43: make cordic common (LP-PHY and N-PHY need it)
On Mon, Jan 25, 2010 at 07:53:19PM +0100, Michael Buesch wrote: > On Monday 25 January 2010 19:36:27 Rafał Miłecki wrote: > > W dniu 25 stycznia 2010 19:35 użytkownik Rafał Miłecki > > napisał: > > > 2010/1/25 Michael Buesch : > > >> On Monday 25 January 2010 18:59:59 Rafał Miłecki wrote: > > >>> +/* Complex number using 2 32-bit signed integers */ > > >>> +typedef struct { s32 i, q; } b43_c32; > > >> > > >> No typedef. ever. > > > > > > Well, I just copied (Gabor's?) code here. But of course I can fix this > > > by the way, no problem :) > > Yeah, I saw that. We can fix it while we're at it. ;) > > > > Just read about typedef in Linux Kernel Coding Style, didn't know > > > about this earlier. Thanks for pointing. > > > > Is this OK to fix this in separated patch? Or should I modify this set > > of patches? > > Well, as you touch any reference to the typedef anyway (you renamed it), > you can just put the keyword "struct" in front of the references and no > separate patch is needed. > It won't even grow your current patch in the number of changed lines. I took care of these modifications to the original patch... John -- John W. LinvilleSomeday the world will need a hero, and you linvi...@tuxdriver.com might be all we have. Be ready. ___ Bcm43xx-dev mailing list Bcm43xx-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/bcm43xx-dev
Re: LP-PHY Fatal DMA error 0x00000800 on non-ULV Core 2 Duo?!?!!??!
On 01/25/2010 02:15 PM, Lucas Thode wrote: > As you can tell, this processor is neither an Atom nor a ULV Core 2 > Duo. The WLAN card is the Dell Wireless 1395 that came with the laptop > (a Vostro 1510). I can build a custom kernel based on the Debian kernel > sources if need be; just tell me what config options to flip/patches to > apply. Also, wl.o works on this laptop with the Debian 2.6.30 kernel. > Aptitude lists the kernel version as a 2.6.32-5. There is one other report of the DMA problem with a non-Atom CPU (I'm not sure about the non-ULV part.). We do not know what the wl driver does that we do not, or vice-versa. If you want to use b43, you need to build it to use PIO only. Choosing PIO is now available as a run-time option, but I do not think 2.6.32 has this feature. Debugging this problem has been most difficult as it only affects Intel CPUs and all my machines have AMD processors. Larry ___ Bcm43xx-dev mailing list Bcm43xx-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/bcm43xx-dev
Re: LP-PHY Fatal DMA error 0x00000800 on non-ULV Core 2 Duo?!?!!??!
On Mon, Jan 25, 2010 at 9:15 PM, Lucas Thode wrote: > ---start dmesg snippet--- > [17189.121003] b43-pci-bridge :06:00.0: PCI INT A disabled > [17192.494272] cfg80211: Using static regulatory domain info > [17192.494279] cfg80211: Regulatory domain: US > [17192.494283] (start_freq - end_freq @ bandwidth), (max_antenna_gain, > max_eirp > ) > [17192.494292] (2402000 KHz - 2472000 KHz @ 4 KHz), (600 mBi, 2700 mBm) > [17192.494299] (517 KHz - 519 KHz @ 4 KHz), (600 mBi, 2300 mBm) > [17192.494306] (519 KHz - 521 KHz @ 4 KHz), (600 mBi, 2300 mBm) > [17192.494314] (521 KHz - 523 KHz @ 4 KHz), (600 mBi, 2300 mBm) > [17192.494321] (523 KHz - 533 KHz @ 4 KHz), (600 mBi, 2300 mBm) > [17192.494328] (5735000 KHz - 5835000 KHz @ 4 KHz), (600 mBi, 3000 mBm) > [17192.494418] cfg80211: Calling CRDA for country: US > [17192.658174] b43-pci-bridge :06:00.0: PCI INT A -> GSI 19 (level, low) > -> > IRQ 19 > [17192.658206] b43-pci-bridge :06:00.0: setting latency timer to 64 > [17192.724352] ssb: Sonics Silicon Backplane found on PCI device > :06:00.0 > [17192.769108] b43-phy0: Broadcom 4312 WLAN found (core revision 15) > [17192.843094] phy0: Selected rate control algorithm 'minstrel' > [17192.844206] Registered led device: b43-phy0::tx > [17192.84] Registered led device: b43-phy0::rx > [17192.844500] Registered led device: b43-phy0::radio > [17192.844859] Broadcom 43xx driver loaded [ Features: PMLS, Firmware-ID: > FW13 ] > [17196.776755] b43 ssb0:0: firmware: requesting b43/ucode15.fw > [17196.780967] b43 ssb0:0: firmware: requesting b43/lp0initvals15.fw > [17196.784551] b43 ssb0:0: firmware: requesting b43/lp0bsinitvals15.fw > [17196.921708] b43-phy0: Loading firmware version 410.2160 (2007-05-26 > 15:32:10) > [17202.497881] ADDRCONF(NETDEV_UP): wlan0: link is not ready > [17202.934136] b43-phy0 ERROR: Fatal DMA error: 0x0800, 0x, > 0x, 0x, 0x, 0x > [17202.934153] b43-phy0: Controller RESET (DMA error) ... > [17203.148369] b43-phy0: Loading firmware version 410.2160 (2007-05-26 > 15:32:10) > [17208.681254] b43-phy0: Controller restarted > [17208.696481] b43-phy0 ERROR: Fatal DMA error: 0x0400, 0x, > 0x, 0x, 0x, 0x > [17208.696490] b43-phy0: Controller RESET (DMA error) ... > [17208.914882] b43-phy0: Loading firmware version 410.2160 (2007-05-26 > 15:32:10) > [17214.461361] b43-phy0: Controller restarted > [17214.461610] b43-phy0 ERROR: Fatal DMA error: 0x0400, 0x, > 0x, 0x, 0x, 0x > [17214.461626] b43-phy0: Controller RESET (DMA error) ... > [17214.676285] b43-phy0: Loading firmware version 410.2160 (2007-05-26 > 15:32:10) > ---end dmesg snippet---...and on and on the dma errors go. > > This occured about (sorry, not sure exactly, but I don't think it quite > matters with this particular error) when I used "iwlist scan" to search for > wireless networks after I used the b43-fwcutter from Debian testing to > install the firmware and re-inserted the driver with 'modprobe -r b43; > modprobe b43'. > > kb...@kb1rd-mobroost:~$ uname -a > Linux kb1rd-mobroost 2.6.32-trunk-amd64 #1 SMP Sun Jan 10 22:40:40 UTC 2010 > x86_64 GNU/Linux > kb...@kb1rd-mobroost:~$ lspci -vvn | grep 43 -A7 > 06:00.0 0280: 14e4:4315 (rev 01) > Subsystem: 1028:000b > Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- > Stepping- SERR+ FastB2B- DisINTx- > Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- Latency: 0, Cache Line Size: 64 bytes > Interrupt: pin A routed to IRQ 19 > Region 0: Memory at f400 (64-bit, non-prefetchable) [size=16K] > Capabilities: > Kernel driver in use: b43-pci-bridge > > > kb...@kb1rd-mobroost:~$ cat /proc/cpuinfo > processor : 0 > vendor_id : GenuineIntel > cpu family : 6 > model : 15 > model name : Intel(R) Core(TM)2 Duo CPU T5670 @ 1.80GHz > stepping : 13 > cpu MHz : 800.000 > cache size : 2048 KB > physical id : 0 > siblings : 2 > core id : 0 > cpu cores : 2 > apicid : 0 > initial apicid : 0 > fpu : yes > fpu_exception : yes > cpuid level : 10 > wp : yes > flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov > pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm > constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor > ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm ida > bogomips : 3590.43 > clflush size : 64 > cache_alignment : 64 > address sizes : 36 bits physical, 48 bits virtual > power management: > > > > As you can tell, this processor is neither an Atom nor a ULV Core 2 Duo. > The WLAN card is the Dell Wireless 1395 that came with the laptop (a Vostro > 1510). I can build a custom kernel based on the Debian kernel sources if > need be; just tell me what config options to flip/pat
Re: Is this a known problem?
Larry, list, -Original Message- >From: Larry Finger >Sent: Jan 25, 2010 2:57 PM >To: iko...@earthlink.net >Cc: bcm43xx-dev@lists.berlios.de >Subject: Re: Is this a known problem? > >On 01/25/2010 01:44 AM, iko...@earthlink.net wrote: >> Hi, ALL, >> I have a Dell Laptop which has a Broadcom wireless device in it. >> It is a dual-boot system with Windows XP/Gentoo. >> >> This is the result of lspci: >> 0b:00.0 Network controller: Broadcom Corporation BCM4311 802.11b/g WLAN (rev >> 01) >> >> This is the system name: >> IgorsGentooOnNetwork buildGTK # uname -a >> Linux IgorsGentooOnNetwork 2.6.30-gentoo-r6 #5 SMP Sun Oct 4 22:43:50 PDT >> 2009 i686 Genuine Intel(R) CPU T1350 @ 1.86GHz GenuineIntel GNU/Linux >> >> When I boot in XP everything works perfect. >> When I then boot in Gentoo then, I can't get an IP right away. >> >> Asking about it on Gentoo forum, I got a responce that I should turn off the >> router for 30 seconds and then everything will work. >> >> The router is using the WPA2 encryption and I am using wpa_supplicant. >> >> Is this a problem with just the b43 driver or something on the lower level? >> Is this at least known problem? > >No, it is not a known problem. The NM mailing list has had some traffic about >DHCP timeouts on busy networks where the DHCP lease time is 1 day, thus the AP >has to probe to find an unused IP, but that should not apply to you. On the >other hand, if turning off the router does change the situation, you might try >changing the lease time there. > >I use WPA2 on my network with b43 and NetworkManager. My network does not >start >until I login, but an IP is always available within 15-20 seconds of the time >that my desktop is ready. Is there any additional information I can provide to further investigate the issue? I'm assuming it's not a problem with the driver, but with something on lower level... Thank you. ___ Bcm43xx-dev mailing list Bcm43xx-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/bcm43xx-dev
LP-PHY Fatal DMA error 0x00000800 on non-ULV Core 2 Duo?!?!!??!
---start dmesg snippet--- [17189.121003] b43-pci-bridge :06:00.0: PCI INT A disabled [17192.494272] cfg80211: Using static regulatory domain info [17192.494279] cfg80211: Regulatory domain: US [17192.494283] (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp ) [17192.494292] (2402000 KHz - 2472000 KHz @ 4 KHz), (600 mBi, 2700 mBm) [17192.494299] (517 KHz - 519 KHz @ 4 KHz), (600 mBi, 2300 mBm) [17192.494306] (519 KHz - 521 KHz @ 4 KHz), (600 mBi, 2300 mBm) [17192.494314] (521 KHz - 523 KHz @ 4 KHz), (600 mBi, 2300 mBm) [17192.494321] (523 KHz - 533 KHz @ 4 KHz), (600 mBi, 2300 mBm) [17192.494328] (5735000 KHz - 5835000 KHz @ 4 KHz), (600 mBi, 3000 mBm) [17192.494418] cfg80211: Calling CRDA for country: US [17192.658174] b43-pci-bridge :06:00.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19 [17192.658206] b43-pci-bridge :06:00.0: setting latency timer to 64 [17192.724352] ssb: Sonics Silicon Backplane found on PCI device :06:00.0 [17192.769108] b43-phy0: Broadcom 4312 WLAN found (core revision 15) [17192.843094] phy0: Selected rate control algorithm 'minstrel' [17192.844206] Registered led device: b43-phy0::tx [17192.84] Registered led device: b43-phy0::rx [17192.844500] Registered led device: b43-phy0::radio [17192.844859] Broadcom 43xx driver loaded [ Features: PMLS, Firmware-ID: FW13 ] [17196.776755] b43 ssb0:0: firmware: requesting b43/ucode15.fw [17196.780967] b43 ssb0:0: firmware: requesting b43/lp0initvals15.fw [17196.784551] b43 ssb0:0: firmware: requesting b43/lp0bsinitvals15.fw [17196.921708] b43-phy0: Loading firmware version 410.2160 (2007-05-26 15:32:10) [17202.497881] ADDRCONF(NETDEV_UP): wlan0: link is not ready [17202.934136] b43-phy0 ERROR: Fatal DMA error: 0x0800, 0x, 0x, 0x, 0x, 0x [17202.934153] b43-phy0: Controller RESET (DMA error) ... [17203.148369] b43-phy0: Loading firmware version 410.2160 (2007-05-26 15:32:10) [17208.681254] b43-phy0: Controller restarted [17208.696481] b43-phy0 ERROR: Fatal DMA error: 0x0400, 0x, 0x, 0x, 0x, 0x [17208.696490] b43-phy0: Controller RESET (DMA error) ... [17208.914882] b43-phy0: Loading firmware version 410.2160 (2007-05-26 15:32:10) [17214.461361] b43-phy0: Controller restarted [17214.461610] b43-phy0 ERROR: Fatal DMA error: 0x0400, 0x, 0x, 0x, 0x, 0x [17214.461626] b43-phy0: Controller RESET (DMA error) ... [17214.676285] b43-phy0: Loading firmware version 410.2160 (2007-05-26 15:32:10) ---end dmesg snippet---...and on and on the dma errors go. This occured about (sorry, not sure exactly, but I don't think it quite matters with this particular error) when I used "iwlist scan" to search for wireless networks after I used the b43-fwcutter from Debian testing to install the firmware and re-inserted the driver with 'modprobe -r b43; modprobe b43'. kb...@kb1rd-mobroost:~$ uname -a Linux kb1rd-mobroost 2.6.32-trunk-amd64 #1 SMP Sun Jan 10 22:40:40 UTC 2010 x86_64 GNU/Linux kb...@kb1rd-mobroost:~$ lspci -vvn | grep 43 -A7 06:00.0 0280: 14e4:4315 (rev 01) Subsystem: 1028:000b Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- Kernel driver in use: b43-pci-bridge kb...@kb1rd-mobroost:~$ cat /proc/cpuinfo processor: 0 vendor_id: GenuineIntel cpu family: 6 model: 15 model name: Intel(R) Core(TM)2 Duo CPU T5670 @ 1.80GHz stepping: 13 cpu MHz: 800.000 cache size: 2048 KB physical id: 0 siblings: 2 core id: 0 cpu cores: 2 apicid: 0 initial apicid: 0 fpu: yes fpu_exception: yes cpuid level: 10 wp: yes flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm ida bogomips: 3590.43 clflush size: 64 cache_alignment: 64 address sizes: 36 bits physical, 48 bits virtual power management: As you can tell, this processor is neither an Atom nor a ULV Core 2 Duo. The WLAN card is the Dell Wireless 1395 that came with the laptop (a Vostro 1510). I can build a custom kernel based on the Debian kernel sources if need be; just tell me what config options to flip/patches to apply. Also, wl.o works on this laptop with the Debian 2.6.30 kernel. Aptitude lists the kernel version as a 2.6.32-5. --Lucas ___ Bcm43xx-dev mailing list Bcm43xx-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/bcm43xx-dev
Re: Is this a known problem?
On 01/25/2010 01:44 AM, iko...@earthlink.net wrote: > Hi, ALL, > I have a Dell Laptop which has a Broadcom wireless device in it. > It is a dual-boot system with Windows XP/Gentoo. > > This is the result of lspci: > 0b:00.0 Network controller: Broadcom Corporation BCM4311 802.11b/g WLAN (rev > 01) > > This is the system name: > IgorsGentooOnNetwork buildGTK # uname -a > Linux IgorsGentooOnNetwork 2.6.30-gentoo-r6 #5 SMP Sun Oct 4 22:43:50 PDT > 2009 i686 Genuine Intel(R) CPU T1350 @ 1.86GHz GenuineIntel GNU/Linux > > When I boot in XP everything works perfect. > When I then boot in Gentoo then, I can't get an IP right away. > > Asking about it on Gentoo forum, I got a responce that I should turn off the > router for 30 seconds and then everything will work. > > The router is using the WPA2 encryption and I am using wpa_supplicant. > > Is this a problem with just the b43 driver or something on the lower level? > Is this at least known problem? No, it is not a known problem. The NM mailing list has had some traffic about DHCP timeouts on busy networks where the DHCP lease time is 1 day, thus the AP has to probe to find an unused IP, but that should not apply to you. On the other hand, if turning off the router does change the situation, you might try changing the lease time there. I use WPA2 on my network with b43 and NetworkManager. My network does not start until I login, but an IP is always available within 15-20 seconds of the time that my desktop is ready. ___ Bcm43xx-dev mailing list Bcm43xx-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/bcm43xx-dev
Re: [PATCH 2/4] b43: make cordic common (LP-PHY and N-PHY need it)
On Monday 25 January 2010 19:36:27 Rafał Miłecki wrote: > W dniu 25 stycznia 2010 19:35 użytkownik Rafał Miłecki > napisał: > > 2010/1/25 Michael Buesch : > >> On Monday 25 January 2010 18:59:59 Rafał Miłecki wrote: > >>> +/* Complex number using 2 32-bit signed integers */ > >>> +typedef struct { s32 i, q; } b43_c32; > >> > >> No typedef. ever. > > > > Well, I just copied (Gabor's?) code here. But of course I can fix this > > by the way, no problem :) Yeah, I saw that. We can fix it while we're at it. ;) > > Just read about typedef in Linux Kernel Coding Style, didn't know > > about this earlier. Thanks for pointing. > > Is this OK to fix this in separated patch? Or should I modify this set > of patches? Well, as you touch any reference to the typedef anyway (you renamed it), you can just put the keyword "struct" in front of the references and no separate patch is needed. It won't even grow your current patch in the number of changed lines. -- Greetings, Michael. ___ Bcm43xx-dev mailing list Bcm43xx-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/bcm43xx-dev
Re: [PATCH 2/4] b43: make cordic common (LP-PHY and N-PHY need it)
W dniu 25 stycznia 2010 19:35 użytkownik Rafał Miłecki napisał: > 2010/1/25 Michael Buesch : >> On Monday 25 January 2010 18:59:59 Rafał Miłecki wrote: >>> +/* Complex number using 2 32-bit signed integers */ >>> +typedef struct { s32 i, q; } b43_c32; >> >> No typedef. ever. > > Well, I just copied (Gabor's?) code here. But of course I can fix this > by the way, no problem :) > > Just read about typedef in Linux Kernel Coding Style, didn't know > about this earlier. Thanks for pointing. Is this OK to fix this in separated patch? Or should I modify this set of patches? -- Rafał ___ Bcm43xx-dev mailing list Bcm43xx-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/bcm43xx-dev
Re: [PATCH 2/4] b43: make cordic common (LP-PHY and N-PHY need it)
2010/1/25 Michael Buesch : > On Monday 25 January 2010 18:59:59 Rafał Miłecki wrote: >> +/* Complex number using 2 32-bit signed integers */ >> +typedef struct { s32 i, q; } b43_c32; > > No typedef. ever. Well, I just copied (Gabor's?) code here. But of course I can fix this by the way, no problem :) Just read about typedef in Linux Kernel Coding Style, didn't know about this earlier. Thanks for pointing. -- Rafał ___ Bcm43xx-dev mailing list Bcm43xx-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/bcm43xx-dev
Re: [PATCH 2/4] b43: make cordic common (LP-PHY and N-PHY need it)
On Monday 25 January 2010 18:59:59 Rafał Miłecki wrote: > +/* Complex number using 2 32-bit signed integers */ > +typedef struct { s32 i, q; } b43_c32; No typedef. ever. -- Greetings, Michael. ___ Bcm43xx-dev mailing list Bcm43xx-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/bcm43xx-dev
[PATCH 4/4] b43: N-PHY: use cordic to generate samples
Signed-off-by: Rafał Miłecki --- drivers/net/wireless/b43/phy_n.c | 21 - 1 files changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c index 061b01b..e15f05c 100644 --- a/drivers/net/wireless/b43/phy_n.c +++ b/drivers/net/wireless/b43/phy_n.c @@ -821,8 +821,9 @@ static u16 b43_nphy_gen_load_samples(struct b43_wldev *dev, u32 freq, u16 max, bool test) { int i; - u16 bw, len, num, rot, angle; - /* TODO: *buffer; */ + u16 bw, len, rot, angle; + b43_c32 *samples; + bw = (dev->phy.is_40mhz) ? 40 : 20; len = bw << 3; @@ -839,18 +840,20 @@ static u16 b43_nphy_gen_load_samples(struct b43_wldev *dev, u32 freq, u16 max, len = bw << 1; } - /* TODO: buffer = kzalloc(len * sizeof(u32), GFP_KERNEL); */ - num = len; + samples = kzalloc(len * sizeof(b43_c32), GFP_KERNEL); rot = (((freq * 36) / bw) << 16) / 100; angle = 0; - for (i = 0; i < num; i++) { - /* TODO */ + for (i = 0; i < len; i++) { + samples[i] = b43_cordic(angle); + angle += rot; + samples[i].q = CORDIC_CONVERT(samples[i].q * max); + samples[i].i = CORDIC_CONVERT(samples[i].i * max); } - /* TODO: Call N PHY Load Sample Table with buffer, num as arguments */ - /* TODO: kfree(buffer); */ - return num; + /* TODO: Call N PHY Load Sample Table with buffer, len as arguments */ + kfree(samples); + return len; } /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RunSamples */ -- 1.6.4.2 ___ Bcm43xx-dev mailing list Bcm43xx-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/bcm43xx-dev
[PATCH 3/4] b43: update cordic code to match current specs
Signed-off-by: Rafał Miłecki Tested-by: Larry Finger --- drivers/net/wireless/b43/phy_common.c | 19 +-- drivers/net/wireless/b43/phy_common.h |4 drivers/net/wireless/b43/phy_lp.c |7 --- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/drivers/net/wireless/b43/phy_common.c b/drivers/net/wireless/b43/phy_common.c index 348a78f..868b829 100644 --- a/drivers/net/wireless/b43/phy_common.c +++ b/drivers/net/wireless/b43/phy_common.c @@ -422,21 +422,28 @@ void b43_phyop_switch_analog_generic(struct b43_wldev *dev, bool on) b43_write16(dev, B43_MMIO_PHY0, on ? 0 : 0xF4); } +/* http://bcm-v4.sipsolutions.net/802.11/PHY/Cordic */ b43_c32 b43_cordic(int theta) { u32 arctg[] = { 2949120, 1740967, 919879, 466945, 234379, 117304, 58666, 29335, 14668, 7334, 3667, 1833, 917, 458, 229, 115, 57, 29, }; - int i, tmp, signx = 1, angle = 0; + u8 i; + s32 tmp; + s8 signx = 1; + u32 angle = 0; b43_c32 ret = { .i = 39797, .q = 0, }; - theta = clamp_t(int, theta, -180, 180); + while (theta > (180 << 16)) + theta -= (360 << 16); + while (theta < -(180 << 16)) + theta += (360 << 16); - if (theta > 90) { - theta -= 180; + if (theta > (90 << 16)) { + theta -= (180 << 16); signx = -1; - } else if (theta < -90) { - theta += 180; + } else if (theta < -(90 << 16)) { + theta += (180 << 16); signx = -1; } diff --git a/drivers/net/wireless/b43/phy_common.h b/drivers/net/wireless/b43/phy_common.h index 7a38226..0716f07 100644 --- a/drivers/net/wireless/b43/phy_common.h +++ b/drivers/net/wireless/b43/phy_common.h @@ -8,6 +8,10 @@ struct b43_wldev; /* Complex number using 2 32-bit signed integers */ typedef struct { s32 i, q; } b43_c32; +#define CORDIC_CONVERT(value) (((value) >= 0) ? \ +value) >> 15) + 1) >> 1) : \ +--(value)) >> 15) + 1) >> 1)) + /* PHY register routing bits */ #define B43_PHYROUTE 0x0C00 /* PHY register routing bits mask */ #define B43_PHYROUTE_BASE 0x /* Base registers */ diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c index a142804..e770aad 100644 --- a/drivers/net/wireless/b43/phy_lp.c +++ b/drivers/net/wireless/b43/phy_lp.c @@ -1784,7 +1784,8 @@ static void lpphy_start_tx_tone(struct b43_wldev *dev, s32 freq, u16 max) { struct b43_phy_lp *lpphy = dev->phy.lp; u16 buf[64]; - int i, samples = 0, angle = 0, rotation = (9 * freq) / 500; + int i, samples = 0, angle = 0; + int rotation = (((36 * freq) / 20) << 16) / 100; b43_c32 sample; lpphy->tx_tone_freq = freq; @@ -1803,8 +1804,8 @@ static void lpphy_start_tx_tone(struct b43_wldev *dev, s32 freq, u16 max) for (i = 0; i < samples; i++) { sample = b43_cordic(angle); angle += rotation; - buf[i] = ((sample.i * max) & 0xFF) << 8; - buf[i] |= (sample.q * max) & 0xFF; + buf[i] = CORDIC_CONVERT((sample.i * max) & 0xFF) << 8; + buf[i] |= CORDIC_CONVERT((sample.q * max) & 0xFF); } b43_lptab_write_bulk(dev, B43_LPTAB16(5, 0), samples, buf); -- 1.6.4.2 ___ Bcm43xx-dev mailing list Bcm43xx-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/bcm43xx-dev
[PATCH 2/4] b43: make cordic common (LP-PHY and N-PHY need it)
Signed-off-by: Rafał Miłecki --- drivers/net/wireless/b43/phy_common.c | 38 +++ drivers/net/wireless/b43/phy_common.h |3 ++ drivers/net/wireless/b43/phy_lp.c | 45 +--- 3 files changed, 43 insertions(+), 43 deletions(-) diff --git a/drivers/net/wireless/b43/phy_common.c b/drivers/net/wireless/b43/phy_common.c index 75b26e1..348a78f 100644 --- a/drivers/net/wireless/b43/phy_common.c +++ b/drivers/net/wireless/b43/phy_common.c @@ -421,3 +421,41 @@ void b43_phyop_switch_analog_generic(struct b43_wldev *dev, bool on) { b43_write16(dev, B43_MMIO_PHY0, on ? 0 : 0xF4); } + +b43_c32 b43_cordic(int theta) +{ + u32 arctg[] = { 2949120, 1740967, 919879, 466945, 234379, 117304, + 58666, 29335, 14668, 7334, 3667, 1833, 917, 458, + 229, 115, 57, 29, }; + int i, tmp, signx = 1, angle = 0; + b43_c32 ret = { .i = 39797, .q = 0, }; + + theta = clamp_t(int, theta, -180, 180); + + if (theta > 90) { + theta -= 180; + signx = -1; + } else if (theta < -90) { + theta += 180; + signx = -1; + } + + for (i = 0; i <= 17; i++) { + if (theta > angle) { + tmp = ret.i - (ret.q >> i); + ret.q += ret.i >> i; + ret.i = tmp; + angle += arctg[i]; + } else { + tmp = ret.i + (ret.q >> i); + ret.q -= ret.i >> i; + ret.i = tmp; + angle -= arctg[i]; + } + } + + ret.i *= signx; + ret.q *= signx; + + return ret; +} diff --git a/drivers/net/wireless/b43/phy_common.h b/drivers/net/wireless/b43/phy_common.h index f635f9e..7a38226 100644 --- a/drivers/net/wireless/b43/phy_common.h +++ b/drivers/net/wireless/b43/phy_common.h @@ -5,6 +5,8 @@ struct b43_wldev; +/* Complex number using 2 32-bit signed integers */ +typedef struct { s32 i, q; } b43_c32; /* PHY register routing bits */ #define B43_PHYROUTE 0x0C00 /* PHY register routing bits mask */ @@ -421,5 +423,6 @@ int b43_phy_shm_tssi_read(struct b43_wldev *dev, u16 shm_offset); */ void b43_phyop_switch_analog_generic(struct b43_wldev *dev, bool on); +b43_c32 b43_cordic(int theta); #endif /* LINUX_B43_PHY_COMMON_H_ */ diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c index b58d6cf..a142804 100644 --- a/drivers/net/wireless/b43/phy_lp.c +++ b/drivers/net/wireless/b43/phy_lp.c @@ -1767,47 +1767,6 @@ out: return ret; } -/* Complex number using 2 32-bit signed integers */ -typedef struct {s32 i, q;} lpphy_c32; - -static lpphy_c32 lpphy_cordic(int theta) -{ - u32 arctg[] = { 2949120, 1740967, 919879, 466945, 234379, 117304, - 58666, 29335, 14668, 7334, 3667, 1833, 917, 458, - 229, 115, 57, 29, }; - int i, tmp, signx = 1, angle = 0; - lpphy_c32 ret = { .i = 39797, .q = 0, }; - - theta = clamp_t(int, theta, -180, 180); - - if (theta > 90) { - theta -= 180; - signx = -1; - } else if (theta < -90) { - theta += 180; - signx = -1; - } - - for (i = 0; i <= 17; i++) { - if (theta > angle) { - tmp = ret.i - (ret.q >> i); - ret.q += ret.i >> i; - ret.i = tmp; - angle += arctg[i]; - } else { - tmp = ret.i + (ret.q >> i); - ret.q -= ret.i >> i; - ret.i = tmp; - angle -= arctg[i]; - } - } - - ret.i *= signx; - ret.q *= signx; - - return ret; -} - static void lpphy_run_samples(struct b43_wldev *dev, u16 samples, u16 loops, u16 wait) { @@ -1826,7 +1785,7 @@ static void lpphy_start_tx_tone(struct b43_wldev *dev, s32 freq, u16 max) struct b43_phy_lp *lpphy = dev->phy.lp; u16 buf[64]; int i, samples = 0, angle = 0, rotation = (9 * freq) / 500; - lpphy_c32 sample; + b43_c32 sample; lpphy->tx_tone_freq = freq; @@ -1842,7 +1801,7 @@ static void lpphy_start_tx_tone(struct b43_wldev *dev, s32 freq, u16 max) } for (i = 0; i < samples; i++) { - sample = lpphy_cordic(angle); + sample = b43_cordic(angle); angle += rotation; buf[i] = ((sample.i * max) & 0xFF) << 8; buf[i] |= (sample.q * max) & 0xFF; -- 1.6.4.2 ___ Bcm43xx-dev mailing list Bcm43xx-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/bcm43xx-dev
[PATCH 1/4] b43: N-PHY: fix one bit off in parsing RF Ctrl Override arguments
Signed-off-by: Rafał Miłecki --- drivers/net/wireless/b43/phy_n.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c index a45a1f3..061b01b 100644 --- a/drivers/net/wireless/b43/phy_n.c +++ b/drivers/net/wireless/b43/phy_n.c @@ -1031,7 +1031,7 @@ static void b43_nphy_rf_control_override(struct b43_wldev *dev, u16 field, u8 index = fls(field); u8 addr, en_addr, val_addr; /* we expect only one bit set */ - B43_WARN_ON(field & (~(1 << index))); + B43_WARN_ON(field & (~(1 << (index - 1; if (dev->phy.rev >= 3) { const struct nphy_rf_control_override_rev3 *rf_ctrl; -- 1.6.4.2 ___ Bcm43xx-dev mailing list Bcm43xx-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/bcm43xx-dev
[PATCH 0/4] more N-PHY, cordic stuff
This adds more N-PHY code and modifies cordic function that is currently used by LP-PHY code. Larry checked this and it still works fine on his LP-PHY card. Rafał Miłecki (4): b43: N-PHY: fix one bit off in parsing RF Ctrl Override arguments b43: make cordic common (LP-PHY and N-PHY need it) b43: update cordic code to match current specs b43: N-PHY: use cordic to generate samples drivers/net/wireless/b43/phy_common.c | 45 drivers/net/wireless/b43/phy_common.h |7 drivers/net/wireless/b43/phy_lp.c | 52 - drivers/net/wireless/b43/phy_n.c | 23 -- 4 files changed, 71 insertions(+), 56 deletions(-) ___ Bcm43xx-dev mailing list Bcm43xx-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/bcm43xx-dev