Re: 5354 + B43 = Instant Crash

2009-09-13 Thread Thomas Ilnseher
Ah, I can reply to the list again!

Petr Kubin knew what the problem was (citing his mail:)


 try this:
 in phy_common.c (next-to-last line), in
b43_phyop_switch_analog_generic,
 comment out ``b43_write16(dev, B43_MMIO_PHY0, on ? 0 : 0xF4);''

Now it works!!

Great work, Stefanik, Michael, Larry (and all the others).

Here is the proof (iwconfig):
wlan0 IEEE 802.11bg  ESSID:tommy  
  Mode:Managed  Frequency:2.412 GHz  Access Point: XX:XX:XX 
  Bit Rate=18 Mb/s   Tx-Power=20 dBm   
  Retry  long limit:7   RTS thr:off   Fragment thr:off
  Encryption key:off
  Power Management:off
  Link Quality=70/70  Signal level=10 dBm  
  Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
  Tx excessive retries:0  Invalid misc:0   Missed beacon:0


The Bitrate could be a bit higher ... my notebook (with iwlagn) does
100Mit/s on the same place,  but it's ok as a wireless scanner.

Here is the dmesg output (I got it over ssh over wlan!):

r...@openwrt:~# dmesg 
Linux version 2.6.28.10 (t...@note) (gcc version 4.1.2) #5 Sat Sep 12
12:57:21 CEST 2009
CPU revision is: 00029029 (Broadcom BCM3302)
ssb: Core 0 found: ChipCommon (cc 0x800, rev 0x14, vendor 0x4243)
ssb: Core 1 found: Fast Ethernet (cc 0x806, rev 0x09, vendor 0x4243)
ssb: Core 2 found: MIPS 3302 (cc 0x816, rev 0x08, vendor 0x4243)
ssb: Core 3 found: USB 2.0 Host (cc 0x819, rev 0x02, vendor 0x4243)
ssb: Core 4 found: MEMC SDRAM (cc 0x80F, rev 0x04, vendor 0x4243)
ssb: Core 5 found: IEEE 802.11 (cc 0x812, rev 0x0D, vendor 0x4243)
ssb: Core 6 found: Roboswitch (cc 0x81C, rev 0x02, vendor 0x4243)
ssb: Found rev 0 PMU (capabilities 0x04A63400)
ssb: Initializing MIPS core...
ssb: core 0x0800, irq : 2(S)  3* 4  5  6  D  I 
ssb: core 0x0806, irq : 2(S)  3  4* 5  6  D  I 
ssb: core 0x0816, irq : 2(S)  3  4  5* 6  D  I 
ssb: core 0x0819, irq : 2(S)  3  4  5  6* D  I 
ssb: core 0x080f, irq : 2(S)  3  4  5  6  D  I*
ssb: core 0x0812, irq : 2(S)* 3  4  5  6  D  I 
ssb: core 0x081c, irq : 2(S)  3  4  5  6  D  I*
ssb: set_irq: core 0x0806, irq 4 = 4
ssb: set_irq: core 0x0816, irq 5 = 2
ssb: set_irq: core 0x0812, irq 2 = 5
ssb: after irq reconfiguration
ssb: core 0x0800, irq : 2(S)  3* 4  5  6  D  I 
ssb: core 0x0806, irq : 2(S)  3  4* 5  6  D  I 
ssb: core 0x0816, irq : 2(S)* 3  4  5  6  D  I 
ssb: core 0x0819, irq : 2(S)  3  4  5  6* D  I 
ssb: core 0x080f, irq : 2(S)  3  4  5  6  D  I*
ssb: core 0x0812, irq : 2(S)  3  4  5* 6  D  I 
ssb: core 0x081c, irq : 2(S)  3  4  5  6  D  I*
ssb: Sonics Silicon Backplane found at address 0x1800
Serial init done.
Determined physical RAM map:
 memory: 0100 @  (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal   0x - 0x1000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0x - 0x1000
On node 0 totalpages: 4096
free_area_init_node: node 0, pgdat 80268a00, node_mem_map 802b
  Normal zone: 32 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 4064 pages, LIFO batch:0
  Movable zone: 0 pages used for memmap
Built 1 zonelists in Zone order, mobility grouping off.  Total pages:
4064
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2
noinitrd console=ttyS0,115200
Primary instruction cache 16kB, VIPT, 4-way, linesize 16 bytes.
Primary data cache 16kB, 2-way, VIPT, cache aliases, linesize 16 bytes
PID hash table entries: 64 (order: 6, 256 bytes)
console [ttyS0] enabled
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 13488k/16384k available (2157k kernel code, 2896k reserved, 308k
data, 136k init, 0k highmem)
Calibrating delay loop... 239.61 BogoMIPS (lpj=479232)
Mount-cache hash table entries: 512
net_namespace: 480 bytes
NET: Registered protocol family 16
Switched to high resolution mode on CPU 0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
NET: Registered protocol family 1
detected lzma initramfs
initramfs: LZMA lc=1,lp=2,pb=2,origSize=512
squashfs: version 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
msgmni has been set to 26
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver2 ports, IRQ sharing enabled
serial8250: ttyS0 at MMIO 0xb8000300 (irq = 3) is a 16550A
serial8250: ttyS1 at MMIO 0xb8000400 (irq = 3) is a 16550A
serial8250.0: ttyS0 at MMIO 0xb8000300 (irq = 3) is a 16550A
serial8250.0: ttyS1 at MMIO 0xb8000400 (irq = 3) is a 16550A
b44.c:v2.0
eth0: Broadcom 44xx/47xx 10/100BaseT Ethernet 00:1f:c6:7d:91:31
flash init: 0x1c00 0x0200
Physically mapped flash: Found 1 x16 

Re: 5354 + B43 = Instant Crash

2009-09-13 Thread Larry Finger
Thomas Ilnseher wrote:
 Ah, I can reply to the list again!
 
 Petr Kubin knew what the problem was (citing his mail:)
 
 
 try this:
 in phy_common.c (next-to-last line), in
 b43_phyop_switch_analog_generic,
 comment out ``b43_write16(dev, B43_MMIO_PHY0, on ? 0 : 0xF4);''
 
 Now it works!!

There was a code change for this routine on 08/13 in
http://bcm-v4.sipsolutions.net/802.11/PHY/Anacore. It was missed and
has not yet been coded. Thanks to you and Petr for this tip. BTW,
where is his E-mail posted? I don't seem to have it in my mailbox.

Larry

___
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev


5354 + B43 = Instant Crash

2009-09-11 Thread Thomas Ilnseher
Hi List,

I installed the latest version of OpenWRT on a ASUS WL-520GU.
I compiles a few kernel patches to make the OpenWRT kernel (2.6.28.10)
compatible with compat wireless.

Than I patched OpenWRT to build compat-wireless-09-02

As said, It yields an instant crash:

cfg80211: World regulatory domain updated:
(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
(2402000 KHz - 2472000 KHz @ 4 KHz), (300 mBi, 2000 mBm)
(2457000 KHz - 2482000 KHz @ 2 KHz), (300 mBi, 2000 mBm)
(2474000 KHz - 2494000 KHz @ 2 KHz), (300 mBi, 2000 mBm)
(517 KHz - 525 KHz @ 4 KHz), (300 mBi, 2000 mBm)
(5735000 KHz - 5835000 KHz @ 4 KHz), (300 mBi, 2000 mBm)
b43-phy0: Broadcom 5354 WLAN found (core revision 13)
Decompressing..done == CFE Again, no usefull stuff on teh RS232
port

FWIW, I add the patches for the kernel.

diff -uNr linux-2.6.28.10/include/linux/ssb/ssb.h linux-2.6.28.10_new/include/linux/ssb/ssb.h
--- linux-2.6.28.10/include/linux/ssb/ssb.h	2009-09-11 19:46:51.0 +0200
+++ linux-2.6.28.10_new/include/linux/ssb/ssb.h	2009-09-11 20:40:46.112875751 +0200
@@ -27,24 +27,54 @@
 	u8 et1mdcport;		/* MDIO for enet1 */
 	u8 board_rev;		/* Board revision number from SPROM. */
 	u8 country_code;	/* Country Code */
-	u8 ant_available_a;	/* A-PHY antenna available bits (up to 4) */
-	u8 ant_available_bg;	/* B/G-PHY antenna available bits (up to 4) */
+	u8 ant_available_a;	/* 2GHz antenna available bits (up to 4) */
+	u8 ant_available_bg;	/* 5GHz antenna available bits (up to 4) */
 	u16 pa0b0;
 	u16 pa0b1;
 	u16 pa0b2;
 	u16 pa1b0;
 	u16 pa1b1;
 	u16 pa1b2;
+	u16 pa1lob0;
+	u16 pa1lob1;
+	u16 pa1lob2;
+	u16 pa1hib0;
+	u16 pa1hib1;
+	u16 pa1hib2;
 	u8 gpio0;		/* GPIO pin 0 */
 	u8 gpio1;		/* GPIO pin 1 */
 	u8 gpio2;		/* GPIO pin 2 */
 	u8 gpio3;		/* GPIO pin 3 */
-	u16 maxpwr_a;		/* A-PHY Amplifier Max Power (in dBm Q5.2) */
-	u16 maxpwr_bg;		/* B/G-PHY Amplifier Max Power (in dBm Q5.2) */
+	u16 maxpwr_bg;		/* 2.4GHz Amplifier Max Power (in dBm Q5.2) */
+	u16 maxpwr_al;		/* 5.2GHz Amplifier Max Power (in dBm Q5.2) */
+	u16 maxpwr_a;		/* 5.3GHz Amplifier Max Power (in dBm Q5.2) */
+	u16 maxpwr_ah;		/* 5.8GHz Amplifier Max Power (in dBm Q5.2) */
 	u8 itssi_a;		/* Idle TSSI Target for A-PHY */
 	u8 itssi_bg;		/* Idle TSSI Target for B/G-PHY */
-	u16 boardflags_lo;	/* Boardflags (low 16 bits) */
-	u16 boardflags_hi;	/* Boardflags (high 16 bits) */
+	u8 tri2g;		/* 2.4GHz TX isolation */
+	u8 tri5gl;		/* 5.2GHz TX isolation */
+	u8 tri5g;		/* 5.3GHz TX isolation */
+	u8 tri5gh;		/* 5.8GHz TX isolation */
+	u8 rxpo2g;		/* 2GHz RX power offset */
+	u8 rxpo5g;		/* 5GHz RX power offset */
+	u8 rssisav2g;		/* 2GHz RSSI params */
+	u8 rssismc2g;
+	u8 rssismf2g;
+	u8 bxa2g;		/* 2GHz BX arch */
+	u8 rssisav5g;		/* 5GHz RSSI params */
+	u8 rssismc5g;
+	u8 rssismf5g;
+	u8 bxa5g;		/* 5GHz BX arch */
+	u16 cck2gpo;		/* CCK power offset */
+	u32 ofdm2gpo;		/* 2.4GHz OFDM power offset */
+	u32 ofdm5glpo;		/* 5.2GHz OFDM power offset */
+	u32 ofdm5gpo;		/* 5.3GHz OFDM power offset */
+	u32 ofdm5ghpo;		/* 5.8GHz OFDM power offset */
+	u16 boardflags_lo;	/* Board flags (bits 0-15) */
+	u16 boardflags_hi;	/* Board flags (bits 16-31) */
+	u16 boardflags2_lo;	/* Board flags (bits 32-47) */
+	u16 boardflags2_hi;	/* Board flags (bits 48-63) */
+	/* TODO store board flags in a single u64 */
 
 	/* Antenna gain values for up to 4 antennas
 	 * on each band. Values in dBm/4 (Q5.2). Negative gain means the
@@ -58,7 +88,7 @@
 		} ghz5;		/* 5GHz band */
 	} antenna_gain;
 
-	/* TODO - add any parameters needed from rev 2, 3, or 4 SPROMs */
+	/* TODO - add any parameters needed from rev 2, 3, 4, 5 or 8 SPROMs */
 };
 
 /* Information about the PCB the circuitry is soldered on. */
