2016-07-15 10:16:43

by Arend Van Spriel

[permalink] [raw]
Subject: [PATCH] brcmfmac: restore stopping netdev queue when bus clogs up

When the host-interface bus has hard time handling transmit packets
it informs higher layer about this and it would stop the netdev
queue when needed. However, since commit 9cd18359d31e ("brcmfmac:
Make FWS queueing configurable.") this was broken. With this patch
the behaviour is restored.

Cc: [email protected] # v4.5, v4.6, v4.7
Fixes: 9cd18359d31e ("brcmfmac: Make FWS queueing configurable.")
Tested-by: Per Förlin <[email protected]>
Reviewed-by: Hante Meuleman <[email protected]>
Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Reviewed-by: Franky Lin <[email protected]>
Signed-off-by: Arend van Spriel <[email protected]>
---
Hi Kalle,

The issue fixed with this patch does not crash anything so it is
probably fine for 4.8 after the merge window. So I have marked it
for 4.7-stable.

Regards,
Arend
---
.../broadcom/brcm80211/brcmfmac/fwsignal.c | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
index 5b30922..2ce3199 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
@@ -2469,10 +2469,22 @@ void brcmf_fws_bustxfail(struct brcmf_fws_info *fws, struct sk_buff *skb)
void brcmf_fws_bus_blocked(struct brcmf_pub *drvr, bool flow_blocked)
{
struct brcmf_fws_info *fws = drvr->fws;
+ struct brcmf_if *ifp;
+ int i;

- fws->bus_flow_blocked = flow_blocked;
- if (!flow_blocked)
- brcmf_fws_schedule_deq(fws);
- else
- fws->stats.bus_flow_block++;
+ if (fws->avoid_queueing) {
+ for (i = 0; i < BRCMF_MAX_IFS; i++) {
+ ifp = drvr->iflist[i];
+ if (!ifp || !ifp->ndev)
+ continue;
+ brcmf_txflowblock_if(ifp, BRCMF_NETIF_STOP_REASON_FLOW,
+ flow_blocked);
+ }
+ } else {
+ fws->bus_flow_blocked = flow_blocked;
+ if (!flow_blocked)
+ brcmf_fws_schedule_deq(fws);
+ else
+ fws->stats.bus_flow_block++;
+ }
}
--
1.9.1



2016-07-18 19:41:33

by Kalle Valo

[permalink] [raw]
Subject: Re: brcmfmac: restore stopping netdev queue when bus clogs up

Arend Van Spriel <[email protected]> wrote:
> When the host-interface bus has hard time handling transmit packets
> it informs higher layer about this and it would stop the netdev
> queue when needed. However, since commit 9cd18359d31e ("brcmfmac:
> Make FWS queueing configurable.") this was broken. With this patch
> the behaviour is restored.
>
> Cc: [email protected] # v4.5, v4.6, v4.7
> Fixes: 9cd18359d31e ("brcmfmac: Make FWS queueing configurable.")
> Tested-by: Per Förlin <[email protected]>
> Reviewed-by: Hante Meuleman <[email protected]>
> Reviewed-by: Pieter-Paul Giesberts <[email protected]>
> Reviewed-by: Franky Lin <[email protected]>
> Signed-off-by: Arend van Spriel <[email protected]>

Thanks, 1 patch applied to wireless-drivers-next.git:

82bc9ab6a8f5 brcmfmac: restore stopping netdev queue when bus clogs up

--
Sent by pwcli
https://patchwork.kernel.org/patch/9231603/