Received: by 10.192.165.156 with SMTP id m28csp789869imm; Fri, 13 Apr 2018 07:54:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx48lt1qcvu4S3NE0pnX0Y9JXtFKpdTyl4wofR27ctXWoE2RLHRXJILz9NVcbrOKGhm2gMVh2 X-Received: by 10.98.254.17 with SMTP id z17mr11758316pfh.105.1523631242344; Fri, 13 Apr 2018 07:54:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523631242; cv=none; d=google.com; s=arc-20160816; b=STMpahXWMKIuWI8Enj1SL/sk+JOFpSnyNUhl/lQlq8doyxRV0qE+up6oWANv5rJDiW 0brnsGCLngQa4EV40c1Gfaa1mv9ph8MC4C5ofQseph0rgY2L7+Em4VkWTUvOtIKWHvoy cvWa1aP2OFXm1DWcvA39KQ5MzqwYmYPt3ywh8hTx5zBB0lCWEbP1QcPBWFLiQTimdHNv sYIqQs3Zg0+QQ7ArHaaR/8aJ2yPHpmqmbfiWrw8EsokPQwLZrXQ+9/vLrwWer/zQEwKO UFjhJNkiUZZwavVGuLi0cWmMudDs8yv9+vLGN6MvUAmhTXdBKruKQVjVDNASk6WhzlXT CLBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=veBFc+GRLKh1W8vLqwsccxU3aYR7TdeZdqoAxLDhu8k=; b=mLZz2w645SErrQayH7TblDoi9sV5lk+bCrwSrdo8dh0nnJ00o7NfydQKgzRMBLn0Mb oLooGLPWMk5oTJx2hRTf7BMihr3CQAjBYgHXTtysOZzEGK7TwhSR+2+W1OzHL81F4MJv O4D+Ng0H9L93lx06CRDZVIAiypFln7e+MQ6M9ILdpVOYUmakA9QWpXPcdpyrTnrD7ZL/ yrH7AYr2W/NEs2l0Y/ag08MHfucsDv46ydfpu6oq679Klojx3wGH31uiwUQozAe0ob+7 ErpZ1z6ySgn3Sm0rWNcPZGHUhf8u02Lx/QQuGdxw5JCjMOsKrfhWbdDgx9vJ2MEn2eFb XdUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=oSIw7sZd; dkim=pass header.i=@codeaurora.org header.s=default header.b=oSIw7sZd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e4-v6si5775431pls.268.2018.04.13.07.53.48; Fri, 13 Apr 2018 07:54:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=oSIw7sZd; dkim=pass header.i=@codeaurora.org header.s=default header.b=oSIw7sZd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750923AbeDMOlu (ORCPT + 99 others); Fri, 13 Apr 2018 10:41:50 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:41720 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750734AbeDMOlt (ORCPT ); Fri, 13 Apr 2018 10:41:49 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id B4E1460BFA; Fri, 13 Apr 2018 14:41:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523630508; bh=BzkoLiesjPMJ7wvkC2AJT/zXG1E2ACvYcv+cj03dO30=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=oSIw7sZdQMw8hZY2Edfmme3NzK06PqJ7T5Z7DRxdfZzu0x8ClO/vOBY2Gi79zsPkW MdaUqMFeUY3tcgFyjQRGGOJVpF1yEbDYgUoZ/7ZvcDy+bn6ud0Oj4R64hlNYzY3GgW /fVedtlfs5KCyVeeQPToTeA264LK5cQKa4KsmgzU= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from potku.adurom.net (88-114-240-52.elisa-laajakaista.fi [88.114.240.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: kvalo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 55BB86072E; Fri, 13 Apr 2018 14:41:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523630508; bh=BzkoLiesjPMJ7wvkC2AJT/zXG1E2ACvYcv+cj03dO30=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=oSIw7sZdQMw8hZY2Edfmme3NzK06PqJ7T5Z7DRxdfZzu0x8ClO/vOBY2Gi79zsPkW MdaUqMFeUY3tcgFyjQRGGOJVpF1yEbDYgUoZ/7ZvcDy+bn6ud0Oj4R64hlNYzY3GgW /fVedtlfs5KCyVeeQPToTeA264LK5cQKa4KsmgzU= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 55BB86072E Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: Thomas Hebb Cc: linux-kernel@vger.kernel.org, ath10k@lists.infradead.org Subject: Re: [PATCH] ath10k: search all IEs for variant before falling back References: <87y3jcp0kz.fsf@kamboji.qca.qualcomm.com> Date: Fri, 13 Apr 2018 17:41:45 +0300 In-Reply-To: <87y3jcp0kz.fsf@kamboji.qca.qualcomm.com> (Kalle Valo's message of "Thu, 01 Mar 2018 12:11:24 +0200") Message-ID: <87a7u7qic6.fsf@kamboji.qca.qualcomm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Kalle Valo writes: > Thomas Hebb writes: > >> commit f2593cb1b291 ("ath10k: Search SMBIOS for OEM board file >> extension") added a feature to ath10k that allows Board Data File >> (BDF) conflicts between multiple devices that use the same device IDs >> but have different calibration requirements to be resolved by allowing >> a "variant" string to be stored in SMBIOS [and later device tree, added >> by commit d06f26c5c8a4 ("ath10k: search DT for qcom,ath10k-calibration- >> variant")] that gets appended to the ID stored in board-2.bin. >> >> This original patch had a regression, however. Namely that devices with >> a variant present in SMBIOS that didn't need custom BDFs could no longer >> find the default BDF, which has no variant appended. The patch was >> reverted and re-applied with a fix for this issue in commit 1657b8f84ed9 >> ("search SMBIOS for OEM board file extension"). >> >> But the fix to fall back to a default BDF introduced another issue: the >> driver currently parses IEs in board-2.bin one by one, and for each one >> it first checks to see if it matches the ID with the variant appended. >> If it doesn't, it checks to see if it matches the "fallback" ID with no >> variant. If a matching BDF is found at any point during this search, the >> search is terminated and that BDF is used. The issue is that it's very >> possible (and is currently the case for board-2.bin files present in the >> ath10k-firmware repository) for the default BDF to occur in an earlier >> IE than the variant-specific BDF. In this case, the current code will >> happily choose the default BDF even though a better-matching BDF is >> present later in the file. >> >> This patch fixes the issue by first searching the entire file for the ID >> with variant, and searching for the fallback ID only if that search >> fails. It also includes some code cleanup in the area, as >> ath10k_core_fetch_board_data_api_n() no longer does its own string >> mangling to remove the variant from an ID, instead leaving that job to a >> new flag passed to ath10k_core_create_board_name(). >> >> I've tested this patch on a QCA4019 and verified that the driver behaves >> correctly for 1) both fallback and variant BDFs present, 2) only fallback >> BDF present, and 3) no matching BDFs present. >> >> Fixes: 1657b8f84ed9 ("ath10k: search SMBIOS for OEM board file extension") >> Signed-off-by: Thomas Hebb > > BTW, you forgot to CC linux-wireless so I don't see this in patchwork. > > https://wireless.wiki.kernel.org/en/users/drivers/ath10k/submittingpatches I submitted v2 so that I see it in patchwork: https://patchwork.kernel.org/patch/10340241/ -- Kalle Valo