From patchwork Mon Jan 9 09:50:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arend van Spriel X-Patchwork-Id: 13093222 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78F05C5479D for ; Mon, 9 Jan 2023 09:52:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236921AbjAIJwG (ORCPT ); Mon, 9 Jan 2023 04:52:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236907AbjAIJvg (ORCPT ); Mon, 9 Jan 2023 04:51:36 -0500 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F423FF7 for ; Mon, 9 Jan 2023 01:50:55 -0800 (PST) Received: by mail-wm1-x32e.google.com with SMTP id m3so5847193wmq.0 for ; Mon, 09 Jan 2023 01:50:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=tXxfScEqqdrp8q4bMgoY6opUa2MsZSzFn59crKdioYs=; b=Jns9ct5wbNpzMAKsJN1vWmPRyyRVQA1jSDma4wsXgHvERc3GFfV3DoTRXYOKefkh67 WTrraLicFFFvuu9mkqcVelhqpCX7CXnydZV976ecJ25P7WEcXimjSSgGSNVcYeHYpZXs YDYQaHLeZhCaBxb8Q2w0yyP8psVvFxxq0mpuo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=tXxfScEqqdrp8q4bMgoY6opUa2MsZSzFn59crKdioYs=; b=bGbVnDu0764rj4v+CUKwsZdrNiSYUwraKJwef6UGV7j01s8UNfTfrZ9M9CgwZCL0F5 eGUDSmQoOH6WcxVX/CRY+P3lFQpcCRlF4V0WqM9qF/flxciLBkxAth8Gsu7Deh/FjTuy djoYXTL9TsbkqNtSYA14KXC0OKs6D+Dvbsm2jbG4e6eqsSFoezq2Ea56c3VD9V9fc5W7 4WLu/9Ub8MCgXyC1EgGvxHXXnGYRvmBkljPmvGWlNrfkNisfG8I+OXZD2UiSD3e7u9SH b/3A9p1zfFNp7n7nksD00EqA+4T3t0JVKNkgm+dx80V+K7kt9e2o5bS20Xq0jhIgqczN Zzjg== X-Gm-Message-State: AFqh2kp6VeN37lRqaZoj9RUpoPqVQI3zGnuXvO7O0p5byL1iGuTYUoWU oQJ1dBlTTi8gTSE84GGc/+NaOQ== X-Google-Smtp-Source: AMrXdXvgsGZp4CZqaCuUBn/YvE5N1du1vGvzU9z9iKMUieDts7mPujOMM8E+NazuWyMOQXG2iBCe9Q== X-Received: by 2002:a05:600c:b99:b0:3d9:edd9:20ea with SMTP id fl25-20020a05600c0b9900b003d9edd920eamr2833897wmb.38.1673257853895; Mon, 09 Jan 2023 01:50:53 -0800 (PST) Received: from bld-bun-02.bun.broadcom.com ([192.19.148.250]) by smtp.gmail.com with ESMTPSA id i8-20020a05600c354800b003cf894dbc4fsm11480179wmq.25.2023.01.09.01.50.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jan 2023 01:50:53 -0800 (PST) From: Arend van Spriel To: Kalle Valo Cc: linux-wireless@vger.kernel.org, Arend van Spriel , chainofflowers Subject: [PATCH for-6.2] wifi: brcmfmac: fix regression for Broadcom PCIe wifi devices Date: Mon, 9 Jan 2023 10:50:20 +0100 Message-Id: <20230109095020.412475-1-arend.vanspriel@broadcom.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org A sanity check was introduced by [1] considering maximum flowrings above 256 as insane and effectively aborting the device probe. This resulted in regression for number of users and it is also tracked in bugzilla [2]. [1] https://lore.kernel.org/all/20220929031001.9962-3-ian.lin@infineon.com/ [2] https://bugzilla.kernel.org/show_bug.cgi?id=216894 Fixes: 2aca4f3734bd ("brcmfmac: return error when getting invalid max_flowrings from dongle") Reported-by: chainofflowers Signed-off-by: Arend van Spriel Reported-by: Christian Marillat --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c index ae57a9a3ab05..b67f6d0810b6 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c @@ -1228,7 +1228,7 @@ static int brcmf_pcie_init_ringbuffers(struct brcmf_pciedev_info *devinfo) BRCMF_NROF_H2D_COMMON_MSGRINGS; max_completionrings = BRCMF_NROF_D2H_COMMON_MSGRINGS; } - if (max_flowrings > 256) { + if (max_flowrings > 512) { brcmf_err(bus, "invalid max_flowrings(%d)\n", max_flowrings); return -EIO; }