From patchwork Thu May 21 03:48:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 11562213 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 1A6C61392 for ; Thu, 21 May 2020 03:48:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F25CF20748 for ; Thu, 21 May 2020 03:48:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cypress.com header.i=@cypress.com header.b="ancX1q05" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728142AbgEUDs4 (ORCPT ); Wed, 20 May 2020 23:48:56 -0400 Received: from mail-dm6nam10on2136.outbound.protection.outlook.com ([40.107.93.136]:9153 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728015AbgEUDsz (ORCPT ); Wed, 20 May 2020 23:48:55 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HP/uAR3eQInCm+0/VnAIKTmYUnqaQO2JsTjE7sBicd8ZmtO+KdzLZysM+A0Wefxzt2SGNdDbzJa/KX0EdxyITxLORT/zVhmqjUM28KFwPsMJYF3UnWzLi7lpsguLj1nOQHp3lTONpmE1voItMwRnzxAFRrJ7fpoH5tkjsMfust0IgrFTxMdNP1ykCOEmkBBjsUD4XGy1VAMdD9ar+7Gl5RscEIjyhNIdiFKIbBp7lm+SR858XoND7h5TOTP4E2uZMvui3EILmly3f/WRBTryd/GouEGPwyjn+T5w3h9PI/NbEhLmipI/vPjXiZ+zv2jpTGzd1wImxvZvlyimUn6YlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/gUzyH6QizgpGUFTU2B8t3Y1txxfAD1IRfn/nYuT7ho=; b=NechDzCSWmFXF25YaQf4UgF9RlnrJ0j9vYidg0jt0VqxXztAYmVwB8n0b4W0/ycDmMCXd/4EHQ4PpPocnoaHnzqaI59ioU6S8x2Xi6Pbl7ZWdvh5ajImparZiFQgugLRVZ5kUv/YOqYl1jl33giYUiCHoHyEZoSR8T3mXeubfR8ftftSz1PEXu+qlXJw3/KqTd97jlhCfuML+yes6F3MD+U81z95/sKH+2RHv8n/tACrZN0THTh5DGFcRXgj+yH2tQBcw5GIGZDwSmhI2QHXIGlWd4itRrGDjW3ISQ76ZuA/pPo0cMI9at0L01rvXZiazSmZ/8mnmf8dDtNI6tVcVg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cypress.com; dmarc=pass action=none header.from=cypress.com; dkim=pass header.d=cypress.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cypress.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/gUzyH6QizgpGUFTU2B8t3Y1txxfAD1IRfn/nYuT7ho=; b=ancX1q05OY2IYPxk3PsRXu3teSTJlXw9L8Qx+U2n2ZPm5MAF0vCmkQTcPKJIZevO79wHVPVpOZ1Bv2By1+pU/0wDOwlm57pUB9dYSYBtYbVsV4RUYV5BuA1gdPD33nwe4JSGDe+qvVEmQjCIzBc5Uo5h7b2zOmUWW9USJmer+7c= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=cypress.com; Received: from BYAPR06MB4901.namprd06.prod.outlook.com (2603:10b6:a03:7a::30) by BYAPR06MB4024.namprd06.prod.outlook.com (2603:10b6:a02:81::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23; Thu, 21 May 2020 03:48:48 +0000 Received: from BYAPR06MB4901.namprd06.prod.outlook.com ([fe80::b972:c25d:c8fc:fc0e]) by BYAPR06MB4901.namprd06.prod.outlook.com ([fe80::b972:c25d:c8fc:fc0e%7]) with mapi id 15.20.3021.020; Thu, 21 May 2020 03:48:48 +0000 From: Chi-Hsien Lin To: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list@broadcom.com, brcm80211-dev-list@cypress.com, Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Chi-hsien Lin Subject: [PATCH 1/5] brcmfmac: set F2 blocksize for 4373 Date: Wed, 20 May 2020 22:48:34 -0500 Message-Id: <20200521034838.57371-2-chi-hsien.lin@cypress.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200521034838.57371-1-chi-hsien.lin@cypress.com> References: <20200521034838.57371-1-chi-hsien.lin@cypress.com> X-ClientProxiedBy: BY5PR20CA0021.namprd20.prod.outlook.com (2603:10b6:a03:1f4::34) To BYAPR06MB4901.namprd06.prod.outlook.com (2603:10b6:a03:7a::30) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from aremote02.aus.cypress.com (12.110.209.245) by BY5PR20CA0021.namprd20.prod.outlook.com (2603:10b6:a03:1f4::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23 via Frontend Transport; Thu, 21 May 2020 03:48:47 +0000 X-Mailer: git-send-email 2.25.0 X-Originating-IP: [12.110.209.245] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f9625517-394f-45a7-bd82-08d7fd39de47 X-MS-TrafficTypeDiagnostic: BYAPR06MB4024: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-Forefront-PRVS: 041032FF37 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fh6GRWwK3RDk38NTVP4zRPFoCLAGNRiwtzVPeMfED8ou/YH06ucW5/4EbH0HSaKPZ/ow+mVhi48mViDZY+dEjRzIP3Pef4LCbBH4mQnTtVipRc8tKY/2zC+tpr+gvZo83JW9e0NNteByUb7q7hWzfv5ZpF3ZLH3z0NtUx9VWUzuJVWJMc8+oeQNlB7PYOPnbF2JZWisKY5sJu//WiwxK2/HXK7iIXOuSMf3XhYk6wil3Tr3pGkohQW/Gg08s9dvhS4a7howmc0RBYfYIDFbQ/mwpJ5H/0WHBwF3EvmZvNHdBbv2NxTiOulHoi/wNqd14 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR06MB4901.namprd06.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(376002)(136003)(346002)(39860400002)(366004)(396003)(26005)(6666004)(107886003)(7696005)(1076003)(52116002)(86362001)(16526019)(956004)(5660300002)(66476007)(66556008)(66946007)(54906003)(2616005)(6486002)(316002)(36756003)(6916009)(8936002)(4326008)(478600001)(8676002)(186003)(2906002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: p3IqEgklNTjaKDnsaXRozncJkSWvDO5J4xc9YtPyZ1Nab3oLFa1Z4pAg41hR8OOU1zRO06F/GOK5DZHtiAIKswOgagY3lXF0tTYfOsqXCJxA01O54Snppa+nLldEZUf/cZ93ColDR3WT7hGIO5bKGbSHWuLMng+dyFSzycJvBydCHbmZ3Qj2EtzO0DytPDgphsJM4djSOGu7WGfG+gcdlHywMmEPoYC9reOBsQT/35dKydaiRdTTroL4ky2pP+ccITtIsg9myAc+SFIVD08QuphU8KCXtYb7oaoailvAhVajb2zb7viXlmZE39a2pLxFa2VZC+Ctr9tJjEuKalgIyZsWQCqW3psTiX8LbBMnoy06rwwF4RIXGTHszgFOd3hCLoMuTjt9NS4Ic3K+gPDp2Lq6xCMxZBZO3WFRqVb3sfBHfi+TFuQEunX28n8Ynzn9yj35eWxdzw8ioVIqkEU6PPKOLkWM2NHnbEL3oA7QY4LrWBXwgG8RmkMEidtzA8W8 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: f9625517-394f-45a7-bd82-08d7fd39de47 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2020 03:48:48.5708 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: kUa+c6Xo4r7wkhSz0SAf8JGbhU2xNyWJbzKj+pSn9s7/ErKYF2sq+Plt4p2saUAZgOwEypat+Jqpsq3l54zjBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR06MB4024 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Wright Feng Set F2 blocksize to 256 bytes for 4373. It fixes DMA error while having UDP bi-directional traffic. Also use a defined F1 MesBusyCtrl value. Signed-off-by: Wright Feng Signed-off-by: Chi-hsien Lin --- .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 14 +++++++++++++- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 4 ++-- 2 files changed, 15 insertions(+), 3 deletions(-) -- 2.25.0 This message and any attachments may contain confidential information from Cypress or its subsidiaries. If it has been received in error, please advise the sender and immediately delete this message. diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c index 22a17ae09e94..bb3196cba683 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c @@ -43,6 +43,7 @@ #define SDIO_FUNC1_BLOCKSIZE 64 #define SDIO_FUNC2_BLOCKSIZE 512 +#define SDIO_4373_FUNC2_BLOCKSIZE 256 #define SDIO_4359_FUNC2_BLOCKSIZE 256 /* Maximum milliseconds to wait for F2 to come up */ #define SDIO_WAIT_F2RDY 3000 @@ -910,13 +911,24 @@ static int brcmf_sdiod_probe(struct brcmf_sdio_dev *sdiodev) sdio_release_host(sdiodev->func1); goto out; } - if (sdiodev->func2->device == SDIO_DEVICE_ID_BROADCOM_4359) + switch (sdiodev->func2->device) { + case SDIO_DEVICE_ID_CYPRESS_4373: + f2_blksz = SDIO_4373_FUNC2_BLOCKSIZE; + break; + case SDIO_DEVICE_ID_BROADCOM_4359: f2_blksz = SDIO_4359_FUNC2_BLOCKSIZE; + break; + default: + break; + } + ret = sdio_set_block_size(sdiodev->func2, f2_blksz); if (ret) { brcmf_err("Failed to set F2 blocksize\n"); sdio_release_host(sdiodev->func1); goto out; + } else { + brcmf_dbg(SDIO, "set F2 blocksize to %d\n", f2_blksz); } /* increase F2 timeout */ diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index ce6f15284277..dce22cd2279d 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -41,6 +41,7 @@ /* watermark expressed in number of words */ #define DEFAULT_F2_WATERMARK 0x8 #define CY_4373_F2_WATERMARK 0x40 +#define CY_4373_F1_MESBUSYCTRL (CY_4373_F2_WATERMARK | SBSDIO_MESBUSYCTRL_ENAB) #define CY_43012_F2_WATERMARK 0x60 #define CY_4359_F2_WATERMARK 0x40 #define CY_4359_F1_MESBUSYCTRL (CY_4359_F2_WATERMARK | SBSDIO_MESBUSYCTRL_ENAB) @@ -4195,8 +4196,7 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err, brcmf_sdiod_writeb(sdiod, SBSDIO_DEVICE_CTL, devctl, &err); brcmf_sdiod_writeb(sdiod, SBSDIO_FUNC1_MESBUSYCTRL, - CY_4373_F2_WATERMARK | - SBSDIO_MESBUSYCTRL_ENAB, &err); + CY_4373_F1_MESBUSYCTRL, &err); break; case SDIO_DEVICE_ID_CYPRESS_43012: brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes\n", From patchwork Thu May 21 03:48:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 11562215 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 82CA4138A for ; Thu, 21 May 2020 03:48:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 654F320738 for ; Thu, 21 May 2020 03:48:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cypress.com header.i=@cypress.com header.b="bmU+bleZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728165AbgEUDs5 (ORCPT ); Wed, 20 May 2020 23:48:57 -0400 Received: from mail-dm6nam10on2136.outbound.protection.outlook.com ([40.107.93.136]:9153 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727998AbgEUDs5 (ORCPT ); Wed, 20 May 2020 23:48:57 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KgfxmJ+2EPKPDoUySNoyi4crzoDRPkxTo4x4rllkHUDWGtrU6jv55vocfitMSgsc/9MuY3Cp3YJ6SvMoGjXMmgubOOhpIKwHTr2C952henvqldN56zej9DotgiDMl297XhKzZy2lJqCanhnwibXB2rrctj1WVVIxPM19at5GrQGghlu9W3To78G99pBOM6UijJfb70y9U5xjoPp65XScvIbEv/7Ji3fSFcL8CPiEkwPLzcSec4rMJFfHZ8ug/Mu4Q1E18qBetdwWE+anCPr1v8S8NLoCYJMZ+Tfb8ii2S6kQ6LGOxTibux6hxPFEjYjRtqJLuGM1BsO6ghPvz2S6pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5JnRgMvUkgFHYBytlNfECs1FdgxjPyvEf5Sy4Kq0C+Y=; b=nYcS+SoPksDXxDdKfguqUTSFg7p9PVe+QMTNvHGmqnnsnTZiEq8lNF9LvQGzFNdLjEGWxNCuB4djHrZNv/CbyGgV3zF3N+bgwQLXJUY/LVvFQr8I8NIKJlHsizPmp36xfQ7kRkn+eTkiNUlsi82slvt7pUNDe3bVDKW9DDasivBpUqeqn14Sd/TWzn+TR5Xp7+HFK8C3124Mms5CTt1tP59z2MwVjAIwmfsYy576Xjy1f7NaTayxvgK9Z7Wplhgi88WIZv4xcdvPkxjBTXRTjHx8q2l9rDLdIw/FGLCiaeP3TIwxEyu8a3V+CGIYNT3OEVuScF/q02oC4aIQ3UFZAQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cypress.com; dmarc=pass action=none header.from=cypress.com; dkim=pass header.d=cypress.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cypress.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5JnRgMvUkgFHYBytlNfECs1FdgxjPyvEf5Sy4Kq0C+Y=; b=bmU+bleZ4MT0d/dOx05J4iaWCaPe4YjInfHkbXmaGIKA8yRcs/UXjwfatY960N9PT2JXjcIcq65u7aTiVrA6wV794xYbMRl++mkl0LpGE9koTL+MmD9DYDrxqw8kaxdWIaJYsKKQMPlRx7U60Glk+fFxbiM3K+mslBTmzjUYYp4= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=cypress.com; Received: from BYAPR06MB4901.namprd06.prod.outlook.com (2603:10b6:a03:7a::30) by BYAPR06MB4024.namprd06.prod.outlook.com (2603:10b6:a02:81::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23; Thu, 21 May 2020 03:48:50 +0000 Received: from BYAPR06MB4901.namprd06.prod.outlook.com ([fe80::b972:c25d:c8fc:fc0e]) by BYAPR06MB4901.namprd06.prod.outlook.com ([fe80::b972:c25d:c8fc:fc0e%7]) with mapi id 15.20.3021.020; Thu, 21 May 2020 03:48:49 +0000 From: Chi-Hsien Lin To: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list@broadcom.com, brcm80211-dev-list@cypress.com, Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Double Lo , Chi-hsien Lin Subject: [PATCH 2/5] brcmfmac: fix 4339 CRC error under SDIO 3.0 SDR104 mode Date: Wed, 20 May 2020 22:48:35 -0500 Message-Id: <20200521034838.57371-3-chi-hsien.lin@cypress.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200521034838.57371-1-chi-hsien.lin@cypress.com> References: <20200521034838.57371-1-chi-hsien.lin@cypress.com> X-ClientProxiedBy: BY5PR20CA0021.namprd20.prod.outlook.com (2603:10b6:a03:1f4::34) To BYAPR06MB4901.namprd06.prod.outlook.com (2603:10b6:a03:7a::30) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from aremote02.aus.cypress.com (12.110.209.245) by BY5PR20CA0021.namprd20.prod.outlook.com (2603:10b6:a03:1f4::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23 via Frontend Transport; Thu, 21 May 2020 03:48:48 +0000 X-Mailer: git-send-email 2.25.0 X-Originating-IP: [12.110.209.245] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 879229c7-a50e-4bf9-d1c9-08d7fd39df0f X-MS-TrafficTypeDiagnostic: BYAPR06MB4024: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-Forefront-PRVS: 041032FF37 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: G5q4vSgg+/SbuCKZ2RgxVNLqgkhC+ZAjQB6f1hbx9N3BFUiMDrN4jKtOuy2bdJ/oIPMypR02QDu+Hn0XhZQDwNb3TD6EJcynHMT7UCwaVwmhEDhSpVVW8nRJ77i+mLljcfOo+spwS5C/HQk0fHT70qlxpqK3f57/LVf18pW/LiQodYpFzmc8r7e5vjmsrXzq5Owt181AyvrYixhygTFjJzMSOgjwR8MHog+izjDjHiCwvfqMoKb306rtL4hTAXpcsPiVZV7dmd305tjFjamiYNv7l3V2HG4sk3Nr0HA3ceEeMPGF/sbm2xpySIbzCA9j/WNlmiYCWEgKY5XaZAC3Ig== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR06MB4901.namprd06.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(376002)(136003)(346002)(39860400002)(366004)(396003)(26005)(6666004)(107886003)(7696005)(1076003)(52116002)(86362001)(16526019)(956004)(5660300002)(66476007)(66556008)(66946007)(54906003)(2616005)(6486002)(316002)(36756003)(6916009)(8936002)(4326008)(478600001)(8676002)(186003)(2906002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: Sx0h9CUAJMjqd12RwZepeagIjvTjyNRfhKXnYdCppFv5BDNH+uM2hjgIbBHuFaYb3DNDMBaayZOa8Yk0x2aic0lrAXGcq9Uc80XN9j5eahprY9rZ9d9NdowFZ9AVogCf3DzsMuDnN1cCMDtXUMraYGOrgkMgsSD3+IqTT9+MRJyipoZNwqdN3ocaBxvk2C5SHNv3WHFxCW66viSFdYWYHZOyXBoynN4wTkIrFJC70aobggb+pSi8np8Y2BhnCTKy1aF5RzcjNHNb5qemVUmp77/8k4YVgwZIcQMVgjTeyqQP9yjl8WCvqkMnOYdQp2rGO+nWRnDUUVP+4BK2eP+IT6RAtTA5ONljiLeezCKifG9qEH0XUk7BIzo0GaFzye883SCdWufpAPn6uPnvvC0oYeBQH4K7Pxdegy2gBp7/vrwbgISc2KL3dwsIqHHPRoXcp9YDrlfCBRKI2cm5ZHl43DS6eBwSsda1MboGGTd4D83/3iNicpje3PsQQzLI6MQw X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 879229c7-a50e-4bf9-d1c9-08d7fd39df0f X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2020 03:48:49.7191 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9oeclxuq/rcF561mEvlZDzdYvcTWYHW+DzdTokYkJGOsaUFkjh0Aect+z0w1stYtUpFFG1NTyQZan80tbWOGug== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR06MB4024 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Double Lo This patch fixes 4339 CRC error while running Tput test with suspend/resume test script. The continuous failure messages before system crash: brcmfmac: brcmf_sdiod_sglist_rw: CMD53 sg block read failed -84 brcmfmac: brcmf_sdio_rxglom: glom read of 25600 bytes failed: -5 brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame brcmfmac: brcmf_sdiod_sglist_rw: CMD53 sg block read failed -84 brcmfmac: brcmf_sdio_rxglom: glom read of 24576 bytes failed: -5 brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame Signed-off-by: Double Lo Signed-off-by: Chi-hsien Lin --- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) -- 2.25.0 This message and any attachments may contain confidential information from Cypress or its subsidiaries. If it has been received in error, please advise the sender and immediately delete this message. diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index dce22cd2279d..491b635e72b1 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -43,6 +43,10 @@ #define CY_4373_F2_WATERMARK 0x40 #define CY_4373_F1_MESBUSYCTRL (CY_4373_F2_WATERMARK | SBSDIO_MESBUSYCTRL_ENAB) #define CY_43012_F2_WATERMARK 0x60 +#define CY_4339_F2_WATERMARK 48 +#define CY_4339_MES_WATERMARK 80 +#define CY_4339_MESBUSYCTRL (CY_4339_MES_WATERMARK | \ + SBSDIO_MESBUSYCTRL_ENAB) #define CY_4359_F2_WATERMARK 0x40 #define CY_4359_F1_MESBUSYCTRL (CY_4359_F2_WATERMARK | SBSDIO_MESBUSYCTRL_ENAB) @@ -4209,6 +4213,19 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err, brcmf_sdiod_writeb(sdiod, SBSDIO_DEVICE_CTL, devctl, &err); break; + case SDIO_DEVICE_ID_BROADCOM_4339: + brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes for 4339\n", + CY_4339_F2_WATERMARK); + brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, + CY_4339_F2_WATERMARK, &err); + devctl = brcmf_sdiod_readb(sdiod, SBSDIO_DEVICE_CTL, + &err); + devctl |= SBSDIO_DEVCTL_F2WM_ENAB; + brcmf_sdiod_writeb(sdiod, SBSDIO_DEVICE_CTL, devctl, + &err); + brcmf_sdiod_writeb(sdiod, SBSDIO_FUNC1_MESBUSYCTRL, + CY_4339_MESBUSYCTRL, &err); + break; case SDIO_DEVICE_ID_BROADCOM_4359: brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes\n", CY_4359_F2_WATERMARK); From patchwork Thu May 21 03:48:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 11562221 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 357CC138A for ; Thu, 21 May 2020 03:50:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1726620748 for ; Thu, 21 May 2020 03:50:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cypress.com header.i=@cypress.com header.b="diOWm7Uv" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728045AbgEUDue (ORCPT ); Wed, 20 May 2020 23:50:34 -0400 Received: from mail-dm6nam10on2136.outbound.protection.outlook.com ([40.107.93.136]:9153 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728015AbgEUDue (ORCPT ); Wed, 20 May 2020 23:50:34 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E0LIcIxwHWLgegHZ1/j0fWuD9SIAXj0v1rTmX5BkOd/6X477Y2OBsG7i8NRCBDttqHxI8SkZ/dNE4dm9UpG+/Oo9cIu14BuEHXdoSuZC60P2h036xF1hT3QUsIBItDP8OJiWDSxDBbF1A51sdqyONjhoRnzq9hW8/S9VL0sHcctZ3dqRkDXo6JpSndOU9fnf97o/qCVq/5Vmhi5T7+RANHjvFYeEaDvfp8JO8Y5FHp/F2pg+uOqft9af+hopyhuxTK3CqcrKHuWOxA3zD5wAeDs3fogm3vnQt7iPVYnpk9PDHgwzuQHZ7V2SyS9gH/YsdbJzJgjLRHDu/52DhDdUzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Fop8C/fbQGNSlmWGRNnAeK1duiYVeCygwiUIjqnsydA=; b=NXg4MRDB0dAH825qd5bFHgZ6ZpqPy12sGstLAXhFn9mQbSdsm9Gq6/G1o4w5qjBhXVYn+nPLxBdl0qJeFqyPW0aoTTui17ulwqDRN8cSWU19m6SwAZsvi8ElI2Dd48zSnR01Zikus1BW1jSvDfyVgfWS7dRCaXz1zZGPrXga3bXtmG0uMdg0NRERDgwQl61yRcmWG548o5sMKhFYnJrp0CG+cRFMAuAebd0EKtqLPdwOLZznU7GH5Uu0Lb1URBMKbhtgZrMP0jc8qMp70oPr/IpaAvdjhBqJ/qb0OaarnM3WC/mj5dBPLx1t/zJCCf5cmPlhnsdPKC43BkGVFoOsuw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cypress.com; dmarc=pass action=none header.from=cypress.com; dkim=pass header.d=cypress.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cypress.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Fop8C/fbQGNSlmWGRNnAeK1duiYVeCygwiUIjqnsydA=; b=diOWm7UvGButuYm7Am7+Ha4P7stjGcSiJH6fpF9Er97ZRyU5xfdUkFw9vo+BmV3vdECb5yH0cb4AyQ1vvPaPM4niVkaYNvrtufcM3CtjXLQdyVNjVVbxSB1ha/6d12SCRF4mEn1qMYOQtAohytvHnrPpdxeI8xydb1j2NudvELg= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=cypress.com; Received: from BYAPR06MB4901.namprd06.prod.outlook.com (2603:10b6:a03:7a::30) by BYAPR06MB4024.namprd06.prod.outlook.com (2603:10b6:a02:81::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23; Thu, 21 May 2020 03:48:50 +0000 Received: from BYAPR06MB4901.namprd06.prod.outlook.com ([fe80::b972:c25d:c8fc:fc0e]) by BYAPR06MB4901.namprd06.prod.outlook.com ([fe80::b972:c25d:c8fc:fc0e%7]) with mapi id 15.20.3021.020; Thu, 21 May 2020 03:48:50 +0000 From: Chi-Hsien Lin To: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list@broadcom.com, brcm80211-dev-list@cypress.com, Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Frank Kao , Chi-Hsien Lin Subject: [PATCH 3/5] brcmfmac: set F2 blocksize and watermark for 4354/4356 SDIO Date: Wed, 20 May 2020 22:48:36 -0500 Message-Id: <20200521034838.57371-4-chi-hsien.lin@cypress.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200521034838.57371-1-chi-hsien.lin@cypress.com> References: <20200521034838.57371-1-chi-hsien.lin@cypress.com> X-ClientProxiedBy: BY5PR20CA0021.namprd20.prod.outlook.com (2603:10b6:a03:1f4::34) To BYAPR06MB4901.namprd06.prod.outlook.com (2603:10b6:a03:7a::30) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from aremote02.aus.cypress.com (12.110.209.245) by BY5PR20CA0021.namprd20.prod.outlook.com (2603:10b6:a03:1f4::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23 via Frontend Transport; Thu, 21 May 2020 03:48:49 +0000 X-Mailer: git-send-email 2.25.0 X-Originating-IP: [12.110.209.245] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 297996ce-682d-4ca9-d38b-08d7fd39dfab X-MS-TrafficTypeDiagnostic: BYAPR06MB4024: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-Forefront-PRVS: 041032FF37 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: u/oGLOtBzvTCWq971o053WqDTFlohr8k0UkCupsy8Eb5Mpjq8jXwrffc+E9uGnoqzjMXPXGeM37I3Sm1hcz2Viqvx1Y95qocQKnu0GUJXIAFjKyG28MrwFRydjO3UydohJw49g8SZDfSImPw9BssGOeTtu4d9M9CsLjnLAqcZa4Owf/z/DclvhCOf35CmhswisujkmpvwijhQT3PjZ0qMA9FlnPOt6RBfRW5WqmT0rV5soI7vWc4lizz8kDPkpW9FzD5109VO8D6mfpjZWM5DAgKQmqB22SDt4SlpL2Q/YoOlTjhWIbgQHAAehUvMar6JeRghLyYyy86H9D57gcdpg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR06MB4901.namprd06.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(376002)(136003)(346002)(39860400002)(366004)(396003)(26005)(6666004)(107886003)(7696005)(1076003)(52116002)(86362001)(16526019)(956004)(5660300002)(66476007)(66556008)(66946007)(54906003)(2616005)(6486002)(316002)(36756003)(6916009)(8936002)(4326008)(478600001)(8676002)(186003)(2906002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: 9RHCtWWbJwHIu80YTw/OxnXMxgIdElWVeevIQprSrBo9XFRDubKfUykccRdgQR7YBUnmZWA9Fp3gicanvnFGXyPCsmup0rx3EmkxRUwQlzqqXssFwKwV8OQUpPaSPq5gcynltF6b4C7Vf8QZyrc0R216eriRutwy4qGwYDIxerwP7wQA+06hjrL+2vm0Oxznirrk/TQu4BhNvSbubWHmfQyAGJVj2NalItEhdwpAqjthZKjxQ2w7PU7wOkNHzeQ2l2xu35RMbXWQNjXsAkPaEDHy2SKLbec3pKJaDI7U68HuqN+O9qh9avIUHPZGP61M1Uqd/pmLu2IhWW9tY+kBlOlXQSrADpwXj8LmRlnoZ7s+ABz0Xy7myNpc5+yOui1xCn78LxXJSp761g7uXCkglgs+UonbhnP3B3J3ipdEebrjhOgJZY1WwbvDHId3KH/UsZt1scw57UPeh0TWlyn49I0Wp6sA3nVhBt4res2K4qGQKAJInFqOhfmsB/lay2V0 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 297996ce-682d-4ca9-d38b-08d7fd39dfab X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2020 03:48:50.7445 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fEhBX0S1EJrfaeOWIYfc80zQpRcl3e2rli608K/ZyPV8TXviK9n7PJtO+7pJ8deZIsv+l1p8s3HOSbkA7daQuQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR06MB4024 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Frank Kao Set F2 blocksize to 256 bytes and watermark to 0x40 for 4354/4356 SDIO. Also enable and configure F1 MesBusyCtrl. It would resolve random driver crash issue. Signed-off-by: Frank Kao Signed-off-by: Chi-Hsien Lin --- .../broadcom/brcm80211/brcmfmac/bcmsdh.c | 8 ++++++-- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 16 ++++++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) -- 2.25.0 This message and any attachments may contain confidential information from Cypress or its subsidiaries. If it has been received in error, please advise the sender and immediately delete this message. diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c index bb3196cba683..b1a66320ba54 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c @@ -44,7 +44,7 @@ #define SDIO_FUNC1_BLOCKSIZE 64 #define SDIO_FUNC2_BLOCKSIZE 512 #define SDIO_4373_FUNC2_BLOCKSIZE 256 -#define SDIO_4359_FUNC2_BLOCKSIZE 256 +#define SDIO_435X_FUNC2_BLOCKSIZE 256 /* Maximum milliseconds to wait for F2 to come up */ #define SDIO_WAIT_F2RDY 3000 @@ -916,7 +916,11 @@ static int brcmf_sdiod_probe(struct brcmf_sdio_dev *sdiodev) f2_blksz = SDIO_4373_FUNC2_BLOCKSIZE; break; case SDIO_DEVICE_ID_BROADCOM_4359: - f2_blksz = SDIO_4359_FUNC2_BLOCKSIZE; + /* fallthrough */ + case SDIO_DEVICE_ID_BROADCOM_4354: + /* fallthrough */ + case SDIO_DEVICE_ID_BROADCOM_4356: + f2_blksz = SDIO_435X_FUNC2_BLOCKSIZE; break; default: break; diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index 491b635e72b1..037a4efef924 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -47,9 +47,9 @@ #define CY_4339_MES_WATERMARK 80 #define CY_4339_MESBUSYCTRL (CY_4339_MES_WATERMARK | \ SBSDIO_MESBUSYCTRL_ENAB) -#define CY_4359_F2_WATERMARK 0x40 -#define CY_4359_F1_MESBUSYCTRL (CY_4359_F2_WATERMARK | SBSDIO_MESBUSYCTRL_ENAB) - +#define CY_435X_F2_WATERMARK 0x40 +#define CY_435X_F1_MESBUSYCTRL (CY_435X_F2_WATERMARK | \ + SBSDIO_MESBUSYCTRL_ENAB) #ifdef DEBUG #define BRCMF_TRAP_INFO_SIZE 80 @@ -4227,17 +4227,21 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err, CY_4339_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_4359_F2_WATERMARK); + CY_435X_F2_WATERMARK); brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, - CY_4359_F2_WATERMARK, &err); + CY_435X_F2_WATERMARK, &err); devctl = brcmf_sdiod_readb(sdiod, SBSDIO_DEVICE_CTL, &err); devctl |= SBSDIO_DEVCTL_F2WM_ENAB; brcmf_sdiod_writeb(sdiod, SBSDIO_DEVICE_CTL, devctl, &err); brcmf_sdiod_writeb(sdiod, SBSDIO_FUNC1_MESBUSYCTRL, - CY_4359_F1_MESBUSYCTRL, &err); + CY_435X_F1_MESBUSYCTRL, &err); break; default: brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, From patchwork Thu May 21 03:48:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 11562217 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 4B8FD138A for ; Thu, 21 May 2020 03:49:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2E80620748 for ; Thu, 21 May 2020 03:49:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cypress.com header.i=@cypress.com header.b="l5cj9vE3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728100AbgEUDtb (ORCPT ); Wed, 20 May 2020 23:49:31 -0400 Received: from mail-dm6nam10on2131.outbound.protection.outlook.com ([40.107.93.131]:18624 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727998AbgEUDtb (ORCPT ); Wed, 20 May 2020 23:49:31 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N0POGjbPGZVbB/cx0pXnE4t8XbKRWrHCpHdZ6422fwecE6SDRCmSt6IHj4QfASsFwfxXsxA2PUIoLdar/eFYibxU0a/MGcSKOWjpQSiZom6lTDhMEf/qD3CdWUPuN+s5ER5Ked08sDcJswUOPoCD5KeRZMPL1woyzqceQCScFIzOJ1gbUF091mUzkP8qyRatnyhK0hprK6AkhVuCypX3vyM60oj0QZF+YD3w1QQTpPfT3CoRLMD0kF0XG6kjFmhBr4CE3HTyFUcCUXmJg26Vw7IEhNhR7Kvn/QmEHKfth+Qy5/4VRv2GwyCiibtt1mGMcVoXGcrNkK8ZhF4XRL1ljQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iH1LUDKud288xOqxaG2LiseQ5gYcP18B17tmc+duFg8=; b=mFa1lqfa/nM9PfzKwJnZHFEDsP0npRQxK1u9ZdZXyMn9uTjvK40pKtplTz5WpkryUir2EMzSVLWOrXoCaIP5xxp3KOY/FQXgKhQDahT3Qj60+TU4abAOvkp/Dqih1Y3ye0XXJgVa7Zq1EazH8af5de+8NktwxquJ8MKQPAvZ4/VflgexKyUCzwZ67ZSdh9+rkFat5ecdEvDKwmJZxkgBSDPksjEGEsidBUeW4vMZ7O7MTXveUrwgGaGbI8FIlUK9SwriKs3A1gc5ql/jJr2+c4yKCK+C1c+Y9mPdp42+zVjaXkMkK461Vastv0jCtO0wIfUvby0PyBQf7MQFQEZQ3w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cypress.com; dmarc=pass action=none header.from=cypress.com; dkim=pass header.d=cypress.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cypress.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iH1LUDKud288xOqxaG2LiseQ5gYcP18B17tmc+duFg8=; b=l5cj9vE3AZ2r75KCIfs+zXvPyn2vuTaL7ZUftae/AABRE6C46RCs45SYr8dIhYzybeuKJuBmy4Ksvpcn+pCCn+T0kLTrEfMlfFwbAIaOzBNh8nGsItXibIJYFUAjx8v7gPQ+69KvIpC5ZW89vNHzpj2JxISmBxJll88p3lGk8KU= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=cypress.com; Received: from BYAPR06MB4901.namprd06.prod.outlook.com (2603:10b6:a03:7a::30) by BYAPR06MB4024.namprd06.prod.outlook.com (2603:10b6:a02:81::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23; Thu, 21 May 2020 03:48:52 +0000 Received: from BYAPR06MB4901.namprd06.prod.outlook.com ([fe80::b972:c25d:c8fc:fc0e]) by BYAPR06MB4901.namprd06.prod.outlook.com ([fe80::b972:c25d:c8fc:fc0e%7]) with mapi id 15.20.3021.020; Thu, 21 May 2020 03:48:51 +0000 From: Chi-Hsien Lin To: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list@broadcom.com, brcm80211-dev-list@cypress.com, Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Chi-hsien Lin Subject: [PATCH 4/5] brcmfmac: fix 43455 CRC error under SDIO 3.0 SDR104 mode Date: Wed, 20 May 2020 22:48:37 -0500 Message-Id: <20200521034838.57371-5-chi-hsien.lin@cypress.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200521034838.57371-1-chi-hsien.lin@cypress.com> References: <20200521034838.57371-1-chi-hsien.lin@cypress.com> X-ClientProxiedBy: BY5PR20CA0021.namprd20.prod.outlook.com (2603:10b6:a03:1f4::34) To BYAPR06MB4901.namprd06.prod.outlook.com (2603:10b6:a03:7a::30) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from aremote02.aus.cypress.com (12.110.209.245) by BY5PR20CA0021.namprd20.prod.outlook.com (2603:10b6:a03:1f4::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23 via Frontend Transport; Thu, 21 May 2020 03:48:50 +0000 X-Mailer: git-send-email 2.25.0 X-Originating-IP: [12.110.209.245] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 1c54c56e-08a2-4c5f-691f-08d7fd39e043 X-MS-TrafficTypeDiagnostic: BYAPR06MB4024: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4941; X-Forefront-PRVS: 041032FF37 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qN6ErZGrFuQbXJHr9cR3hD4KEnAhKrEya1ufQpOfFXZEPnQdBN2grTeh0PDOVHBpJo6J3uFNFgR65IF9IWuN/qVbkKWH4/XTphkpnDGR26c7XhyzsQ/2YZpXboeItmmf4/Me5jWAPlQzb2OToNL6MCadIjLqwv3dtBeZie/0gp3F4cFMYRkdpOyVwTh29nkMXmdq34cNym2VKKrNHYjwOVqv8IPI6wtPoy6dhufS7Qeaepe+Bh34hUDZy3IOr+SPxhLMF9eRciicII6+qn4Q3lJXngWDoRVQYgDzA5Z4dy+pmhVpVzvOmZu0CJRsuH201b716erMu8sUbyOlOeRQlg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR06MB4901.namprd06.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(376002)(136003)(346002)(39860400002)(366004)(396003)(26005)(6666004)(107886003)(7696005)(1076003)(52116002)(86362001)(16526019)(956004)(5660300002)(66476007)(66556008)(66946007)(54906003)(2616005)(6486002)(316002)(36756003)(6916009)(8936002)(4326008)(478600001)(8676002)(186003)(2906002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: y9slphLvlzzLdd4KbT5LkCBPyPxinVLc33Co8rz4JhF5mhR7/hh6XOmoUKBtclRvskGLHOyOn+j6vrENfo5leTsaQZHwstEeTN2htwWCfXrVcQLCxs1cESzzVYeufywOMY1VjEjnGocbUIrIPT4qyXbwXuGIUzUvkPwCUgMAy0BmxM/c50+F+oHm9qg/mAozU7T0ZzG+dAwo/4/9/8kkG0mESGN7ZucPhHzfMtFftLfczjLABiduKkqedHhATJZGU3sdDzgLqKaI1gX9lhWrvf54d3W4JmmvADhemwrl6Di0YdhgAXzNB/MsdIf8FjnqNvqFWk+vAQFP0RjujNw4HNrT/B2ritZoLGKQjLlKs5CgJ+F7r2Jknfj2LdWQF9cVm0k0IOySHFgS46R/5cZF2OmwU8D0KbBvdm/SgN9hT4A09k+D9NxZYAF7rDsbZAIP21zazvOrUYsPrkMOXgJOdCXSVZpbQNORR1G77XHxABtunos2E4Ct/qOuiR53+q8F X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1c54c56e-08a2-4c5f-691f-08d7fd39e043 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2020 03:48:51.8029 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Ma4BRFfF6PR8mAkxnlAXLqwHjyHhgZJp5lo6YpKDjxlIvsz5o2dk7p5X3LK1reqzcff54ez7hrqq20/CSxFqkQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR06MB4024 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Wright Feng This patch fixes 43455 CRC error while running throughput test with suspend/resume stress test. The continuous failure messages before system crash: brcmfmac: brcmf_sdiod_sglist_rw: CMD53 sg block read failed -84 brcmfmac: brcmf_sdio_rxglom: glom read of 25600 bytes failed: -5 brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame brcmfmac: brcmf_sdiod_sglist_rw: CMD53 sg block read failed -84 brcmfmac: brcmf_sdio_rxglom: glom read of 24576 bytes failed: -5 brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame Signed-off-by: Wright Feng Signed-off-by: Chi-hsien Lin --- .../broadcom/brcm80211/brcmfmac/sdio.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) -- 2.25.0 This message and any attachments may contain confidential information from Cypress or its subsidiaries. If it has been received in error, please advise the sender and immediately delete this message. diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index 037a4efef924..58d9f0b90ad3 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -47,9 +47,14 @@ #define CY_4339_MES_WATERMARK 80 #define CY_4339_MESBUSYCTRL (CY_4339_MES_WATERMARK | \ SBSDIO_MESBUSYCTRL_ENAB) +#define CY_43455_F2_WATERMARK 0x60 +#define CY_43455_MES_WATERMARK 0x50 +#define CY_43455_MESBUSYCTRL (CY_43455_MES_WATERMARK | \ + SBSDIO_MESBUSYCTRL_ENAB) #define CY_435X_F2_WATERMARK 0x40 #define CY_435X_F1_MESBUSYCTRL (CY_435X_F2_WATERMARK | \ SBSDIO_MESBUSYCTRL_ENAB) + #ifdef DEBUG #define BRCMF_TRAP_INFO_SIZE 80 @@ -4226,6 +4231,19 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err, brcmf_sdiod_writeb(sdiod, SBSDIO_FUNC1_MESBUSYCTRL, 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", + CY_43455_F2_WATERMARK); + brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, + CY_43455_F2_WATERMARK, &err); + devctl = brcmf_sdiod_readb(sdiod, SBSDIO_DEVICE_CTL, + &err); + devctl |= SBSDIO_DEVCTL_F2WM_ENAB; + brcmf_sdiod_writeb(sdiod, SBSDIO_DEVICE_CTL, devctl, + &err); + brcmf_sdiod_writeb(sdiod, SBSDIO_FUNC1_MESBUSYCTRL, + CY_43455_MESBUSYCTRL, &err); + break; case SDIO_DEVICE_ID_BROADCOM_4359: /* fallthrough */ case SDIO_DEVICE_ID_BROADCOM_4354: From patchwork Thu May 21 03:48:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 11562219 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 D05811392 for ; Thu, 21 May 2020 03:49:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B406520738 for ; Thu, 21 May 2020 03:49:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cypress.com header.i=@cypress.com header.b="mBFXcMgy" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728180AbgEUDtd (ORCPT ); Wed, 20 May 2020 23:49:33 -0400 Received: from mail-dm6nam10on2131.outbound.protection.outlook.com ([40.107.93.131]:18624 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728083AbgEUDtd (ORCPT ); Wed, 20 May 2020 23:49:33 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Lqi+kSM3yS9iyxQrb26LScDt7uupDTdF47bd7WbgV9hMnnOWuJEXTKu4nFAuEx8XQUDfjT9AYII4PEZrQKB6jEIlbZ+ADvK3BVeHKGm6NWmXCOfKF8sEeC1LLHA5Getm81fE8DMca93l2WRtQ8AVy5IU7Pra+9dEoI1D+0IqxoKwrw6U4Q+32wvK7u8pOuH+yj7JA4kcv0zISygZT/wMlBBQooap6ZyRlD7szN586peDGBOQXiCIciznMt0Q79ZCuJ7MdgNmIYVCyXfPmBo5CYxksHIfhADxCMnpmmppQYsQGYz/8TUU5FFEpfixTmirQigt2QidkAmX0q70sK/BbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yX3iQ2DfxMZY3mCYYTVfnfDeIozy68gBAp+aVCUXzOU=; b=PYaxpHRPH1+bkEl0c+CTkG05huwY9b4Aj2U0Gd8T277drXJ1E4qnDA84kvbVVLdzNxchKgIuBpbYwbo/g8YzuS2melAKvCsAMrWSFYHdrtKNAj0FGCmbkjqcwrLQZoWlfiiFULxYYlfxYsj0uHdrUPb4QSg2uU4QXQKL3P4OrK/Eyis3tFyjISMBwGEeepRxvjUbyjAne9gaWuky9TXwMnZdumXbcZxrZc0fzhDqMHIUY5ChCQVWdIBm5TdiWw4/zvUWAriQa0ppwN04T40W5+wUyC7npvEf8lB0SwCsOj9rcZDxxbEciBbmecLfVC6evEYzWOqzKg1Gk3Xkc9g0+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cypress.com; dmarc=pass action=none header.from=cypress.com; dkim=pass header.d=cypress.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cypress.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yX3iQ2DfxMZY3mCYYTVfnfDeIozy68gBAp+aVCUXzOU=; b=mBFXcMgy1wb+78sZy2XofdqFsbDjqOTvjW7nQuNRv5+WS8TgeQrSmpxn5xuYSSLFX9oqFe0VtE63eHrLwupyjHt1yw9Lvsomnk/ysSdHHge6lizOyha9pn0KeoqRZay0KGoqq+qdATeLUwzG6/cafUBK2InHFQHbKzPgMS5WgoE= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=cypress.com; Received: from BYAPR06MB4901.namprd06.prod.outlook.com (2603:10b6:a03:7a::30) by BYAPR06MB4024.namprd06.prod.outlook.com (2603:10b6:a02:81::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23; Thu, 21 May 2020 03:48:53 +0000 Received: from BYAPR06MB4901.namprd06.prod.outlook.com ([fe80::b972:c25d:c8fc:fc0e]) by BYAPR06MB4901.namprd06.prod.outlook.com ([fe80::b972:c25d:c8fc:fc0e%7]) with mapi id 15.20.3021.020; Thu, 21 May 2020 03:48:53 +0000 From: Chi-Hsien Lin To: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list@broadcom.com, brcm80211-dev-list@cypress.com, Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Double Lo , Chi-hsien Lin Subject: [PATCH 5/5] brcmfmac: 43012 Update MES Watermark Date: Wed, 20 May 2020 22:48:38 -0500 Message-Id: <20200521034838.57371-6-chi-hsien.lin@cypress.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200521034838.57371-1-chi-hsien.lin@cypress.com> References: <20200521034838.57371-1-chi-hsien.lin@cypress.com> X-ClientProxiedBy: BY5PR20CA0021.namprd20.prod.outlook.com (2603:10b6:a03:1f4::34) To BYAPR06MB4901.namprd06.prod.outlook.com (2603:10b6:a03:7a::30) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from aremote02.aus.cypress.com (12.110.209.245) by BY5PR20CA0021.namprd20.prod.outlook.com (2603:10b6:a03:1f4::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23 via Frontend Transport; Thu, 21 May 2020 03:48:52 +0000 X-Mailer: git-send-email 2.25.0 X-Originating-IP: [12.110.209.245] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 348d704d-59d6-43d8-35c4-08d7fd39e0ee X-MS-TrafficTypeDiagnostic: BYAPR06MB4024: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-Forefront-PRVS: 041032FF37 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NNYSy1/4FbY9leSWHfSVKerlHrGv075AzK+3QgtvutleAb9jQRt8MOe+HNYfCLfWXZBMfmVc4uEEjSHvtmuchIt+hZIiKFWWMR9Su7FJP/kO4UQh15YnmAHuoPfa885j2Ri3sILoG7sDLSvcg94B97NCCam2hCrE6fqF3/E1jV7c/qp2EmvgjqhoXSm4/AEApvg2zkoZpEIl3Oy0iZjBeVL+dtyYmtqi7UDc31jWPmUdlzVitwvwoB2DTOq1Uu6nrezeQGK50M2EX807ICSZrJQHFhRttV9NETmLWdGKNPXJTtAzITI0FUUa+0Wy5Sz/+hgGZQy9hCbqJ1I8qZrDfw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR06MB4901.namprd06.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(376002)(136003)(346002)(39860400002)(366004)(396003)(26005)(6666004)(107886003)(7696005)(1076003)(52116002)(86362001)(16526019)(956004)(5660300002)(66476007)(66556008)(66946007)(54906003)(2616005)(15650500001)(6486002)(316002)(36756003)(6916009)(8936002)(4326008)(478600001)(8676002)(186003)(2906002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: 3HOO/ixBxgV6wSSrkyyLBesfUwXcxgXAWLN+84RI22A/DI6EmynPX+IWb6wmpToFpvoMcn/Zvn488fI8c46QU/s7x4KvSwUJQujQalVI8utvitpPJGBmcGq33PzlnWCqWQ5AVzrbKBGesZmsoABbmoAJ8Cx+vHl0V45FDTSsv/p2QaspTjRaqmX89JfP6G62Wgk2tiTe/CAJIox/hQqwFxniiylL5o2fJgncpaSjOvU1LyDDNQ2YeoEILsc2DVd9ps07FDYMyN8cVMp73rZ4egQj/96voyEbXTVsgRLlvWb00GWX2jNFNzcqb14hoHCH35oZ5PwPkjAhm6C0AitrR0hHZgBH+IY5vqvEP3IjuWUH2Mw0JEwP/uEEW686gSBZ6kQYp/deZkIzvfI1VuS+SfFYy0YWqfpqRk0blQEe5kZs8fahJkZ867vOjuBxKvIy6wT1mutK8oP//0mHOZXcJqwtEEAF1L3FuiVWYMmk0/5jLuIqZ/gcjZkXoscqpmY6 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 348d704d-59d6-43d8-35c4-08d7fd39e0ee X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2020 03:48:52.9402 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 218rxy+oWkXPtDCHy62H25c1r2YmxxcysU8cFFxr4q35SHzEbcgIxBtALHhaHciLFHx24XuQtExQEDdEiCrlyg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR06MB4024 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Double Lo Set MES watermark size to 0x50 for 43012. It fixes SDIO bus hang issue when running at high throughput. Signed-off-by: Double Lo Signed-off-by: Chi-hsien Lin --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.25.0 This message and any attachments may contain confidential information from Cypress or its subsidiaries. If it has been received in error, please advise the sender and immediately delete this message. diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index 58d9f0b90ad3..760b7737e745 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -43,6 +43,9 @@ #define CY_4373_F2_WATERMARK 0x40 #define CY_4373_F1_MESBUSYCTRL (CY_4373_F2_WATERMARK | SBSDIO_MESBUSYCTRL_ENAB) #define CY_43012_F2_WATERMARK 0x60 +#define CY_43012_MES_WATERMARK 0x50 +#define CY_43012_MESBUSYCTRL (CY_43012_MES_WATERMARK | \ + SBSDIO_MESBUSYCTRL_ENAB) #define CY_4339_F2_WATERMARK 48 #define CY_4339_MES_WATERMARK 80 #define CY_4339_MESBUSYCTRL (CY_4339_MES_WATERMARK | \ @@ -4217,6 +4220,8 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err, devctl |= SBSDIO_DEVCTL_F2WM_ENAB; brcmf_sdiod_writeb(sdiod, SBSDIO_DEVICE_CTL, devctl, &err); + brcmf_sdiod_writeb(sdiod, SBSDIO_FUNC1_MESBUSYCTRL, + CY_43012_MESBUSYCTRL, &err); break; case SDIO_DEVICE_ID_BROADCOM_4339: brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes for 4339\n",