From patchwork Tue Jul 19 13:00:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 9237095 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 BA0066075D for ; Tue, 19 Jul 2016 12:59:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA8D31FF2F for ; Tue, 19 Jul 2016 12:59:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9EB5626B4A; Tue, 19 Jul 2016 12:59:50 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A6F2B26D08 for ; Tue, 19 Jul 2016 12:59:49 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bPUcY-0004vT-Bj; Tue, 19 Jul 2016 12:59:34 +0000 Received: from mail-lf0-x22e.google.com ([2a00:1450:4010:c07::22e]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bPUcD-0004Fq-1Y for ath10k@lists.infradead.org; Tue, 19 Jul 2016 12:59:23 +0000 Received: by mail-lf0-x22e.google.com with SMTP id l69so13517536lfg.1 for ; Tue, 19 Jul 2016 05:58:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id; bh=6aDQb4QzQHRXHzUfemPJVzQM+zSgRR/GePpeH5GFp/c=; b=006v2bvJPbTsqWrVL82Pw1hzLg5dQrfBoJsXicFD9acCOfTKeBjngtXseqfMj4K1Ya BXj+xC2XSHfcd9tQaAjSe7Rcz1PsYm1l3+srTAP0t/sm8HC9h9FYwEmMRa+Z6uVxYLzo QmsjIA5RraBWb7kb1ekke07qBktyBvOMLxi0g= 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; bh=6aDQb4QzQHRXHzUfemPJVzQM+zSgRR/GePpeH5GFp/c=; b=jPqXpgYq3U6WlPF/oiSWqEYOlAWvlBKPfIZuRUq6mSiGi9tP54kcVBi5nWUqioK6vB gXMyoh0epGRk5oB+hpA+9AwDCba6CziVLthcANGttTeeTOmeteUxKeUCcjh2PxiH7CMh pHjhX6cDkgMgyrdAz/z2OeY0/8qiMYdcDn8vi+PCJN25jXZe9kTixvYitbEAB08Si5AD FY4JJueEL+/qTf88N3TBEROhvoP/z25wjQKz1d9E0AfwbnjktmFq+YJfcdK4EshFGHjQ zf3PXooVwFlXNGsdaV4I/FLXVTCusMZU/IfRjyqtLgIO1h+xK/EkHYfZrkRzz5UOj6qD iYHA== X-Gm-Message-State: ALyK8tIjz0LiFfK+Q2cxICljWlY4bR94mt9iuyQrI0yz44Eg3UWvIYsd52L40PEkCEua4qwnjicCWLTqCA7UvW/De3ngyvCsaZm1qAkgrcK51umpvaTRxGc5LVTddhpy6BC4VjXJ X-Received: by 10.25.37.208 with SMTP id l199mr3950552lfl.41.1468933128030; Tue, 19 Jul 2016 05:58:48 -0700 (PDT) Received: from localhost.localdomain ([91.198.246.8]) by smtp.gmail.com with ESMTPSA id f40sm485254lji.46.2016.07.19.05.58.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 19 Jul 2016 05:58:47 -0700 (PDT) From: Michal Kazior To: kvalo@qca.qualcomm.com Subject: [RFC] ath10k: silence firmware file probing warnings Date: Tue, 19 Jul 2016 15:00:37 +0200 Message-Id: <1468933237-5226-1-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 2.1.4 X-DomainID: tieto.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160719_055913_980302_CEB19E41 X-CRM114-Status: GOOD ( 10.21 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-wireless@vger.kernel.org, Michal Kazior , ath10k@lists.infradead.org MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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. Signed-off-by: Michal Kazior --- 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 e88982921aa3..81bfb71fe876 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -431,7 +431,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); @@ -1089,12 +1092,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 120f4234d3b0..fe49e7a83d00 100644 --- a/drivers/net/wireless/ath/ath10k/testmode.c +++ b/drivers/net/wireless/ath/ath10k/testmode.c @@ -149,7 +149,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);