Re: bcm43xx from 2.6.20-rc1-mm1 on HPC nx6325 (x86_64)

2006-12-23 Thread Rafael J. Wysocki
Hi,

On Friday, 22 December 2006 18:30, Larry Finger wrote:
> I'm trying to make the bcm43xx driver out of the 2.6.20-rc1-mm1 kernel work on
> an HPC nx6325, with no luck, so far, although I'm using a firmware that has
> been reported to work with these boxes
> (http://gentoo-wiki.com/HARDWARE_Gentoo_on_HP_Compaq_nx6325#Onboard_Wireless_.28802.11.29).
> 
> The driver loads and seems to operate the hardware to some extent, but there
> seems to be a problem with interrupts. Namely, the chip doesn't seem to
> generate any.
> Raphael J. Wysocki wrote:
> 
>  > Right after a fresh 'modprobe bcm43xx' I get the following messages in 
> dmesg:
> 
>  > bcm43xx driver
>  > ACPI: PCI Interrupt :30:00.0[A] -> GSI 18 (level, low) -> IRQ 18
>  > PCI: Setting latency timer of device :30:00.0 to 64
>  > bcm43xx: Chip ID 0x4311, rev 0x1
>  > bcm43xx: Number of cores: 4
>  > bcm43xx: Core 0: ID 0x800, rev 0x11, vendor 0x4243
>  > bcm43xx: Core 1: ID 0x812, rev 0xa, vendor 0x4243
>  > bcm43xx: Core 2: ID 0x817, rev 0x3, vendor 0x4243
>  > bcm43xx: Core 3: ID 0x820, rev 0x1, vendor 0x4243
>  > bcm43xx: PHY connected
>  > bcm43xx: Detected PHY: Version: 4, Type 2, Revision 8
>  > bcm43xx: Detected Radio: ID: 2205017f (Manuf: 17f Ver: 2050 Rev: 2)
>  > bcm43xx: Radio turned off
>  > bcm43xx: Radio turned off
>  > PM: Adding info for No Bus:eth1
>  > printk: 3 messages suppressed.
>  > SoftMAC: ASSERTION FAILED (0) at: > 
> net/ieee80211/softmac/ieee80211softmac_wx.c:306:ieee80211softmac_wx_get_rate()
>  >
>  > but, strangely enough, eth1 does not appear, but eth2 appears instead:
>  >
> 
> Usually the problem generates an oops, but I think your problem is due to the 
> changes in the work 
> struct in 2.6.20-rc1. There is a fix in the pipeline, but it has not 
> propagated through the system.
> 
> You should apply the work_struct2 patch attached. If your computer has a 
> switch to kill the RF, you 
> may also wish to apply the radio_hwenable patch, which should cause the radio 
> LED to be turned on.
> 
> The selection of eth2 rather than eth1 is probably due to the rules in 
> /etc/udev/rules.d/30-net_persistent_names.rules.

Ah, I'll check that, thanks.  It used to be eth1, though, and I haven't changed
the  udev configuration myself.

> When I boot a softmac version, my bcm43xx device is  
> wlan0, but when I boot the d80211 version, it is eth1. I have a second 
> bcm43xx card, which becomes 
> eth2 under softmac.

Thanks for the patch.  In the meantime I've browsed the bcm43xx-dev archives
and found some other interesting patches for me to try. ;-)

Greetings,
Rafael


-- 
If you don't have the time to read,
you don't have the time or the tools to write.
- Stephen King
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


bcm43xx from 2.6.20-rc1-mm1 on HPC nx6325 (x86_64)

2006-12-22 Thread Larry Finger

