Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp900506rwd; Thu, 8 Jun 2023 09:10:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6o2Vo8XZ3dC2MbX2e4wx1DQvXeSXKaPRrgh1m+FVVRa3+YavxGMNsIqGgNb0r+KfwFfEqg X-Received: by 2002:a05:6a20:8f27:b0:10b:646f:d9f1 with SMTP id b39-20020a056a208f2700b0010b646fd9f1mr5789956pzk.5.1686240644970; Thu, 08 Jun 2023 09:10:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686240644; cv=none; d=google.com; s=arc-20160816; b=YsbsznoGBBO7b8tADGeIDSvfY8CLFCSb54tzX/lWok1I6/5rnu9fLETegLB41pKrTl epO/15HeaoZRazpo5x7tGEn6pJ8W787/G/rIQvATw0gYUl8ijg4T1DPDkznBH4JlDWZP 7+tJwv0mBi6VfYX/6gTGSFERf0qXN/IRi0ZNrRa4KSiiSbyBmtUmJXUJWhbCOTwSvV35 KCLHPn7VoRk/GozikO9lKa2T2DiXEAAJZIJx5tcVYDP3rB5dWWUyuCLkw+w1Bu7w/xAf 9872fE9nfsayc0jGkWr1CXGZ7AIFfuK935f2ri9K7+X7Z4pyDWT5rdZTT3DiNuC/kNgZ RVkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dkim-signature; bh=nFxlA76TUArc3YZ3MR36qFMOun2WQaWD1hWpMf2DGrA=; b=vwIKiTWS7/sNRX7njflkujI7T8O0UR1R3pVAG68822MwD8ifITf4D/trJkeT4jpMXn xIJj3nLQ5O0cInGlkWp19QyH/XyU+/+IVcCokFSKrDag61vZIjJgTvGsilE6Q0bLcnqj B/5P6kvnXhaIpXtjM4Ej+3hFwpzQ9wRmTKP8x/OffqPlvshq12lkO+xNVoNdRvxs2lAp Wbhv6e2pvCve5jZOH2CiWIAJ4oVY74idDArYOpfl4TgX7b4v9BFHdC1pSu0DpGvQHwd0 Z1xe1+akAIN8aeQrdxyDHazZ83sF6wvwJeF4YpekHtjE2gHEk/rW3t3piA86NaZOIS8m 3Kqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=R5QOb8eK; 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 24-20020a631258000000b0050726756edesi1103001pgs.76.2023.06.08.09.10.27; Thu, 08 Jun 2023 09:10:44 -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=@kernel.org header.s=k20201202 header.b=R5QOb8eK; 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 S235748AbjFHQAo (ORCPT + 61 others); Thu, 8 Jun 2023 12:00:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236694AbjFHQAd (ORCPT ); Thu, 8 Jun 2023 12:00:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 727992D4B for ; Thu, 8 Jun 2023 09:00:10 -0700 (PDT) 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 E9A1C64E9D for ; Thu, 8 Jun 2023 16:00:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6DD76C433EF; Thu, 8 Jun 2023 16:00:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686240009; bh=8CHMakvzh7d7SG5fF00PAkQqLlMVw6ll1ojFXaqZANg=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=R5QOb8eKfDNhfTol7OzFf0RnTn2eysKrFhZyn4btF2of42Bih6EWxH8SiB+/eOUE1 3DIJcmTXUOofoeDhSxk3Qp4SeD1FUD9MYPIGs6hZBNXBkrHw8/yI55O3or5vsVVAi8 1WfMAhLpQKkBKhD71lMZTKDLKY1edJg0DuiqXhm1+umemnKmalHlh8MxTR2G2j3Nqu YQS2dC3k4RPVKWpu8nUapBaczCbToxSSrEHDf/jhk2X96SnCtr36L7j0QBlun3zSms rqW1ECvjYGLx0TkwkoT2WLFf5pS4NwAAjGUPlEnVVOKkh8mpWOlttCzU5scrBFRbTt nmZaibRcO3NOw== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [v3] wifi: brcmfmac: Detect corner error case earlier with log From: Kalle Valo In-Reply-To: <20230603060021.57225-1-nealsid@gmail.com> References: <20230603060021.57225-1-nealsid@gmail.com> To: Neal Sidhwaney Cc: linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, Neal Sidhwaney User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.7.3 Message-ID: <168624000624.5828.4050513344928794764.kvalo@kernel.org> Date: Thu, 8 Jun 2023 16:00:08 +0000 (UTC) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 Neal Sidhwaney wrote: > In brcmf_chip_recognition(), the return value from an MMIO read is > interpreted as various fields without checking if it failed, which is > harmless today, as the interpreted fields are checked for validity a > few lines below. However, in corner cases (on my MacbookPro 14,1, > sometimes after waking from sleep or soft reboot), when this happens, > it causes the logging to be misleading, because the message indicates > an unsupported chip type ("brcmfmac: brcmf_chip_recognition: chip > backplane type 15 is not supported"). This patch detects this case > slightly earlier and logs an appropriate message, with the same return > result as is the case today. > > Signed-off-by: Neal Sidhwaney Patch applied to wireless-next.git, thanks. f8f912bf69a0 wifi: brcmfmac: Detect corner error case earlier with log -- https://patchwork.kernel.org/project/linux-wireless/patch/20230603060021.57225-1-nealsid@gmail.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches