2008-10-18 23:10:49

by Dominik Brodowski

[permalink] [raw]
Subject: 2.6.28-rc regression: Can't stop Rx DMA

Hi,

with current Linus' tree, I cannot connet my notebook to the AP any more.

02:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
Subsystem: Intel Corporation PRO/Wireless 3945ABG Network Connection
Flags: bus master, fast devsel, latency 0, IRQ 380
Memory at f0300000 (32-bit, non-prefetchable) [size=4K]

[ 20.645198] iwl3945: Intel(R) PRO/Wireless 3945ABG/BG Network Connection driver for Linux, 1.2.26ks
[ 20.645337] iwl3945: Copyright(c) 2003-2008 Intel Corporation
[ 20.645767] iwl3945 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 20.645913] iwl3945 0000:02:00.0: setting latency timer to 64
[ 20.645996] iwl3945: Detected Intel Wireless WiFi Link 3945ABG
[ 20.708706] iwl3945: Tunable channels: 13 802.11bg, 23 802.11a channels
[ 20.712625] phy0: Selected rate control algorithm 'iwl-3945-rs'
[ 20.733199] iwl3945 0000:02:00.0: PCI INT A disabled
...
[ 34.824476] iwl3945 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 34.824637] iwl3945 0000:02:00.0: restoring config space at offset 0x1 (was 0x100102, writing 0x100106)
[ 34.825269] iwl3945 0000:02:00.0: firmware: requesting iwlwifi-3945-1.ucode
[ 37.340901] iwl3945: Microcode SW error detected. Restarting 0x82000008.
[ 37.340944] iwl3945: Error Reply type 0x00000005 cmd REPLY_SCAN_CMD (0x80) seq 0x4413 ser 0x0000004B
[ 37.342349] iwl3945: Can't stop Rx DMA.

The iwlwifi-3945-1.ucode is the one shipped with Ubuntu's 2.6.24-21-generic
kernel sources (md5sum: 26d10014b09439dc5a8573c2a6f85b0a ). And, as
mentioned in the subject, 2.6.27 or 2.6.26 work perfectly fine.

Oh, and the .config:

CONFIG_IWLWIFI=y
CONFIG_IWLCORE=y
# CONFIG_IWLWIFI_LEDS is not set
CONFIG_IWLWIFI_RFKILL=y
# CONFIG_IWLWIFI_DEBUG is not set
# CONFIG_IWLAGN is not set
CONFIG_IWL3945=m
CONFIG_IWL3945_RFKILL=y
CONFIG_IWL3945_SPECTRUM_MEASUREMENT=y
# CONFIG_IWL3945_LEDS is not set
# CONFIG_IWL3945_DEBUG is not set

Any ideas? Patches to test? Thanks!

Best,
Dominik


2008-10-18 23:30:50

by Tomas Winkler

[permalink] [raw]
Subject: Re: 2.6.28-rc regression: Can't stop Rx DMA

On Sun, Oct 19, 2008 at 1:10 AM, Dominik Brodowski
<[email protected]> wrote:
> Hi,
>
> with current Linus' tree, I cannot connet my notebook to the AP any more.
>
> 02:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
> Subsystem: Intel Corporation PRO/Wireless 3945ABG Network Connection
> Flags: bus master, fast devsel, latency 0, IRQ 380
> Memory at f0300000 (32-bit, non-prefetchable) [size=4K]
>
> [ 20.645198] iwl3945: Intel(R) PRO/Wireless 3945ABG/BG Network Connection driver for Linux, 1.2.26ks
> [ 20.645337] iwl3945: Copyright(c) 2003-2008 Intel Corporation
> [ 20.645767] iwl3945 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
> [ 20.645913] iwl3945 0000:02:00.0: setting latency timer to 64
> [ 20.645996] iwl3945: Detected Intel Wireless WiFi Link 3945ABG
> [ 20.708706] iwl3945: Tunable channels: 13 802.11bg, 23 802.11a channels
> [ 20.712625] phy0: Selected rate control algorithm 'iwl-3945-rs'
> [ 20.733199] iwl3945 0000:02:00.0: PCI INT A disabled
> ...
> [ 34.824476] iwl3945 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
> [ 34.824637] iwl3945 0000:02:00.0: restoring config space at offset 0x1 (was 0x100102, writing 0x100106)
> [ 34.825269] iwl3945 0000:02:00.0: firmware: requesting iwlwifi-3945-1.ucode
> [ 37.340901] iwl3945: Microcode SW error detected. Restarting 0x82000008.
> [ 37.340944] iwl3945: Error Reply type 0x00000005 cmd REPLY_SCAN_CMD (0x80) seq 0x4413 ser 0x0000004B
> [ 37.342349] iwl3945: Can't stop Rx DMA.
>
> The iwlwifi-3945-1.ucode is the one shipped with Ubuntu's 2.6.24-21-generic
> kernel sources (md5sum: 26d10014b09439dc5a8573c2a6f85b0a ). And, as
> mentioned in the subject, 2.6.27 or 2.6.26 work perfectly fine.

I think you need new uCode, the API has changed to support stealth APs
.... I believe there was
some misscommunication...
Tomas

2008-10-27 22:10:47

by Reinette Chatre

[permalink] [raw]
Subject: Re: 2.6.28-rc regression: Can't stop Rx DMA

On Sun, 2008-10-19 at 00:59 -0700, Dominik Brodowski wrote:
> On Sun, Oct 19, 2008 at 01:30:50AM +0200, Tomas Winkler wrote:
> > On Sun, Oct 19, 2008 at 1:10 AM, Dominik Brodowski
> > > [ 37.340901] iwl3945: Microcode SW error detected. Restarting 0x82000008.
> > > [ 37.340944] iwl3945: Error Reply type 0x00000005 cmd REPLY_SCAN_CMD (0x80) seq 0x4413 ser 0x0000004B
> > > [ 37.342349] iwl3945: Can't stop Rx DMA.
> > >
> > > The iwlwifi-3945-1.ucode is the one shipped with Ubuntu's 2.6.24-21-generic
> > > kernel sources (md5sum: 26d10014b09439dc5a8573c2a6f85b0a ). And, as
> > > mentioned in the subject, 2.6.27 or 2.6.26 work perfectly fine.
> >
> > I think you need new uCode, the API has changed to support stealth APs
> > .... I believe there was some misscommunication...
>
> Thanks for the hint -- indeed, the newest uCode works both with 2.6.26 and
> current git... so the uCode is backwards compatible, but the kernel code is
> not. Should the uCode be named iwlwifi-3945-2.ucode therefore, to notify the
> users that they need something newer? Or can the kernel code be made to work
> with the old uCode again?

(let me try again... sorry for the spam)

Could you please try the following patch instead of updating your ucode?

diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c
b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index d15a2c9..0f811dd 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -6100,7 +6100,7 @@ static void iwl3945_bg_request_scan(struct
work_struct *data)
int rc = 0;
struct iwl3945_scan_cmd *scan;
struct ieee80211_conf *conf = NULL;
- u8 n_probes = 2;
+ u8 n_probes = 0;
enum ieee80211_band band;

conf = ieee80211_get_hw_conf(priv->hw);



2008-10-19 07:59:19

by Dominik Brodowski

[permalink] [raw]
Subject: Re: 2.6.28-rc regression: Can't stop Rx DMA

On Sun, Oct 19, 2008 at 01:30:50AM +0200, Tomas Winkler wrote:
> On Sun, Oct 19, 2008 at 1:10 AM, Dominik Brodowski
> > [ 37.340901] iwl3945: Microcode SW error detected. Restarting 0x82000008.
> > [ 37.340944] iwl3945: Error Reply type 0x00000005 cmd REPLY_SCAN_CMD (0x80) seq 0x4413 ser 0x0000004B
> > [ 37.342349] iwl3945: Can't stop Rx DMA.
> >
> > The iwlwifi-3945-1.ucode is the one shipped with Ubuntu's 2.6.24-21-generic
> > kernel sources (md5sum: 26d10014b09439dc5a8573c2a6f85b0a ). And, as
> > mentioned in the subject, 2.6.27 or 2.6.26 work perfectly fine.
>
> I think you need new uCode, the API has changed to support stealth APs
> .... I believe there was some misscommunication...

