From patchwork Thu Aug 27 06:04:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11739993 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D092514F6 for ; Thu, 27 Aug 2020 06:06:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B8C9C2080C for ; Thu, 27 Aug 2020 06:06:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SSNJVMkE" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727049AbgH0GG3 (ORCPT ); Thu, 27 Aug 2020 02:06:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726157AbgH0GF6 (ORCPT ); Thu, 27 Aug 2020 02:05:58 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3533FC061249; Wed, 26 Aug 2020 23:05:57 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id w25so5039052ljo.12; Wed, 26 Aug 2020 23:05:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=38x/FHPCvUI6C1PMr+cgZ0iy8HiLtsEpmjxfqsfrl/Y=; b=SSNJVMkEHNvDX/DmCTbWERwWBdLLQgom+e0hE6G1ghYZCG1jR5qDYJdmZLXR2Knxgm SlKtBoFxp4Yem1DCeI05lMEIl+rIF3QI4COLd1uI2hswj5jFD6DdYxeQIZEYntRPAgVA USAG3gn0c52GL9A5V+sRgW2T3be7I7xJ8U4Ci5+l2Pdcx5jwgR9Kz+7FglwEQ35ciBW2 mijc2MBtPzzsxG47wryZ+3yvtQn68gCSoTj0Ge1JpKxsiltW1E+ysg6UqQwR0AwzZJGP q4PlyFIsPz35z8jFlzCjQNn8xg89biT17b7zGH9Y6hidUabt45xvLE2rC9nUroSWIW4a ZDyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=38x/FHPCvUI6C1PMr+cgZ0iy8HiLtsEpmjxfqsfrl/Y=; b=X7pXJgOT8xpCsZjUeOamynTLjGMyy4SwUPCtSOB9xVrOTIcOH/mFbN33Kn/AbBw2TL YxS7UXTfq+ShNmqTfVlGLQD+rgCsISnFkxnnEKPuQizI5TRNyTYMbMzeL/w5fZtR19Zq xdRJkwtFGsD8bh8nnJ1OeZvF2yZjvt+rimDDyLQCrm8ge1uuHfL+9FjRHh7eqYafa1P0 DJQ9qtS4EQycbYHMKJwxE3WxAKW8I6ThmiLPaFMYu9S+9EUvBQ6Y0zQlFHGuFWB7daFx wYMiyrosL1J9kWsUI3NzeACZKi3MlFdK7oDhBa3iLFKn40oNRGObYzZESRzo2zOtB7D6 7A+w== X-Gm-Message-State: AOAM530HJArM6YLIgPDKbd0Yd3u/GYb0JKefB0LrX69lPpbud60qDrln uTIbTUsQicp052npxX+gZEs= X-Google-Smtp-Source: ABdhPJwFLyLpiDrInngiKjDlMQnbzdI8mZJVC9hfbrCATktdnCPtvDaaTTWZrQGRFBpJbEYV7pDmHg== X-Received: by 2002:a05:651c:152:: with SMTP id c18mr8010629ljd.15.1598508356372; Wed, 26 Aug 2020 23:05:56 -0700 (PDT) Received: from localhost.localdomain (109-252-170-211.dynamic.spd-mgts.ru. [109.252.170.211]) by smtp.gmail.com with ESMTPSA id z7sm255295lfc.59.2020.08.26.23.05.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 23:05:55 -0700 (PDT) From: Dmitry Osipenko To: Arend van Spriel , Franky Lin , Hante Meuleman , Chi-Hsien Lin , Wright Feng , Kalle Valo Cc: linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, netdev@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/4] brcmfmac: increase F2 watermark for BCM4329 Date: Thu, 27 Aug 2020 09:04:38 +0300 Message-Id: <20200827060441.15487-2-digetx@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200827060441.15487-1-digetx@gmail.com> References: <20200827060441.15487-1-digetx@gmail.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This patch fixes SDHCI CRC errors during of RX throughput testing on BCM4329 chip if SDIO BUS is clocked above 25MHz. In particular the checksum problem is observed on NVIDIA Tegra20 SoCs. The good watermark value is borrowed from downstream BCMDHD driver and it's matching to the value that is already used for the BCM4339 chip, hence let's re-use it for BCM4329. Signed-off-by: Dmitry Osipenko Reviewed-by: Arend van Spriel --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index 3c07d1bbe1c6..ac3ee93a2378 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -4278,6 +4278,7 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err, brcmf_sdiod_writeb(sdiod, SBSDIO_FUNC1_MESBUSYCTRL, CY_43012_MESBUSYCTRL, &err); break; + case SDIO_DEVICE_ID_BROADCOM_4329: case SDIO_DEVICE_ID_BROADCOM_4339: brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes for 4339\n", CY_4339_F2_WATERMARK); From patchwork Thu Aug 27 06:04:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11739989 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6154C14F6 for ; Thu, 27 Aug 2020 06:06:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4860220786 for ; Thu, 27 Aug 2020 06:06:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="B30mTGxX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727807AbgH0GGU (ORCPT ); Thu, 27 Aug 2020 02:06:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727041AbgH0GF7 (ORCPT ); Thu, 27 Aug 2020 02:05:59 -0400 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA0E8C061247; Wed, 26 Aug 2020 23:05:58 -0700 (PDT) Received: by mail-lf1-x142.google.com with SMTP id k10so2286152lfm.5; Wed, 26 Aug 2020 23:05:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TyfqwcOqzI+LTCqOQsnVyQ4MKkXCO8VQFL1cTjyFH+c=; b=B30mTGxXAKNYGRQstG6YWQsAmtZNP5pSXIl9+9PQRuXlC6NlfBRq9rZbMfNllycRnf ExzR9IKBBRZ6JLycWvVYHsrrLIAQ45RSilxX7htvD1bwoSEecwpMQv/EHO/dlWjikyrF Bb5eRAZQ8gwB6UJyZ2SIjgdq/81hBWliDdjdRECF/cme60cmaXHHRyWJ3jnPSwJnxyrB EyCFym+c8dViDd4EdsPHUlFd0+AyTkJDCquy956GGE3oPaisbE6jWCXmKBfovrzdLvt5 K2DQCcpzOxIyZJu29J/E4iBMijX/wASVYTrqVL1s2Sdn508vLkjbsnQGcgC0B0Fxy8Pm tuYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TyfqwcOqzI+LTCqOQsnVyQ4MKkXCO8VQFL1cTjyFH+c=; b=Ro1lvOeuLZFq/XOXekrI89+fg2WgM7xpBO8Lagx+dYWg0Xh55GYySpHnfyHcaQ+ywM hdPJliAM6FGQIno1V7cvaTX0GQjqEuTylNK3nCBGszKoKMbBZtCtue+LE6+s21O6uB9s 2sE2LmNFjlgSBzuQbO+xvxiAH9ZxbMEKx4Cmt9KeXpDIr7bwcTk7WB79L/XwakZfkqqR cqoNYu7LbsEprBsv5nodu8pLGESR/V30H6h4zCnRLwiYjoabkrQlSpm70BcR46I5dbZ2 k9qXkZqaCeThb4kzo7SbEuDB9Tayo+g9RSWMWoIfHibWfz2RBlR83UVqKSZ95KJsbolS EqGA== X-Gm-Message-State: AOAM533aAtFA6VoXrELV4sBpV3ZXbS4i1DZBYqRAApHB0UDRD2VQTKf7 o+Y9raOO2/QdQmyWOOVGMMEe/d1TdeQ= X-Google-Smtp-Source: ABdhPJzSBA/pFB2/PN21Swo9ACb5wJXp06RjoytEa+wAUxh79r1KkvtyljqbTFP1ehYkms+fLBp5WQ== X-Received: by 2002:a05:6512:1055:: with SMTP id c21mr9041396lfb.84.1598508357307; Wed, 26 Aug 2020 23:05:57 -0700 (PDT) Received: from localhost.localdomain (109-252-170-211.dynamic.spd-mgts.ru. [109.252.170.211]) by smtp.gmail.com with ESMTPSA id z7sm255295lfc.59.2020.08.26.23.05.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 23:05:56 -0700 (PDT) From: Dmitry Osipenko To: Arend van Spriel , Franky Lin , Hante Meuleman , Chi-Hsien Lin , Wright Feng , Kalle Valo Cc: linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, netdev@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/4] brcmfmac: drop unnecessary "fallthrough" comments Date: Thu, 27 Aug 2020 09:04:39 +0300 Message-Id: <20200827060441.15487-3-digetx@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200827060441.15487-1-digetx@gmail.com> References: <20200827060441.15487-1-digetx@gmail.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org There is no need to insert the "fallthrough" comment if there is nothing in-between of case switches. Hence let's remove the unnecessary comments in order to make code cleaner a tad. Signed-off-by: Dmitry Osipenko --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 2 -- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c index 1a7ab49295aa..0dc4de2fa9f6 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c @@ -916,9 +916,7 @@ int brcmf_sdiod_probe(struct brcmf_sdio_dev *sdiodev) f2_blksz = SDIO_4373_FUNC2_BLOCKSIZE; break; case SDIO_DEVICE_ID_BROADCOM_4359: - /* fallthrough */ case SDIO_DEVICE_ID_BROADCOM_4354: - /* fallthrough */ case SDIO_DEVICE_ID_BROADCOM_4356: f2_blksz = SDIO_435X_FUNC2_BLOCKSIZE; break; diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index ac3ee93a2378..b16944a898f9 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -4306,9 +4306,7 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err, CY_43455_MESBUSYCTRL, &err); break; case SDIO_DEVICE_ID_BROADCOM_4359: - /* fallthrough */ case SDIO_DEVICE_ID_BROADCOM_4354: - /* fallthrough */ case SDIO_DEVICE_ID_BROADCOM_4356: brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes\n", CY_435X_F2_WATERMARK); From patchwork Thu Aug 27 06:04:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11739985 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D279F14F6 for ; Thu, 27 Aug 2020 06:06:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AF7202080C for ; Thu, 27 Aug 2020 06:06:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LAQCKf7V" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727107AbgH0GGB (ORCPT ); Thu, 27 Aug 2020 02:06:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727077AbgH0GGA (ORCPT ); Thu, 27 Aug 2020 02:06:00 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7655C06124F; Wed, 26 Aug 2020 23:05:59 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id f26so5043834ljc.8; Wed, 26 Aug 2020 23:05:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=85fBH067dHvKQNq6ek+W6lpUInMb+ZStwZLTCqTuQ3g=; b=LAQCKf7V+H8Hfnb7BZybXxxgLvGGrihgB+KAUY1Tj+kA0EoV35K6aUEb5WXr23Q30Y hQtw6kqLqLfS0UMyLBIXjMRb6LFAC0B6K5YCTROdl24fwAg/MCo3YYfLvyxVRB7IB+7J wANPAygVIyQKATVHjVt3N8pk8TGRgRy3zhmjqvP8lDFVJwf4t4TyKxFoOKZnLzynj/z7 B7bKlnDJShUYmmO2QUG4+xGhYSflF8aCg1UvernFWssBdoZoZ2fye3j7rtr7VbvVaqgB eYdTf/1z1wRP0v4UEiR6WOOEwvg/m1OyL9nDEeG+00C+SePaDOODBSGrCt0FHpuPTzFR NZlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=85fBH067dHvKQNq6ek+W6lpUInMb+ZStwZLTCqTuQ3g=; b=nhZu2+0V97IFijj4d8vdptMZnX3sp2WIrV8OCXYFECW7ykgsLE1WI0OiER9kilKgpm 0+C5vrVnztpsU4v7loTyVKJf9QMvKoE8PMtHFihK9s+7ohbMjNVFEsboinntQunMpFd6 yP7m9gGEiwTKjn1jWgbEPNP0c/DzGkFhuntaC4yKAMx1caoL7+0NrTVJ0bSAotZeA3UE 2yEqDf+T+OKZ33wbthjTNHaXlM7II2896CFZc98OEcoFyv5PYWPjXLJtEjQDjs3U1Wi0 pmx7BYGi/eI7TolE/MbRrZ5cDEsXURnaHA9RdIW2/dl9gU3ZeBUTYaVSuJc0hXV5O+yg /gxQ== X-Gm-Message-State: AOAM531Iafru935YWn7mcmkgFi8+KfSnura/L0G61XkSvgHKSyn4nbw8 hHLT6UMN1gialDSQdhs2PXE= X-Google-Smtp-Source: ABdhPJwoOgvB7reSaDGYFu+hqpx2fpi2Z8iky2pgXDkwAHSZ7nlUuSO623t8xrL9U8X11t6Q7cSmdg== X-Received: by 2002:a2e:9990:: with SMTP id w16mr8244686lji.156.1598508358235; Wed, 26 Aug 2020 23:05:58 -0700 (PDT) Received: from localhost.localdomain (109-252-170-211.dynamic.spd-mgts.ru. [109.252.170.211]) by smtp.gmail.com with ESMTPSA id z7sm255295lfc.59.2020.08.26.23.05.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 23:05:57 -0700 (PDT) From: Dmitry Osipenko To: Arend van Spriel , Franky Lin , Hante Meuleman , Chi-Hsien Lin , Wright Feng , Kalle Valo Cc: linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, netdev@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/4] brcmfmac: drop chip id from debug messages Date: Thu, 27 Aug 2020 09:04:40 +0300 Message-Id: <20200827060441.15487-4-digetx@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200827060441.15487-1-digetx@gmail.com> References: <20200827060441.15487-1-digetx@gmail.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The chip ID was already printed out at the time when debug message about the changed F2 watermark is printed, hence let's drop the unnecessary part of the debug messages. This cleans code a tad and also allows to re-use the F2 watermark debug messages by multiple chips. Suggested-by: Arend van Spriel Signed-off-by: Dmitry Osipenko --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index b16944a898f9..d4989e0cd7be 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -4280,7 +4280,7 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err, break; case SDIO_DEVICE_ID_BROADCOM_4329: case SDIO_DEVICE_ID_BROADCOM_4339: - brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes for 4339\n", + brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes\n", CY_4339_F2_WATERMARK); brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, CY_4339_F2_WATERMARK, &err); @@ -4293,7 +4293,7 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err, CY_4339_MESBUSYCTRL, &err); break; case SDIO_DEVICE_ID_BROADCOM_43455: - brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes for 43455\n", + brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes\n", CY_43455_F2_WATERMARK); brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, CY_43455_F2_WATERMARK, &err); From patchwork Thu Aug 27 06:04:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11739987 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 839CA14F6 for ; Thu, 27 Aug 2020 06:06:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6958820786 for ; Thu, 27 Aug 2020 06:06:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qLQ1i7wD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727793AbgH0GGC (ORCPT ); Thu, 27 Aug 2020 02:06:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727099AbgH0GGB (ORCPT ); Thu, 27 Aug 2020 02:06:01 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B67E5C061247; Wed, 26 Aug 2020 23:06:00 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id i10so5088547ljn.2; Wed, 26 Aug 2020 23:06:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WKk6KWPNkMHUCww/FbErLxUYYQtEUh3n/PTtmJB/IIQ=; b=qLQ1i7wDv9Q3Xaxm3HkxgYB7iVc8sv2O42p4VD+k9wlAuWC3GcWW1tNXitXj3Z/Z8J LD4FG7R+IhHjNW6ryE+cQg5ynJQa1Ptl3jDD2TGOGmu4TFD7wrDI9SxFi1pN6g42aMtO LJKXRFRdeXciiZYHQKqPZxeh8ankvU95AW/bznMKHir8JNe0moVMAK+LWaSP17dxyp7n IsJUpueYCn42JrF000SSmEXeXlkO9Yr5A1Y4Jdnq5WgIA7VULEy8fA2IsHcW/qMbqgY/ 7zzLR8JSNoSGXv/p+1Vtiv6mWbynRcPPOY2HfGkX4D1GwFx62b4zp2oLkWUrcvAxokDC NLKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WKk6KWPNkMHUCww/FbErLxUYYQtEUh3n/PTtmJB/IIQ=; b=V2ahx8Gu879552bFOuxvWm4wrCLeeFte0kQQCjqi3Ft1pZdX3aeW2N7fYYX/h+PABH mD6jFg9lfmaZQMIxvnHXbwCOlS/sERxJWeayc7KXP1J8atTlWuLJ7D+Cgiv22GrrG521 Jf/yZDHRZPQPt4BWF3bxaxaQjcFqVrH1e020NNvLpTl8gz0yabP7kiIqA1+QfnnQ9qwz aCHG5zBvkRNqdpRYiZPjAdOaraFDRZ+BTUNcH5tAWEENNzC7jji0ERw+fz8weYjvGsvS /BSm68R22E3JJx4C9CwrvNdshD2VJ+aBxcJXj7bYB8zeFNmIXBRqMJ7kib3FhIVPZwHF lJEA== X-Gm-Message-State: AOAM532oDTV2M5VCldaH5MRCVhxUYeteZwygWl4fTj+9qSgHY/jEoXXE mkUJ7JObJ2geVcaXeiu3UrY= X-Google-Smtp-Source: ABdhPJzrTQlLzdl6fvs+KJ8nM6o4Pq1n7ukkS0FV/jYFLwOfmV5xlKCDf2GJF4pBmm4Evv0Fhq0aXQ== X-Received: by 2002:a2e:98d5:: with SMTP id s21mr8116414ljj.59.1598508359172; Wed, 26 Aug 2020 23:05:59 -0700 (PDT) Received: from localhost.localdomain (109-252-170-211.dynamic.spd-mgts.ru. [109.252.170.211]) by smtp.gmail.com with ESMTPSA id z7sm255295lfc.59.2020.08.26.23.05.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 23:05:58 -0700 (PDT) From: Dmitry Osipenko To: Arend van Spriel , Franky Lin , Hante Meuleman , Chi-Hsien Lin , Wright Feng , Kalle Valo Cc: linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, netdev@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 4/4] brcmfmac: set F2 SDIO block size to 128 bytes for BCM4329 Date: Thu, 27 Aug 2020 09:04:41 +0300 Message-Id: <20200827060441.15487-5-digetx@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200827060441.15487-1-digetx@gmail.com> References: <20200827060441.15487-1-digetx@gmail.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Setting F2 block size to 128 bytes for BCM4329 allows to significantly improve RX throughput on NVIDIA Tegra20. Before this change the throughput was capped to 30 Mbit/s on Tegra, now throughput is at 40 Mbit/s, which is a maximum throughput for the BCM4329 chip. The F2 block size is borrowed from the downstream BCMDHD driver. The comment in the BCMDHD driver says that 128B improves throughput and turns out that it works for the brcmfmac as well. Signed-off-by: Dmitry Osipenko --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c index 0dc4de2fa9f6..318bd00bf94f 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c @@ -45,6 +45,7 @@ #define SDIO_FUNC2_BLOCKSIZE 512 #define SDIO_4373_FUNC2_BLOCKSIZE 256 #define SDIO_435X_FUNC2_BLOCKSIZE 256 +#define SDIO_4329_FUNC2_BLOCKSIZE 128 /* Maximum milliseconds to wait for F2 to come up */ #define SDIO_WAIT_F2RDY 3000 @@ -920,6 +921,9 @@ int brcmf_sdiod_probe(struct brcmf_sdio_dev *sdiodev) case SDIO_DEVICE_ID_BROADCOM_4356: f2_blksz = SDIO_435X_FUNC2_BLOCKSIZE; break; + case SDIO_DEVICE_ID_BROADCOM_4329: + f2_blksz = SDIO_4329_FUNC2_BLOCKSIZE; + break; default: break; }