Received: by 10.223.185.116 with SMTP id b49csp7244365wrg; Thu, 1 Mar 2018 02:15:24 -0800 (PST) X-Google-Smtp-Source: AG47ELtLLt0Kermfx5ERk71GUw9DHMdaOIbBPoinDX8EsoeFsxQWDgg6YN4wQFwnc7Un9abSHe6A X-Received: by 10.98.34.75 with SMTP id i72mr1368988pfi.165.1519899324552; Thu, 01 Mar 2018 02:15:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519899324; cv=none; d=google.com; s=arc-20160816; b=Qf00bgFCwGJPTHpPe+y5Q1V5BUATGVBt2na9BpmNllg/JgrERvTPMOBGPoRz8FjF7B NEJLNZC1LQcBJXLBP9YjxJFtPaBN1BAipwy5Lp7D/SOQEVFIpLc5biBonzHkKreejk5T LsRV/Kmtx/F7C/MKS+73DELEXzr4OTtTjJYMFkQPJuaAM9LQxmCUDCVlt39Mfuewf1vD 0s9ffVc4QhdNn8HcSHaJSIIRZEEu/p/WbmLBIsU1zaD/2NM/Q7Ytj4QZFsVf3CK6hhlJ TLFfyPC7y50+dvVEjGzCVx64tND9hZQC1TT/yb+UwxaFy63mLtKQ67xyxmjoHahsbeOt gOVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=exqatnhSODhfs8mJYxKU4z4IBABcRgp6vx1O1/HR5Bc=; b=fOTLvwFEwLEpZFZ6E8cK/a2GNMd9maSocNCSy4vDJNpkJAr14FD37b1CVgq2hjq1EV q8hmF4TL/WCxJBQPZsjOUYNlA0iMZT9XwmbeVAb4N7UOsprdtFdqhQ2zk22NkR7yStXO cgdhFFitSVX0qzKY2Cmhum/D1WWiUy1mdT5uWCsAE84oPvzT4yf+QOvV/tl+KKBAdK2n lbqpP8PlmxJpDMl/n7od9zgIWgihaSHoLecfMEf8P4crX3jr8IvLb7GMQkzlUZHcFU7q M8i+YKBSu2XnsUmlb1HecpVJGWMq0Xrh3d8I6BN3JcH7LQfFK4y15GkmLleCNs9r6k4u abHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@qca.qualcomm.com header.s=qcdkim header.b=kH4kayn+; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=qca.qualcomm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f10-v6si2827002pln.821.2018.03.01.02.15.09; Thu, 01 Mar 2018 02:15:24 -0800 (PST) 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=fail header.i=@qca.qualcomm.com header.s=qcdkim header.b=kH4kayn+; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=qca.qualcomm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967462AbeCAKNN (ORCPT + 99 others); Thu, 1 Mar 2018 05:13:13 -0500 Received: from alexa-out.qualcomm.com ([129.46.98.28]:43743 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967232AbeCAKNK (ORCPT ); Thu, 1 Mar 2018 05:13:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1519899190; x=1551435190; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=exqatnhSODhfs8mJYxKU4z4IBABcRgp6vx1O1/HR5Bc=; b=kH4kayn+2dgsQLujKs3Hj52PZrnmo5t0mi/9WGVPmwHjnb4J+5ifT1c0 GFjk8jklH0MmqQ8qL51nXfsJDTt/Ggk9pllrPO1m+l/uXB6pAFfKRXr89 1dwe0cZZovy9n/qslQOmwgnQmK5wYKjgz4MmbbyFh3sRS61c9toyTi+hV 0=; X-IronPort-AV: E=Sophos;i="5.47,407,1515484800"; d="scan'208";a="15454771" Received: from ironmsg02-sd.qualcomm.com ([10.53.140.142]) by alexa-out.qualcomm.com with ESMTP; 01 Mar 2018 02:13:10 -0800 Received: from nasanexm01e.na.qualcomm.com ([10.85.0.31]) by ironmsg02-sd.qualcomm.com with ESMTP/TLS/AES256-SHA; 01 Mar 2018 02:13:09 -0800 Received: from euamsexm01b.eu.qualcomm.com (10.251.127.41) by NASANEXM01E.na.qualcomm.com (10.85.0.31) with Microsoft SMTP Server (TLS) id 15.0.1365.1; Thu, 1 Mar 2018 02:13:08 -0800 Received: from euamsexm01a.eu.qualcomm.com (10.251.127.40) by euamsexm01b.eu.qualcomm.com (10.251.127.41) with Microsoft SMTP Server (TLS) id 15.0.1365.1; Thu, 1 Mar 2018 11:13:05 +0100 Received: from euamsexm01a.eu.qualcomm.com ([10.251.127.40]) by euamsexm01a.eu.qualcomm.com ([10.251.127.40]) with mapi id 15.00.1365.000; Thu, 1 Mar 2018 11:13:05 +0100 From: Kalle Valo To: Thomas Hebb CC: "ath10k@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] ath10k: search all IEs for variant before falling back Thread-Topic: [PATCH] ath10k: search all IEs for variant before falling back Thread-Index: AQHTsUXj6VXRigGCREuv4ev5MVXW+g== Date: Thu, 1 Mar 2018 10:13:05 +0000 Message-ID: <87tvu0p0i7.fsf@kamboji.qca.qualcomm.com> References: <87y3jcp0kz.fsf@kamboji.qca.qualcomm.com> In-Reply-To: <87y3jcp0kz.fsf@kamboji.qca.qualcomm.com> (Kalle Valo's message of "Thu, 01 Mar 2018 12:11:24 +0200") Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.251.52.12] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 fallbac= k >> 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/submittingpatche= s Oh, and I haven't had a chance to review this yet but I'll try to do that soon. --=20 Kalle Valo=