Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp414491pxu; Thu, 3 Dec 2020 03:36:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJylbfnXN8j9G/NzzTEOeTBQk5h0c1PjhjoiDlQ5V7U2PD+rquGgr4scUzl0AY3mlzfC9Jxx X-Received: by 2002:a17:906:caa:: with SMTP id k10mr2066671ejh.204.1606995393412; Thu, 03 Dec 2020 03:36:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606995393; cv=none; d=google.com; s=arc-20160816; b=SNJq9t/f9wrN3mm/Kz0s6iUB1sarSl6r0looxnVsP9v4DJtCBuLPU98Ax85tb1g/Ut JIF9U5f6Ehs/rmMyvIt7KMRupWKrBI1qFRDgtmAkbT7suU5W8E6mXxHR+6UzYbsfvkFv j4LRpvIkolKloDSLPIM6PGl9WW5SZnp1dFQChnGtVFPVJyuBmsyuuEHuKY3v78d7ANRg qs90x6ZaULStANEw2o62Ls9Y+9PAzB68Qvdhc47ZnRM2b0IB/gTbSFyn+pXKWbEP2OcB 7+qPBlUjq5ateSzgvdLezG21OKisicOgd3cWxAeAqhpDskDWQ2sdIttYdnrkNqnijweL 11hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:thread-index :content-transfer-encoding:mime-version:message-id:date:subject :in-reply-to:references:cc:to:from:dmarc-filter:sender :dkim-signature; bh=3lEeiYfIabUWjKykhFZltcpohpjJIHJVg3falMmo2a8=; b=hqCbvPmLlyHXQqIqTtmb0EIG8RHzS9L2DT9qFI6WdmIZQpDSu0JenWDUmKzinOFqpN XxOjFQhPGk407/yZi0M1mwB/F5TDk9Lnsy8i6wh12qd2p/E2igEDcubFaWvBgw+5WYHI 0qyGipwJdbLxTzXChyUCbxyZmhHdIqmADlKiFoCgQfVLqvEl8ywQMAb8zgGTTeP8Hzl7 tM12h2CK8hBPK7b2fnqbqvjDz5euMX+KG0Qlf91rUY9Lb0kPK1UXRKXF99ZH1PcpVFyu /UESUkW4xaQ54/tK8aJ2/kGi5sjm9Sb/ymYdBXdv7bC8IhF8pCJFDdYki4CZNK7LgHj7 fltQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=LDhJjt11; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bi10si779322edb.483.2020.12.03.03.36.08; Thu, 03 Dec 2020 03:36:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=LDhJjt11; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728811AbgLCLd7 (ORCPT + 99 others); Thu, 3 Dec 2020 06:33:59 -0500 Received: from m43-15.mailgun.net ([69.72.43.15]:51046 "EHLO m43-15.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726061AbgLCLd6 (ORCPT ); Thu, 3 Dec 2020 06:33:58 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1606995218; h=Content-Transfer-Encoding: Content-Type: MIME-Version: Message-ID: Date: Subject: In-Reply-To: References: Cc: To: From: Sender; bh=3lEeiYfIabUWjKykhFZltcpohpjJIHJVg3falMmo2a8=; b=LDhJjt11eV4sG/wbrJKa0i6TKaEupBQahM7YQO2Ujs0FNczDebutXqUmn7zgF1W+XRdL7oeT v3krTAvnsL1E96POlzEk/dv1FyAcuG8yXXOI/wCkxYSXsxuEVNf5bzkR2wBQWw4zPm5sVlkK 9+8YPCk3DdLxj0eSaGMWEVqbbrA= X-Mailgun-Sending-Ip: 69.72.43.15 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n06.prod.us-east-1.postgun.com with SMTP id 5fc8ccf789b9bc6268d3bc15 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 03 Dec 2020 11:33:11 GMT Sender: pillair=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 4727AC43462; Thu, 3 Dec 2020 11:33:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from Pillair (unknown [49.205.247.166]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: pillair) by smtp.codeaurora.org (Postfix) with ESMTPSA id 88C49C433ED; Thu, 3 Dec 2020 11:33:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 88C49C433ED Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=pillair@codeaurora.org From: "Rakesh Pillai" To: "'Doug Anderson'" Cc: "'Abhishek Kumar'" , "'Kalle Valo'" , "'LKML'" , "'ath10k'" , "'Brian Norris'" , "'linux-wireless'" , "'David S. Miller'" , "'Jakub Kicinski'" , "'netdev'" References: <20201112200906.991086-1-kuabhs@chromium.org> <20201112200856.v2.1.Ia526132a366886e3b5cf72433d0d58bb7bb1be0f@changeid> <002401d6c242$d78f2140$86ad63c0$@codeaurora.org> <002d01d6c2dd$4386d880$ca948980$@codeaurora.org> In-Reply-To: Subject: RE: [PATCH v2 1/1] ath10k: add option for chip-id based BDF selection Date: Thu, 3 Dec 2020 17:03:02 +0530 Message-ID: <004301d6c968$12ef1b10$38cd5130$@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQKxMSkDsdRsNwK99YDuloz1ISNQFAKbjoqbAYQwjuUA6sHy1gG3FmuoAayVhWkBiF+H7qfguODA Content-Language: en-us Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > -----Original Message----- > From: Doug Anderson > Sent: Tuesday, December 1, 2020 12:49 AM > To: Rakesh Pillai > Cc: Abhishek Kumar ; Kalle Valo > ; LKML ; ath10k > ; Brian Norris ; > linux-wireless ; David S. Miller > ; Jakub Kicinski ; netdev > > Subject: Re: [PATCH v2 1/1] ath10k: add option for chip-id based BDF > selection >=20 > Hi, >=20 > On Tue, Nov 24, 2020 at 7:44 PM Rakesh Pillai > wrote: > > > > > > I missed on reviewing this change. Also I agree with Doug that = this is not > > > the change I was looking for. > > > > > > > > The argument "with_variant" can be renamed to = "with_extra_params". > > > There is no need for any new argument to this function. > > > > Case 1: with_extra_params=3D0, ar->id.bdf_ext[0] =3D 0 = -> The > default > > > name will be used (bus=3Dsnoc,qmi_board_id=3D0xab) > > > > Case 2: with_extra_params=3D1, ar->id.bdf_ext[0] =3D 0 = -> > > > bus=3Dsnoc,qmi_board_id=3D0xab,qmi_chip_id=3D0xcd > > > > Case 3: with_extra_params=3D1, ar->id.bdf_ext[0] =3D "xyz" = -> > > > bus=3Dsnoc,qmi_board_id=3D0xab,qmi_chip_id=3D0xcd,variant=3Dxyz > > > > > > > > ar->id.bdf_ext[0] depends on the DT entry for variant field. > > > > > > I'm confused about your suggestion. Maybe you can help clarify. = Are > > > you suggesting: > > > > > > a) Only two calls to ath10k_core_create_board_name() > > > > > > I'm pretty sure this will fail in some cases. Specifically = consider > > > the case where the device tree has a "variant" defined but the BRD > > > file only has one entry for (board-id) and one for (board-id + > > > chip-id) but no entry for (board-id + chip-id + variant). If you = are > > > only making two calls then I don't think you'll pick the right = one. > > > > > > Said another way... > > > > > > If the device tree has a variant: > > > 1. We should prefer a BRD entry that has board-id + chip-id + = variant > > > 2. If #1 isn't there, we should prefer a BRD entry that has = board-id + chip- > id > > > 3. If #1 and #2 aren't there we fall back to a BRD entry that has = board-id. > > > > > > ...without 3 calls to ath10k_core_create_board_name() we can't = handle > > > all 3 cases. > > > > This can be handled by two calls to ath10k_core_create_board_name > > 1) ath10k_core_create_board_name(ar, boardname, sizeof(boardname), > true) : As per my suggestions, this can result in two possible = board names > > a) If DT have the "variant" node, it outputs the #1 from your = suggestion > (1. We should prefer a BRD entry that has board-id + chip-id + = variant) > > b) If DT does not have the "variant" node, it outputs the #2 = from your > suggestion (2. If #1 isn't there, we should prefer a BRD entry that = has board- > id + chip-id) > > > > 2) ath10k_core_create_board_name(ar, boardname, sizeof(boardname), > false) : This is the second call to this function and outputs the = #3 from your > suggestion (3. If #1 and #2 aren't there we fall back to a BRD entry = that has > board-id) >=20 > What I'm trying to say is this. Imagine that: >=20 > a) the device tree has the "variant" property. >=20 > b) the BRD file has two entries, one for "board-id" (1) and one for > "board-id + chip-id" (2). It doesn't have one for "board-id + chip-id > + variant" (3). >=20 > With your suggestion we'll see the "variant" property in the device > tree. That means we'll search for (1) and (3). (3) isn't there, so > we'll pick (1). ...but we really should have picked (2), right? Do we expect board-2.bin to not be populated with the bdf with variant = field (if its necessary ?) Seems fine for me, if we have 2 fallback names if that is needed. >=20 > -Doug