Thanks for the hint -- indeed, the newest uCode works both with 2.6.26 and
current git... so the uCode is backwards compatible, but the kernel code is
not. Should the uCode be named iwlwifi-3945-2.ucode therefore, to notify the
users that they need something newer? Or can the kernel code be made to work
with the old uCode again?

Thanks,
Dominik

2008-10-29 21:53:28

by Dominik Brodowski

[permalink] [raw]
Subject: Re: 2.6.28-rc regression: Can't stop Rx DMA

Hi,

On Wed, Oct 29, 2008 at 10:10:52AM -0700, reinette chatre wrote:
> On Tue, 2008-10-28 at 17:27 -0700, Dominik Brodowski wrote:
> > With CONFIG_WIRELESS_OLD_REGULATORY=y, both the old and the new firmware
> > works. Without, only the old firmware works.
>
> (I assume you mean "only the new firmware works")

yes, sorry for the confusion.

> > I'd think that at least the error message could be clarified a bit
> > (is it really a "Microcode SW error"?)... also, it might be a corner case
> > whether the new firmware would better be called -2 because of this
> > incompatibility?
>
> We can do away with the error message with a driver change. This patch
> should take care of it:

but could we get a more meaningful error message instead? Such as "No
regulartory information found -- therefore the microcode fails to cooperate
with you! Either use iw available at ... or recompile with
CONFIG_WIRELESS_OLD_REGULATORY set to yes." ?

Thanks,
Dominik

2008-10-29 23:06:16

by Reinette Chatre

[permalink] [raw]
Subject: Re: 2.6.28-rc regression: Can't stop Rx DMA

On Wed, 2008-10-29 at 14:53 -0700, Dominik Brodowski wrote:

> but could we get a more meaningful error message instead? Such as "No
> regulartory information found -- therefore the microcode fails to cooperate
> with you! Either use iw available at ... or recompile with
> CONFIG_WIRELESS_OLD_REGULATORY set to yes." ?
>

This is not an error ... the driver sets the information according to
what it thinks is correct and then mac80211 changes it to what it thinks
is correct.

We are working on changes for the driver to work better with cfg80211

Reinette



2008-10-27 20:02:14

by Reinette Chatre

[permalink] [raw]
Subject: Re: 2.6.28-rc regression: Can't stop Rx DMA

On Sun, 2008-10-19 at 00:59 -0700, Dominik Brodowski wrote:
> On Sun, Oct 19, 2008 at 01:30:50AM +0200, Tomas Winkler wrote:
> > On Sun, Oct 19, 2008 at 1:10 AM, Dominik Brodowski
> > > [ 37.340901] iwl3945: Microcode SW error detected. Restarting 0x82000008.
> > > [ 37.340944] iwl3945: Error Reply type 0x00000005 cmd REPLY_SCAN_CMD (0x80) seq 0x4413 ser 0x0000004B
> > > [ 37.342349] iwl3945: Can't stop Rx DMA.
> > >
> > > The iwlwifi-3945-1.ucode is the one shipped with Ubuntu's 2.6.24-21-generic
> > > kernel sources (md5sum: 26d10014b09439dc5a8573c2a6f85b0a ). And, as
> > > mentioned in the subject, 2.6.27 or 2.6.26 work perfectly fine.
> >
> > I think you need new uCode, the API has changed to support stealth APs
> > .... I believe there was some misscommunication...
>
> Thanks for the hint -- indeed, the newest uCode works both with 2.6.26 and
> current git... so the uCode is backwards compatible, but the kernel code is
> not. Should the uCode be named iwlwifi-3945-2.ucode therefore, to notify the
> users that they need something newer? Or can the kernel code be made to work
> with the old uCode again?

Instead of new ucode ... could you please try this patch ?

Thank you

diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c
b/drivers/net/wireless/iwlwifi/iwl-scan.c
index 6c8ac3a..61c9a40 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
@@ -709,7 +709,7 @@ static void iwl_bg_request_scan(struct work_struct
*data)
u32 tx_ant;
u16 cmd_len;
enum ieee80211_band band;
- u8 n_probes = 2;
+ u8 n_probes = 0;
u8 rx_chain = 0x7; /* bitmap: ABC chains */

conf = ieee80211_get_hw_conf(priv->hw);



2008-10-28 00:46:42

by Reinette Chatre

