From patchwork Tue Feb 6 23:05:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Greear X-Patchwork-Id: 10204299 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A06E9601A1 for ; Tue, 6 Feb 2018 23:05:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8991B287B3 for ; Tue, 6 Feb 2018 23:05:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7E9C528A0A; Tue, 6 Feb 2018 23:05:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 08DA1287B3 for ; Tue, 6 Feb 2018 23:05:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753506AbeBFXF3 (ORCPT ); Tue, 6 Feb 2018 18:05:29 -0500 Received: from mail2.candelatech.com ([208.74.158.173]:56586 "EHLO mail2.candelatech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753171AbeBFXF2 (ORCPT ); Tue, 6 Feb 2018 18:05:28 -0500 Received: from ben-dt3.candelatech.com (firewall.candelatech.com [50.251.239.81]) by mail2.candelatech.com (Postfix) with ESMTP id 119E940A339; Tue, 6 Feb 2018 15:05:26 -0800 (PST) From: greearb@candelatech.com To: linux-wireless@vger.kernel.org Cc: Ben Greear Subject: [PATCH] ath9k: break out of irq handler after 5 jiffies Date: Tue, 6 Feb 2018 15:05:24 -0800 Message-Id: <1517958324-13536-1-git-send-email-greearb@candelatech.com> X-Mailer: git-send-email 2.4.11 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ben Greear In case where the system is sluggish, we should probably break out early. Maybe this will fix issues where the OS thinks the IRQ handler is not responding and disables the IRQ because 'nobody cared' Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath9k/recv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index b90ea2b..274814c 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c @@ -1084,6 +1084,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp) dma_addr_t new_buf_addr; unsigned int budget = 512; struct ieee80211_hdr *hdr; + unsigned long expires_jiffies = jiffies + 5; if (edma) dma_type = DMA_BIDIRECTIONAL; @@ -1241,6 +1242,9 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp) if (!budget--) break; + + if (time_is_before_jiffies(expires_jiffies)) + break; } while (1); if (!(ah->imask & ATH9K_INT_RXEOL)) {