<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/net/wireless, branch v5.11.4</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>wilc1000: Fix use of void pointer as a wrong struct type</title>
<updated>2021-03-07T11:35:52+00:00</updated>
<author>
<name>Vsevolod Kozlov</name>
<email>zaba@mm.st</email>
</author>
<published>2021-02-10T18:40:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2d170040408f8d2a73e55725bff9cf655b1930ed'/>
<id>2d170040408f8d2a73e55725bff9cf655b1930ed</id>
<content type='text'>
[ Upstream commit 6fe91b69ceceea832a73d35185df04b3e877f399 ]

ac_classify() expects a struct sk_buff* as its second argument, which is
a member of struct tx_complete_data. priv happens to be a pointer to
struct tx_complete_data, so passing it directly to ac_classify() leads
to wrong behaviour and occasional panics.

Since there is only one caller of wilc_wlan_txq_add_net_pkt and it
already knows the type behind this pointer, and the structure is already
in the header file, change the function signature to use the real type
instead of void* in order to prevent confusion.

Signed-off-by: Vsevolod Kozlov &lt;zaba@mm.st&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/YCQomJ1mO5BLxYOT@Vsevolods-Mini.lan
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 6fe91b69ceceea832a73d35185df04b3e877f399 ]

ac_classify() expects a struct sk_buff* as its second argument, which is
a member of struct tx_complete_data. priv happens to be a pointer to
struct tx_complete_data, so passing it directly to ac_classify() leads
to wrong behaviour and occasional panics.

Since there is only one caller of wilc_wlan_txq_add_net_pkt and it
already knows the type behind this pointer, and the structure is already
in the header file, change the function signature to use the real type
instead of void* in order to prevent confusion.

Signed-off-by: Vsevolod Kozlov &lt;zaba@mm.st&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/YCQomJ1mO5BLxYOT@Vsevolods-Mini.lan
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>brcmfmac: Add DMI nvram filename quirk for Voyo winpad A15 tablet</title>
<updated>2021-03-07T11:35:51+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2021-01-29T17:14:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8b82b825aa8c1accf3c9f1d222b320cd424338bf'/>
<id>8b82b825aa8c1accf3c9f1d222b320cd424338bf</id>
<content type='text'>
[ Upstream commit a338c874d3d9d2463f031e89ae14942929b93db6 ]

The Voyo winpad A15 tablet contains quite generic names in the sys_vendor
and product_name DMI strings, without this patch brcmfmac will try to load:
rcmfmac4330-sdio.To be filled by O.E.M.-To be filled by O.E.M..txt
as nvram file which is a bit too generic.

Add a DMI quirk so that a unique and clearly identifiable nvram file name
is used on the Voyo winpad A15 tablet.

While preparing a matching linux-firmware update I noticed that the nvram
is identical to the nvram used on the Prowise-PT301 tablet, so the new DMI
quirk entry simply points to the already existing Prowise-PT301 nvram file.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20210129171413.139880-2-hdegoede@redhat.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit a338c874d3d9d2463f031e89ae14942929b93db6 ]

The Voyo winpad A15 tablet contains quite generic names in the sys_vendor
and product_name DMI strings, without this patch brcmfmac will try to load:
rcmfmac4330-sdio.To be filled by O.E.M.-To be filled by O.E.M..txt
as nvram file which is a bit too generic.

Add a DMI quirk so that a unique and clearly identifiable nvram file name
is used on the Voyo winpad A15 tablet.

While preparing a matching linux-firmware update I noticed that the nvram
is identical to the nvram used on the Prowise-PT301 tablet, so the new DMI
quirk entry simply points to the already existing Prowise-PT301 nvram file.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20210129171413.139880-2-hdegoede@redhat.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>brcmfmac: Add DMI nvram filename quirk for Predia Basic tablet</title>
<updated>2021-03-07T11:35:51+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2021-01-29T17:14:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8ce490ff2d421e048314a7bfe739d0f205a9a460'/>
<id>8ce490ff2d421e048314a7bfe739d0f205a9a460</id>
<content type='text'>
[ Upstream commit af4b3a6f36d6c2fc5fca026bccf45e0fdcabddd9 ]

The Predia Basic tablet contains quite generic names in the sys_vendor and
product_name DMI strings, without this patch brcmfmac will try to load:
brcmfmac43340-sdio.Insyde-CherryTrail.txt as nvram file which is a bit
too generic.

Add a DMI quirk so that a unique and clearly identifiable nvram file name
is used on the Predia Basic tablet.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20210129171413.139880-1-hdegoede@redhat.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit af4b3a6f36d6c2fc5fca026bccf45e0fdcabddd9 ]

The Predia Basic tablet contains quite generic names in the sys_vendor and
product_name DMI strings, without this patch brcmfmac will try to load:
brcmfmac43340-sdio.Insyde-CherryTrail.txt as nvram file which is a bit
too generic.

Add a DMI quirk so that a unique and clearly identifiable nvram file name
is used on the Predia Basic tablet.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20210129171413.139880-1-hdegoede@redhat.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ath10k: fix wmi mgmt tx queue full due to race condition</title>
<updated>2021-03-07T11:35:50+00:00</updated>
<author>
<name>Miaoqing Pan</name>
<email>miaoqing@codeaurora.org</email>
</author>
<published>2020-12-22T06:34:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e7729fe245f724c7f46507b506ed6e2a2718b77c'/>
<id>e7729fe245f724c7f46507b506ed6e2a2718b77c</id>
<content type='text'>
[ Upstream commit b55379e343a3472c35f4a1245906db5158cab453 ]

Failed to transmit wmi management frames:

[84977.840894] ath10k_snoc a000000.wifi: wmi mgmt tx queue is full
[84977.840913] ath10k_snoc a000000.wifi: failed to transmit packet, dropping: -28
[84977.840924] ath10k_snoc a000000.wifi: failed to submit frame: -28
[84977.840932] ath10k_snoc a000000.wifi: failed to transmit frame: -28

This issue is caused by race condition between skb_dequeue and
__skb_queue_tail. The queue of ‘wmi_mgmt_tx_queue’ is protected by a
different lock: ar-&gt;data_lock vs list-&gt;lock, the result is no protection.
So when ath10k_mgmt_over_wmi_tx_work() and ath10k_mac_tx_wmi_mgmt()
running concurrently on different CPUs, there appear to be a rare corner
cases when the queue length is 1,

  CPUx (skb_deuque)			CPUy (__skb_queue_tail)
					next=list
					prev=list
  struct sk_buff *skb = skb_peek(list);	WRITE_ONCE(newsk-&gt;next, next);
  WRITE_ONCE(list-&gt;qlen, list-&gt;qlen - 1);WRITE_ONCE(newsk-&gt;prev, prev);
  next       = skb-&gt;next;		WRITE_ONCE(next-&gt;prev, newsk);
  prev       = skb-&gt;prev;		WRITE_ONCE(prev-&gt;next, newsk);
  skb-&gt;next  = skb-&gt;prev = NULL;	list-&gt;qlen++;
  WRITE_ONCE(next-&gt;prev, prev);
  WRITE_ONCE(prev-&gt;next, next);

If the instruction ‘next = skb-&gt;next’ is executed before
‘WRITE_ONCE(prev-&gt;next, newsk)’, newsk will be lost, as CPUx get the
old ‘next’ pointer, but the length is still added by one. The final
result is the length of the queue will reach the maximum value but
the queue is empty.

So remove ar-&gt;data_lock, and use 'skb_queue_tail' instead of
'__skb_queue_tail' to prevent the potential race condition. Also switch
to use skb_queue_len_lockless, in case we queue a few SKBs simultaneously.

Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.1.c2-00033-QCAHLSWMTPLZ-1

Signed-off-by: Miaoqing Pan &lt;miaoqing@codeaurora.org&gt;
Reviewed-by: Brian Norris &lt;briannorris@chromium.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/1608618887-8857-1-git-send-email-miaoqing@codeaurora.org
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit b55379e343a3472c35f4a1245906db5158cab453 ]

Failed to transmit wmi management frames:

[84977.840894] ath10k_snoc a000000.wifi: wmi mgmt tx queue is full
[84977.840913] ath10k_snoc a000000.wifi: failed to transmit packet, dropping: -28
[84977.840924] ath10k_snoc a000000.wifi: failed to submit frame: -28
[84977.840932] ath10k_snoc a000000.wifi: failed to transmit frame: -28

This issue is caused by race condition between skb_dequeue and
__skb_queue_tail. The queue of ‘wmi_mgmt_tx_queue’ is protected by a
different lock: ar-&gt;data_lock vs list-&gt;lock, the result is no protection.
So when ath10k_mgmt_over_wmi_tx_work() and ath10k_mac_tx_wmi_mgmt()
running concurrently on different CPUs, there appear to be a rare corner
cases when the queue length is 1,

  CPUx (skb_deuque)			CPUy (__skb_queue_tail)
					next=list
					prev=list
  struct sk_buff *skb = skb_peek(list);	WRITE_ONCE(newsk-&gt;next, next);
  WRITE_ONCE(list-&gt;qlen, list-&gt;qlen - 1);WRITE_ONCE(newsk-&gt;prev, prev);
  next       = skb-&gt;next;		WRITE_ONCE(next-&gt;prev, newsk);
  prev       = skb-&gt;prev;		WRITE_ONCE(prev-&gt;next, newsk);
  skb-&gt;next  = skb-&gt;prev = NULL;	list-&gt;qlen++;
  WRITE_ONCE(next-&gt;prev, prev);
  WRITE_ONCE(prev-&gt;next, next);

If the instruction ‘next = skb-&gt;next’ is executed before
‘WRITE_ONCE(prev-&gt;next, newsk)’, newsk will be lost, as CPUx get the
old ‘next’ pointer, but the length is still added by one. The final
result is the length of the queue will reach the maximum value but
the queue is empty.

So remove ar-&gt;data_lock, and use 'skb_queue_tail' instead of
'__skb_queue_tail' to prevent the potential race condition. Also switch
to use skb_queue_len_lockless, in case we queue a few SKBs simultaneously.

Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.1.c2-00033-QCAHLSWMTPLZ-1

Signed-off-by: Miaoqing Pan &lt;miaoqing@codeaurora.org&gt;
Reviewed-by: Brian Norris &lt;briannorris@chromium.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/1608618887-8857-1-git-send-email-miaoqing@codeaurora.org
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mt76: mt7615: reset token when mac_reset happens</title>
<updated>2021-03-07T11:35:50+00:00</updated>
<author>
<name>Ryder Lee</name>
<email>ryder.lee@mediatek.com</email>
</author>
<published>2020-12-10T18:51:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1aca6c30d4b655a4fd29c4ad66985b60def88eed'/>
<id>1aca6c30d4b655a4fd29c4ad66985b60def88eed</id>
<content type='text'>
[ Upstream commit a6275e934605646ef81b02d8d1164f21343149c9 ]

Reset token in mt7615_mac_reset_work() to avoid possible leakege.

Signed-off-by: Ryder Lee &lt;ryder.lee@mediatek.com&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit a6275e934605646ef81b02d8d1164f21343149c9 ]

Reset token in mt7615_mac_reset_work() to avoid possible leakege.

Signed-off-by: Ryder Lee &lt;ryder.lee@mediatek.com&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mt76: mt7915: reset token when mac_reset happens</title>
<updated>2021-03-07T11:35:50+00:00</updated>
<author>
<name>Ryder Lee</name>
<email>ryder.lee@mediatek.com</email>
</author>
<published>2020-12-10T18:51:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4e9e896f81932e337a93ad61cd3d9647571c4637'/>
<id>4e9e896f81932e337a93ad61cd3d9647571c4637</id>
<content type='text'>
[ Upstream commit f285dfb98562e8380101095d168910df1d07d8be ]

Reset buffering token in mt7915_mac_reset_work() to avoid possible leakege,
which leads to Tx stop after mac reset.

Tested-by: Bo Jiao &lt;bo.jiao@mediatek.com&gt;
Signed-off-by: Ryder Lee &lt;ryder.lee@mediatek.com&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit f285dfb98562e8380101095d168910df1d07d8be ]

Reset buffering token in mt7915_mac_reset_work() to avoid possible leakege,
which leads to Tx stop after mac reset.