@@ -208,6 +238,7 @@
 	SSB_BUSTYPE_SSB,	/* This SSB bus is the system bus */
 	SSB_BUSTYPE_PCI,	/* SSB is connected to PCI bus */
 	SSB_BUSTYPE_PCMCIA,	/* SSB is connected to PCMCIA bus */
+	SSB_BUSTYPE_SDIO,	/* SSB is connected to SDIO bus */
 };
 
 /* board_vendor */
@@ -240,8 +271,12 @@
 
 	/* The core in the basic address register window. (PCI bus only) */
 	struct ssb_device *mapped_device;
-	/* Currently mapped PCMCIA segment. (bustype == SSB_BUSTYPE_PCMCIA only) */
-	u8 mapped_pcmcia_seg;
+	union {
+		/* Currently mapped PCMCIA segment. (bustype == SSB_BUSTYPE_PCMCIA only) */
+		u8 mapped_pcmcia_seg;
+		/* Current SSB base address window for SDIO. */
+		u32 sdio_sbaddr;
+	};
 	/* Lock for core and segment switching.
 	 * On PCMCIA-host busses this is used to protect the whole MMIO access. */
 	spinlock_t bar_lock;
@@ -252,6 +287,11 @@
 	struct pci_dev *host_pci;
 	/* Pointer to the PCMCIA device (only if bustype == SSB_BUSTYPE_PCMCIA). */
 	struct pcmcia_device *host_pcmcia;
