From patchwork Fri Feb 10 12:26:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 9566673 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 89DBA60572 for ; Fri, 10 Feb 2017 12:28:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 766031FF73 for ; Fri, 10 Feb 2017 12:28:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B46228556; Fri, 10 Feb 2017 12:28:06 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BF9C91FF73 for ; Fri, 10 Feb 2017 12:28:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:To:From:Subject:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=//6bU428lGUn6LhSmpoOpH38dcO5t40jcSSKdjO2slI=; b=I6t6+j34gCoZQa MXrqSe5egjrD4xNluSxfwsvWgml85n0QpRJyfNuDDJvNCKZJDbmUDwjh8UYrEK0KzUKB6ogq0u8v+ gQu7ADr4tWmpUVfhsF3r9D3p6bwisN9AWjHEVeYWXj2v0gVGECKA/8rLv2mpJUGznHPCPyHR+OEg7 kxSgY7ezGoBeUezhIK2HWyGOsJucC3KspApLn/5jw3H1G8Rv7KoiZNyy+GjDtTKpVKA6ys4B4390d Ifo3ggRrYhLkzO6zSab+LlUjixZ0t/16rWZZdH4qKKfDt0ecA43ihDmctTHvGU+J94z38KyPjgVeQ /haiDNEe7LRshi7OgYuA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ccAIy-0007St-Pi; Fri, 10 Feb 2017 12:28:00 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ccAIv-0007Qd-Vn for ath10k@bombadil.infradead.org; Fri, 10 Feb 2017 12:27:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-ID:Date:CC:To:From:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=NXkxuhTQR0dLqPWy8ClQ9XxQz39hOvoBq64kV7UFiZ8=; b=Pdc61Ie3WUJxuVHni3DV+DSDZD iS+x8Mfl9VRoV+NMxN4z/8h/+I8IkhMjqtwtt72vEDgAE7f4s0dGwkOuxoG2Rg0TGMgFOBA3v4y4i bvBTuDBD1jC6KcxvSlxC50pxqSFG/8NadC4MEIQXce99UnBzvbMF3XOzJasE4liDiYGP/FtOr0RKs mBVnFqBUoQMjMKFlI/lCUbRFHrIQqtqzttcPlFuLk00u2igMx6Udt5NOPyOIdQtazpB5SP1BS6tRs UEKj2t5HeyIXqkWN/WyMcIXkJlCe+pmsd/EP4QqXn+XteROHAxqwBeKQjQcriDPcQ7SyThljzH3eL /WN0K12w==; Received: from wolverine01.qualcomm.com ([199.106.114.254]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ccAIr-0004wf-74 for ath10k@lists.infradead.org; Fri, 10 Feb 2017 12:27:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1486729673; x=1518265673; h=subject:from:to:cc:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yrYSR9yF0Y8L2ayyDYFjH7PXI+RjSXILjCFlL5ZhyVY=; b=hyOaDLJ2BWEevFRkWZorj8c4o+cleSfLD2jT0tf4nCoPRI3FMePp9pkx tBboY/ik1UwBFtDgLvLuxhEYn2I/5ZHk9iNWGOuLGZXZS9fJpSGGUNTXe p/aEtxf5CjdrNHY91Qvlu/QXIFxFDaRZEASGEUaeX61bxbUtCAyENkWfm k=; X-IronPort-AV: E=Sophos;i="5.35,141,1484035200"; d="scan'208";a="261806542" Received: from unknown (HELO Ironmsg03-R.qualcomm.com) ([10.53.140.107]) by wolverine01.qualcomm.com with ESMTP; 10 Feb 2017 04:27:28 -0800 X-IronPort-AV: E=McAfee;i="5800,7501,8434"; a="1306949669" Received: from nasanexm01h.na.qualcomm.com ([10.85.0.34]) by Ironmsg03-R.qualcomm.com with ESMTP/TLS/RC4-SHA; 10 Feb 2017 04:27:28 -0800 Received: from eusanexr01a.eu.qualcomm.com (10.85.0.97) by NASANEXM01H.na.qualcomm.com (10.85.0.34) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Fri, 10 Feb 2017 04:27:28 -0800 Received: from potku.adurom.net (10.80.80.8) by eusanexr01a.eu.qualcomm.com (10.85.0.97) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Fri, 10 Feb 2017 04:27:25 -0800 Subject: [PATCH v2 3/4] ath10k: silence firmware file probing warnings From: Kalle Valo To: Date: Fri, 10 Feb 2017 14:26:56 +0200 Message-ID: <148672961596.8556.5270733641640682835.stgit@potku.adurom.net> In-Reply-To: <148672934198.8556.5588600166627442652.stgit@potku.adurom.net> References: <148672934198.8556.5588600166627442652.stgit@potku.adurom.net> User-Agent: StGit/0.17.1-17-ge4e0 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01C.na.qualcomm.com (10.85.0.83) To eusanexr01a.eu.qualcomm.com (10.85.0.97) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170210_122753_601699_EF9C183C X-CRM114-Status: GOOD ( 11.19 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-wireless@vger.kernel.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Michal Kazior Firmware files are versioned to prevent older driver instances to load unsupported firmware blobs. This is reflected with a fallback logic which attempts to load several firmware files. This however produced a lot of unnecessary warnings sometimes confusing users and leading them to rename firmware files making things even more confusing. Hence use request_firmware_direct() which does not produce extra warnings. This shouldn't really break anything because most modern systems don't rely on udev/hotplug helpers to load firmware files anymore. For example it was confirmed that LEDE does not user helper. This also fixes a 60 second delay per _each_ unexistent firmware/calibration file with distros which have CONFIG_FW_LOADER_USER_HELPER_FALLBACK enabled, RHEL being a notable example. Using ath10k with firmware-2.bin this might end up into a five minute delay in boot. Signed-off-by: Michal Kazior Patchwork-Id: 9237095 [kvalo@qca.qualcomm.com: add more info to the commit log] Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath10k/core.c | 11 +++++------ drivers/net/wireless/ath/ath10k/testmode.c | 5 ++++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index f395d3a98bc5..6433fdd2c0c7 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -456,7 +456,10 @@ static const struct firmware *ath10k_fetch_fw_file(struct ath10k *ar, dir = "."; snprintf(filename, sizeof(filename), "%s/%s", dir, file); - ret = request_firmware(&fw, filename, ar->dev); + ret = request_firmware_direct(&fw, filename, ar->dev); + ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot fw request '%s': %d\n", + filename, ret); + if (ret) return ERR_PTR(ret); @@ -1190,12 +1193,8 @@ int ath10k_core_fetch_firmware_api_n(struct ath10k *ar, const char *name, /* first fetch the firmware file (firmware-*.bin) */ fw_file->firmware = ath10k_fetch_fw_file(ar, ar->hw_params.fw.dir, name); - if (IS_ERR(fw_file->firmware)) { - ath10k_err(ar, "could not fetch firmware file '%s/%s': %ld\n", - ar->hw_params.fw.dir, name, - PTR_ERR(fw_file->firmware)); + if (IS_ERR(fw_file->firmware)) return PTR_ERR(fw_file->firmware); - } data = fw_file->firmware->data; len = fw_file->firmware->size; diff --git a/drivers/net/wireless/ath/ath10k/testmode.c b/drivers/net/wireless/ath/ath10k/testmode.c index ed85f938e3c0..8bb36c18a749 100644 --- a/drivers/net/wireless/ath/ath10k/testmode.c +++ b/drivers/net/wireless/ath/ath10k/testmode.c @@ -150,7 +150,10 @@ static int ath10k_tm_fetch_utf_firmware_api_1(struct ath10k *ar, ar->hw_params.fw.dir, ATH10K_FW_UTF_FILE); /* load utf firmware image */ - ret = request_firmware(&fw_file->firmware, filename, ar->dev); + ret = request_firmware_direct(&fw_file->firmware, filename, ar->dev); + ath10k_dbg(ar, ATH10K_DBG_TESTMODE, "testmode fw request '%s': %d\n", + filename, ret); + if (ret) { ath10k_warn(ar, "failed to retrieve utf firmware '%s': %d\n", filename, ret);