Tested-by: Bo Jiao &lt;bo.jiao@mediatek.com&gt;
Signed-off-by: Ryder Lee &lt;ryder.lee@mediatek.com&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>wlcore: Fix command execute failure 19 for wl12xx</title>
<updated>2021-03-07T11:35:49+00:00</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2021-01-15T06:56:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6cb8f57dacc1a36b769f4496ec1972d0d2fc5d34'/>
<id>6cb8f57dacc1a36b769f4496ec1972d0d2fc5d34</id>
<content type='text'>
[ Upstream commit cb88d01b67383a095e3f7caeb4cdade5a6cf0417 ]

We can currently get a "command execute failure 19" error on beacon loss
if the signal is weak:

wlcore: Beacon loss detected. roles:0xff
wlcore: Connection loss work (role_id: 0).
...
wlcore: ERROR command execute failure 19
...
WARNING: CPU: 0 PID: 1552 at drivers/net/wireless/ti/wlcore/main.c:803
...
(wl12xx_queue_recovery_work.part.0 [wlcore])
(wl12xx_cmd_role_start_sta [wlcore])
(wl1271_op_bss_info_changed [wlcore])
(ieee80211_prep_connection [mac80211])

Error 19 is defined as CMD_STATUS_WRONG_NESTING from the wlcore firmware,
and seems to mean that the firmware no longer wants to see the quirk
handling for WLCORE_QUIRK_START_STA_FAILS done.

This quirk got added with commit 18eab430700d ("wlcore: workaround
start_sta problem in wl12xx fw"), and it seems that this already got fixed
in the firmware long time ago back in 2012 as wl18xx never had this quirk
in place to start with.

As we no longer even support firmware that early, to me it seems that it's
safe to just drop WLCORE_QUIRK_START_STA_FAILS to fix the error. Looks
like earlier firmware got disabled back in 2013 with commit 0e284c074ef9
("wl12xx: increase minimum singlerole firmware version required").

If it turns out we still need WLCORE_QUIRK_START_STA_FAILS with any
firmware that the driver works with, we can simply revert this patch and
add extra checks for firmware version used.

With this fix wlcore reconnects properly after a beacon loss.

Cc: Raz Bouganim &lt;r-bouganim@ti.com&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20210115065613.7731-1-tony@atomide.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit cb88d01b67383a095e3f7caeb4cdade5a6cf0417 ]

We can currently get a "command execute failure 19" error on beacon loss
if the signal is weak:

wlcore: Beacon loss detected. roles:0xff
wlcore: Connection loss work (role_id: 0).
...
wlcore: ERROR command execute failure 19
...
WARNING: CPU: 0 PID: 1552 at drivers/net/wireless/ti/wlcore/main.c:803
...
(wl12xx_queue_recovery_work.part.0 [wlcore])
(wl12xx_cmd_role_start_sta [wlcore])
(wl1271_op_bss_info_changed [wlcore])
(ieee80211_prep_connection [mac80211])

Error 19 is defined as CMD_STATUS_WRONG_NESTING from the wlcore firmware,
and seems to mean that the firmware no longer wants to see the quirk
handling for WLCORE_QUIRK_START_STA_FAILS done.