[permalink] [raw]
Subject: Re: 2.6.28-rc regression: Can't stop Rx DMA

On Mon, 2008-10-27 at 16:03 -0700, Dominik Brodowski wrote:
> Hi,
>
> On Mon, Oct 27, 2008 at 03:11:08PM -0700, reinette chatre wrote:
> > Could you please try the following patch instead of updating your ucode?
>
> Thanks for the patch -- it doesn't work with the old uCode, unfortunately;
> while the new uCode works with or without this patch.
>

We would like to trace what is causing that microcode error - could you
please reproduce the problem while debugging is enabled in the driver?
That will give us a full log of the microcode error. Please compile your
driver with debugging (CONFIG_IWL3945_DEBUG) and load the module with
option "debug=0x43fff". Please run the test without the patch I just
sent.

Thank you very much

Reinette



2008-10-27 20:23:57

by Reinette Chatre

[permalink] [raw]
Subject: Re: 2.6.28-rc regression: Can't stop Rx DMA

On Mon, 2008-10-27 at 13:02 -0700, reinette chatre wrote:
> On Sun, 2008-10-19 at 00:59 -0700, Dominik Brodowski wrote:
> > On Sun, Oct 19, 2008 at 01:30:50AM +0200, Tomas Winkler wrote:
> > > On Sun, Oct 19, 2008 at 1:10 AM, Dominik Brodowski
> > > > [ 37.340901] iwl3945: Microcode SW error detected. Restarting 0x82000008.
> > > > [ 37.340944] iwl3945: Error Reply type 0x00000005 cmd REPLY_SCAN_CMD (0x80) seq 0x4413 ser 0x0000004B
> > > > [ 37.342349] iwl3945: Can't stop Rx DMA.
> > > >
> > > > The iwlwifi-3945-1.ucode is the one shipped with Ubuntu's 2.6.24-21-generic
> > > > kernel sources (md5sum: 26d10014b09439dc5a8573c2a6f85b0a ). And, as
> > > > mentioned in the subject, 2.6.27 or 2.6.26 work perfectly fine.
> > >
> > > I think you need new uCode, the API has changed to support stealth APs
> > > .... I believe there was some misscommunication...
> >
> > Thanks for the hint -- indeed, the newest uCode works both with 2.6.26 and
> > current git... so the uCode is backwards compatible, but the kernel code is
> > not. Should the uCode be named iwlwifi-3945-2.ucode therefore, to notify the
> > users that they need something newer? Or can the kernel code be made to work
> > with the old uCode again?
>
> Instead of new ucode ... could you please try this patch ?
>

sorry - this does not apply to 3945

Reinette



2008-10-29 17:10:32

by Reinette Chatre

[permalink] [raw]
Subject: Re: 2.6.28-rc regression: Can't stop Rx DMA

On Tue, 2008-10-28 at 17:27 -0700, Dominik Brodowski wrote:
> With CONFIG_WIRELESS_OLD_REGULATORY=y, both the old and the new firmware
> works. Without, only the old firmware works.

(I assume you mean "only the new firmware works")

>
> I'd think that at least the error message could be clarified a bit
> (is it really a "Microcode SW error"?)... also, it might be a corner case
> whether the new firmware would better be called -2 because of this
> incompatibility?

We can do away with the error message with a driver change. This patch
should take care of it:

diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 0758f8f..ab7c93d 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -6219,6 +6219,11 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
n_probes,
(void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]);

+ if (scan->channel_count == 0) {
+ IWL_DEBUG_SCAN("channel count %d\n", scan->channel_count);
+ goto done;
+ }
+
cmd.len += le16_to_cpu(scan->tx_cmd.len) +
scan->channel_count * sizeof(struct iwl3945_scan_channel);
cmd.data = scan;



2008-10-27 23:03:29

by Dominik Brodowski

[permalink] [raw]
Subject: Re: 2.6.28-rc regression: Can't stop Rx DMA

Hi,

On Mon, Oct 27, 2008 at 03:11:08PM -0700, reinette chatre wrote:
> Could you please try the following patch instead of updating your ucode?

Thanks for the patch -- it doesn't work with the old uCode, unfortunately;
while the new uCode works with or without this patch.

Best,
Dominik