linux/drivers/net/wireless/ti/wlcore
John Stultz b630806d7c wlcore: Fixup "Add support for optional wakeirq"
After commit 3c83dd577c ("wlcore: Add support for optional
wakeirq") landed upstream, I started seeing the following oops
on my HiKey board:

[    1.870279] Unable to handle kernel read from unreadable memory at virtual address 0000000000000010
[    1.870283] Mem abort info:
[    1.870287]   ESR = 0x96000005
[    1.870292]   Exception class = DABT (current EL), IL = 32 bits
[    1.870296]   SET = 0, FnV = 0
[    1.870299]   EA = 0, S1PTW = 0
[    1.870302] Data abort info:
[    1.870306]   ISV = 0, ISS = 0x00000005
[    1.870309]   CM = 0, WnR = 0
[    1.870312] [0000000000000010] user address but active_mm is swapper
[    1.870318] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[    1.870327] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 4.19.0-05129-gb3d1e8e #48
[    1.870331] Hardware name: HiKey Development Board (DT)
[    1.870350] Workqueue: events_freezable mmc_rescan
[    1.870358] pstate: 60400005 (nZCv daif +PAN -UAO)
[    1.870366] pc : wl1271_probe+0x210/0x350
[    1.870371] lr : wl1271_probe+0x210/0x350
[    1.870374] sp : ffffff80080739b0
[    1.870377] x29: ffffff80080739b0 x28: 0000000000000000
[    1.870384] x27: 0000000000000000 x26: 0000000000000000
[    1.870391] x25: 0000000000000036 x24: ffffffc074ecb598
[    1.870398] x23: ffffffc07ffdce78 x22: ffffffc0744ed808
[    1.870404] x21: ffffffc074ecbb98 x20: ffffff8008ff9000
[    1.870411] x19: ffffffc0744ed800 x18: ffffff8008ff9a48
[    1.870418] x17: 0000000000000000 x16: 0000000000000000
[    1.870425] x15: ffffffc074ecb503 x14: ffffffffffffffff
[    1.870431] x13: ffffffc074ecb502 x12: 0000000000000030
[    1.870438] x11: 0101010101010101 x10: 0000000000000040
[    1.870444] x9 : ffffffc075400248 x8 : ffffffc075400270
[    1.870451] x7 : 0000000000000000 x6 : 0000000000000000
[    1.870457] x5 : 0000000000000000 x4 : 0000000000000000
[    1.870463] x3 : 0000000000000000 x2 : 0000000000000000
[    1.870469] x1 : 0000000000000028 x0 : 0000000000000000
[    1.870477] Process kworker/0:0 (pid: 5, stack limit = 0x(____ptrval____))
[    1.870480] Call trace:
[    1.870485]  wl1271_probe+0x210/0x350
[    1.870491]  sdio_bus_probe+0x100/0x128
[    1.870500]  really_probe+0x1a8/0x2b8
[    1.870506]  driver_probe_device+0x58/0x100
[    1.870511]  __device_attach_driver+0x94/0xd8
[    1.870517]  bus_for_each_drv+0x70/0xc8
[    1.870522]  __device_attach+0xe0/0x140
[    1.870527]  device_initial_probe+0x10/0x18
[    1.870532]  bus_probe_device+0x94/0xa0
[    1.870537]  device_add+0x374/0x5b8
[    1.870542]  sdio_add_func+0x60/0x88
[    1.870546]  mmc_attach_sdio+0x1b0/0x358
[    1.870551]  mmc_rescan+0x2cc/0x390
[    1.870558]  process_one_work+0x12c/0x320
[    1.870563]  worker_thread+0x48/0x458
[    1.870569]  kthread+0xf8/0x128
[    1.870575]  ret_from_fork+0x10/0x18
[    1.870583] Code: 92400c21 b2760021 a90687a2 97e95bf9 (f9400803)
[    1.870587] ---[ end trace 1e15f81d3c139ca9 ]---

It seems since we don't have a wakeirq value in the dts, the wakeirq
value in wl1271_probe() is zero, which then causes trouble in
irqd_get_trigger_type(irq_get_irq_data(wakeirq)).

This patch tries to address this by checking if wakeirq is zero,
and not trying to add it to the resources if that is the case.

Fixes: 3c83dd577c ("wlcore: Add support for optional wakeirq")
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: Eyal Reizer <eyalr@ti.com>
Cc: Anders Roxell <anders.roxell@linaro.org>
Cc: linux-wireless@vger.kernel.org
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-11-06 18:44:36 +02:00
..
Kconfig wlcore/wl12xx: spi: add device tree support 2016-01-29 11:10:10 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
acx.c wlcore: Add support for runtime PM 2018-06-27 18:44:47 +03:00
acx.h wlcore: fix unused function warning 2017-12-14 14:44:31 +02:00
boot.c wlcore: Fix config firmware loading issues 2016-09-26 18:13:45 +03:00
boot.h
cmd.c wlcore: Fix memory leak in wlcore_cmd_wait_for_event_or_timeout 2018-07-04 18:14:09 +03:00
cmd.h cfg80211: remove enum ieee80211_band 2016-04-12 15:56:15 +02:00
conf.h wlcore: split wl12xx/wl18xx sg parameters 2015-12-11 13:10:59 +02:00
debug.h
debugfs.c wlcore: Enable runtime PM autosuspend support 2018-06-27 18:45:24 +03:00
debugfs.h
event.c mac80211: Pass new RSSI level in CQM RSSI notification 2017-02-08 10:43:04 +01:00
event.h wlcore/wl18xx: fw logger over sdio 2015-12-31 10:19:47 +02:00
hw_ops.h
ini.h
init.c scripts/spelling.txt: add "intialization" pattern and fix typo instances 2017-02-27 18:43:47 -08:00
init.h wlcore: add p2p device support 2015-08-10 22:16:34 +03:00
io.c wlcore/wl12xx: Fix fw logger over sdio 2016-05-11 21:26:15 +03:00
io.h wlcore/wl12xx: Fix fw logger over sdio 2016-05-11 21:26:15 +03:00
main.c wlcore: Add support for optional wakeirq 2018-10-05 11:33:31 +03:00
ps.c wlcore: Add support for runtime PM 2018-06-27 18:44:47 +03:00
ps.h wlcore: Add support for runtime PM 2018-06-27 18:44:47 +03:00
rx.c wlcore: Set rx_status boottime_ns field on rx 2018-07-31 10:24:10 +03:00
rx.h cfg80211: remove enum ieee80211_band 2016-04-12 15:56:15 +02:00
scan.c wlcore: Enable runtime PM autosuspend support 2018-06-27 18:45:24 +03:00
scan.h wl18xx: use long intervals in sched scan 2015-08-10 22:16:21 +03:00
sdio.c wlcore: Fixup "Add support for optional wakeirq" 2018-11-06 18:44:36 +02:00
spi.c wlcore: add missing nvs file name info for wilink8 2017-08-24 12:51:22 +03:00
sysfs.c wlcore: Enable runtime PM autosuspend support 2018-06-27 18:45:24 +03:00
sysfs.h
testmode.c wlcore: Enable runtime PM autosuspend support 2018-06-27 18:45:24 +03:00
testmode.h
tx.c wlcore: Enable runtime PM autosuspend support 2018-06-27 18:45:24 +03:00
tx.h cfg80211: remove enum ieee80211_band 2016-04-12 15:56:15 +02:00
vendor_cmd.c wlcore: Enable runtime PM autosuspend support 2018-06-27 18:45:24 +03:00
vendor_cmd.h
wl12xx_80211.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
wlcore.h wlcore: Add support for optional wakeirq 2018-10-05 11:33:31 +03:00
wlcore_i.h wlcore: Add support for runtime PM 2018-06-27 18:44:47 +03:00