This quirk got added with commit 18eab430700d ("wlcore: workaround
start_sta problem in wl12xx fw"), and it seems that this already got fixed
in the firmware long time ago back in 2012 as wl18xx never had this quirk
in place to start with.

As we no longer even support firmware that early, to me it seems that it's
safe to just drop WLCORE_QUIRK_START_STA_FAILS to fix the error. Looks
like earlier firmware got disabled back in 2013 with commit 0e284c074ef9
("wl12xx: increase minimum singlerole firmware version required").

If it turns out we still need WLCORE_QUIRK_START_STA_FAILS with any
firmware that the driver works with, we can simply revert this patch and
add extra checks for firmware version used.

With this fix wlcore reconnects properly after a beacon loss.

Cc: Raz Bouganim &lt;r-bouganim@ti.com&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20210115065613.7731-1-tony@atomide.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ath10k: prevent deinitializing NAPI twice</title>
<updated>2021-03-07T11:35:48+00:00</updated>
<author>
<name>Wen Gong</name>
<email>wgong@codeaurora.org</email>
</author>
<published>2020-12-15T06:35:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=cc8fb7d897e8fb23f278c612811434ec1b40f84f'/>
<id>cc8fb7d897e8fb23f278c612811434ec1b40f84f</id>
<content type='text'>
[ Upstream commit e2f8b74e58cb1560c1399ba94a470b770e858259 ]

It happened "Kernel panic - not syncing: hung_task: blocked tasks" when
test simulate crash and ifconfig down/rmmod meanwhile.

Test steps:

1.Test commands, either can reproduce the hang for PCIe, SDIO and SNOC.
echo soft &gt; /sys/kernel/debug/ieee80211/phy0/ath10k/simulate_fw_crash;sleep 0.05;ifconfig wlan0 down
echo soft &gt; /sys/kernel/debug/ieee80211/phy0/ath10k/simulate_fw_crash;rmmod ath10k_sdio
echo hw-restart &gt; /sys/kernel/debug/ieee80211/phy0/ath10k/simulate_fw_crash;rmmod ath10k_pci

2. dmesg:
[ 5622.548630] ath10k_sdio mmc1:0001:1: simulating soft firmware crash
[ 5622.655995] ieee80211 phy0: Hardware restart was requested
[ 5776.355164] INFO: task shill:1572 blocked for more than 122 seconds.
[ 5776.355687] INFO: task kworker/1:2:24437 blocked for more than 122 seconds.
[ 5776.359812] Kernel panic - not syncing: hung_task: blocked tasks
[ 5776.359836] CPU: 1 PID: 55 Comm: khungtaskd Tainted: G        W         4.19.86 #137
[ 5776.359846] Hardware name: MediaTek krane sku176 board (DT)
[ 5776.359855] Call trace:
[ 5776.359868]  dump_backtrace+0x0/0x170
[ 5776.359881]  show_stack+0x20/0x2c
[ 5776.359896]  dump_stack+0xd4/0x10c
[ 5776.359916]  panic+0x12c/0x29c
[ 5776.359937]  hung_task_panic+0x0/0x50
[ 5776.359953]  kthread+0x120/0x130
[ 5776.359965]  ret_from_fork+0x10/0x18
[ 5776.359986] SMP: stopping secondary CPUs
[ 5776.360012] Kernel Offset: 0x141ea00000 from 0xffffff8008000000
[ 5776.360026] CPU features: 0x0,2188200c
[ 5776.360035] Memory Limit: none

command "ifconfig wlan0 down" or "rmmod ath10k_sdio" will be blocked
callstack of ifconfig:
[&lt;0&gt;] __switch_to+0x120/0x13c
[&lt;0&gt;] msleep+0x28/0x38
[&lt;0&gt;] ath10k_sdio_hif_stop+0x24c/0x294 [ath10k_sdio]
[&lt;0&gt;] ath10k_core_stop+0x50/0x78 [ath10k_core]
[&lt;0&gt;] ath10k_halt+0x120/0x178 [ath10k_core]
[&lt;0&gt;] ath10k_stop+0x4c/0x8c [ath10k_core]
[&lt;0&gt;] drv_stop+0xe0/0x1e4 [mac80211]
[&lt;0&gt;] ieee80211_stop_device+0x48/0x54 [mac80211]
[&lt;0&gt;] ieee80211_do_stop+0x678/0x6f8 [mac80211]
[&lt;0&gt;] ieee80211_stop+0x20/0x30 [mac80211]
[&lt;0&gt;] __dev_close_many+0xb8/0x11c
[&lt;0&gt;] __dev_change_flags+0xe0/0x1d0
[&lt;0&gt;] dev_change_flags+0x30/0x6c
[&lt;0&gt;] devinet_ioctl+0x370/0x564
[&lt;0&gt;] inet_ioctl+0xdc/0x304
[&lt;0&gt;] sock_do_ioctl+0x50/0x288
[&lt;0&gt;] compat_sock_ioctl+0x1b4/0x1aac
[&lt;0&gt;] __se_compat_sys_ioctl+0x100/0x26fc
[&lt;0&gt;] __arm64_compat_sys_ioctl+0x20/0x2c
[&lt;0&gt;] el0_svc_common+0xa4/0x154
[&lt;0&gt;] el0_svc_compat_handler+0x2c/0x38
[&lt;0&gt;] el0_svc_compat+0x8/0x18
[&lt;0&gt;] 0xffffffffffffffff

callstack of rmmod:
[&lt;0&gt;] __switch_to+0x120/0x13c
[&lt;0&gt;] msleep+0x28/0x38
[&lt;0&gt;] ath10k_sdio_hif_stop+0x294/0x31c [ath10k_sdio]
[&lt;0&gt;] ath10k_core_stop+0x50/0x78 [ath10k_core]
[&lt;0&gt;] ath10k_halt+0x120/0x178 [ath10k_core]
[&lt;0&gt;] ath10k_stop+0x4c/0x8c [ath10k_core]
[&lt;0&gt;] drv_stop+0xe0/0x1e4 [mac80211]
[&lt;0&gt;] ieee80211_stop_device+0x48/0x54 [mac80211]
[&lt;0&gt;] ieee80211_do_stop+0x678/0x6f8 [mac80211]
[&lt;0&gt;] ieee80211_stop+0x20/0x30 [mac80211]
[&lt;0&gt;] __dev_close_many+0xb8/0x11c
[&lt;0&gt;] dev_close_many+0x70/0x100
[&lt;0&gt;] dev_close+0x4c/0x80
[&lt;0&gt;] cfg80211_shutdown_all_interfaces+0x50/0xcc [cfg80211]
[&lt;0&gt;] ieee80211_remove_interfaces+0x58/0x1a0 [mac80211]
[&lt;0&gt;] ieee80211_unregister_hw+0x40/0x100 [mac80211]
[&lt;0&gt;] ath10k_mac_unregister+0x1c/0x44 [ath10k_core]
[&lt;0&gt;] ath10k_core_unregister+0x38/0x7c [ath10k_core]
[&lt;0&gt;] ath10k_sdio_remove+0x8c/0xd0 [ath10k_sdio]
[&lt;0&gt;] sdio_bus_remove+0x48/0x108
[&lt;0&gt;] device_release_driver_internal+0x138/0x1ec
[&lt;0&gt;] driver_detach+0x6c/0xa8
[&lt;0&gt;] bus_remove_driver+0x78/0xa8
[&lt;0&gt;] driver_unregister+0x30/0x50
[&lt;0&gt;] sdio_unregister_driver+0x28/0x34
[&lt;0&gt;] cleanup_module+0x14/0x6bc [ath10k_sdio]
[&lt;0&gt;] __arm64_sys_delete_module+0x1e0/0x22c
[&lt;0&gt;] el0_svc_common+0xa4/0x154
[&lt;0&gt;] el0_svc_compat_handler+0x2c/0x38
[&lt;0&gt;] el0_svc_compat+0x8/0x18
[&lt;0&gt;] 0xffffffffffffffff

SNOC:
[  647.156863] Call trace:
[  647.162166] [&lt;ffffff80080855a4&gt;] __switch_to+0x120/0x13c
[  647.164512] [&lt;ffffff800899d8b8&gt;] __schedule+0x5ec/0x798
[  647.170062] [&lt;ffffff800899dad8&gt;] schedule+0x74/0x94
[  647.175050] [&lt;ffffff80089a0848&gt;] schedule_timeout+0x314/0x42c
[  647.179874] [&lt;ffffff80089a0a14&gt;] schedule_timeout_uninterruptible+0x34/0x40
[  647.185780] [&lt;ffffff80082a494&gt;] msleep+0x28/0x38
[  647.192546] [&lt;ffffff800117ec4c&gt;] ath10k_snoc_hif_stop+0x4c/0x1e0 [ath10k_snoc]
[  647.197439] [&lt;ffffff80010dfbd8&gt;] ath10k_core_stop+0x50/0x7c [ath10k_core]
[  647.204652] [&lt;ffffff80010c8f48&gt;] ath10k_halt+0x114/0x16c [ath10k_core]
[  647.211420] [&lt;ffffff80010cad68&gt;] ath10k_stop+0x4c/0x88 [ath10k_core]
[  647.217865] [&lt;ffffff8000fdbf54&gt;] drv_stop+0x110/0x244 [mac80211]
[  647.224367] [&lt;ffffff80010147ac&gt;] ieee80211_stop_device+0x48/0x54 [mac80211]
[  647.230359] [&lt;ffffff8000ff3eec&gt;] ieee80211_do_stop+0x6a4/0x73c [mac80211]
[  647.237033] [&lt;ffffff8000ff4500&gt;] ieee80211_stop+0x20/0x30 [mac80211]
[  647.243942] [&lt;ffffff80087e39b8&gt;] __dev_close_many+0xa0/0xfc
[  647.250435] [&lt;ffffff80087e3888&gt;] dev_close_many+0x70/0x100
[  647.255651] [&lt;ffffff80087e3a60&gt;] dev_close+0x4c/0x80
[  647.261244] [&lt;ffffff8000f1ba54&gt;] cfg80211_shutdown_all_interfaces+0x44/0xcc [cfg80211]
[  647.266383] [&lt;ffffff8000ff3fdc&gt;] ieee80211_remove_interfaces+0x58/0x1b4 [mac80211]
[  647.274128] [&lt;ffffff8000fda540&gt;] ieee80211_unregister_hw+0x50/0x120 [mac80211]
[  647.281659] [&lt;ffffff80010ca314&gt;] ath10k_mac_unregister+0x1c/0x44 [ath10k_core]
[  647.288839] [&lt;ffffff80010dfc94&gt;] ath10k_core_unregister+0x48/0x90 [ath10k_core]
[  647.296027] [&lt;ffffff800117e598&gt;] ath10k_snoc_remove+0x5c/0x150 [ath10k_snoc]
[  647.303229] [&lt;ffffff80085625fc&gt;] platform_drv_remove+0x28/0x50
[  647.310517] [&lt;ffffff80085601a4&gt;] device_release_driver_internal+0x114/0x1b8
[  647.316257] [&lt;ffffff80085602e4&gt;] driver_detach+0x6c/0xa8
[  647.323021] [&lt;ffffff800855e5b8&gt;] bus_remove_driver+0x78/0xa8
[  647.328571] [&lt;ffffff800856107c&gt;] driver_unregister+0x30/0x50
[  647.334213] [&lt;ffffff8008562674&gt;] platform_driver_unregister+0x1c/0x28
[  647.339876] [&lt;ffffff800117fefc&gt;] cleanup_module+0x1c/0x120 [ath10k_snoc]
[  647.346196] [&lt;ffffff8008143ab8&gt;] SyS_delete_module+0x1dc/0x22c

PCIe:
[  615.392770] rmmod           D    0  3523   3458 0x00000080
[  615.392777] Call Trace:
[  615.392784]  __schedule+0x617/0x7d3
[  615.392791]  ? __mod_timer+0x263/0x35c
[  615.392797]  schedule+0x62/0x72
[  615.392803]  schedule_timeout+0x8d/0xf3
[  615.392809]  ? run_local_timers+0x6b/0x6b
[  615.392814]  msleep+0x1b/0x22
[  615.392824]  ath10k_pci_hif_stop+0x68/0xd6 [ath10k_pci]
[  615.392844]  ath10k_core_stop+0x44/0x67 [ath10k_core]
[  615.392859]  ath10k_halt+0x102/0x153 [ath10k_core]
[  615.392873]  ath10k_stop+0x38/0x75 [ath10k_core]
[  615.392893]  drv_stop+0x9a/0x13c [mac80211]
[  615.392915]  ieee80211_do_stop+0x772/0x7cd [mac80211]
[  615.392937]  ieee80211_stop+0x1a/0x1e [mac80211]
[  615.392945]  __dev_close_many+0x9e/0xf0
[  615.392952]  dev_close_many+0x62/0xe8
[  615.392958]  dev_close+0x54/0x7d
[  615.392975]  cfg80211_shutdown_all_interfaces+0x6e/0xa5 [cfg80211]
[  615.393021]  ieee80211_remove_interfaces+0x52/0x1aa [mac80211]
[  615.393049]  ieee80211_unregister_hw+0x54/0x136 [mac80211]
[  615.393068]  ath10k_mac_unregister+0x19/0x4a [ath10k_core]
[  615.393091]  ath10k_core_unregister+0x39/0x7e [ath10k_core]
[  615.393104]  ath10k_pci_remove+0x3d/0x7f [ath10k_pci]
[  615.393117]  pci_device_remove+0x41/0xa6
[  615.393129]  device_release_driver_internal+0x123/0x1ec
[  615.393140]  driver_detach+0x60/0x90
[  615.393152]  bus_remove_driver+0x72/0x9f
[  615.393164]  pci_unregister_driver+0x1e/0x87
[  615.393177]  SyS_delete_module+0x1d7/0x277
[  615.393188]  do_syscall_64+0x6b/0xf7
[  615.393199]  entry_SYSCALL_64_after_hwframe+0x41/0xa6

The test command run simulate_fw_crash firstly and it call into
ath10k_sdio_hif_stop from ath10k_core_restart, then napi_disable
is called and bit NAPI_STATE_SCHED is set. After that, function
ath10k_sdio_hif_stop is called again from ath10k_stop by command
"ifconfig wlan0 down" or "rmmod ath10k_sdio", then command blocked.

It is blocked by napi_synchronize, napi_disable will set bit with
NAPI_STATE_SCHED, and then napi_synchronize will enter dead loop
becuase bit NAPI_STATE_SCHED is set by napi_disable.

function of napi_synchronize
static inline void napi_synchronize(const struct napi_struct *n)
{
	if (IS_ENABLED(CONFIG_SMP))
		while (test_bit(NAPI_STATE_SCHED, &amp;n-&gt;state))
			msleep(1);
	else
		barrier();
}

function of napi_disable
void napi_disable(struct napi_struct *n)
{
	might_sleep();
	set_bit(NAPI_STATE_DISABLE, &amp;n-&gt;state);

	while (test_and_set_bit(NAPI_STATE_SCHED, &amp;n-&gt;state))
		msleep(1);
	while (test_and_set_bit(NAPI_STATE_NPSVC, &amp;n-&gt;state))
		msleep(1);

	hrtimer_cancel(&amp;n-&gt;timer);

	clear_bit(NAPI_STATE_DISABLE, &amp;n-&gt;state);
}

Add flag for it avoid the hang and crash.

Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00049
Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00110-QCARMSWP-1
Tested-on: WCN3990 hw1.0 SNOC hw1.0 WLAN.HL.3.1-01307.1-QCAHLSWMTPL-2

Signed-off-by: Wen Gong &lt;wgong@codeaurora.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/1598617348-2325-1-git-send-email-wgong@codeaurora.org
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit e2f8b74e58cb1560c1399ba94a470b770e858259 ]

