From patchwork Mon Feb 10 11:47:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eliad Peller X-Patchwork-Id: 3618361 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E70599F2D6 for ; Mon, 10 Feb 2014 11:48:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2225320138 for ; Mon, 10 Feb 2014 11:48:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DFD72201C0 for ; Mon, 10 Feb 2014 11:48:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752721AbaBJLsK (ORCPT ); Mon, 10 Feb 2014 06:48:10 -0500 Received: from mail-wg0-f41.google.com ([74.125.82.41]:57661 "EHLO mail-wg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752679AbaBJLsH (ORCPT ); Mon, 10 Feb 2014 06:48:07 -0500 Received: by mail-wg0-f41.google.com with SMTP id n12so2466313wgh.2 for ; Mon, 10 Feb 2014 03:48:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wtHPaMXN0V21l50L6PfBumMt9ng2zsH4BEEz9nS8Kl8=; b=TB60oSP/S9/UKdYEUtcDDuuAUPhCVjoexOYZJ5zab0U+8fOgqytKcWgGIOQBA3RXWN +IuPVJgumIi1xDfhURBnARy4kFUDGwxH7kkWBQUbBCJPG9S0qzPFd7mfCzf2hrowp1q6 YkkgwFx8SdI9ls0XB2fTEUkYwFVPb7vrG/ijkqbH88picpoOnikKEx9WdNaybMjeuSQH 7vofI4WirpKyY4LW3jDwSyefRrz1fcznM5aCMFvF9ozjmZmKB1N4lwDEo29+q9SJ4ZtU C89lxKrf4WHBzx3Y3Off0wanPVrXroxrIt49FD/qssgacRN4xZow8cZ+ThqZVstLDnTe pYtw== X-Gm-Message-State: ALoCoQk3uGISr7JVKPiD48B423xV+nvr2FzkROT6ye57iivVOvhSyQW/fOkRyRN1fgLOaNyBprYG X-Received: by 10.180.84.73 with SMTP id w9mr10029038wiy.58.1392032886138; Mon, 10 Feb 2014 03:48:06 -0800 (PST) Received: from muse.amr.corp.intel.com (93-173-177-113.bb.netvision.net.il. [93.173.177.113]) by mx.google.com with ESMTPSA id ju6sm34687484wjc.1.2014.02.10.03.48.04 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Feb 2014 03:48:05 -0800 (PST) From: Eliad Peller To: "John W. Linville" Cc: Subject: [PATCH 15/18] wlcore: decrease warning verbosity during recovery Date: Mon, 10 Feb 2014 13:47:31 +0200 Message-Id: <1392032854-28126-16-git-send-email-eliad@wizery.com> X-Mailer: git-send-email 1.8.5.2.229.g4448466.dirty In-Reply-To: <1392032854-28126-1-git-send-email-eliad@wizery.com> References: <1392032854-28126-1-git-send-email-eliad@wizery.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 From: Arik Nemtsov Silently ignore repetitive scheduling of recovery work and commands being passed to the bus when the HW is not available. This can happen many times during recovery and slow it down. It also spams the kernel logs. Signed-off-by: Arik Nemtsov Signed-off-by: Eliad Peller --- drivers/net/wireless/ti/wlcore/cmd.c | 4 ++-- drivers/net/wireless/ti/wlcore/main.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ti/wlcore/cmd.c b/drivers/net/wireless/ti/wlcore/cmd.c index 3463a67..40dc30f 100644 --- a/drivers/net/wireless/ti/wlcore/cmd.c +++ b/drivers/net/wireless/ti/wlcore/cmd.c @@ -60,8 +60,8 @@ static int __wlcore_cmd_send(struct wl1271 *wl, u16 id, void *buf, u16 status; u16 poll_count = 0; - if (WARN_ON(wl->state == WLCORE_STATE_RESTARTING && - id != CMD_STOP_FWLOGGER)) + if (unlikely(wl->state == WLCORE_STATE_RESTARTING && + id != CMD_STOP_FWLOGGER)) return -EIO; cmd = buf; diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index 8106c96..a2348b9 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c @@ -782,10 +782,11 @@ out: void wl12xx_queue_recovery_work(struct wl1271 *wl) { - WARN_ON(!test_bit(WL1271_FLAG_INTENDED_FW_RECOVERY, &wl->flags)); - /* Avoid a recursive recovery */ if (wl->state == WLCORE_STATE_ON) { + WARN_ON(!test_bit(WL1271_FLAG_INTENDED_FW_RECOVERY, + &wl->flags)); + wl->state = WLCORE_STATE_RESTARTING; set_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS, &wl->flags); wl1271_ps_elp_wakeup(wl);