From patchwork Thu Mar 20 09:18:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arend van Spriel X-Patchwork-Id: 3863921 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B0CE4BF540 for ; Thu, 20 Mar 2014 09:18:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F3D39201FA for ; Thu, 20 Mar 2014 09:18:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2F866201F4 for ; Thu, 20 Mar 2014 09:18:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756893AbaCTJSW (ORCPT ); Thu, 20 Mar 2014 05:18:22 -0400 Received: from mail-gw2-out.broadcom.com ([216.31.210.63]:20797 "EHLO mail-gw2-out.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753188AbaCTJSM (ORCPT ); Thu, 20 Mar 2014 05:18:12 -0400 X-IronPort-AV: E=Sophos;i="4.97,693,1389772800"; d="scan'208";a="20350667" Received: from irvexchcas08.broadcom.com (HELO IRVEXCHCAS08.corp.ad.broadcom.com) ([10.9.208.57]) by mail-gw2-out.broadcom.com with ESMTP; 20 Mar 2014 02:37:24 -0700 Received: from IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) by IRVEXCHCAS08.corp.ad.broadcom.com (10.9.208.57) with Microsoft SMTP Server (TLS) id 14.3.174.1; Thu, 20 Mar 2014 02:18:09 -0700 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) with Microsoft SMTP Server id 14.3.174.1; Thu, 20 Mar 2014 02:18:09 -0700 Received: from xl-bun-04.broadcom.com (xl-bun-04.bun.broadcom.com [10.176.128.58]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id D6634EAD4D; Thu, 20 Mar 2014 02:18:08 -0700 (PDT) Received: by xl-bun-04.broadcom.com (Postfix, from userid 25152) id 2B7BDF01ECA; Thu, 20 Mar 2014 10:18:08 +0100 (CET) From: Arend van Spriel To: "John W. Linville" CC: , Arend van Spriel Subject: [PATCH 2/4] brcmfmac: reinit watchdog completion after handling watchdog Date: Thu, 20 Mar 2014 10:18:01 +0100 Message-ID: <1395307083-31523-3-git-send-email-arend@broadcom.com> X-Mailer: git-send-email 1.8.1.3 In-Reply-To: <1395307083-31523-1-git-send-email-arend@broadcom.com> References: <1395307083-31523-1-git-send-email-arend@broadcom.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The watchdog thread waits on completion that is set from a timer. As the completion is count based this could mean that on a busy system the watchdog is handled multiple times with a very short interval. This is not the intended behaviour. After handling the watchdog it should wait for the next timer expiry. This is accomplished by reinitializing the completion. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Arend van Spriel --- drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c index 859eddd..47a6f39 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c @@ -3994,6 +3994,7 @@ brcmf_sdio_watchdog_thread(void *data) brcmf_sdio_bus_watchdog(bus); /* Count the tick for reference */ bus->sdcnt.tickcnt++; + reinit_completion(&bus->watchdog_wait); } else break; }