It happened "Kernel panic - not syncing: hung_task: blocked tasks" when
test simulate crash and ifconfig down/rmmod meanwhile.

Test steps:

1.Test commands, either can reproduce the hang for PCIe, SDIO and SNOC.
echo soft &gt; /sys/kernel/debug/ieee80211/phy0/ath10k/simulate_fw_crash;sleep 0.05;ifconfig wlan0 down
echo soft &gt; /sys/kernel/debug/ieee80211/phy0/ath10k/simulate_fw_crash;rmmod ath10k_sdio
echo hw-restart &gt; /sys/kernel/debug/ieee80211/phy0/ath10k/simulate_fw_crash;rmmod ath10k_pci

2. dmesg:
[ 5622.548630] ath10k_sdio mmc1:0001:1: simulating soft firmware crash
[ 5622.655995] ieee80211 phy0: Hardware restart was requested
[ 5776.355164] INFO: task shill:1572 blocked for more than 122 seconds.
[ 5776.355687] INFO: task kworker/1:2:24437 blocked for more than 122 seconds.
[ 5776.359812] Kernel panic - not syncing: hung_task: blocked tasks
[ 5776.359836] CPU: 1 PID: 55 Comm: khungtaskd Tainted: G        W         4.19.86 #137
[ 5776.359846] Hardware name: MediaTek krane sku176 board (DT)
[ 5776.359855] Call trace:
[ 5776.359868]  dump_backtrace+0x0/0x170
[ 5776.359881]  show_stack+0x20/0x2c
[ 5776.359896]  dump_stack+0xd4/0x10c
[ 5776.359916]  panic+0x12c/0x29c
[ 5776.359937]  hung_task_panic+0x0/0x50
[ 5776.359953]  kthread+0x120/0x130
[ 5776.359965]  ret_from_fork+0x10/0x18
[ 5776.359986] SMP: stopping secondary CPUs
[ 5776.360012] Kernel Offset: 0x141ea00000 from 0xffffff8008000000
[ 5776.360026] CPU features: 0x0,2188200c
[ 5776.360035] Memory Limit: none