I'm trying to make the bcm43xx driver out of the 2.6.20-rc1-mm1 kernel work on
an HPC nx6325, with no luck, so far, although I'm using a firmware that has
been reported to work with these boxes
(http://gentoo-wiki.com/HARDWARE_Gentoo_on_HP_Compaq_nx6325#Onboard_Wireless_.28802.11.29).

The driver loads and seems to operate the hardware to some extent, but there
seems to be a problem with interrupts. Namely, the chip doesn't seem to
generate any.
Raphael J. Wysocki wrote:

> Right after a fresh 'modprobe bcm43xx' I get the following messages in dmesg:

> bcm43xx driver
> ACPI: PCI Interrupt :30:00.0[A] -> GSI 18 (level, low) -> IRQ 18
> PCI: Setting latency timer of device :30:00.0 to 64
> bcm43xx: Chip ID 0x4311, rev 0x1
> bcm43xx: Number of cores: 4
> bcm43xx: Core 0: ID 0x800, rev 0x11, vendor 0x4243
> bcm43xx: Core 1: ID 0x812, rev 0xa, vendor 0x4243
> bcm43xx: Core 2: ID 0x817, rev 0x3, vendor 0x4243
> bcm43xx: Core 3: ID 0x820, rev 0x1, vendor 0x4243
> bcm43xx: PHY connected
> bcm43xx: Detected PHY: Version: 4, Type 2, Revision 8
> bcm43xx: Detected Radio: ID: 2205017f (Manuf: 17f Ver: 2050 Rev: 2)
> bcm43xx: Radio turned off
> bcm43xx: Radio turned off
> PM: Adding info for No Bus:eth1
> printk: 3 messages suppressed.
> SoftMAC: ASSERTION FAILED (0) at: > 
net/ieee80211/softmac/ieee80211softmac_wx.c:306:ieee80211softmac_wx_get_rate()

>
> but, strangely enough, eth1 does not appear, but eth2 appears instead:
>

Usually the problem generates an oops, but I think your problem is due to the changes in the work 
struct in 2.6.20-rc1. There is a fix in the pipeline, but it has not propagated through the system.


You should apply the work_struct2 patch attached. If your computer has a switch to kill the RF, you 
may also wish to apply the radio_hwenable patch, which should cause the radio LED to be turned on.


The selection of eth2 rather than eth1 is probably due to the rules in 
/etc/udev/rules.d/30-net_persistent_names.rules. When I boot a softmac version, my bcm43xx device is 
wlan0, but when I boot the d80211 version, it is eth1. I have a second bcm43xx card, which becomes 
eth2 under softmac.


Larry
From: Ulrich Kunitz <[EMAIL PROTECTED]>

The signature of work functions changed recently from a context
pointer to the work structure pointer. This caused a problem in
the ieee80211softmac code, because the ieee80211softmac_assox_work
function has  been called directly with a parameter explicitly
casted to (void*). This compiled correctly but resulted in a
softlock, because mutex_lock was called with the wrong memory
address. The patch fixes the problem. Another issue was a wrong
call of the schedule_work function. Softmac works again and this
fixes the problem I mentioned earlier in the zd1211rw rx tasklet
patch. The patch is against Linus' tree (commit af1713e0).

Signed-off-by: Ulrich Kunitz <[EMAIL PROTECTED]>
Acked-by: Michael Buesch <[EMAIL PROTECTED]>
Signed-off-by: Larry Finger <[EMAIL PROTECTED]>
---

John,

This patch should be pushed upstream to 2.6.20. At the moment, the work
struct changes have not yet propagated to wireless-2.6. When they do,
it will be needed there as well.

Larry

 net/ieee80211/softmac/ieee80211softmac_assoc.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/ieee80211/softmac/ieee80211softmac_assoc.c 
b/net/ieee80211/softmac/ieee80211softmac_assoc.c
index eec1a1d..a824852 100644
--- a/net/ieee80211/softmac/ieee80211softmac_assoc.c
+++ b/net/ieee80211/softmac/ieee80211softmac_assoc.c
@@ -167,7 +167,7 @@ static void
 ieee80211softmac_assoc_notify_scan(struct net_device *dev, int event_type, 
void *context)
 {
struct ieee80211softmac_device *mac = ieee80211_priv(dev);
-   ieee80211softmac_assoc_work((void*)mac);
+   ieee80211softmac_assoc_work(&mac->associnfo.work.work);
 }
 
 static void
@@ -177,7 +177,7 @@ ieee80211softmac_assoc_notify_auth(struc
 
switch (event_type) {
case IEEE80211SOFTMAC_EVENT_AUTHENTICATED:
-   ieee80211softmac_assoc_work((void*)mac);
+   ieee80211softmac_assoc_work(&mac->associnfo.work.work);
break;
case IEEE80211SOFTMAC_EVENT_AUTH_FAILED:
case IEEE80211SOFTMAC_EVENT_AUTH_TIMEOUT:

Index: linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
===
--- linux-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+++ linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
@@ -2441,6 +2441,9 @@ static int bcm43xx_chip_init(struct bcm4
if (err)
goto err_gpio_cleanup;
bcm43xx_radio_turn_on(bcm);
+   bcm->radio_hw_enable = bcm43xx_is_hw_radio_enabled(bcm);
+   printk(KERN_INFO PFX "Radio %s by hardware\n",
+   (bcm->radio_hw_enable == 0) ? "disabled" : "enabled");
 
bcm43xx_write16(bcm, 0x03E6, 0x);
err = bcm43xx_phy_init(bcm);
@@ -3172,9 +3175,24 @@ static void bcm43xx_periodic_every30sec(
 
 sta

bcm43xx from 2.6.20-rc1-mm1 on HPC nx6325 (x86_64)

2006-12-21 Thread Rafael J. Wysocki
Hi,

I'm trying to make the bcm43xx driver out of the 2.6.20-rc1-mm1 kernel work on
an HPC nx6325, with no luck, so far, although I'm using a firmware that has
been reported to work with these boxes
(http://gentoo-wiki.com/HARDWARE_Gentoo_on_HP_Compaq_nx6325#Onboard_Wireless_.28802.11.29).

The driver loads and seems to operate the hardware to some extent, but there
seems to be a problem with interrupts.  Namely, the chip doesn't seem to
generate any.

Right after a fresh 'modprobe bcm43xx' I get the following messages in dmesg:

bcm43xx driver
ACPI: PCI Interrupt :30:00.0[A] -> GSI 18 (level, low) -> IRQ 18
PCI: Setting latency timer of device :30:00.0 to 64
bcm43xx: Chip ID 0x4311, rev 0x1
bcm43xx: Number of cores: 4
bcm43xx: Core 0: ID 0x800, rev 0x11, vendor 0x4243
bcm43xx: Core 1: ID 0x812, rev 0xa, vendor 0x4243
bcm43xx: Core 2: ID 0x817, rev 0x3, vendor 0x4243
bcm43xx: Core 3: ID 0x820, rev 0x1, vendor 0x4243
bcm43xx: PHY connected
bcm43xx: Detected PHY: Version: 4, Type 2, Revision 8
bcm43xx: Detected Radio: ID: 2205017f (Manuf: 17f Ver: 2050 Rev: 2)
bcm43xx: Radio turned off
bcm43xx: Radio turned off
PM: Adding info for No Bus:eth1
printk: 3 messages suppressed.
SoftMAC: ASSERTION FAILED (0) at: 
net/ieee80211/softmac/ieee80211softmac_wx.c:306:ieee80211softmac_wx_get_rate()

but, strangely enough, eth1 does not appear, but eth2 appears instead:

# ifconfig eth1 up
eth1: unknown interface: No such device
# ifconfig eth2 up
#

Now there are lots of

SoftMAC: ASSERTION FAILED (0) at: 
net/ieee80211/softmac/ieee80211softmac_wx.c:306:ieee80211softmac_wx_get_rate()

messages in dmesg followed by

bcm43xx: PHY connected
PM: Adding info for No Bus::30:00.0
PM: Removing info for No Bus::30:00.0
PM: Adding info for No Bus::30:00.0
PM: Removing info for No Bus::30:00.0
PM: Adding info for No Bus::30:00.0
PM: Removing info for No Bus::30:00.0
PM: Adding info for No Bus::30:00.0
PM: Removing info for No Bus::30:00.0
bcm43xx: Microcode rev 0x122, pl 0x98 (2004-11-16  07:21:20)
bcm43xx: Radio turned on
bcm43xx: Chip initialized
bcm43xx: 32-bit DMA initialized
bcm43xx: Keys cleared
bcm43xx: Selected 802.11 core (phytype 2)
PM: Adding info for No Bus:hw_random
ADDRCONF(NETDEV_UP): eth2: link is not ready

Now, if I run iwconfig on it, I get

eth2  IEEE 802.11b/g  ESSID:off/any  Nickname:"Broadcom 4311"
  Mode:Managed  Frequency=2.437 GHz  Access Point: Invalid
  Bit Rate=1 Mb/s   Tx-Power=18 dBm
  RTS thr:off   Fragment thr:off
  Encryption key:off
  Link Quality=0/100  Signal level=-256 dBm  Noise level=-256 dBm
  Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
  Tx excessive retries:0  Invalid misc:0   Missed beacon:0

and 'iwlist eth2 scan' says 'eth2  No scan results', although a working
access point is standing next to the box and the following line appears in
dmesg:

SoftMAC: Scanning finished: scanned 14 channels starting with channel 1

_But_ if I do 'cat /proc/interrupts' now, I get:

   CPU0   CPU1
  0:1247596  0-edge  timer
  1:   3939   1170   IO-APIC-edge  i8042
  8:  0  0   IO-APIC-edge  rtc
 12:150170   IO-APIC-edge  i8042
 14:  38129   6047   IO-APIC-edge  ide0
 16:  99585  18389   IO-APIC-fasteoi   libata, HDA Intel
 18:  0  0   IO-APIC-fasteoi   bcm43xx
 19:  48003   9582   IO-APIC-fasteoi   ohci_hcd:usb1, ohci_hcd:usb2, 
ehci_hcd:usb3
 20:  0  3   IO-APIC-fasteoi   yenta, tifm_7xx1, ohci1394, 
sdhci:slot0
 21:  11522   2467   IO-APIC-fasteoi   acpi
 23:  68971  11663   IO-APIC-fasteoi   eth0
NMI:  0  0
LOC:12476621247039
ERR: 10

so apparently there's something wrong.

Greetings,
Rafael


-- 
If you don't have the time to read,
you don't have the time or the tools to write.
- Stephen King
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/