Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp4165211pxb; Tue, 19 Apr 2022 19:06:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2i4eIHf25WVYS559dF30LSWylfIErSegadJOt96U/wmqxAKKT/qcULBmrIMTCc2LfM5EZ X-Received: by 2002:a17:903:1d0:b0:158:d4c7:99c2 with SMTP id e16-20020a17090301d000b00158d4c799c2mr18527356plh.63.1650420393150; Tue, 19 Apr 2022 19:06:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650420393; cv=none; d=google.com; s=arc-20160816; b=T4u1Jh8Ug/7MWSfvwjLyPhBMFi4dm9VR9H5seWwcl23uV0+C7XJu3jws1raCYDwiEb 2RUZQMdMuNGzjRzGjilbbk6rwib25PTsFDvdu9PTFEW7e8+g2z9M/bzKCNRC1D5hG4ST MQP+ZKDVVAXl4DtvnDvQMae9jRrGDNOEX+8U+8wAkFYgBWOVBQqhVekVAQpCnWj8kXeA 1K2OOy8uXPjyBFr80GWscsMT4VxBjvZ5cgOZy+tuzg61znTPJYVbSQAhM00RhlX5Gokh uH1vPYlWEYcmXYeUZPuVwguTzE9PaN5m5ojhzAv/EGvLJ9rOIXIRwsW4th070u3UEauo ZduQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=l+ByOqKk3aTPDxOgi+MMXPoJaKvFYjmLHvE3XekD1Uk=; b=qnlrkht45YqA1aE1ZFuby5NWpBdfiGSLkr7Yz8A4KCgEwqhUijY1XXF6ZxBsr35jRO NhGICzwEbUSmIwNKod3TW1vP7liFXGAr+SAaCag/EcQXlVU0Wh5pLL/7fGwNUS/JSKDL hkOT7IFcYsKJY+ukSOX3OCcalWBFxCfAcSQz5I5ajeSdWlol2T89UbLwjAlYeEo/1uUP 4rjtGcbbEh991BrrNVLFMi6b/C0vV1DSsBzoAHpRncntU/K1CIK4JgJTY8aoRyqAxu3y 5jWS7lW6OlnAbRgHH8DQjPyT3b0qL00dfiUycHiAIPIdGTOGL0jZlDIlCNnOig7eQXrS gUEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JmR0pcqj; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lk3-20020a17090b33c300b001cba0e94ddbsi4754475pjb.147.2022.04.19.19.06.16; Tue, 19 Apr 2022 19:06:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JmR0pcqj; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358609AbiDTAqD (ORCPT + 66 others); Tue, 19 Apr 2022 20:46:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358612AbiDTAqA (ORCPT ); Tue, 19 Apr 2022 20:46:00 -0400 Received: from mail-il1-x12c.google.com (mail-il1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F86628989 for ; Tue, 19 Apr 2022 17:43:16 -0700 (PDT) Received: by mail-il1-x12c.google.com with SMTP id t4so34277ilo.12 for ; Tue, 19 Apr 2022 17:43:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=l+ByOqKk3aTPDxOgi+MMXPoJaKvFYjmLHvE3XekD1Uk=; b=JmR0pcqjjI6YzateDyGtk1MhYbDzRKG/FbmqtGeN/mQoa5eGagsWoTWt7YHJ19A7yw IZvnTcD8zmglvHiaKtcUbQmYYQjwRPW4/B/maJVyPt69Vn+Df/Esf+QK+aBi8OOsffB2 2ShP+sI29u2/BwgQ3bxIIHDCYwBU4J3ovXjSI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=l+ByOqKk3aTPDxOgi+MMXPoJaKvFYjmLHvE3XekD1Uk=; b=lQpBSVYm9BOo4miCc7P/QeoII3qZM5rqvqOPHK0o7Oko8sGURHVkcD/beWIpScxdab JtanIQn1g1LvLyRyl9eEPf682EvOP5daQK9eTEvy69hc9TNmdEYV7lwiH/4PqR/S8MKu 0kGOHZsFvpWrxqkmE2Aqe25oxRU6qtH+LmKOG1G7DAKWbkISjpkaWAdirgPgbSMmeS2P ywK7o++dow+mSYgBmqns6IUbHQalNHGmpN6m6cXLSJtTyabGTXUnavT9PDc3S18Gk0tr t9yvN9tPUucSpu92/6DEQaeuiz2ApJZJVq0fpPxJqmBCOYp79NXq6ugBaRZFt//v7y8d +ldA== X-Gm-Message-State: AOAM531iR8oVyEdmB8lli4S576RLNJG8vWiQ5bUcBq8d84YvPtWCyupB OUxr5tZr6pEJzYRNtAKioVwayuwGD2cTt9Q1qmloLA== X-Received: by 2002:a05:6e02:2184:b0:2cc:56e0:1686 with SMTP id j4-20020a056e02218400b002cc56e01686mr1048598ila.28.1650415395243; Tue, 19 Apr 2022 17:43:15 -0700 (PDT) MIME-Version: 1.0 References: <20220107200417.1.Ie4dcc45b0bf365077303c596891d460d716bb4c5@changeid> <87sfrqqfzy.fsf@kernel.org> <87fsmio9y8.fsf@kernel.org> In-Reply-To: <87fsmio9y8.fsf@kernel.org> From: Abhishek Kumar Date: Tue, 19 Apr 2022 17:43:02 -0700 Message-ID: Subject: Re: [PATCH 1/2] ath10k: search for default BDF name provided in DT To: Kalle Valo Cc: Doug Anderson , Rakesh Pillai , LKML , linux-wireless , "David S. Miller" , Jakub Kicinski , ath10k , netdev Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Tue, Apr 12, 2022 at 3:47 AM Kalle Valo wrote: > > Abhishek Kumar writes: > > > Hi All, > > > > Apologies for the late reply, too many things at the same time. > > Trust me, I know the feeling :) > > > Just a quick note, Qcomm provided a new BDF file with support for > > 'bus=snoc,qmi-board-id=ff' as well, so even without this patch, the > > non-programmed devices(with board-id=0xff) would work. However, for > > optimization of the BDF search strategy, the above mentioned strategy > > would still not work: - The stripping of full Board name would not > > work if board-id itself is not programmed i.e. =0xff e.g. for > > 'bus=snoc,qmi-board-id=ff,qmi-chip-id=320,variant=GO_LAZOR' => no > > match 'bus=snoc,qmi-board-id=ff,qmi-chip-id=320' => no match > > 'bus=snoc,qmi-board-id=ff' => no match 'bus=snoc' => no match because > > all the BDFs contains board-id=67 > > Sorry, not fully following your here. Are you saying that the problem is > that WCN3990/hw1.0/board-2.bin is missing board file for 'bus=snoc'? Ya, that is what I meant here, the board-2.bin file does not contain an entry for 'bus=snoc' and so if board-id=oxff then still there cannot be any BDF that matches. So adding BDF for 'bus=snoc' would simplify the approach. > That's easy to add, each board file within board-2.bin has multiple > names so we can easily select one board file for which we add > 'bus=snoc'. > > > So with this DT patch specifically for case 'bus=snoc,qmi-board-id=ff' > > => no match, we fallback to default case ( the one provided in DT) > > i.e. 'bus=snoc,qmi-board-id=67' => match . I do not see how exactly > > the driver can know that it should check for a board-id of 67. > > Sorry, not following you here either. Why would the driver need to use > board-id 67? > > > However, to still remove dependency on the DT, we can make the > > board-id as no-op if it is not programmed i.e. if the board-id=ff then > > we would pick any BDF that match 'bus=snoc,qmi-board-id=' where XX > > can be any arbitrary number. Thoughts ? > > To me using just 'bus=snoc' is more logical than picking up an arbitrary > number. But I might be missing something here. The reason I mentioned that if the board-id=oxff then pick any available BDF entry which matches 'bus=snoc,qmi-board-id=' is because: - This will atleast let the wlan chip to boot. - There is no BDF for 'bus=snoc' , so further stripping of boardname will not find any match, but as you mentioned that BDF for 'bus=snoc' can be added, then this will make the logic simpler and we don't have to pick 'bus=snoc,qmi-board-id=' with any arbitrary board-id. I will rollout a patch with this approach. > > -- > https://patchwork.kernel.org/project/linux-wireless/list/ > > https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches Thanks Abhishek