command "ifconfig wlan0 down" or "rmmod ath10k_sdio" will be blocked
callstack of ifconfig:
[&lt;0&gt;] __switch_to+0x120/0x13c
[&lt;0&gt;] msleep+0x28/0x38
[&lt;0&gt;] ath10k_sdio_hif_stop+0x24c/0x294 [ath10k_sdio]
[&lt;0&gt;] ath10k_core_stop+0x50/0x78 [ath10k_core]
[&lt;0&gt;] ath10k_halt+0x120/0x178 [ath10k_core]
[&lt;0&gt;] ath10k_stop+0x4c/0x8c [ath10k_core]
[&lt;0&gt;] drv_stop+0xe0/0x1e4 [mac80211]
[&lt;0&gt;] ieee80211_stop_device+0x48/0x54 [mac80211]
[&lt;0&gt;] ieee80211_do_stop+0x678/0x6f8 [mac80211]
[&lt;0&gt;] ieee80211_stop+0x20/0x30 [mac80211]
[&lt;0&gt;] __dev_close_many+0xb8/0x11c
[&lt;0&gt;] __dev_change_flags+0xe0/0x1d0
[&lt;0&gt;] dev_change_flags+0x30/0x6c
[&lt;0&gt;] devinet_ioctl+0x370/0x564
[&lt;0&gt;] inet_ioctl+0xdc/0x304
[&lt;0&gt;] sock_do_ioctl+0x50/0x288
[&lt;0&gt;] compat_sock_ioctl+0x1b4/0x1aac
[&lt;0&gt;] __se_compat_sys_ioctl+0x100/0x26fc
[&lt;0&gt;] __arm64_compat_sys_ioctl+0x20/0x2c
[&lt;0&gt;] el0_svc_common+0xa4/0x154
[&lt;0&gt;] el0_svc_compat_handler+0x2c/0x38
[&lt;0&gt;] el0_svc_compat+0x8/0x18
[&lt;0&gt;] 0xffffffffffffffff

callstack of rmmod:
[&lt;0&gt;] __switch_to+0x120/0x13c
[&lt;0&gt;] msleep+0x28/0x38
[&lt;0&gt;] ath10k_sdio_hif_stop+0x294/0x31c [ath10k_sdio]
[&lt;0&gt;] ath10k_core_stop+0x50/0x78 [ath10k_core]
[&lt;0&gt;] ath10k_halt+0x120/0x178 [ath10k_core]
[&lt;0&gt;] ath10k_stop+0x4c/0x8c [ath10k_core]
[&lt;0&gt;] drv_stop+0xe0/0x1e4 [mac80211]
[&lt;0&gt;] ieee80211_stop_device+0x48/0x54 [mac80211]
[&lt;0&gt;] ieee80211_do_stop+0x678/0x6f8 [mac80211]
[&lt;0&gt;] ieee80211_stop+0x20/0x30 [mac80211]
[&lt;0&gt;] __dev_close_many+0xb8/0x11c
[&lt;0&gt;] dev_close_many+0x70/0x100
[&lt;0&gt;] dev_close+0x4c/0x80
[&lt;0&gt;] cfg80211_shutdown_all_interfaces+0x50/0xcc [cfg80211]
[&lt;0&gt;] ieee80211_remove_interfaces+0x58/0x1a0 [mac80211]
[&lt;0&gt;] ieee80211_unregister_hw+0x40/0x100 [mac80211]
[&lt;0&gt;] ath10k_mac_unregister+0x1c/0x44 [ath10k_core]
[&lt;0&gt;] ath10k_core_unregister+0x38/0x7c [ath10k_core]
[&lt;0&gt;] ath10k_sdio_remove+0x8c/0xd0 [ath10k_sdio]
[&lt;0&gt;] sdio_bus_remove+0x48/0x108
[&lt;0&gt;] device_release_driver_internal+0x138/0x1ec
[&lt;0&gt;] driver_detach+0x6c/0xa8
[&lt;0&gt;] bus_remove_driver+0x78/0xa8
[&lt;0&gt;] driver_unregister+0x30/0x50
[&lt;0&gt;] sdio_unregister_driver+0x28/0x34
[&lt;0&gt;] cleanup_module+0x14/0x6bc [ath10k_sdio]
[&lt;0&gt;] __arm64_sys_delete_module+0x1e0/0x22c
[&lt;0&gt;] el0_svc_common+0xa4/0x154
[&lt;0&gt;] el0_svc_compat_handler+0x2c/0x38
[&lt;0&gt;] el0_svc_compat+0x8/0x18
[&lt;0&gt;] 0xffffffffffffffff

SNOC:
[  647.156863] Call trace:
[  647.162166] [&lt;ffffff80080855a4&gt;] __switch_to+0x120/0x13c
[  647.164512] [&lt;ffffff800899d8b8&gt;] __schedule+0x5ec/0x798
[  647.170062] [&lt;ffffff800899dad8&gt;] schedule+0x74/0x94
[  647.175050] [&lt;ffffff80089a0848&gt;] schedule_timeout+0x314/0x42c
[  647.179874] [&lt;ffffff80089a0a14&gt;] schedule_timeout_uninterruptible+0x34/0x40
[  647.185780] [&lt;ffffff80082a494&gt;] msleep+0x28/0x38
[  647.192546] [&lt;ffffff800117ec4c&gt;] ath10k_snoc_hif_stop+0x4c/0x1e0 [ath10k_snoc]
[  647.197439] [&lt;ffffff80010dfbd8&gt;] ath10k_core_stop+0x50/0x7c [ath10k_core]
[  647.204652] [&lt;ffffff80010c8f48&gt;] ath10k_halt+0x114/0x16c [ath10k_core]
[  647.211420] [&lt;ffffff80010cad68&gt;] ath10k_stop+0x4c/0x88 [ath10k_core]
[  647.217865] [&lt;ffffff8000fdbf54&gt;] drv_stop+0x110/0x244 [mac80211]
[  647.224367] [&lt;ffffff80010147ac&gt;] ieee80211_stop_device+0x48/0x54 [mac80211]
[  647.230359] [&lt;ffffff8000ff3eec&gt;] ieee80211_do_stop+0x6a4/0x73c [mac80211]
[  647.237033] [&lt;ffffff8000ff4500&gt;] ieee80211_stop+0x20/0x30 [mac80211]
[  647.243942] [&lt;ffffff80087e39b8&gt;] __dev_close_many+0xa0/0xfc
[  647.250435] [&lt;ffffff80087e3888&gt;] dev_close_many+0x70/0x100
[  647.255651] [&lt;ffffff80087e3a60&gt;] dev_close+0x4c/0x80
[  647.261244] [&lt;ffffff8000f1ba54&gt;] cfg80211_shutdown_all_interfaces+0x44/0xcc [cfg80211]
[  647.266383] [&lt;ffffff8000ff3fdc&gt;] ieee80211_remove_interfaces+0x58/0x1b4 [mac80211]
[  647.274128] [&lt;ffffff8000fda540&gt;] ieee80211_unregister_hw+0x50/0x120 [mac80211]
[  647.281659] [&lt;ffffff80010ca314&gt;] ath10k_mac_unregister+0x1c/0x44 [ath10k_core]
[  647.288839] [&lt;ffffff80010dfc94&gt;] ath10k_core_unregister+0x48/0x90 [ath10k_core]
[  647.296027] [&lt;ffffff800117e598&gt;] ath10k_snoc_remove+0x5c/0x150 [ath10k_snoc]
[  647.303229] [&lt;ffffff80085625fc&gt;] platform_drv_remove+0x28/0x50
[  647.310517] [&lt;ffffff80085601a4&gt;] device_release_driver_internal+0x114/0x1b8
[  647.316257] [&lt;ffffff80085602e4&gt;] driver_detach+0x6c/0xa8
[  647.323021] [&lt;ffffff800855e5b8&gt;] bus_remove_driver+0x78/0xa8
[  647.328571] [&lt;ffffff800856107c&gt;] driver_unregister+0x30/0x50
[  647.334213] [&lt;ffffff8008562674&gt;] platform_driver_unregister+0x1c/0x28
[  647.339876] [&lt;ffffff800117fefc&gt;] cleanup_module+0x1c/0x120 [ath10k_snoc]
[  647.346196] [&lt;ffffff8008143ab8&gt;] SyS_delete_module+0x1dc/0x22c

PCIe:
[  615.392770] rmmod           D    0  3523   3458 0x00000080
[  615.392777] Call Trace:
[  615.392784]  __schedule+0x617/0x7d3
[  615.392791]  ? __mod_timer+0x263/0x35c
[  615.392797]  schedule+0x62/0x72
[  615.392803]  schedule_timeout+0x8d/0xf3
[  615.392809]  ? run_local_timers+0x6b/0x6b
[  615.392814]  msleep+0x1b/0x22
[  615.392824]  ath10k_pci_hif_stop+0x68/0xd6 [ath10k_pci]
[  615.392844]  ath10k_core_stop+0x44/0x67 [ath10k_core]
[  615.392859]  ath10k_halt+0x102/0x153 [ath10k_core]
[  615.392873]  ath10k_stop+0x38/0x75 [ath10k_core]
[  615.392893]  drv_stop+0x9a/0x13c [mac80211]
[  615.392915]  ieee80211_do_stop+0x772/0x7cd [mac80211]
[  615.392937]  ieee80211_stop+0x1a/0x1e [mac80211]
[  615.392945]  __dev_close_many+0x9e/0xf0
[  615.392952]  dev_close_many+0x62/0xe8
[  615.392958]  dev_close+0x54/0x7d
[  615.392975]  cfg80211_shutdown_all_interfaces+0x6e/0xa5 [cfg80211]
[  615.393021]  ieee80211_remove_interfaces+0x52/0x1aa [mac80211]
[  615.393049]  ieee80211_unregister_hw+0x54/0x136 [mac80211]
[  615.393068]  ath10k_mac_unregister+0x19/0x4a [ath10k_core]
[  615.393091]  ath10k_core_unregister+0x39/0x7e [ath10k_core]
[  615.393104]  ath10k_pci_remove+0x3d/0x7f [ath10k_pci]
[  615.393117]  pci_device_remove+0x41/0xa6
[  615.393129]  device_release_driver_internal+0x123/0x1ec
[  615.393140]  driver_detach+0x60/0x90
[  615.393152]  bus_remove_driver+0x72/0x9f
[  615.393164]  pci_unregister_driver+0x1e/0x87
[  615.393177]  SyS_delete_module+0x1d7/0x277
[  615.393188]  do_syscall_64+0x6b/0xf7
[  615.393199]  entry_SYSCALL_64_after_hwframe+0x41/0xa6

The test command run simulate_fw_crash firstly and it call into
ath10k_sdio_hif_stop from ath10k_core_restart, then napi_disable
is called and bit NAPI_STATE_SCHED is set. After that, function
ath10k_sdio_hif_stop is called again from ath10k_stop by command
"ifconfig wlan0 down" or "rmmod ath10k_sdio", then command blocked.

It is blocked by napi_synchronize, napi_disable will set bit with
NAPI_STATE_SCHED, and then napi_synchronize will enter dead loop
becuase bit NAPI_STATE_SCHED is set by napi_disable.

function of napi_synchronize
static inline void napi_synchronize(const struct napi_struct *n)
{
	if (IS_ENABLED(CONFIG_SMP))
		while (test_bit(NAPI_STATE_SCHED, &amp;n-&gt;state))
			msleep(1);
	else
		barrier();
}

function of napi_disable
void napi_disable(struct napi_struct *n)
{
	might_sleep();
	set_bit(NAPI_STATE_DISABLE, &amp;n-&gt;state);

	while (test_and_set_bit(NAPI_STATE_SCHED, &amp;n-&gt;state))
		msleep(1);
	while (test_and_set_bit(NAPI_STATE_NPSVC, &amp;n-&gt;state))
		msleep(1);

	hrtimer_cancel(&amp;n-&gt;timer);

	clear_bit(NAPI_STATE_DISABLE, &amp;n-&gt;state);
}

Add flag for it avoid the hang and crash.

Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00049
Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00110-QCARMSWP-1
Tested-on: WCN3990 hw1.0 SNOC hw1.0 WLAN.HL.3.1-01307.1-QCAHLSWMTPL-2

Signed-off-by: Wen Gong &lt;wgong@codeaurora.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/1598617348-2325-1-git-send-email-wgong@codeaurora.org
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iwlwifi: add new cards for So and Qu family</title>
<updated>2021-03-07T11:35:43+00:00</updated>
<author>
<name>Ihab Zhaika</name>
<email>ihab.zhaika@intel.com</email>
</author>
<published>2021-02-06T11:01:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d1ea54ae3a77ac4ccb407bf01384c7698f6eb3b5'/>
<id>d1ea54ae3a77ac4ccb407bf01384c7698f6eb3b5</id>
<content type='text'>
commit 410f758529bc227b186ba0846bcc75ac0700ffb2 upstream.

add few PCI ID'S for So with Hr and Qu with Hr in AX family.

Cc: stable@vger.kernel.org
Signed-off-by: Ihab Zhaika &lt;ihab.zhaika@intel.com&gt;
Signed-off-by: Luca Coelho &lt;luciano.coelho@intel.com&gt;
Link: https://lore.kernel.org/r/iwlwifi.20210206130110.6f0c1849f7dc.I647b4d22f9468c2f34b777a4bfa445912c6f04f0@changeid
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 410f758529bc227b186ba0846bcc75ac0700ffb2 upstream.

add few PCI ID'S for So with Hr and Qu with Hr in AX family.

Cc: stable@vger.kernel.org
Signed-off-by: Ihab Zhaika &lt;ihab.zhaika@intel.com&gt;
Signed-off-by: Luca Coelho &lt;luciano.coelho@intel.com&gt;
Link: https://lore.kernel.org/r/iwlwifi.20210206130110.6f0c1849f7dc.I647b4d22f9468c2f34b777a4bfa445912c6f04f0@changeid
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>b43: N-PHY: Fix the update of coef for the PHY revision &gt;= 3case</title>
<updated>2021-03-04T11:13:56+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2021-02-15T12:05:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=864f6c3a6e74333c9cd9a8731e91b96cbe49957b'/>
<id>864f6c3a6e74333c9cd9a8731e91b96cbe49957b</id>
<content type='text'>
[ Upstream commit 4773acf3d4b50768bf08e9e97a204819e9ea0895 ]

The documentation for the PHY update [1] states:

Loop 4 times with index i

    If PHY Revision &gt;= 3
        Copy table[i] to coef[i]
    Otherwise
        Set coef[i] to 0

the copy of the table to coef is currently implemented the wrong way
around, table is being updated from uninitialized values in coeff.
Fix this by swapping the assignment around.

[1] https://bcm-v4.sipsolutions.net/802.11/PHY/N/RestoreCal/

Fixes: 2f258b74d13c ("b43: N-PHY: implement restoring general configuration")
Addresses-Coverity: ("Uninitialized scalar variable")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Acked-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 4773acf3d4b50768bf08e9e97a204819e9ea0895 ]

The documentation for the PHY update [1] states:

Loop 4 times with index i

    If PHY Revision &gt;= 3
        Copy table[i] to coef[i]
    Otherwise
        Set coef[i] to 0

the copy of the table to coef is currently implemented the wrong way
around, table is being updated from uninitialized values in coeff.
Fix this by swapping the assignment around.

[1] https://bcm-v4.sipsolutions.net/802.11/PHY/N/RestoreCal/

Fixes: 2f258b74d13c ("b43: N-PHY: implement restoring general configuration")
Addresses-Coverity: ("Uninitialized scalar variable")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Acked-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
