From: Tim Harvey Date: Mon, 21 Apr 2014 23:14:56 +0000 (-0700) Subject: ath9k: fix possible hang on flush X-Git-Tag: v5.15~17840^2~20^2^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3a758134e66ca74a9df792616b5288b2fa2cfd7f;p=platform%2Fkernel%2Flinux-starfive.git ath9k: fix possible hang on flush If a flush is requested, make sure to clear the descriptor once we've processed it. This resolves a hang that will occur if all RX descriptors are full when a flush is requested. Signed-off-by: Tim Harvey Acked-by: Felix Fietkau Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 6c9accd..e77a253 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c @@ -1113,14 +1113,13 @@ requeue_drop_frag: } requeue: list_add_tail(&bf->list, &sc->rx.rxbuf); - if (flush) - continue; if (edma) { ath_rx_edma_buf_link(sc, qtype); } else { ath_rx_buf_relink(sc, bf); - ath9k_hw_rxena(ah); + if (!flush) + ath9k_hw_rxena(ah); } } while (1);