linux/drivers/net/wireless
Reinette Chatre e43ab94d2e iwlagn: power up device before initializing EEPROM
A recent change optimized the power usage by the device by only powering it
up during EEPROM load if it is required (for OTP devices). This change causes
an error on the 1000 series devices during module load.

The error looks as follows:
[ 1624.024524] iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27kds
[ 1624.024527] iwlagn: Copyright(c) 2003-2009 Intel Corporation
[ 1624.024711] iwlagn 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 1624.024749] iwlagn 0000:01:00.0: setting latency timer to 64
[ 1624.024909] iwlagn 0000:01:00.0: Detected Intel Wireless WiFi Link 1000 Series BGN REV=0x6C
[ 1624.081263] iwlagn 0000:01:00.0: MAC is in deep sleep!.  CSR_GP_CNTRL = 0x080003D8
[ 1624.092967] iwlagn 0000:01:00.0: OTP is empty
[ 1624.092988] iwlagn 0000:01:00.0: Unable to init EEPROM
[ 1624.093033] iwlagn 0000:01:00.0: PCI INT A disabled
[ 1624.093065] iwlagn: probe of 0000:01:00.0 failed with error -2

Adding a dump_stack() to where that error is printed shows the following:

[ 1624.024524] iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27kds
[ 1624.024527] iwlagn: Copyright(c) 2003-2009 Intel Corporation
[ 1624.024711] iwlagn 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 1624.024749] iwlagn 0000:01:00.0: setting latency timer to 64
[ 1624.024909] iwlagn 0000:01:00.0: Detected Intel Wireless WiFi Link 1000 Series BGN REV=0x6C
[ 1624.081263] iwlagn 0000:01:00.0: MAC is in deep sleep!.  CSR_GP_CNTRL = 0x080003D8
[ 1624.081263] Pid: 3073, comm: work_for_cpu Tainted: G        W 2.6.31.5 #4
[ 1624.081263] Call Trace:
[ 1624.081263]  [<ffffffffa02395db>] T.726+0x22b/0x420 [iwlcore]
[ 1624.081263]  [<ffffffffa023985a>] iwlcore_eeprom_acquire_semaphore+0x8a/0x190 [iwlcore]
[ 1624.081263]  [<ffffffff81110c94>] ? __kmalloc+0x194/0x1c0
[ 1624.081263]  [<ffffffffa02391f5>] ?  iwlcore_eeprom_verify_signature+0x25/0xf0 [iwlcore]
[ 1624.081263]  [<ffffffffa0239c67>] iwl_eeprom_init+0x107/0xf40 [iwlcore]
[ 1624.081263]  [<ffffffffa026ab9c>] ?  iwl_prepare_card_hw+0x11c/0x470 [iwlagn]
[ 1624.081263]  [<ffffffff8127e2a4>] ?  pci_bus_write_config_byte+0x64/0x80
[ 1624.081263]  [<ffffffffa026b1f8>] iwl_pci_probe+0x308/0xac0 [iwlagn]
[ 1624.081263]  [<ffffffff810710a0>] ? do_work_for_cpu+0x0/0x30
[ 1624.081263]  [<ffffffff81284912>] local_pci_probe+0x12/0x20
[ 1624.081263]  [<ffffffff810710b3>] do_work_for_cpu+0x13/0x30
[ 1624.081263]  [<ffffffff81075826>] kthread+0xa6/0xb0
[ 1624.081263]  [<ffffffff81012fea>] child_rip+0xa/0x20
[ 1624.081263]  [<ffffffff81075780>] ? kthread+0x0/0xb0
[ 1624.081263]  [<ffffffff81012fe0>] ? child_rip+0x0/0x20
[ 1624.092967] iwlagn 0000:01:00.0: OTP is empty
[ 1624.092988] iwlagn 0000:01:00.0: Unable to init EEPROM
[ 1624.093033] iwlagn 0000:01:00.0: PCI INT A disabled
[ 1624.093065] iwlagn: probe of 0000:01:00.0 failed with error -2

We know that the routines in this trace, iwlcore_eeprom_acquire_semaphore
and iwlcore_eeprom_verify_signature, only access CSR registers and thus do
not need the device to be awake if it is EEPROM. But for OTP it is required
for the device to be awake to read these registers. Ensure device is awake
before accessing these registers.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Acked-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-18 17:09:06 -05:00
..
ath ath5k: allow setting txpower to 0 2009-11-16 14:17:14 -05:00
b43 b43-pio: Fix RX error path for rev>=8 devices 2009-11-11 15:23:49 -05:00
b43legacy b43legacy: Remove deprecated 'qual' from returned RX status 2009-11-06 16:49:09 -05:00
hostap wireless: remove WLAN_80211 and WLAN_PRE80211 from Kconfig 2009-10-30 16:50:35 -04:00
ipw2x00 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2009-11-18 10:55:32 -08:00
iwlwifi iwlagn: power up device before initializing EEPROM 2009-11-18 17:09:06 -05:00
iwmc3200wifi iwmc3200wifi: declare MODULE_FIRMWARE 2009-11-11 15:23:52 -05:00
libertas libertas: declare MODULE_FIRMWARE 2009-11-11 15:23:53 -05:00
libertas_tf libertas_tf_usb: declare MODULE_FIRMWARE 2009-11-11 15:23:53 -05:00
orinoco orinoco: declare MODULE_FIRMWARE 2009-11-11 15:23:53 -05:00
p54 drivers/net/wireless/p54: remove exceptional & on function name 2009-11-18 10:48:56 -08:00
prism54 prism54: declare MODULE_FIRMWARE 2009-11-11 15:23:54 -05:00
rt2x00 rt2800: do not enable tbtt unless we are in a beacon mode 2009-11-16 14:17:13 -05:00
rtl818x drivers/net/wireless/rtl818x: remove exceptional & on function name 2009-11-18 10:48:57 -08:00
wl12xx wl12xx: declare MODULE_FIRMWARE 2009-11-11 15:23:54 -05:00
zd1211rw zd1211rw: declare MODULE_FIRMWARE 2009-11-11 15:23:55 -05:00
adm8211.c drivers/net/adm8211.c: remove exceptional & on function name 2009-11-18 10:48:52 -08:00
adm8211.h
airo_cs.c
airo.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-10-29 21:28:59 -07:00
airo.h
at76c50x-usb.c at76c50x-usb: Supply additional parameters to at76_start_monitor scan request 2009-11-11 17:09:17 -05:00
at76c50x-usb.h
atmel_cs.c
atmel_pci.c
atmel.c atmel: declare MODULE_FIRMWARE 2009-11-11 15:23:49 -05:00
atmel.h
Kconfig wireless: airo_cs needs WEXT_SPY 2009-10-30 16:50:38 -04:00
mac80211_hwsim.c mac80211_hwsim: Send ACK frames on the hwsim0 interface 2009-11-02 15:43:27 -05:00
Makefile netwave: move driver to staging 2009-10-30 16:50:34 -04:00
mwl8k.c mwl8k: declare MODULE_FIRMWARE 2009-11-11 15:23:53 -05:00
ray_cs.c drivers/net/wireless: correct check on CCS_START_NETWORK 2009-11-11 15:23:55 -05:00
ray_cs.h
rayctl.h
rndis_wlan.c rndis_wlan: handle NL80211_AUTHTYPE_AUTOMATIC 2009-11-16 14:17:13 -05:00
wl3501_cs.c
wl3501.h
zd1201.c zd1201: declare MODULE_FIRMWARE 2009-11-11 15:23:54 -05:00
zd1201.h