Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1474427pxp; Thu, 10 Mar 2022 06:13:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJyNB1ZB6Iz51LZRzeRSoo3ySRpANBM5PqHyXsryGeXfLhmfdYvrdAQdHS5tLYjQlU6qjfDE X-Received: by 2002:a05:6402:40d0:b0:415:db98:c263 with SMTP id z16-20020a05640240d000b00415db98c263mr4610105edb.82.1646921617396; Thu, 10 Mar 2022 06:13:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646921617; cv=none; d=google.com; s=arc-20160816; b=i43eaXuO5pAWdmSkooalhcuy3dbX6wtA+6geBPaIQqNTcbfTjYzPXGnVlxyGn8JNn4 BrP29mIe2FX5GBi6Ch9RerI/EVS1ppcyoulyclSXdPR0Y40qYxGmViUemGl9mhNTjHHv JdwOyCn3fFST5x6zE5qpSMUShTAaMnhOFOCCgWpcoCtYpxnaKkXKe8my2u5J8chCZ5je k/lV7TuTBDpJfU2aVD4mA+1DEcNNKG5pRSSVoSGwLZKvV9iRnrFmAeYX9l7+1IJ+GL9D hxf1AmMpVQ/GJt1nmM2S2gV3OKNLIacNYVFFS+lT/NdVQOteXX5+RNANhB1IDazBJGeH gAQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=0BfdMozQ4YxnyxZzPWb9tIrSCsZcpnnI3EnZj9QLJrQ=; b=UamVNyyQs10Ry7aFtR3ThutHR2GF1kXZMTq3OqIAj618eGL38NzU63HgMzfX8zJuAs feBmpkOKrAOcWzuTZIruad4IN5KI39sZUFvlUamH2AkJT/AytWnGlDT7vNy/qJJlGX0R is/s9BRGYO5tbOHQFCU/jUXy4PpuhEzrOHIeO0E1FsB8D+3JV076Sso8lbIS/BAyBAGA E8LlBpqpdPu8fXurGvX/JJ9dwzV66HvcGgKSaj3uuuGwsLrUgJdTihvKW0SQCWnnPOJZ iXYYJdxJuVTG1shQyHGedDpBh9IqTcNMmJPAxy59xAeAwBndu9ap7X9AdVd7xAiZZK04 3abw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UyMlOTXB; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd14-20020a1709076e0e00b006db141db8absi3568039ejc.323.2022.03.10.06.13.14; Thu, 10 Mar 2022 06:13:37 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=UyMlOTXB; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240125AbiCJIBU (ORCPT + 69 others); Thu, 10 Mar 2022 03:01:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231814AbiCJIBS (ORCPT ); Thu, 10 Mar 2022 03:01:18 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5324A9D06C for ; Thu, 10 Mar 2022 00:00:18 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D3E9161B10 for ; Thu, 10 Mar 2022 08:00:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 568E9C340F3; Thu, 10 Mar 2022 08:00:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646899217; bh=cD2ae26TdyXdZ90Ib6mYDKQO01MMWHicIRUO6mJBBmE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=UyMlOTXBobHA/M2lD/ZursErYUsearXhGOumAdqiI/xjmBwVS0sGtwlWC/M18i4qA 7tH0zagyUKJrVZ7EVGogprDxblZ2pW9KohlaXliTvv9XFkgqhLfIQtfX72JV24jBmP BXdgMOWjWunO9WCVHY29Bg/2Gd39Z8senzMPWcVN3X/5zje3M9taQpmEFUAc+la384 wAu5yJ1V41kjb/UV5GXj64rvSb0wILOFMKW5FktowwKIpFPJQLqaO8SDEuAJUlielf 28oWC9nJGyQIw9t5ykbdepDiaiB4NDHHByrdjSdKuNqMLKwD6kaFMZwEFvSPpMqlwV oz4uCz7ueeUfw== From: Kalle Valo To: Wen Gong Cc: , Subject: Re: [PATCH v5 1/2] ath11k: add fallback board name without variant while searching board-2.bin References: <20211220064829.17557-1-quic_wgong@quicinc.com> <20211220064829.17557-2-quic_wgong@quicinc.com> Date: Thu, 10 Mar 2022 10:00:11 +0200 In-Reply-To: <20211220064829.17557-2-quic_wgong@quicinc.com> (Wen Gong's message of "Mon, 20 Dec 2021 01:48:28 -0500") Message-ID: <871qzas0dw.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Wen Gong writes: > Sometimes it has a variant value which read from DT or SMBIOS by > ath11k, and meanwhile it does not have the matched board name in > board-2.bin, then it will failed at boot up phase. > > Add fallback board name which removed variant value and search again > in board-2.bin when failed with variant and try to load the board > data again to increase boot up success rate. > > dmesg log after this patch: > [169547.248472] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262,variant=test' > [169547.248565] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 180324 > [169547.248568] ath11k_pci 0000:05:00.0: board name > [169547.248570] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1 > [169547.248571] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103, > [169547.248572] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor > [169547.248574] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem- > [169547.248575] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi- > [169547.248576] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo > [169547.248577] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262 > [169547.248578] ath11k_pci 0000:05:00.0: board name > [169547.248579] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1 > [169547.248581] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103, > [169547.248582] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor > [169547.248583] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem- > [169547.248584] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi- > [169547.248585] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo > [169547.248587] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266 > [169547.248588] ath11k_pci 0000:05:00.0: board name > [169547.248589] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1 > [169547.248590] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103, > [169547.248591] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor > [169547.248592] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem- > [169547.248594] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi- > [169547.248595] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 31 38 2c 71 6d 69 2d 62 chip-id=18,qmi-b > [169547.248596] ath11k_pci 0000:05:00.0: 00000060: 6f 61 72 64 2d 69 64 3d 32 36 36 oard-id=266 > [169547.248597] ath11k_pci 0000:05:00.0: failed to fetch board data for bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262,variant=test from ath11k/WCN6855/hw2.0/board-2.bin > [169547.248476] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262' > [169547.248634] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 180324 > [169547.248636] ath11k_pci 0000:05:00.0: board name > [169547.248637] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1 > [169547.248638] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103, > [169547.248639] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor > [169547.248641] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem- > [169547.248642] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi- > [169547.248643] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo > [169547.248645] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262 > [169547.248646] ath11k_pci 0000:05:00.0: boot found match for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262' > [169547.248647] ath11k_pci 0000:05:00.0: boot found board data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262' > [169547.248649] ath11k_pci 0000:05:00.0: using board api 2 > > Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 > > Signed-off-by: Wen Gong [...] > @@ -722,7 +734,7 @@ static int ath11k_core_fetch_board_data_api_n(struct ath11k_base *ab, > > out: > if (!bd->data || !bd->len) { > - ath11k_err(ab, > + ath11k_dbg(ab, ATH11K_DBG_BOOT, > "failed to fetch board data for %s from %s\n", > boardname, filepath); > ret = -ENODATA; This error message was useful as it made easy to find out what board data file we are missing. An example: https://bugzilla.kernel.org/show_bug.cgi?id=215586#c0 So I'm worried it will become more difficult if the message is changed to a debug message. But I don't know what's a good solution either, we shouldn't print an error message while we are searching for the board file and print it only after we could not find any. One idea I have was to print every boardname we tried to find or just print the first boardname, but don't know really what's the best. But to summarise, we need to think carefully how to handle the missing board file case. It's very common for users that a board file is missing in board-2.bin so the error message should be informative enough. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches