This patch reads the microcode revision number from SHM. And you will
get an error message in case of new ucode versions (rev > 0x128) which
do not run at the moment (aka 4.x firmware version problem).
I hope this will run fine with all firmware files. I tried only a few
ones and the result was ok so far. BTW, I can only test the popular
bcm43xx_microcode5.fw files.
It would be great if users with microcode2/microcode4 hardware could
test it, too. If you don't know what kind of hardware you have, then
look for the revision number of your core 0x812.
Core 0x812 rev 2 is microcode2 hardware
Core 0x812 rev 4 is microcode4 hardware
Core 0x812 rev >=5 is microcode5 hardware
I hope this patch can prevent some machines from crashing in the future.
Signed-off-by: Martin Langer <[EMAIL PROTECTED]>
--- bcm43xx_main.c.ORIGINAL 2006-07-29 11:27:37.000000000 +0200
+++ bcm43xx_main.c 2006-07-29 14:55:49.000000000 +0200
@@ -2396,6 +2396,20 @@
if (err)
goto err_release_fw;
+ value16 = bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED,
+ BCM43xx_UCODE_REVISION);
+
+ dprintk(KERN_INFO PFX "Firmware: microcode rev 0x%x, patchlevel 0x%x\n",
+ value16, bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED,
+ BCM43xx_UCODE_PATCHLEVEL));
+
+ if ( value16 > 0x128 ) {
+ dprintk(KERN_ERR PFX
+ "Firmware: no support for microcode rev > 0x128\n");
+ err = -1;
+ goto err_release_fw;
+ }
+
err = bcm43xx_gpio_init(bcm);
if (err)
goto err_free_irq;
--- bcm43xx.h.ORIGINAL 2006-07-29 14:50:24.000000000 +0200
+++ bcm43xx.h 2006-07-29 14:56:50.000000000 +0200
@@ -281,6 +281,10 @@
#define BCM43xx_SBF_TIME_UPDATE 0x10000000
#define BCM43xx_SBF_80000000 0x80000000 /*FIXME: fix name*/
+/* Microcode */
+#define BCM43xx_UCODE_REVISION 0x0000
+#define BCM43xx_UCODE_PATCHLEVEL 0x0002
+
/* MicrocodeFlagsBitfield (addr + lo-word values?)*/
#define BCM43xx_UCODEFLAGS_OFFSET 0x005E
_______________________________________________
Bcm43xx-dev mailing list
[email protected]
http://bat.berlios.de/mailman/listinfo/bcm43xx-dev