From patchwork Mon Jun 20 11:42:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jussi Kivilinna X-Patchwork-Id: 897062 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5KBgwfU007141 for ; Mon, 20 Jun 2011 11:42:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753394Ab1FTLm4 (ORCPT ); Mon, 20 Jun 2011 07:42:56 -0400 Received: from sd-mail-sa-02.sanoma.fi ([158.127.18.162]:42279 "EHLO sd-mail-sa-02.sanoma.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753369Ab1FTLmz (ORCPT ); Mon, 20 Jun 2011 07:42:55 -0400 Received: from localhost (localhost [127.0.0.1]) by sd-mail-sa-02.sanoma.fi (Postfix) with ESMTP id DA43510EDAA; Mon, 20 Jun 2011 14:42:54 +0300 (EEST) Received: from sd-mail-sa-02.sanoma.fi ([127.0.0.1]) by localhost (sd-mail-sa-02.sanoma.fi [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9t3B0HXOPWpR; Mon, 20 Jun 2011 14:42:54 +0300 (EEST) Received: from hayate.81.fi (dyn2-85-23-163-91.psoas.suomi.net [85.23.163.91]) by sd-mail-sa-02.sanoma.fi (Postfix) with ESMTPSA id 9361410EDBB; Mon, 20 Jun 2011 14:42:54 +0300 (EEST) Received: from fate.lan ([10.0.0.10] helo=fate) by hayate.81.fi with esmtp (Exim 4.72) (envelope-from ) id 1QYcsY-0000mc-9d; Mon, 20 Jun 2011 14:42:54 +0300 Received: from localhost6.localdomain6 (unknown [127.0.0.1]) by fate (Postfix) with ESMTP id 44C7E25209; Mon, 20 Jun 2011 14:42:54 +0300 (EEST) Subject: [PATCH 6/6] zd1211rw: detect stalled beacon interrupt faster To: linux-wireless@vger.kernel.org From: Jussi Kivilinna Cc: Daniel Drake , "John W. Linville" , Ulrich Kunitz Date: Mon, 20 Jun 2011 14:42:54 +0300 Message-ID: <20110620114254.964.92160.stgit@localhost6.localdomain6> In-Reply-To: <20110620114228.964.35459.stgit@localhost6.localdomain6> References: <20110620114228.964.35459.stgit@localhost6.localdomain6> User-Agent: StGit/0.15 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 20 Jun 2011 11:42:58 +0000 (UTC) As USB_INT_ID_RETRY_FAILED can override USB_INT_ID_REGS, beacon interrupt (CR_INTERRUPT) might be lost. Problem is that when device trigger CR_INTERRUPT it disables HW interrupt. Now if USB_INT_ID_REGS with CR_INTERRUPT gets lost, beacon interrupt stays disabled until beacon watchdog notices the stall. This happen very often on heavy TX. Improve watchdog to trigger earlier, after three missing beacon interrupts. Signed-off-by: Jussi Kivilinna --- drivers/net/wireless/zd1211rw/zd_mac.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index b67c52d..cabfae1 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c @@ -1429,7 +1429,8 @@ static void beacon_watchdog_handler(struct work_struct *work) spin_lock_irq(&mac->lock); interval = mac->beacon.interval; period = mac->beacon.period; - timeout = mac->beacon.last_update + msecs_to_jiffies(interval) + HZ; + timeout = mac->beacon.last_update + + msecs_to_jiffies(interval * 1024 / 1000) * 3; spin_unlock_irq(&mac->lock); if (interval > 0 && time_is_before_jiffies(timeout)) {