+	/* Pointer to the SDIO device (only if bustype == SSB_BUSTYPE_SDIO). */
+	struct sdio_func *host_sdio;
+
+	/* See enum ssb_quirks */
+	unsigned int quirks;
 
 #ifdef CONFIG_SSB_SPROM
 	/* Mutex to protect 

Re: 5354 + B43 = Instant Crash

2009-09-11 Thread Gábor Stefanik
On Fri, Sep 11, 2009 at 10:54 PM, Thomas Ilnseher il...@gmx.de wrote:
 Hi List,

 I installed the latest version of OpenWRT on a ASUS WL-520GU.
 I compiles a few kernel patches to make the OpenWRT kernel (2.6.28.10)
 compatible with compat wireless.

 Than I patched OpenWRT to build compat-wireless-09-02

 As said, It yields an instant crash:

 cfg80211: World regulatory domain updated:
        (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
        (2402000 KHz - 2472000 KHz @ 4 KHz), (300 mBi, 2000 mBm)
        (2457000 KHz - 2482000 KHz @ 2 KHz), (300 mBi, 2000 mBm)
        (2474000 KHz - 2494000 KHz @ 2 KHz), (300 mBi, 2000 mBm)
        (517 KHz - 525 KHz @ 4 KHz), (300 mBi, 2000 mBm)
        (5735000 KHz - 5835000 KHz @ 4 KHz), (300 mBi, 2000 mBm)
 b43-phy0: Broadcom 5354 WLAN found (core revision 13)
 Decompressing..done == CFE Again, no usefull stuff on teh RS232
 port

 FWIW, I add the patches for the kernel.

These patches are probably not enough - there were more changes to the
ssb module since 2.6.28. You will probably need to compile a new
kernel from wireless-testing or net-next-2.6 (linux-next  linux-2.6
may also work). (God luck doing that in the OpenWRT build system...)



 ___
 Bcm43xx-dev mailing list
 Bcm43xx-dev@lists.berlios.de
 https://lists.berlios.de/mailman/listinfo/bcm43xx-dev





-- 
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: 5354 + B43 = Instant Crash

2009-09-11 Thread Gábor Stefanik
2009/9/12 Gábor Stefanik netrolller...@gmail.com:
 On Fri, Sep 11, 2009 at 10:54 PM, Thomas Ilnseher il...@gmx.de wrote:
 Hi List,

 I installed the latest version of OpenWRT on a ASUS WL-520GU.
 I compiles a few kernel patches to make the OpenWRT kernel (2.6.28.10)
 compatible with compat wireless.

 Than I patched OpenWRT to build compat-wireless-09-02

 As said, It yields an instant crash:

 cfg80211: World regulatory domain updated:
        (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
        (2402000 KHz - 2472000 KHz @ 4 KHz), (300 mBi, 2000 mBm)
        (2457000 KHz - 2482000 KHz @ 2 KHz), (300 mBi, 2000 mBm)
        (2474000 KHz - 2494000 KHz @ 2 KHz), (300 mBi, 2000 mBm)
        (517 KHz - 525 KHz @ 4 KHz), (300 mBi, 2000 mBm)
        (5735000 KHz - 5835000 KHz @ 4 KHz), (300 mBi, 2000 mBm)
 b43-phy0: Broadcom 5354 WLAN found (core revision 13)
 Decompressing..done == CFE Again, no usefull stuff on teh RS232
 port

 FWIW, I add the patches for the kernel.

 These patches are probably not enough - there were more changes to the
 ssb module since 2.6.28. You will probably need to compile a new
 kernel from wireless-testing or net-next-2.6 (linux-next  linux-2.6
 may also work). (God luck doing that in the OpenWRT build system...)

Oops... that was Good's hand. :)




 ___
 Bcm43xx-dev mailing list
 Bcm43xx-dev@lists.berlios.de
 https://lists.berlios.de/mailman/listinfo/bcm43xx-dev





 --
 Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)




-- 
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: 5354 + B43 = Instant Crash

2009-09-11 Thread Thomas Ilnseher
On Sa, 2009-09-12 at 00:56 +0200, Gábor Stefanik wrote:
 2009/9/12 Gábor Stefanik netrolller...@gmail.com:
  On Fri, Sep 11, 2009 at 10:54 PM, Thomas Ilnseher il...@gmx.de wrote:
  Hi List,
 
  I installed the latest version of OpenWRT on a ASUS WL-520GU.
  I compiles a few kernel patches to make the OpenWRT kernel (2.6.28.10)
  compatible with compat wireless.
 
  Than I patched OpenWRT to build compat-wireless-09-02
 
  As said, It yields an instant crash:
 
  cfg80211: World regulatory domain updated:
 (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
 (2402000 KHz - 2472000 KHz @ 4 KHz), (300 mBi, 2000 mBm)
 (2457000 KHz - 2482000 KHz @ 2 KHz), (300 mBi, 2000 mBm)
 (2474000 KHz - 2494000 KHz @ 2 KHz), (300 mBi, 2000 mBm)
 (517 KHz - 525 KHz @ 4 KHz), (300 mBi, 2000 mBm)
 (5735000 KHz - 5835000 KHz @ 4 KHz), (300 mBi, 2000 mBm)
  b43-phy0: Broadcom 5354 WLAN found (core revision 13)
  Decompressing..done == CFE Again, no usefull stuff on teh RS232
  port
 
  FWIW, I add the patches for the kernel.
 
  These patches are probably not enough - there were more changes to the
  ssb module since 2.6.28. You will probably need to compile a new
  kernel from wireless-testing or net-next-2.6 (linux-next  linux-2.6
  may also work). (God luck doing that in the OpenWRT build system...)
I will try to copy all ssb files from compat-wireless to the 2.6.28.10
kernel, and create a patch. 

I assume the kernel will crash on boot then, cause I'd need some changes
in /arch/mips/

I can probably hack the build system to support a newer kernel, but the
problem remains that there are a gazillion patches that need porting :/

So I think the next thing to do is a diff of that ssb stuff, and see
what's changed.

The main Issue is that I can't get any usefull information what's going
on- I see only the single line above. 

As far as I understand the code (that I've read so far) It should printk
some driver message BEFORE this message.

I've seen some verbosity parameter, I will play with that.


 
 Oops... that was Good's hand. :)
 
 
 
 
  ___
  Bcm43xx-dev mailing list
  Bcm43xx-dev@lists.berlios.de
  https://lists.berlios.de/mailman/listinfo/bcm43xx-dev
 
 
 
 
 
  --
  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