From patchwork Tue Nov 6 03:50:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 10669551 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F3D5913AD for ; Tue, 6 Nov 2018 03:50:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E453F29F29 for ; Tue, 6 Nov 2018 03:50:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D7EAE29F5E; Tue, 6 Nov 2018 03:50:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 77A2629F29 for ; Tue, 6 Nov 2018 03:50:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729571AbeKFNN2 (ORCPT ); Tue, 6 Nov 2018 08:13:28 -0500 Received: from mail-eopbgr810101.outbound.protection.outlook.com ([40.107.81.101]:25243 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729015AbeKFNN2 (ORCPT ); Tue, 6 Nov 2018 08:13:28 -0500 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=nyqkN6F8DB1OZjt9Om43c2nrMAs2BCfxiXjpPq/uFi4=; b=V20aBvkdy/0Ow5+XXv9HXi2t2SkrY2g1WBnDirMfZDXM1CxazgppiDTHc4nosBZoCtpYTunNkkI8ZqPbWH2FhsGS79ckRhNfgQenmwhZoXwvHrKt4239ntkGhBCEvsFLaZ8F42ClicNIwxMJSPQeAt2Cd9O+iXOFQj2/P8IfRWE= Received: from BY1PR0601MB1436.namprd06.prod.outlook.com (10.162.111.23) by BY1PR0601MB1142.namprd06.prod.outlook.com (10.160.196.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.27; Tue, 6 Nov 2018 03:50:15 +0000 Received: from BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979]) by BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979%3]) with mapi id 15.20.1294.032; Tue, 6 Nov 2018 03:50:15 +0000 From: Chi-Hsien Lin To: "linux-wireless@vger.kernel.org" CC: "brcm80211-dev-list@broadcom.com" , brcm80211-dev-list , Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Winnie Chang , Chi-Hsien Lin Subject: [PATCH 01/11] brcmfmac: add 4354 raw pcie device id Thread-Topic: [PATCH 01/11] brcmfmac: add 4354 raw pcie device id Thread-Index: AQHUdYPTvo0SK1/quUWwYFxyaP3qAQ== Date: Tue, 6 Nov 2018 03:50:15 +0000 Message-ID: <1541476188-75475-2-git-send-email-chi-hsien.lin@cypress.com> References: <1541476188-75475-1-git-send-email-chi-hsien.lin@cypress.com> In-Reply-To: <1541476188-75475-1-git-send-email-chi-hsien.lin@cypress.com> Accept-Language: en-US, zh-TW Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [12.110.209.245] x-clientproxiedby: MWHPR2201CA0082.namprd22.prod.outlook.com (2603:10b6:301:5e::35) To BY1PR0601MB1436.namprd06.prod.outlook.com (2a01:111:e400:522c::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chi-Hsien.Lin@cypress.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR0601MB1142;6:EUH1dqZn1/saXGDWvPJReuEAwnJUZDAXMZi9/YeoJcTZllpObmluiftTSKWg1W1tqVY6IImbmKDzbKwgZAoKscw5q6HtlGRJU+zo9Sl0vYDEu/lV46X6i52c3DdPnC3B1LBrTH9Xfn+bGywOC8UwXTk4y9p13AEZl/3sK8vdswxUiX4C4ua2pwZwxHK35nPgjrQneK88HbMWIlvdGrTYFTGcH5TXcLekhHgXjz5cJGwdZgoG2peSHcoob+OXufiUwdBTl1w5VDsQ6hXxnlbIRfzElsGOErArkF21jCGUFCvE046lcVtyLwuUnQdzV4mBn5O2MqsG6U6GPBJq8w9xw3zyh4oJd0XOu2UBQRUD2zBUGxy26O5vkAPRtzt1I4GyUvBdfB6cTM6qo4x/pAIdK+oRDe6s0e9xHTStZ7SP/0evLKd26vnM7mwFFc14h4M+hfnDpj8CICintlNdVK3NxA==;5:hqTs48EMXL3fkrku4bc7OQQA2Xc9uejP8g4SqwSu3hMzHBdH9xQ42YK+2Boq/fpEPSwF1Ql7yaX1w+1/GB/wzlRVSZrvEpLMnHHwNtecP+aAp3wnHtBrOOGQ9Z09fVgb86mpEOTkabr1WVehxT8JHSaGdWfoQIBndS28/qGml+c=;7:Kbh3OUrxJTVHK8TKFNIphfQIIkZ9vMBdaaBwR6UGvBThcHO2nGQnHTXVf7VeZ7R5XReLaNmsOsDYYAbiOQzxWzT6f4pMXubegr1mnEQg09/UY/phs38sq3jSTVC/lIu82xv3RFr/s8Bg0L8dIw25/g== x-ms-office365-filtering-correlation-id: a973ecd4-a6ce-4784-6baf-08d6439af5d0 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:BY1PR0601MB1142; x-ms-traffictypediagnostic: BY1PR0601MB1142: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(258095267146985); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231382)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:BY1PR0601MB1142;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0601MB1142; x-forefront-prvs: 0848C1A6AA x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(136003)(396003)(376002)(366004)(39860400002)(346002)(199004)(189003)(6506007)(36756003)(386003)(102836004)(186003)(2906002)(6916009)(8936002)(54906003)(5660300001)(81156014)(5640700003)(81166006)(14454004)(26005)(8676002)(476003)(486006)(2351001)(2616005)(446003)(97736004)(11346002)(6436002)(106356001)(105586002)(6512007)(256004)(6486002)(4326008)(3846002)(6116002)(7736002)(68736007)(99286004)(72206003)(53936002)(305945005)(76176011)(66066001)(2501003)(575784001)(107886003)(86362001)(316002)(71200400001)(71190400001)(52116002)(25786009)(478600001)(2900100001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR0601MB1142;H:BY1PR0601MB1436.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: e0g79PPABJq+XopMPvy09s3pHr6VKVegQZxaqzRR+qPjVscMJqXoda8AQBoazV3Aeb7E5lY+yYJmlPByBzooVe8V0PWj3LxVGjIcnlwE89Ez1QwZmxXGvmF+Im3ADzUttRGpGJ6b6IZbpt4DCKb3Lbl+rKTygLOBmAY4O43b/iwZiHS80cKUwk4LhTY6XiVzccNkb2yNKdsWKTJSqhDp7XCipqVSYnJ8vL3oLoZCy2WPhl9SO4gv4jD5e2gw68pcSvcr7Ne04++PJe6wvJnrzhYfIpMpVaPvj0LLznix0HeWMcTn2Mzy3kCqldoGU/ot+UZYq1BNG0ftDGvzpx4PUTwkun5ZKT/xhR5JCHObU4A= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: a973ecd4-a6ce-4784-6baf-08d6439af5d0 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Nov 2018 03:50:15.2929 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0601MB1142 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Winnie Chang Add the raw 4354 PCIe device ID. Signed-off-by: Winnie Chang Signed-off-by: Chi-Hsien Lin --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 1 + drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c index 5dea569d63ed..8887bbc0084f 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c @@ -2018,6 +2018,7 @@ static const struct dev_pm_ops brcmf_pciedrvr_pm = { static const struct pci_device_id brcmf_pcie_devid_table[] = { BRCMF_PCIE_DEVICE(BRCM_PCIE_4350_DEVICE_ID), BRCMF_PCIE_DEVICE_SUB(0x4355, BRCM_PCIE_VENDOR_ID_BROADCOM, 0x4355), + BRCMF_PCIE_DEVICE(BRCM_PCIE_4354_RAW_DEVICE_ID), BRCMF_PCIE_DEVICE(BRCM_PCIE_4356_DEVICE_ID), BRCMF_PCIE_DEVICE(BRCM_PCIE_43567_DEVICE_ID), BRCMF_PCIE_DEVICE(BRCM_PCIE_43570_DEVICE_ID), diff --git a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h index 686f7a85a045..acb87238922f 100644 --- a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h +++ b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h @@ -74,6 +74,7 @@ /* PCIE Device IDs */ #define BRCM_PCIE_4350_DEVICE_ID 0x43a3 #define BRCM_PCIE_4354_DEVICE_ID 0x43df +#define BRCM_PCIE_4354_RAW_DEVICE_ID 0x4354 #define BRCM_PCIE_4356_DEVICE_ID 0x43ec #define BRCM_PCIE_43567_DEVICE_ID 0x43d3 #define BRCM_PCIE_43570_DEVICE_ID 0x43d9 From patchwork Tue Nov 6 03:50:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 10669553 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E8F8913AD for ; Tue, 6 Nov 2018 03:50:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D9CD229F29 for ; Tue, 6 Nov 2018 03:50:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE1E929F5E; Tue, 6 Nov 2018 03:50:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6196929F29 for ; Tue, 6 Nov 2018 03:50:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729617AbeKFNNa (ORCPT ); Tue, 6 Nov 2018 08:13:30 -0500 Received: from mail-eopbgr810101.outbound.protection.outlook.com ([40.107.81.101]:25243 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728971AbeKFNNa (ORCPT ); Tue, 6 Nov 2018 08:13:30 -0500 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=O83q3fIf8wMu6DnhP41y4MjXCw/+sG6AMYzp9U1fOvk=; b=XhPGSOf7b7CM6OrnAgpRsrK+PIcuH5i6UDTvBTdhsBpN77HrvuY7pCNTYC1Xin3B51tgNm6nDAiMM/BscFjVO84w6KaU4p1bUB8FpCFbeeBlzs+xaT6jKYFdHjVoYQBwdajPTvyMphLKbEAEPYU/QY8Ps5cQVpUJgeipe1RWzyY= Received: from BY1PR0601MB1436.namprd06.prod.outlook.com (10.162.111.23) by BY1PR0601MB1142.namprd06.prod.outlook.com (10.160.196.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.27; Tue, 6 Nov 2018 03:50:17 +0000 Received: from BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979]) by BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979%3]) with mapi id 15.20.1294.032; Tue, 6 Nov 2018 03:50:17 +0000 From: Chi-Hsien Lin To: "linux-wireless@vger.kernel.org" CC: "brcm80211-dev-list@broadcom.com" , brcm80211-dev-list , Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Chi-Hsien Lin Subject: [PATCH 02/11] brcmfmac: set F2 watermark to 256 for 4373 Thread-Topic: [PATCH 02/11] brcmfmac: set F2 watermark to 256 for 4373 Thread-Index: AQHUdYPUCQkY2O7PYEC9l/5qSczFkg== Date: Tue, 6 Nov 2018 03:50:16 +0000 Message-ID: <1541476188-75475-3-git-send-email-chi-hsien.lin@cypress.com> References: <1541476188-75475-1-git-send-email-chi-hsien.lin@cypress.com> In-Reply-To: <1541476188-75475-1-git-send-email-chi-hsien.lin@cypress.com> Accept-Language: en-US, zh-TW Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [12.110.209.245] x-clientproxiedby: MWHPR2201CA0082.namprd22.prod.outlook.com (2603:10b6:301:5e::35) To BY1PR0601MB1436.namprd06.prod.outlook.com (2a01:111:e400:522c::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chi-Hsien.Lin@cypress.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR0601MB1142;6:+UmR5w4aNikvyCE8zDgynlcptTA98cdEVNrWwLOR6LbTYntXjWItw7OVlKRYWez6awEGpayIKXzvzPq62Yafd3uy8rtw4jrFJQ+9HSl9dq1azLQtefadxYtHev561vVtsmb+PrmrEHwvEB5rG6r2VI3asmOH/xcl349siR42luuwqI1TRljmRMkNWQBEH3ErHSDclKMKccLJyv72us/yQVC8wyvScPuK5BSIjeS66IbBCUwYKSqelpokmlS/1ma/Datvy6cbMt/gXDmMjYN9DozJ268+SjGjoH18pzR9I+SWF6inF2jAr88nJHHrpwv+EKTzsRYDMppsRw82Sw34JC53fyjDS2GtCEPNbWvlqMTU5OpmxOa9B87gki4ya2I7WoTzyomKU/bEUPv51vEvMIyvF460FJwxGKZ6UjlXgcCTSqF926HWI9KNyTZ8h6ZAF7KDcEuoOjK/YDyVGneC/w==;5:zWNIqCldqGpacOFBF3VwILL/QPCLTK0tN+ZB+X0zC2f/TEfOu3FgMn3gWe7/fNEtixPOeXqFk1CVE/N5lLl+HqmfPlyNtSAiw8tJui+oDWn/1+Wrwi/MEZND1xZ2dXDIif6iesbE9ip3y7z1KYOsRrXchH1qxMVEeYuN/48ktl0=;7:kaCdrutwO9tyFMiPR48GW4Gu/E1hXrHEbq62NmgR7MKfA+dcAy7NQSXmXyk395WLcnatqRp3jyV4ArzShOAoebxfxMgnUddJMSDK1eOWkNtVlzRjTl/hlJzFNePOUd9Ric8DOL53zFniMXkFJ7AKpQ== x-ms-office365-filtering-correlation-id: f9bd8b42-120c-4c9b-2cd8-08d6439af6c0 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:BY1PR0601MB1142; x-ms-traffictypediagnostic: BY1PR0601MB1142: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(258095267146985); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231382)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:BY1PR0601MB1142;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0601MB1142; x-forefront-prvs: 0848C1A6AA x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(136003)(396003)(376002)(366004)(39860400002)(346002)(199004)(189003)(6506007)(36756003)(386003)(102836004)(186003)(2906002)(6916009)(8936002)(54906003)(5660300001)(81156014)(5640700003)(81166006)(14454004)(26005)(8676002)(476003)(486006)(2351001)(2616005)(446003)(97736004)(11346002)(6436002)(106356001)(105586002)(6512007)(256004)(6486002)(4326008)(3846002)(6116002)(7736002)(68736007)(99286004)(72206003)(53936002)(305945005)(76176011)(66066001)(2501003)(575784001)(107886003)(86362001)(316002)(71200400001)(71190400001)(52116002)(25786009)(478600001)(2900100001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR0601MB1142;H:BY1PR0601MB1436.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 84yCmz/tz3wOpJhaHzOKGYIygt3YzbVjQHjbipvCwc+PhsrpBodpZsWl6GIiAEg92xUqBhi56yCcN25jeboONr8dUL1CsTLfj1UVmQzf2ajBTxcBTg96Yy/WwtwgZSc+JeimmXxEy6wwkmCOrD/jCnDH0jGPMe0gOu1ErCpwLgYsVFSt5AH5SsHnrFRDVKHxLkGSQSm3Ja1s3AUALjrldCZV/Gl6fsYj9ZpX3Zax3cpt+WoOqCVuLKr75uAfTyev6tlyTvlRkNBAd5KdheQuEHuuYu5nklh/AZvShAneOj5oGgFOG+BwLgif6Mpinf9uWMm71ZLUXltTwCaroL5HSLk5pgmLlSoonXsXOD+ngAI= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: f9bd8b42-120c-4c9b-2cd8-08d6439af6c0 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Nov 2018 03:50:16.9743 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0601MB1142 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wright Feng We got SDIO_CRC_ERROR with 4373 on SDR104 when doing bi-directional throughput test. Enable watermark to 256 to guarantee the operation stability. Signed-off-by: Wright Feng Signed-off-by: Chi-Hsien Lin Reviewed-by: Arend van Spriel --- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 25 ++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index b2e1ab5adb64..541d54661c9e 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -49,6 +49,9 @@ #define DCMD_RESP_TIMEOUT msecs_to_jiffies(2500) #define CTL_DONE_TIMEOUT msecs_to_jiffies(2500) +#define DEFAULT_F2_WATERMARK 0x8 +#define CY_4373_F2_WATERMARK 0x40 + #ifdef DEBUG #define BRCMF_TRAP_INFO_SIZE 80 @@ -138,6 +141,8 @@ struct rte_console { /* 1: isolate internal sdio signals, put external pads in tri-state; requires * sdio bus power cycle to clear (rev 9) */ #define SBSDIO_DEVCTL_PADS_ISO 0x08 +/* 1: enable F2 Watermark */ +#define SBSDIO_DEVCTL_F2WM_ENAB 0x10 /* Force SD->SB reset mapping (rev 11) */ #define SBSDIO_DEVCTL_SB_RST_CTL 0x30 /* Determined by CoreControl bit */ @@ -4046,6 +4051,7 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err, void *nvram; u32 nvram_len; u8 saveclk; + u8 devctl; brcmf_dbg(TRACE, "Enter: dev=%s, err=%d\n", dev_name(dev), err); @@ -4101,8 +4107,23 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err, brcmf_sdiod_writel(sdiod, core->base + SD_REG(hostintmask), bus->hostintmask, NULL); - - brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, 8, &err); + switch (sdiod->func1->device) { + case SDIO_DEVICE_ID_CYPRESS_4373: + brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes\n", + CY_4373_F2_WATERMARK); + brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, + CY_4373_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); + break; + default: + brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, + DEFAULT_F2_WATERMARK, &err); + break; + } } else { /* Disable F2 again */ sdio_disable_func(sdiod->func2); From patchwork Tue Nov 6 03:50:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 10669571 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 454D71751 for ; Tue, 6 Nov 2018 03:51:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 32C1529F5E for ; Tue, 6 Nov 2018 03:51:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 23E8829F53; Tue, 6 Nov 2018 03:51:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B2B1E29F53 for ; Tue, 6 Nov 2018 03:51:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387475AbeKFNOL (ORCPT ); Tue, 6 Nov 2018 08:14:11 -0500 Received: from mail-eopbgr810101.outbound.protection.outlook.com ([40.107.81.101]:25243 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729015AbeKFNOK (ORCPT ); Tue, 6 Nov 2018 08:14:10 -0500 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=MivY5zgnth8b3CYfw0QoV2pqByPmAWbyALebWkhVOoo=; b=LoGBklryAbyD9FCcg8AY8yZzuu9c7p9nC3vqDm27UhV0zQej1fB0y0rJo3nolkLtxC7Rya9PlbbfhkGrPKTY4BjIRlrhQEm2OCtGJ6T5bkvVaokwDC1rcyzY0jqluH1lYAqPf49Sp9/Q3zwuuK9MtpSqIETQwQPpo8e2uDvl+f8= Received: from BY1PR0601MB1436.namprd06.prod.outlook.com (10.162.111.23) by BY1PR0601MB1142.namprd06.prod.outlook.com (10.160.196.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.27; Tue, 6 Nov 2018 03:50:18 +0000 Received: from BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979]) by BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979%3]) with mapi id 15.20.1294.032; Tue, 6 Nov 2018 03:50:18 +0000 From: Chi-Hsien Lin To: "linux-wireless@vger.kernel.org" CC: "brcm80211-dev-list@broadcom.com" , brcm80211-dev-list , Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Madhan Mohan R , Madhan Mohan R , Chi-Hsien Lin Subject: [PATCH 03/11] brcmfmac: set SDIO F1 MesBusyCtrl for CYW4373 Thread-Topic: [PATCH 03/11] brcmfmac: set SDIO F1 MesBusyCtrl for CYW4373 Thread-Index: AQHUdYPVn+i9i21xekCPH9fEAxhKOQ== Date: Tue, 6 Nov 2018 03:50:18 +0000 Message-ID: <1541476188-75475-4-git-send-email-chi-hsien.lin@cypress.com> References: <1541476188-75475-1-git-send-email-chi-hsien.lin@cypress.com> In-Reply-To: <1541476188-75475-1-git-send-email-chi-hsien.lin@cypress.com> Accept-Language: en-US, zh-TW Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [12.110.209.245] x-clientproxiedby: MWHPR2201CA0082.namprd22.prod.outlook.com (2603:10b6:301:5e::35) To BY1PR0601MB1436.namprd06.prod.outlook.com (2a01:111:e400:522c::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chi-Hsien.Lin@cypress.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR0601MB1142;6:+gXkxoJoidZEahBcQobN4vk+9WCApKJtYMZhlIQCdoA3fOFs1lkuPwIPWGRTA7//d4oB1I0PQ8B6s+Wl0hx9K62bEZcznZaunYdh08mf1AZMgwyQke8f+Ds0wHPet/trD2TMciAc2QZaaqtX942Nt0GsGCJoO/762B/LYCpcX8G5W5S14aJZr19EVaXEIApBIyTHSqEUBkOAgH6XFph7Xy1F4pC2GrcgnQfpeNxCDoKxAznOOnfa9K8P/Q1VsNIK8bMyDIrct0++wIeUj5UnC6GZiHuRxceUQrFZkWgkS2VCsu17L5CkPzxlb6jrKf9OJCj+S2zZbDisHMbkYV4JgHCaGduu62faqrLvQCsB+GsKLSYnr4aVOVrcMMrBGHCDbnbhSbNg8G/8kankAjEaiPYPAWy+/zJbxQMRJb2EZjA+0xE0X+Ng5ECZhqdiHhJOrpqmwmzwATk6mKLGhtODyg==;5:4qx0lk9V8dI4DPWm7NvZFtUdBdtWmI/TnpwcUN6bzf8O3j4a4gA+OHfmVacC13NdUfLBmy+OdH1uDMRwCJYP2gp/dDdbRFacgVHLY9hLQDt25UD6YEcSCtZWr9DiYRfHsyBDv3GmjuFZWN0eoGNHE8BJHUPFkjRuDISVskuE+GU=;7:LMxDMiHmvTD25r44rNJoAofCs/3KnELHiLL6WQ77BUdGCgeEhuo0t9Ag2ZCJZMRBA1xhJtPGEY9CsOXNUU5KScyFrHK3hlGnXPOWjUc/I9+YKZZuvGNOlvgFV5hZryZeBU9w7P53w8rdmtnHURJgtQ== x-ms-office365-filtering-correlation-id: 998984a3-5485-405e-5bb0-08d6439af7d3 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:BY1PR0601MB1142; x-ms-traffictypediagnostic: BY1PR0601MB1142: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(258095267146985); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231382)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:BY1PR0601MB1142;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0601MB1142; x-forefront-prvs: 0848C1A6AA x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(136003)(396003)(376002)(366004)(39860400002)(346002)(199004)(189003)(6506007)(36756003)(386003)(102836004)(186003)(2906002)(6916009)(8936002)(54906003)(5660300001)(81156014)(5640700003)(81166006)(14454004)(26005)(8676002)(476003)(486006)(2351001)(2616005)(446003)(97736004)(11346002)(6436002)(106356001)(105586002)(6512007)(256004)(6486002)(14444005)(4326008)(3846002)(6116002)(7736002)(68736007)(99286004)(72206003)(53936002)(305945005)(76176011)(66066001)(2501003)(575784001)(107886003)(86362001)(316002)(71200400001)(71190400001)(52116002)(25786009)(478600001)(2900100001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR0601MB1142;H:BY1PR0601MB1436.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: W7/sTsttCKX+FLXpOFxpekB0bzKESTQ4TfDw5Kk1grMWamnDQ4fUoZlPVtaIauDEhD2uPvXEnf30kjnGhmzo+cvZaMev4df1TLMtvlNzzBTc4O1Dk9Wqnf3S+wkvt8SQQj8CAEuz3X0i4PALcdVfVprUwrHABD0A0pBlM4QYq78mDfXM0YLREaWqyd3SDUCvrMnFq/GedD/rBRjhP35hiADuqtz/xrPayEGlZdaPkQAvkxM1leiR/jRZJhwoKy+2SFRQwBIzspfoW4YCbZFmEDHzmXEUVN3M7Yvu6zkjsIIWV26/78PsShJEvQRGEfy5IKuB+NGXhfn21EHTkeI8VpBBYlTTJR9B5Dg+gMN1OCM= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 998984a3-5485-405e-5bb0-08d6439af7d3 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Nov 2018 03:50:18.5996 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0601MB1142 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Madhan Mohan R Along with F2 watermark (existing) configuration, F1 MesBusyCtrl should be enabled & configured to avoid overflow errors. Signed-off-by: Madhan Mohan R Signed-off-by: Chi-Hsien Lin Reviewed-by: Arend van Spriel --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 3 +++ drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index 541d54661c9e..34a838fcc319 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -51,6 +51,7 @@ #define DEFAULT_F2_WATERMARK 0x8 #define CY_4373_F2_WATERMARK 0x40 +#define CY_4373_F1_MESBUSYCTRL (CY_4373_F2_WATERMARK | SBSDIO_MESBUSYCTRL_ENAB) #ifdef DEBUG @@ -4118,6 +4119,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_4373_F1_MESBUSYCTRL, &err); break; default: brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h index 7faed831f07d..8aaabca1eb0e 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h @@ -104,6 +104,9 @@ #define SBSDIO_FUNC1_RFRAMEBCHI 0x1001C /* MesBusyCtl (rev 11) */ #define SBSDIO_FUNC1_MESBUSYCTRL 0x1001D +/* Enable busy capability for MES access */ +#define SBSDIO_MESBUSYCTRL_ENAB 0x80 + /* Sdio Core Rev 12 */ #define SBSDIO_FUNC1_WAKEUPCTRL 0x1001E #define SBSDIO_FUNC1_WCTRL_ALPWAIT_MASK 0x1 From patchwork Tue Nov 6 03:50:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 10669555 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 76C7617D4 for ; Tue, 6 Nov 2018 03:50:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 670E429F53 for ; Tue, 6 Nov 2018 03:50:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5AE682A012; Tue, 6 Nov 2018 03:50:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA4B029F53 for ; Tue, 6 Nov 2018 03:50:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729320AbeKFNNm (ORCPT ); Tue, 6 Nov 2018 08:13:42 -0500 Received: from mail-eopbgr810120.outbound.protection.outlook.com ([40.107.81.120]:58734 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729628AbeKFNNm (ORCPT ); Tue, 6 Nov 2018 08:13:42 -0500 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=Efi3va6LFy4PyPNTy0dlJ3j4dVbq0Oe2qjH6de9WAzc=; b=BmbeHItz+4K8eEkOwgHg1q5p4o2Ck0TRndRhNXPOvK67UXGhzn18NQFGp2G9Ozoc48fflSnSfrh2DTuACT+rPmOCJU3NKBRnDrIMJcaB8bPDLXYrI+gaZ8KbqQKusyoEZ84b7ueoX2qE//PXX0zFJvo5MU3Ej9bgsQr+3yibFts= Received: from BY1PR0601MB1436.namprd06.prod.outlook.com (10.162.111.23) by BY1PR0601MB1142.namprd06.prod.outlook.com (10.160.196.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.27; Tue, 6 Nov 2018 03:50:20 +0000 Received: from BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979]) by BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979%3]) with mapi id 15.20.1294.032; Tue, 6 Nov 2018 03:50:20 +0000 From: Chi-Hsien Lin To: "linux-wireless@vger.kernel.org" CC: "brcm80211-dev-list@broadcom.com" , brcm80211-dev-list , Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Chi-Hsien Lin Subject: [PATCH 04/11] brcmfmac: add support for CYW43012 SDIO chipset Thread-Topic: [PATCH 04/11] brcmfmac: add support for CYW43012 SDIO chipset Thread-Index: AQHUdYPWpm0KZ+LuEUeOEYV1k1antw== Date: Tue, 6 Nov 2018 03:50:20 +0000 Message-ID: <1541476188-75475-5-git-send-email-chi-hsien.lin@cypress.com> References: <1541476188-75475-1-git-send-email-chi-hsien.lin@cypress.com> In-Reply-To: <1541476188-75475-1-git-send-email-chi-hsien.lin@cypress.com> Accept-Language: en-US, zh-TW Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [12.110.209.245] x-clientproxiedby: MWHPR2201CA0082.namprd22.prod.outlook.com (2603:10b6:301:5e::35) To BY1PR0601MB1436.namprd06.prod.outlook.com (2a01:111:e400:522c::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chi-Hsien.Lin@cypress.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR0601MB1142;6:Qhy2E8EHCkHKmEfVuJjyCAW+/FAwNpe992UUB9aF8nThSrHHs55CtLv8HW1WG3FWm9DDnE4lAzXnPU/DVJuai+o3rx2dI23hzHDo7git1Tn9R5ailvwrrstlNinlBcCTuIHD3JYRBooYYkzoCBgOEXpX0ixP5OlwDSF6984b2xfxrgOHdA6xzn4K4yJ4qWZDxt8NKJwLXjPlhZw3esvqSmVsCwnXRiZHBe74hMFgVC2LDnfZUO7DsbAqloSIKLzcJc4Hj3aRbeZlqrvmWXszrATGZ1Ac0arKvX0w1VuX5TaKHS5Rjgps3482cScFNaDnCi1GljRydZjVmKw9FOg9yGkNpEscQjhWnJeA4Laq8LrTDc0T13C92glLXiGn9W1EQURBUZYSldnOtqVkLIXlsUrX9KVv9BH3OPOfx8KYYmeIcWBUIoO1piuDM3GDf6wZuaYxy5HFvgca6Kg0iloarw==;5:ATEJBPqbk22VtOgUIeoFQU6q7mm0c8sia0cqlYTzBY/sNKCQdOWd1z7eQPmrFx058Y7JYNoX7XpGaLLl3SDaMSuzLPSCpWtFaIgLRG+Sr49f4YEDLjRwnRGB/bEuw0/A2lWrSPKJfKP4W8Ejj4mkSlt7Vhd9uw2LPWFI1Wo+yjs=;7:dUZQt9KCUIm5l/RCj9zvBLnnPAeJc0xA0UgJchoHDVRCVZ9cXUamBcQuI5hs+mu62W2AtFR14zA6SRB/zG5pgSeFjQA/fsbtL343B5crX+XvSKXov5K8KC5qFgvQvcHeFpgzD9QZtpGTrZ+5h5ds3w== x-ms-office365-filtering-correlation-id: 28f8d581-956a-4321-e552-08d6439af8b6 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:BY1PR0601MB1142; x-ms-traffictypediagnostic: BY1PR0601MB1142: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(258095267146985); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231382)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:BY1PR0601MB1142;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0601MB1142; x-forefront-prvs: 0848C1A6AA x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(136003)(396003)(376002)(366004)(39860400002)(346002)(199004)(189003)(6506007)(36756003)(386003)(102836004)(186003)(2906002)(6916009)(8936002)(54906003)(5660300001)(81156014)(5640700003)(81166006)(14454004)(26005)(8676002)(476003)(486006)(2351001)(2616005)(446003)(97736004)(11346002)(6436002)(106356001)(105586002)(6512007)(256004)(6486002)(4326008)(3846002)(6116002)(7736002)(68736007)(99286004)(72206003)(53936002)(305945005)(76176011)(66066001)(2501003)(575784001)(107886003)(86362001)(316002)(71200400001)(71190400001)(52116002)(25786009)(478600001)(2900100001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR0601MB1142;H:BY1PR0601MB1436.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: IyXwpUQuLdmDdO1mhBPvIBQ8XcSal8egrsl/0Jh7GQ7GIcdMV5tcCaYhRkfEbVsIyRIhXSrBSUEFfsew9nO4nHajep7PF1y/ef47FK2nRBA3+P4wLrDYZxcuKs7tUVR0sE8UgbkRxAN2+DjYw/avQaFXm7n5U05Nz4fIqa/8MVKSKkRE0lpWYF3eNC365zZ63TeCtJLzMWCd6YSBHl8Tpq9iVP8nKuZ66QhOMa51Gms/XA0x0w5Dc2XJtA1fTkOkKQO4kfY8SHpo5VpJ9NEAe5PIobj3GMm8rQAHBI+yLMBUgKNI88I5JTQS5WPwG6e0NZamXqCTchNJq4ArfvkwDRqt8JeiYvEUyKiDBHaYoPI= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 28f8d581-956a-4321-e552-08d6439af8b6 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Nov 2018 03:50:20.1268 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0601MB1142 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP CYW43012 is a 1x1 802.11a/b/g/n Dual-Band HT20, 256-QAM/Turbo QAM. It is an Ultra Low Power WLAN+BT combo chip. Signed-off-by: Chi-Hsien Lin Reviewed-by: Arend van Spriel --- .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 1 + .../wireless/broadcom/brcm80211/brcmfmac/chip.c | 9 ++++- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 40 ++++++++++++++++++---- .../broadcom/brcm80211/include/brcm_hw_ids.h | 1 + include/linux/mmc/sdio_ids.h | 1 + 5 files changed, 45 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c index 3e37c8cf82c6..c1d4f93f7347 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c @@ -972,6 +972,7 @@ static const struct sdio_device_id brcmf_sdmmc_ids[] = { BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4354), BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4356), BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_CYPRESS_4373), + BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_CYPRESS_43012), { /* end: all zeroes */ } }; MODULE_DEVICE_TABLE(sdio, brcmf_sdmmc_ids); diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c index 927d62b3d41b..60fd3018534e 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c @@ -165,6 +165,7 @@ struct sbconfig { #define SRCI_LSS_MASK 0x00f00000 #define SRCI_LSS_SHIFT 20 #define SRCI_SRNB_MASK 0xf0 +#define SRCI_SRNB_MASK_EXT 0x100 #define SRCI_SRNB_SHIFT 4 #define SRCI_SRBSZ_MASK 0xf #define SRCI_SRBSZ_SHIFT 0 @@ -592,7 +593,13 @@ static void brcmf_chip_socram_ramsize(struct brcmf_core_priv *sr, u32 *ramsize, if (lss != 0) *ramsize += (1 << ((lss - 1) + SR_BSZ_BASE)); } else { - nb = (coreinfo & SRCI_SRNB_MASK) >> SRCI_SRNB_SHIFT; + /* length of SRAM Banks increased for corerev greater than 23 */ + if (sr->pub.rev >= 23) { + nb = (coreinfo & (SRCI_SRNB_MASK | SRCI_SRNB_MASK_EXT)) + >> SRCI_SRNB_SHIFT; + } else { + nb = (coreinfo & SRCI_SRNB_MASK) >> SRCI_SRNB_SHIFT; + } for (i = 0; i < nb; i++) { retent = brcmf_chip_socram_banksize(sr, i, &banksize); *ramsize += banksize; diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index 34a838fcc319..299f59f58d8c 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -624,6 +624,7 @@ BRCMF_FW_DEF(43455, "brcmfmac43455-sdio"); BRCMF_FW_DEF(4354, "brcmfmac4354-sdio"); BRCMF_FW_DEF(4356, "brcmfmac4356-sdio"); BRCMF_FW_DEF(4373, "brcmfmac4373-sdio"); +BRCMF_FW_DEF(43012, "brcmfmac43012-sdio"); static const struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = { BRCMF_FW_ENTRY(BRCM_CC_43143_CHIP_ID, 0xFFFFFFFF, 43143), @@ -643,7 +644,8 @@ static const struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = { BRCMF_FW_ENTRY(BRCM_CC_4345_CHIP_ID, 0xFFFFFFC0, 43455), BRCMF_FW_ENTRY(BRCM_CC_4354_CHIP_ID, 0xFFFFFFFF, 4354), BRCMF_FW_ENTRY(BRCM_CC_4356_CHIP_ID, 0xFFFFFFFF, 4356), - BRCMF_FW_ENTRY(CY_CC_4373_CHIP_ID, 0xFFFFFFFF, 4373) + BRCMF_FW_ENTRY(CY_CC_4373_CHIP_ID, 0xFFFFFFFF, 4373), + BRCMF_FW_ENTRY(CY_CC_43012_CHIP_ID, 0xFFFFFFFF, 43012) }; static void pkt_align(struct sk_buff *p, int len, int align) @@ -677,6 +679,15 @@ brcmf_sdio_kso_control(struct brcmf_sdio *bus, bool on) /* 1st KSO write goes to AOS wake up core if device is asleep */ brcmf_sdiod_writeb(bus->sdiodev, SBSDIO_FUNC1_SLEEPCSR, wr_val, &err); + /* In case of 43012 chip, the chip could go down immediately after + * KSO bit is cleared. So the further reads of KSO register could + * fail. Thereby just bailing out immediately after clearing KSO + * bit, to avoid polling of KSO bit. + */ + if (!on && bus->ci->chip == CY_CC_43012_CHIP_ID) { + return err; + } + if (on) { /* device WAKEUP through KSO: * write bit 0 & read back until @@ -2436,9 +2447,20 @@ static void brcmf_sdio_bus_stop(struct device *dev) /* Force backplane clocks to assure F2 interrupt propagates */ saveclk = brcmf_sdiod_readb(sdiodev, SBSDIO_FUNC1_CHIPCLKCSR, &err); - if (!err) - brcmf_sdiod_writeb(sdiodev, SBSDIO_FUNC1_CHIPCLKCSR, - (saveclk | SBSDIO_FORCE_HT), &err); + if (!err) { + if (bus->ci->chip == CY_CC_43012_CHIP_ID) { + brcmf_sdiod_writeb(sdiodev, + SBSDIO_FUNC1_CHIPCLKCSR, + (saveclk | + SBSDIO_HT_AVAIL_REQ), + &err); + } else { + brcmf_sdiod_writeb(sdiodev, + SBSDIO_FUNC1_CHIPCLKCSR, + (saveclk | SBSDIO_FORCE_HT), + &err); + } + } if (err) brcmf_err("Failed to force clock for F2: err %d\n", err); @@ -4085,8 +4107,14 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err, /* Force clocks on backplane to be sure F2 interrupt propagates */ saveclk = brcmf_sdiod_readb(sdiod, SBSDIO_FUNC1_CHIPCLKCSR, &err); if (!err) { - brcmf_sdiod_writeb(sdiod, SBSDIO_FUNC1_CHIPCLKCSR, - (saveclk | SBSDIO_FORCE_HT), &err); + if (bus->ci->chip == CY_CC_43012_CHIP_ID) { + brcmf_sdiod_writeb(sdiod, SBSDIO_FUNC1_CHIPCLKCSR, + (saveclk | SBSDIO_HT_AVAIL_REQ), + &err); + } else { + brcmf_sdiod_writeb(sdiod, SBSDIO_FUNC1_CHIPCLKCSR, + (saveclk | SBSDIO_FORCE_HT), &err); + } } if (err) { brcmf_err("Failed to force clock for F2: err %d\n", err); diff --git a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h index acb87238922f..839980da9643 100644 --- a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h +++ b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h @@ -60,6 +60,7 @@ #define BRCM_CC_43664_CHIP_ID 43664 #define BRCM_CC_4371_CHIP_ID 0x4371 #define CY_CC_4373_CHIP_ID 0x4373 +#define CY_CC_43012_CHIP_ID 43012 /* USB Device IDs */ #define BRCM_USB_43143_DEVICE_ID 0xbd1e diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h index 4224902a8e22..4332199c71c2 100644 --- a/include/linux/mmc/sdio_ids.h +++ b/include/linux/mmc/sdio_ids.h @@ -42,6 +42,7 @@ #define SDIO_DEVICE_ID_BROADCOM_4354 0x4354 #define SDIO_DEVICE_ID_BROADCOM_4356 0x4356 #define SDIO_DEVICE_ID_CYPRESS_4373 0x4373 +#define SDIO_DEVICE_ID_CYPRESS_43012 43012 #define SDIO_VENDOR_ID_INTEL 0x0089 #define SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX 0x1402 From patchwork Tue Nov 6 03:50:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 10669557 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AFA6D1751 for ; Tue, 6 Nov 2018 03:50:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A0A7229F53 for ; Tue, 6 Nov 2018 03:50:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 94ADE29F5E; Tue, 6 Nov 2018 03:50:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0534329F5E for ; Tue, 6 Nov 2018 03:50:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387398AbeKFNNn (ORCPT ); Tue, 6 Nov 2018 08:13:43 -0500 Received: from mail-eopbgr810120.outbound.protection.outlook.com ([40.107.81.120]:58734 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728971AbeKFNNn (ORCPT ); Tue, 6 Nov 2018 08:13:43 -0500 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=Yps4oVlOT51g24lvIYUn+Se2kUM/8fyzB0DRw85/Czs=; b=AA7Sac5y73NNVhHcUuxOveRk3hJ6FsGVBJH0AkvwASM91F926OA3K8Jq2VRU+QyWlRCNpIgCtcJ/rvJ6035Ea/2SXUm2Mxcj7RG4Koh8spkeZYon0pG9SrS5EyFBiOVA8Fhyeixn6DSqSeoV+zzeL1EC0Nw0NdsaEWQx++PkRUo= Received: from BY1PR0601MB1436.namprd06.prod.outlook.com (10.162.111.23) by BY1PR0601MB1142.namprd06.prod.outlook.com (10.160.196.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.27; Tue, 6 Nov 2018 03:50:21 +0000 Received: from BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979]) by BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979%3]) with mapi id 15.20.1294.032; Tue, 6 Nov 2018 03:50:21 +0000 From: Chi-Hsien Lin To: "linux-wireless@vger.kernel.org" CC: "brcm80211-dev-list@broadcom.com" , brcm80211-dev-list , Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Chi-Hsien Lin Subject: [PATCH 05/11] brcmfmac: allow GCI core enumuration Thread-Topic: [PATCH 05/11] brcmfmac: allow GCI core enumuration Thread-Index: AQHUdYPX7fFoiV5gjkm03Sx4slY+xw== Date: Tue, 6 Nov 2018 03:50:21 +0000 Message-ID: <1541476188-75475-6-git-send-email-chi-hsien.lin@cypress.com> References: <1541476188-75475-1-git-send-email-chi-hsien.lin@cypress.com> In-Reply-To: <1541476188-75475-1-git-send-email-chi-hsien.lin@cypress.com> Accept-Language: en-US, zh-TW Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [12.110.209.245] x-clientproxiedby: MWHPR2201CA0082.namprd22.prod.outlook.com (2603:10b6:301:5e::35) To BY1PR0601MB1436.namprd06.prod.outlook.com (2a01:111:e400:522c::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chi-Hsien.Lin@cypress.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR0601MB1142;6:bsU2m5/Q/9PHP8l2TRBtEvY6/S6qZAvDzNbgRrxKTo97M8+58u2Pms7TD3ZGI6wUEJbmslW7oW/GMOv1c9trvtKrwgam1rhKrTXR74UumvrUR9yIbywUXsX5xiRmiaNG1kEBIAivdVnvgfm5w6hTEgE7fOP6wSQYRKE+J1ooTX91WyHD/FkAiabPZr2HUYA/y33HeN3Dks3zX5eCJg6RAzwZzrbajCvw64oMWLccBSXml9B6h+FxXBJqnD0icUneigXZtn2YyMP8ocihyvljb5O+xuR3xF9z0q6I6B3n+Oo42OsnN7DQvleglDOxMCAwg972uTlihXs2Ae1lGUk+o/gzQZjo+qUKKFuHldAGpzMDWM0iXamOBgIvhPG5ApFiHEiI7AZ4fHsGtD+cxaKYt4Gneb2T5ZBYyDsFqEMzX5mpeuywcvWoAxDcFwdRboupab9+yNQPJaiekE+MCoPJ4w==;5:CfefuHztoI69bEluHHLxSha+MbY2sfbFpc2+w9kUStKk9fZ97HlLIdnK1KDIrl7iuFBHGHz0uETDOSnTa58VmREsxxyMJJYVtx2kHtPP8uoeiZh3K9iblz6NpKOiS7fgpx6LKVEQBVnMUC3HpbFQpwthT/YtikkX1yfct6lre3w=;7:6tbfTk7FaWzSo8Lb18ExAJVW2joxHtNBoJWxQgIMSgeNll7Kg8IJJAmPBP7fQxTCKOZ1xawFRoK6VWpW9gt4wFBQuWpaCb7h06R3TIXuDRCFboECm67Y9B4lWnuS8Hrl//+tPhwIq58JUKpf1iOyUQ== x-ms-office365-filtering-correlation-id: bf6340dd-dd71-4dd8-6767-08d6439af99e x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:BY1PR0601MB1142; x-ms-traffictypediagnostic: BY1PR0601MB1142: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(258095267146985); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231382)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:BY1PR0601MB1142;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0601MB1142; x-forefront-prvs: 0848C1A6AA x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(136003)(396003)(376002)(366004)(39860400002)(346002)(199004)(189003)(6506007)(36756003)(386003)(102836004)(186003)(2906002)(6916009)(8936002)(54906003)(5660300001)(81156014)(5640700003)(81166006)(14454004)(26005)(8676002)(476003)(486006)(2351001)(2616005)(446003)(97736004)(11346002)(6436002)(106356001)(105586002)(6512007)(256004)(6486002)(4326008)(3846002)(6116002)(7736002)(68736007)(99286004)(72206003)(53936002)(305945005)(76176011)(66066001)(2501003)(107886003)(86362001)(316002)(71200400001)(71190400001)(52116002)(25786009)(478600001)(2900100001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR0601MB1142;H:BY1PR0601MB1436.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 4qvYzd3R9Qijjqq/5kkZlDCqCYJ3SLJFSlkAalDGXBxxK1F9jJoea7X7Q1k6KWnmjtPSjg19NYEnVXfLCCjXOboXFwVbNiMfbz19CSjxQTnnlETScnOV5zEmS2j4CmaR+s+KWaYD7STyMyQlPFyhxn7l25EmR7WkRNRCfTo0Kd8ZQX3ptup2IBWDZ2chl/fwicUMNq2djijxhMOllHBBvj4PVND8wHYg371leMIHAdgrojXTBvgEdBtEAzf71rRY4eIV343toAPaW6nc/m4IhGSZuN53cN4UK/OMJLjklcAprk3ilQaT4lskXygMqhlwXduYQBcqcT0v/6hqqrQ/EieWZHlYuJN8pXUOZrwjTq8= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: bf6340dd-dd71-4dd8-6767-08d6439af99e X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Nov 2018 03:50:21.5919 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0601MB1142 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP GCI core is needed for ULP operation. Allow GCI core enumuration with below changes: - Allow GCI to be added to core list even when it doesn't have a wrapper. - Allow 8K address space size. - Don't overwrite the address value when an additional size descriptor is in place. Signed-off-by: Chi-Hsien Lin Reviewed-by: Arend van Spriel --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c index 60fd3018534e..7d5005d75e01 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c @@ -786,7 +786,7 @@ static int brcmf_chip_dmp_get_regaddr(struct brcmf_chip_priv *ci, u32 *eromaddr, u32 *regbase, u32 *wrapbase) { u8 desc; - u32 val; + u32 val, szdesc; u8 mpnum = 0; u8 stype, sztype, wraptype; @@ -832,14 +832,15 @@ static int brcmf_chip_dmp_get_regaddr(struct brcmf_chip_priv *ci, u32 *eromaddr, /* next size descriptor can be skipped */ if (sztype == DMP_SLAVE_SIZE_DESC) { - val = brcmf_chip_dmp_get_desc(ci, eromaddr, NULL); + szdesc = brcmf_chip_dmp_get_desc(ci, eromaddr, NULL); /* skip upper size descriptor if present */ - if (val & DMP_DESC_ADDRSIZE_GT32) + if (szdesc & DMP_DESC_ADDRSIZE_GT32) brcmf_chip_dmp_get_desc(ci, eromaddr, NULL); } - /* only look for 4K register regions */ - if (sztype != DMP_SLAVE_SIZE_4K) + /* look for 4K or 8K register regions */ + if (sztype != DMP_SLAVE_SIZE_4K && + sztype != DMP_SLAVE_SIZE_8K) continue; stype = (val & DMP_SLAVE_TYPE) >> DMP_SLAVE_TYPE_S; @@ -896,7 +897,8 @@ int brcmf_chip_dmp_erom_scan(struct brcmf_chip_priv *ci) /* need core with ports */ if (nmw + nsw == 0 && - id != BCMA_CORE_PMU) + id != BCMA_CORE_PMU && + id != BCMA_CORE_GCI) continue; /* try to obtain register address info */ From patchwork Tue Nov 6 03:50:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 10669559 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1355B13AD for ; Tue, 6 Nov 2018 03:50:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 03AC329F53 for ; Tue, 6 Nov 2018 03:50:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EC41829FD6; Tue, 6 Nov 2018 03:50:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 78EB029F53 for ; Tue, 6 Nov 2018 03:50:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387405AbeKFNNo (ORCPT ); Tue, 6 Nov 2018 08:13:44 -0500 Received: from mail-eopbgr810120.outbound.protection.outlook.com ([40.107.81.120]:58734 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729628AbeKFNNo (ORCPT ); Tue, 6 Nov 2018 08:13:44 -0500 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=aJAT+SxHmfNnr8AnIdsXmBWz92ZbcFSvW3usvTAD/tA=; b=nF7qiRyZQ7Y/VTY5kf1Qzm0BiedR9FGNGMozjryeZamV+mmVnaT57pj8ET5EwTU0YPplVpUI4/gb1YBrWs/dEp5yatR7rK9NSvIrbPI7u2MFgPW3K6Y3jOFJ2Vb9cOOUxsS5Z/yXJHudFOvGJNxWal9kXusg+LM9yKPNJbVQ3LI= Received: from BY1PR0601MB1436.namprd06.prod.outlook.com (10.162.111.23) by BY1PR0601MB1142.namprd06.prod.outlook.com (10.160.196.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.27; Tue, 6 Nov 2018 03:50:23 +0000 Received: from BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979]) by BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979%3]) with mapi id 15.20.1294.032; Tue, 6 Nov 2018 03:50:23 +0000 From: Chi-Hsien Lin To: "linux-wireless@vger.kernel.org" CC: "brcm80211-dev-list@broadcom.com" , brcm80211-dev-list , Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Praveen Babu Chandran , Chi-Hsien Lin Subject: [PATCH 06/11] brcmfmac: saverestore support changes for 43012 Thread-Topic: [PATCH 06/11] brcmfmac: saverestore support changes for 43012 Thread-Index: AQHUdYPYR8zoDI+kq0mivIEV6A+foQ== Date: Tue, 6 Nov 2018 03:50:23 +0000 Message-ID: <1541476188-75475-7-git-send-email-chi-hsien.lin@cypress.com> References: <1541476188-75475-1-git-send-email-chi-hsien.lin@cypress.com> In-Reply-To: <1541476188-75475-1-git-send-email-chi-hsien.lin@cypress.com> Accept-Language: en-US, zh-TW Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [12.110.209.245] x-clientproxiedby: MWHPR2201CA0082.namprd22.prod.outlook.com (2603:10b6:301:5e::35) To BY1PR0601MB1436.namprd06.prod.outlook.com (2a01:111:e400:522c::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chi-Hsien.Lin@cypress.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR0601MB1142;6:3/LmfYgsKtcaZ01Nj9gNBEwHpsn2Ek25UQI1YUX2kF4YqNS9Puup2Zm9r2jDfd3dtzLjPpHy1T9nsH6ODHKCRNnjmkoG8+8kqU3cDlnAAE+7VUoGwCY+sCZXKPgLHDiog7FZf3wjqq6aLViqsxtDag8AtLGIyWm09BNJshYGoZXSne5BgL7NCRUyPARqoxvOQ98hHsDVvbYtuJ1zGi3GJtabGe6TLG8/NPqr2yNlP7AZPR5CmqBlwBUGIsdC3rGM3OVAf1CsOJ46+qfkzIhBl8h8KZfhAcbeqfFcOZYvtB2oilHtoyhh9fiQM7Bsb+NLMyj3eeEYR2V1VRZ9aRiOcSCa4gOYoMhsm/w8nPUW93o6zblY4jWb/CcNLXdm512cGIhoDkgxiTvCuFAx9XFYiLR8bD0vsTgZRXrsojDT3hhDLXvQWyZ8LgEVBjWy7U8lJ1jlfj3QP7gsIqe/186g1g==;5:g12pGh5erAkaAfKHHCqHXxQExmu/OQN8ngRoUWJJW5OgN6984Depwnw1gGfjfLdyBsg1gNqA/dY1SKpS5cWwULrgtWvmSA6wWfgB3N29NGORitMdFwBY26FF6CbCcrC+qnc0HNJ1CcZ1O9KvGOGj+XYjDPQ2EeNTm1w+zrMI77E=;7:sZ46mBGA5iKu8V53mFRUES/SQULSiOy7zYYjpOBA6NJtsbrN+rVSzTsIQW7HBd2FCqULeun1pNpyx1ZsfE9AwGZ5NMuj27kZ6fgXv0X68qZTL2xwsG1rRU/CkFA1XdZ9ubLNr3JNpEayfvmwAIqzCg== x-ms-office365-filtering-correlation-id: b9997e13-bb4c-491e-f759-08d6439afa88 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:BY1PR0601MB1142; x-ms-traffictypediagnostic: BY1PR0601MB1142: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(258095267146985); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231382)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:BY1PR0601MB1142;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0601MB1142; x-forefront-prvs: 0848C1A6AA x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(136003)(396003)(376002)(366004)(39860400002)(346002)(199004)(189003)(6506007)(36756003)(386003)(102836004)(186003)(2906002)(6916009)(8936002)(54906003)(5660300001)(81156014)(5640700003)(81166006)(14454004)(26005)(8676002)(476003)(486006)(2351001)(2616005)(446003)(97736004)(11346002)(6436002)(106356001)(105586002)(6512007)(256004)(6486002)(4326008)(3846002)(6116002)(7736002)(68736007)(99286004)(72206003)(53936002)(305945005)(76176011)(66066001)(2501003)(107886003)(86362001)(316002)(71200400001)(71190400001)(52116002)(25786009)(478600001)(2900100001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR0601MB1142;H:BY1PR0601MB1436.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: XuqR6H8dSRJ9HHUihB8NPlENQWjPhdT1w/dntNopq9ayyzUspaVfJqBS/uRPWeYptQQYEoXGHLHbjDs0zZGzR2AH82151SgSIuDU2nAWAAapzwRZ72z+LCBhchE7WQzsXm84YrjjG8K9yFCodjY/6Dgmn7lhq/6nBhjATEcays63kjO0X4XRFm2LGMtpFYoM9y2tE6Av2/nu9uMcBp2LpHsuLhfomCAicd2ZxgNAU8pCJEWESKRAGLN6bwvDLMb3JlAJw2towZlWSyoA+GJcdMGwZ+pxZHgB3LQJiOfIof32wgi/SQxztPlsO/CCJMAyzzv+iQ1cFUwsf9/vedoXek7U/7RBKEeQULqC0SLs3o0= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: b9997e13-bb4c-491e-f759-08d6439afa88 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Nov 2018 03:50:23.2132 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0601MB1142 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Praveen Babu C Add saverestore register settings for 43012. Signed-off-by: Praveen Babu C Signed-off-by: Chi-Hsien Lin Reviewed-by: Arend van Spriel --- .../wireless/broadcom/brcm80211/brcmfmac/chip.c | 5 +++++ .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 22 +++++++++++++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c index 7d5005d75e01..a8d3b96b727f 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c @@ -1365,6 +1365,11 @@ bool brcmf_chip_sr_capable(struct brcmf_chip *pub) addr = CORE_CC_REG(base, sr_control1); reg = chip->ops->read32(chip->ctx, addr); return reg != 0; + case CY_CC_43012_CHIP_ID: + addr = CORE_CC_REG(pmu->base, retention_ctl); + reg = chip->ops->read32(chip->ctx, addr); + return (reg & (PMU_RCTL_MACPHY_DISABLE_MASK | + PMU_RCTL_LOGIC_DISABLE_MASK)) == 0; default: addr = CORE_CC_REG(pmu->base, pmucapabilities_ext); reg = chip->ops->read32(chip->ctx, addr); diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index 299f59f58d8c..a32eb5f868b5 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -3354,16 +3354,29 @@ static void brcmf_sdio_sr_init(struct brcmf_sdio *bus) { int err = 0; u8 val; + u8 wakeupctrl; + u8 cardcap; + u8 chipclkcsr; brcmf_dbg(TRACE, "Enter\n"); + if (bus->ci->chip == CY_CC_43012_CHIP_ID) { + wakeupctrl = SBSDIO_FUNC1_WCTRL_ALPWAIT_SHIFT; + cardcap = SDIO_CCCR_BRCM_CARDCAP_CMD_NODEC; + chipclkcsr = SBSDIO_HT_AVAIL_REQ; + } else { + wakeupctrl = SBSDIO_FUNC1_WCTRL_HTWAIT_SHIFT; + cardcap = (SDIO_CCCR_BRCM_CARDCAP_CMD14_SUPPORT | + SDIO_CCCR_BRCM_CARDCAP_CMD14_EXT); + chipclkcsr = SBSDIO_FORCE_HT; + } + val = brcmf_sdiod_readb(bus->sdiodev, SBSDIO_FUNC1_WAKEUPCTRL, &err); if (err) { brcmf_err("error reading SBSDIO_FUNC1_WAKEUPCTRL\n"); return; } - - val |= 1 << SBSDIO_FUNC1_WCTRL_HTWAIT_SHIFT; + val |= 1 << wakeupctrl; brcmf_sdiod_writeb(bus->sdiodev, SBSDIO_FUNC1_WAKEUPCTRL, val, &err); if (err) { brcmf_err("error writing SBSDIO_FUNC1_WAKEUPCTRL\n"); @@ -3372,8 +3385,7 @@ static void brcmf_sdio_sr_init(struct brcmf_sdio *bus) /* Add CMD14 Support */ brcmf_sdiod_func0_wb(bus->sdiodev, SDIO_CCCR_BRCM_CARDCAP, - (SDIO_CCCR_BRCM_CARDCAP_CMD14_SUPPORT | - SDIO_CCCR_BRCM_CARDCAP_CMD14_EXT), + cardcap, &err); if (err) { brcmf_err("error writing SDIO_CCCR_BRCM_CARDCAP\n"); @@ -3381,7 +3393,7 @@ static void brcmf_sdio_sr_init(struct brcmf_sdio *bus) } brcmf_sdiod_writeb(bus->sdiodev, SBSDIO_FUNC1_CHIPCLKCSR, - SBSDIO_FORCE_HT, &err); + chipclkcsr, &err); if (err) { brcmf_err("error writing SBSDIO_FUNC1_CHIPCLKCSR\n"); return; From patchwork Tue Nov 6 03:50:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 10669561 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 566661751 for ; Tue, 6 Nov 2018 03:50:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4598629F53 for ; Tue, 6 Nov 2018 03:50:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A01529FD6; Tue, 6 Nov 2018 03:50:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D2FC329F53 for ; Tue, 6 Nov 2018 03:50:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387439AbeKFNNp (ORCPT ); Tue, 6 Nov 2018 08:13:45 -0500 Received: from mail-eopbgr810120.outbound.protection.outlook.com ([40.107.81.120]:58734 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387399AbeKFNNp (ORCPT ); Tue, 6 Nov 2018 08:13:45 -0500 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=WG8GXk1ojICSUNbxz8B5PVaj87oNeqBNR4QhZ3PMUwY=; b=PIySf8TQM2gBCxnawV/LD+cgqok49uPTJHRQqG5Z+Ei67XVQw0BREofnT48mx7XdqKIhdLt1Y4ziBIJNrglRAjdGOy+IbvNd2atdMXWSW7Gm3UPjcfcA9q704gE1nQ2NX/De80ZRmTEiUHpYhx1NBfg+BYl/rqYEQj3n1HWK19I= Received: from BY1PR0601MB1436.namprd06.prod.outlook.com (10.162.111.23) by BY1PR0601MB1142.namprd06.prod.outlook.com (10.160.196.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.27; Tue, 6 Nov 2018 03:50:25 +0000 Received: from BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979]) by BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979%3]) with mapi id 15.20.1294.032; Tue, 6 Nov 2018 03:50:25 +0000 From: Chi-Hsien Lin To: "linux-wireless@vger.kernel.org" CC: "brcm80211-dev-list@broadcom.com" , brcm80211-dev-list , Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Naveen Gupta , Chi-Hsien Lin Subject: [PATCH 07/11] brcmfmac: update 43012 F2 watermark setting to fix DMA Error during UDP RX Traffic Thread-Topic: [PATCH 07/11] brcmfmac: update 43012 F2 watermark setting to fix DMA Error during UDP RX Traffic Thread-Index: AQHUdYPZzStu3GHwkEOrMvogUZIZtA== Date: Tue, 6 Nov 2018 03:50:24 +0000 Message-ID: <1541476188-75475-8-git-send-email-chi-hsien.lin@cypress.com> References: <1541476188-75475-1-git-send-email-chi-hsien.lin@cypress.com> In-Reply-To: <1541476188-75475-1-git-send-email-chi-hsien.lin@cypress.com> Accept-Language: en-US, zh-TW Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [12.110.209.245] x-clientproxiedby: MWHPR2201CA0082.namprd22.prod.outlook.com (2603:10b6:301:5e::35) To BY1PR0601MB1436.namprd06.prod.outlook.com (2a01:111:e400:522c::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chi-Hsien.Lin@cypress.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR0601MB1142;6:YvispQlkHdw2q/noO0hg8Ys58P8MsO0ZSWf1C3GNGqpGs1iKngG+eT99i4+uAROGEpTYnGeGQXH9oSFM+l11IyHN8qcLnb5nqGE4vaK1sMZso7uBzYc9grvpnxYejUBtOeJQ6RsFSuQ1T8DXNINFYPPj4h9x2SzxWpwGER9AvhYquYI33ckbbJDFSSW2V4lXB2NrmLuqcuHymO2k2ymxxjyj71FNL78eaB+4HzP52k0lEN8gydpYCw8qeSkfZ+ISMRazNoy1DGrKzPcwcbkpJlXKk6CP8xFkt5vCQR/BRq6kojqIIaipXQBLsE4R3UWYkqgWlJutVWxJERj83tqj5rK1Od232wZEBXs/+2tcgFxxtCQffmaQPLgd36t0/P7AgsG3Mq9TF7AT3hbCvrHbknLSXJdABIqFavxf+sC2ucXp7lUaMdkghtd+EHK+2cTxyI0XTJ0XAvERhDH2tFaxMw==;5:x/ddJ6l5Zs5ee9quE6zfdZ0XyOUcz0gNQ0oEmxJ0lydqNvoVZB1eOyL45NTMb7EmowRrpabO4MWWF/AJzkeDaDmqaoXja/RWb+LWu0kRfooGtNqB6KY30VICdTxujwZGazbRin4Av/QfNUY9mPrDAYM8ygATgXU063gvkmdi2ic=;7:kkJZzep5aVEIIq50EuynDqQuUWVsrYxIVNd1B/fSyH/QOGI/wzNqsJ5vMu/bUFeaVLI4c1/a0ff0n7DogyHPr3/QO8PjhOqQdQSHEi++fgk47MrjpMjaIIzRChVau4rXPoewnSzyQxI1qeNeiXmhNQ== x-ms-office365-filtering-correlation-id: 48d49869-0a2a-4248-5765-08d6439afb82 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:BY1PR0601MB1142; x-ms-traffictypediagnostic: BY1PR0601MB1142: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(258095267146985); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231382)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:BY1PR0601MB1142;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0601MB1142; x-forefront-prvs: 0848C1A6AA x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(136003)(396003)(376002)(366004)(39860400002)(346002)(199004)(189003)(6506007)(36756003)(386003)(102836004)(186003)(2906002)(6916009)(8936002)(54906003)(5660300001)(81156014)(5640700003)(81166006)(14454004)(26005)(8676002)(476003)(486006)(2351001)(2616005)(446003)(97736004)(11346002)(6436002)(106356001)(105586002)(6512007)(256004)(6486002)(4326008)(3846002)(6116002)(7736002)(68736007)(99286004)(72206003)(53936002)(305945005)(76176011)(66066001)(2501003)(107886003)(86362001)(316002)(71200400001)(71190400001)(52116002)(25786009)(478600001)(2900100001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR0601MB1142;H:BY1PR0601MB1436.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: kl5Sv76Bsn4+aEgNIJLPliMwnSAghGRHm+wpjIo7Ve6JoCMv17Z+iC4/hqZ2isVUvPgD8OJDFhvGn+iqh1/pHbWMog/VPhmTlG/UsvNxWlDzytSP1KoSfirwAHtvbuuXsGoW4IZIf0tqI4RwwX+A1Cv/zOYYLj+zwhxZIt8VCI/8r13nRT1jTh60BIKGWssXApyGbLYObkObU1Dq1+97UXnHGbRYBXOBpmHXerosaEm0BAiTrUDZUvy/VTWOgZG2gIMJzlcbB/SlrLHnzJHfcGslp31wy11OCnEfaXuC2E2a0rVZC3xFZoibowk+I8jP1pHdvNhsDUiS7QXWt+5/wQXx+/OVmQ5MRXjLUrcYrIQ= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 48d49869-0a2a-4248-5765-08d6439afb82 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Nov 2018 03:50:24.8265 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0601MB1142 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Naveen Gupta The number of words that the read FIFO has to contain except the end of frame before sends data back to the host. Max watermark = (512B - 2* (BurstLength))/4 = (512 - 128)/4 = 384/4 = 0x60 so if burst length (i.e. BurstLength = 64) is increased, watermark has to be reduced. This is the optimal setting for this chip. Signed-off-by: Naveen Gupta Signed-off-by: Chi-Hsien Lin Reviewed-by: Arend van Spriel --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index a32eb5f868b5..e7ee144dc5dd 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -52,6 +52,7 @@ #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 #ifdef DEBUG @@ -4162,6 +4163,17 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err, brcmf_sdiod_writeb(sdiod, SBSDIO_FUNC1_MESBUSYCTRL, CY_4373_F1_MESBUSYCTRL, &err); break; + case SDIO_DEVICE_ID_CYPRESS_43012: + brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes\n", + CY_43012_F2_WATERMARK); + brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, + CY_43012_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); + break; default: brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, DEFAULT_F2_WATERMARK, &err); From patchwork Tue Nov 6 03:50:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 10669563 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1EA031751 for ; Tue, 6 Nov 2018 03:50:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F64129F53 for ; Tue, 6 Nov 2018 03:50:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 03B4229FD6; Tue, 6 Nov 2018 03:50:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A051429F53 for ; Tue, 6 Nov 2018 03:50:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387446AbeKFNNq (ORCPT ); Tue, 6 Nov 2018 08:13:46 -0500 Received: from mail-eopbgr810120.outbound.protection.outlook.com ([40.107.81.120]:58734 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387424AbeKFNNq (ORCPT ); Tue, 6 Nov 2018 08:13:46 -0500 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=VG/o6sICQAneLzPuErt0knQa5IXhi4SeQrtfgncNA+c=; b=li3htgwtykuRuNjzsIqTcWz5unQNshwo8Z2cSWXv2EC0FF4BLVoX5JQjTyLdJkmguhj8AFm5kqDpRCx8PZTxkR1TNp4BLLin2ezGmL8LVHUvffl/WmG2EkDXeXtuBCFzVyDgoRCfnl7PqTCd/u1Yb8Ay1m8t7gfOHyPBpPRS5GI= Received: from BY1PR0601MB1436.namprd06.prod.outlook.com (10.162.111.23) by BY1PR0601MB1142.namprd06.prod.outlook.com (10.160.196.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.27; Tue, 6 Nov 2018 03:50:26 +0000 Received: from BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979]) by BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979%3]) with mapi id 15.20.1294.032; Tue, 6 Nov 2018 03:50:26 +0000 From: Chi-Hsien Lin To: "linux-wireless@vger.kernel.org" CC: "brcm80211-dev-list@broadcom.com" , brcm80211-dev-list , Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Chi-Hsien Lin Subject: [PATCH 08/11] brcmfmac: 4373 save-restore support Thread-Topic: [PATCH 08/11] brcmfmac: 4373 save-restore support Thread-Index: AQHUdYPaRKN2lEL9VEu4JExKGqQ8kQ== Date: Tue, 6 Nov 2018 03:50:26 +0000 Message-ID: <1541476188-75475-9-git-send-email-chi-hsien.lin@cypress.com> References: <1541476188-75475-1-git-send-email-chi-hsien.lin@cypress.com> In-Reply-To: <1541476188-75475-1-git-send-email-chi-hsien.lin@cypress.com> Accept-Language: en-US, zh-TW Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [12.110.209.245] x-clientproxiedby: MWHPR2201CA0082.namprd22.prod.outlook.com (2603:10b6:301:5e::35) To BY1PR0601MB1436.namprd06.prod.outlook.com (2a01:111:e400:522c::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chi-Hsien.Lin@cypress.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR0601MB1142;6:gmeRiug7fnwmpyl+kb1bOKnAyXoaflqbCxeN9BDQZyx3plnNpDbqDy6jXYOqThrCiVFN/KWvvkT4Usc1kyc4tuLtPsF0+9Sv51/jAmrPwfDxr1TTPXCVAVzkY2vfuJBBT9CBM8CyPKTIIwkbn3DH740JPTqH81nn0WfNLzQxWUTo4PI1pXpM9c9PTe0XovPfFNjTz3wEII+SYVvjE1aScCBpeOaKZiRf2qP2vUVGdK7U45bRyXjWw7Ym5QU4/JG2PHnYvMPrPbT42kV4IpmJvJJbx35CJ4xG5d1HipXecXj54hbwMJ20dc4Ip2AVmqIc9q0wHPbPf766oB0N7ayKuJJEH+DmMCPFVXJMD5s0xyIIbw+1wZ0Q05ZN9BZRbDJE4a169AEXSw8dp6Dmt2qLgs0ytvzskKkv2T667dWC+LBrw0VnutdkcyteIpuCfZQmxbk4zLTBl3Ysdx9sVT+gXg==;5:pPWp/dOGdLar4wpToZvobo/GWJdsJK8KRnur3+SNA2RFEYN7773cAknGEpkS1X7QaeFswZ77E2yF7dNb6Sj1w+FqB+Cq3jW9HeGwLuXDChbf3dNnAq3sty//1pihjZ9Te47EkDMaWRxi2MTNbr0NCRO1C0IZQrYvoHQ9Xop717U=;7:e+IAMdlldVByXHy6ezyoENKRCwqDVaF7QL+gNFmVzBOu3kPVf2vq/+dLiej3ovJcfLr2SofpoeRT1SIqoAQbeDGxV3+UHCg1AbA7I6LH/zxuEYkSuPDtiDI3nz50TuDOl9cqpxtTLbDzDLqVONccdA== x-ms-office365-filtering-correlation-id: e874d8e8-6883-4d84-877b-08d6439afc6b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:BY1PR0601MB1142; x-ms-traffictypediagnostic: BY1PR0601MB1142: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(258095267146985); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231382)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:BY1PR0601MB1142;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0601MB1142; x-forefront-prvs: 0848C1A6AA x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(136003)(396003)(376002)(366004)(39860400002)(346002)(199004)(189003)(6506007)(36756003)(386003)(102836004)(186003)(2906002)(6916009)(8936002)(54906003)(5660300001)(81156014)(5640700003)(81166006)(14454004)(26005)(8676002)(476003)(486006)(2351001)(2616005)(446003)(97736004)(11346002)(6436002)(106356001)(105586002)(6512007)(256004)(6486002)(14444005)(4326008)(3846002)(6116002)(7736002)(68736007)(99286004)(72206003)(53936002)(305945005)(76176011)(66066001)(2501003)(107886003)(86362001)(316002)(71200400001)(71190400001)(52116002)(25786009)(478600001)(2900100001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR0601MB1142;H:BY1PR0601MB1436.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: IosNGMzKCfrZAeCmvBRUfqRFPXG9ZihKVNihY1EFSUWY6NsXwQ0tYU4if4AXa6zJFY9lmE0UgXE6qGdBUQfAo8xCMfWK0fpij6PiElZu+0S10bfLj0ecACIhXMlb1y+BGSKwO5xSOyYpqvj82xen2t0AAVcghHNTLtKtLviX3+lxBGNHWzfk40iUDauJ3jHgEsqQmEP+6Tah/+DsmPEcQRFDcwh1fOa1irawm9st9hLhvhdgbXOwBeO2ZWHCwWL39iJ5BcFIiOR1atFdWzka5ad9n/oa76RsmdMyKF+XW/wAB2HB2hEIkRTq7zm/OcY9v8YmYojYE88RVmC5WVEzTysV4Z/6bxC/r5mQ6z9G8sU= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: e874d8e8-6883-4d84-877b-08d6439afc6b X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Nov 2018 03:50:26.3077 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0601MB1142 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use sr_eng_en bit to check 4373 sr support. Signed-off-by: Chi-Hsien Lin Reviewed-by: Arend van Spriel --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c index a8d3b96b727f..dfc2af943bff 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c @@ -1332,7 +1332,7 @@ bool brcmf_chip_set_active(struct brcmf_chip *pub, u32 rstvec) bool brcmf_chip_sr_capable(struct brcmf_chip *pub) { - u32 base, addr, reg, pmu_cc3_mask = ~0; + u32 base, addr, reg, sr_eng_en, pmu_cc3_mask = ~0; struct brcmf_chip_priv *chip; struct brcmf_core *pmu = brcmf_chip_get_pmu(pub); @@ -1365,6 +1365,12 @@ bool brcmf_chip_sr_capable(struct brcmf_chip *pub) addr = CORE_CC_REG(base, sr_control1); reg = chip->ops->read32(chip->ctx, addr); return reg != 0; + case CY_CC_4373_CHIP_ID: + /* explicitly check SR engine enable bit */ + sr_eng_en = BIT(0); + addr = CORE_CC_REG(base, sr_control0); + reg = chip->ops->read32(chip->ctx, addr); + return (reg & sr_eng_en) != 0; case CY_CC_43012_CHIP_ID: addr = CORE_CC_REG(pmu->base, retention_ctl); reg = chip->ops->read32(chip->ctx, addr); From patchwork Tue Nov 6 03:50:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 10669565 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EF72B13AD for ; Tue, 6 Nov 2018 03:50:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE31829F53 for ; Tue, 6 Nov 2018 03:50:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF48A29FD6; Tue, 6 Nov 2018 03:50:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B91129F53 for ; Tue, 6 Nov 2018 03:50:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387453AbeKFNOA (ORCPT ); Tue, 6 Nov 2018 08:14:00 -0500 Received: from mail-eopbgr810120.outbound.protection.outlook.com ([40.107.81.120]:58734 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387399AbeKFNN7 (ORCPT ); Tue, 6 Nov 2018 08:13:59 -0500 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=eepCyueO8pUDUBiCrq8oJDtlrs5aZj1eP4psI20Kl2Y=; b=QpW7hOqEoII9dRWTZ8gANLMXOkIDfIzfFUlA+OfiSnysO3hH4SPKCB06AKGaTjcAeTi+0c4AK1BpKN2Yt9Kwi1Sfhl0TrjCRj1CEcVs8aJtKRiWf3SHwfARKQNTPazWxv8k8mLcSx13mON1k7BxSyzyr7iPzEoOgCSkdQROk+uc= Received: from BY1PR0601MB1436.namprd06.prod.outlook.com (10.162.111.23) by BY1PR0601MB1142.namprd06.prod.outlook.com (10.160.196.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.27; Tue, 6 Nov 2018 03:50:28 +0000 Received: from BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979]) by BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979%3]) with mapi id 15.20.1294.032; Tue, 6 Nov 2018 03:50:27 +0000 From: Chi-Hsien Lin To: "linux-wireless@vger.kernel.org" CC: "brcm80211-dev-list@broadcom.com" , brcm80211-dev-list , Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Chi-Hsien Lin Subject: [PATCH 09/11] brcmfmac: disable command decode in sdio_aos for 43012/4339/4345 Thread-Topic: [PATCH 09/11] brcmfmac: disable command decode in sdio_aos for 43012/4339/4345 Thread-Index: AQHUdYPbfs+uENghqUGMJLzsV/mFyQ== Date: Tue, 6 Nov 2018 03:50:27 +0000 Message-ID: <1541476188-75475-10-git-send-email-chi-hsien.lin@cypress.com> References: <1541476188-75475-1-git-send-email-chi-hsien.lin@cypress.com> In-Reply-To: <1541476188-75475-1-git-send-email-chi-hsien.lin@cypress.com> Accept-Language: en-US, zh-TW Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [12.110.209.245] x-clientproxiedby: MWHPR2201CA0082.namprd22.prod.outlook.com (2603:10b6:301:5e::35) To BY1PR0601MB1436.namprd06.prod.outlook.com (2a01:111:e400:522c::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chi-Hsien.Lin@cypress.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR0601MB1142;6:sPheQMNPshBz/Z/hIdh6QMAFIe/NeRzH62HAlpooq/Vd7zspCtHhX27MUfJqA0Wmh46y3+NkTe7esfktjU17rIFCvVzPinFb4fI1N9MWl0KKqX84scStigrE9nzyWEA6ovrWWSXJOJ6goDmyKwweAMrBoGZuOKX7ygi5VLcwskWB0npK9wlEUxR5MRLHKk+G3k/euP48VW7MpjvgLLvk58jK4fiHrDrRSnf4hABQ8rvvabueRzgxQP3t5AzVw71fvGg1OVjTHFSk+Av5ORIMtxM4TUdblNpxsXG+fk9fdjLppcgTtz6EacnzJPhkJX2igINhU3uOTHCYTOSM8Nl0m10bpwfPp/ZGscgvLy3swbewgZjXC/kecWIAyGQMOsL+DyFoWAMDIwuRWkcgl/kS7rHwfJTcRaulE/OENmeOiRiqM+WE56I+l+nfQfjU5hcT9BelwFRZHTy0SDk5Yia8lg==;5:MQoIdrh6A2VWpPt6lAW8eSlr6tpmK9Q7+Mk6IZKJelEYzwmJGWnCUxUwNdoz1LObVLVR2RG8z2gZ7bJVCPhbbg58XPNs0p/iY3Fu6Hm/+SlsVSAWQgoF063lHXPg7+B9XOocp17ezq50Cp7KbgwoNjhlLR/4NGrC0NeBOoalgR4=;7:cc+4qHKwTV4zMcwxZ0/8ZSwUiz2tkVSMtwhB18+MFyE3QYzrU7S9WwaVFkT0mL7gB6P8FnFOU7jIAMXopRSCAtTeDPQ7orxOiFlKlykxo1TwNfGH6vKZ4LoHEPVsKExfMPmsS24Fb2y6E/CNB8r0Fg== x-ms-office365-filtering-correlation-id: 2735d3bd-089d-4b32-9bd1-08d6439afd4e x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:BY1PR0601MB1142; x-ms-traffictypediagnostic: BY1PR0601MB1142: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(258095267146985); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231382)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:BY1PR0601MB1142;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0601MB1142; x-forefront-prvs: 0848C1A6AA x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(136003)(396003)(376002)(366004)(39860400002)(346002)(199004)(189003)(6506007)(36756003)(386003)(102836004)(186003)(2906002)(6916009)(8936002)(54906003)(5660300001)(551934003)(81156014)(5640700003)(81166006)(14454004)(26005)(8676002)(476003)(486006)(2351001)(2616005)(446003)(97736004)(11346002)(6436002)(106356001)(105586002)(6512007)(256004)(6486002)(4326008)(3846002)(6116002)(7736002)(68736007)(99286004)(72206003)(53936002)(305945005)(76176011)(66066001)(2501003)(107886003)(86362001)(316002)(71200400001)(71190400001)(52116002)(25786009)(478600001)(2900100001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR0601MB1142;H:BY1PR0601MB1436.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 2V9f94mjmPEw4qMnR5vOHD2LcoLgD8oaBx6qtOWxD7eKEsYDQhBHGMPk9FyZo3j9A+YOtAu7V3pPsXEQehgtqPeQpmTkN02bTugocHqLlOFp2oGd1OjYx3ytHL/Wn1Y1hPKdpdhRqh5OBEN9i0Z5IMJnuO2FhApIY1IM0MOK4jCpNDs6wKXFyQ+H0+DUsvMqpIH7BBCpLET6pdN0EyMfwMnw/LrF+8hIRtmfteS2x8G6HsnqmZRXxqE3NAHB7wLXyyQLGcFFdkt0vyaacPL0hdFG/AxlzmEDcSXWkhl9Mr5Imi9CjOpTWj+JjqdF4R8aXRBElDDynxmcivrxdfuLBNVcmXIxipv+uk6SpueuE4w= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2735d3bd-089d-4b32-9bd1-08d6439afd4e X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Nov 2018 03:50:27.8249 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0601MB1142 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wright Feng Transaction between AOS and SDIOD is not protected, and if cmd 52 received in AOS and in the middle of response state changed from AOS to SDIOD, response is corrupted and it causes to SDIO Host controller to hang. Signed-off-by: Wright Feng Signed-off-by: Chi-Hsien Lin Reviewed-by: Arend van Spriel --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index e7ee144dc5dd..d507d8f15e48 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -3363,15 +3363,21 @@ static void brcmf_sdio_sr_init(struct brcmf_sdio *bus) if (bus->ci->chip == CY_CC_43012_CHIP_ID) { wakeupctrl = SBSDIO_FUNC1_WCTRL_ALPWAIT_SHIFT; - cardcap = SDIO_CCCR_BRCM_CARDCAP_CMD_NODEC; chipclkcsr = SBSDIO_HT_AVAIL_REQ; } else { wakeupctrl = SBSDIO_FUNC1_WCTRL_HTWAIT_SHIFT; - cardcap = (SDIO_CCCR_BRCM_CARDCAP_CMD14_SUPPORT | - SDIO_CCCR_BRCM_CARDCAP_CMD14_EXT); chipclkcsr = SBSDIO_FORCE_HT; } + if (bus->ci->chip == CY_CC_43012_CHIP_ID || + bus->ci->chip == BRCM_CC_4339_CHIP_ID || + bus->ci->chip == BRCM_CC_4345_CHIP_ID) { + cardcap = SDIO_CCCR_BRCM_CARDCAP_CMD_NODEC; + } else { + cardcap = (SDIO_CCCR_BRCM_CARDCAP_CMD14_SUPPORT | + SDIO_CCCR_BRCM_CARDCAP_CMD14_EXT); + } + val = brcmf_sdiod_readb(bus->sdiodev, SBSDIO_FUNC1_WAKEUPCTRL, &err); if (err) { brcmf_err("error reading SBSDIO_FUNC1_WAKEUPCTRL\n"); From patchwork Tue Nov 6 03:50:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 10669567 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 49CAC13AD for ; Tue, 6 Nov 2018 03:50:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A9C729F53 for ; Tue, 6 Nov 2018 03:50:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E9AA29FD6; Tue, 6 Nov 2018 03:50:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D1A9329F53 for ; Tue, 6 Nov 2018 03:50:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387458AbeKFNOC (ORCPT ); Tue, 6 Nov 2018 08:14:02 -0500 Received: from mail-eopbgr810120.outbound.protection.outlook.com ([40.107.81.120]:58734 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387424AbeKFNOB (ORCPT ); Tue, 6 Nov 2018 08:14:01 -0500 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=roAoqktUhhieQRak5XtvAeJL0PLeaCr4HYATWCPlm40=; b=JPbJMnZ9IFJqYhEgPKG3P5TwGiToHUzUCDHWpQT6Dv1YaxU9ukx6QV2zK5Crexv2h+p8BE6cp7IXQFaGqDq3osDw7lW+JYTQ4GOFi4VkRMXAb/Xkn/IrlKP8McVjlQ2hr3BXmMpBKRGPCLJwgat+ji5vOMQk7vwP1HXCL+6BCiE= Received: from BY1PR0601MB1436.namprd06.prod.outlook.com (10.162.111.23) by BY1PR0601MB1142.namprd06.prod.outlook.com (10.160.196.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.27; Tue, 6 Nov 2018 03:50:29 +0000 Received: from BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979]) by BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979%3]) with mapi id 15.20.1294.032; Tue, 6 Nov 2018 03:50:29 +0000 From: Chi-Hsien Lin To: "linux-wireless@vger.kernel.org" CC: "brcm80211-dev-list@broadcom.com" , brcm80211-dev-list , Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Double Lo , Chi-Hsien Lin Subject: [PATCH 10/11] brcmfmac: disable command decode in sdio_aos for 4354 Thread-Topic: [PATCH 10/11] brcmfmac: disable command decode in sdio_aos for 4354 Thread-Index: AQHUdYPcfkO8Gpmxg0q2JuypnIiaGA== Date: Tue, 6 Nov 2018 03:50:29 +0000 Message-ID: <1541476188-75475-11-git-send-email-chi-hsien.lin@cypress.com> References: <1541476188-75475-1-git-send-email-chi-hsien.lin@cypress.com> In-Reply-To: <1541476188-75475-1-git-send-email-chi-hsien.lin@cypress.com> Accept-Language: en-US, zh-TW Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [12.110.209.245] x-clientproxiedby: MWHPR2201CA0082.namprd22.prod.outlook.com (2603:10b6:301:5e::35) To BY1PR0601MB1436.namprd06.prod.outlook.com (2a01:111:e400:522c::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chi-Hsien.Lin@cypress.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR0601MB1142;6:bB4XMQJFosToS/g9kuTl0lYKJgxhNSfJpOfYKxbVs6p8mPPHm1VQTskbd4lbFn6J/DFdMc5/W5zLPUzAfeWxm7BYCTVsNU4I0hPD3MjEJ++ziHIHlvzkcp7bGivvsBPgc7at5f7PLupofNX9vEGoezXKCPxUjgT90w+AIGxhkLX6qO0uTtiwqhKEmRujOVQWf3OLcPqGz7Emdn+g1/gj30lzbekZLIuMNgAt3Vm6MWa5UY5bpyhNXITGCWpCuOj8Rh/BXJ97rNqGGb/oyksAdB6H0dRWDi5T3fsUHZnCTV7fbGhOBZtQIUAJf6NewEVbu9mUCf8cHHrTPLDFV36CAOb5uKZmEEmgL03QkaK9rWHoHmm+ylyIsAmJITY2fhklNBBL+VLmO53KMDNYPs7xFZ8Y5o1CLbCGPs6vTx6nk9ZuoqpXsENab3gIl59TYc/Cdjr3g3KU+FHuJgVMZ3AFNw==;5:0qk2IZ4o/hWdURqcPFALyUVE9vYfmBoegqtewaG/H253Ydb0M/wdaGUH1H1A7vFcpbqurTXZMh2VxTDAA5ZVSzX9KaQ3k6TjiMInARAKHZV4BLP9YV1Vosk5mgWQ9KSSZUI7wNaQpHSlQ6ZHNXmgQU6EKq9yCqh9uS4f1SfSNbU=;7:m+N37t4K8sXK4YA4o4CyrnABVydxGaQQInzyF+alkYy5Fi2QNRFZLbv6u8vNv7CGfC3EjYh6a7+qcSfQDSklul+e7R+vd5CG65UVfaxQLs8DwCNCMrxDrLLsCVqtiw6sbiEl5aroADxd6pMK1bYlxA== x-ms-office365-filtering-correlation-id: 4b8d0cbb-0b2f-48ae-95b6-08d6439afe3f x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:BY1PR0601MB1142; x-ms-traffictypediagnostic: BY1PR0601MB1142: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(258095267146985); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231382)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:BY1PR0601MB1142;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0601MB1142; x-forefront-prvs: 0848C1A6AA x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(136003)(396003)(376002)(366004)(39860400002)(346002)(199004)(189003)(6506007)(36756003)(386003)(102836004)(186003)(2906002)(6916009)(8936002)(54906003)(5660300001)(551934003)(81156014)(5640700003)(81166006)(14454004)(26005)(8676002)(476003)(486006)(2351001)(2616005)(446003)(97736004)(11346002)(6436002)(106356001)(105586002)(6512007)(256004)(6486002)(14444005)(4326008)(3846002)(6116002)(7736002)(68736007)(99286004)(72206003)(53936002)(305945005)(76176011)(66066001)(2501003)(107886003)(86362001)(316002)(71200400001)(71190400001)(52116002)(25786009)(478600001)(2900100001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR0601MB1142;H:BY1PR0601MB1436.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: YZeqepXn04DIKMjS46hamahvNle1ElSsappHcVO7PXKz34xx5qco7n7nJ1uXssFqiEvOFXtJSI6PXt11kWTeA0mj3RMBip8B1rMt8U/67vjGYoRZDShlvs1pcRPmv+tq2ZOi+lbUilqpeTp13Y4ShNtu+b9mYbP9iW20QF/ZJqQAJb5tntf5kBe16blqFvLWbqE65gNqBBnVB19IxPf6jWApdF40LEezeAuscyZiSD7FKrDRBqvSfalEUyS0z3LCJmR1OKuJuPy0g+ucIagAkyHIEsg0l098YY668Dd9k7t4cblbhxTgBuJ+5XJWk1fQ+9XdxuzESZwHryc7wFEWcHfK6EdTfefudviKIXeol1w= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4b8d0cbb-0b2f-48ae-95b6-08d6439afe3f X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Nov 2018 03:50:29.4042 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0601MB1142 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Double Lo Transaction between AOS and SDIOD is not protected, and if cmd 52 received in AOS and in the middle of response state changed from AOS to SDIOD, response is corrupted and it causes to SDIO Host controller to hang. Signed-off-by: Double Lo Signed-off-by: Chi-Hsien Lin --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index d507d8f15e48..337e72b7787c 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -3371,7 +3371,8 @@ static void brcmf_sdio_sr_init(struct brcmf_sdio *bus) if (bus->ci->chip == CY_CC_43012_CHIP_ID || bus->ci->chip == BRCM_CC_4339_CHIP_ID || - bus->ci->chip == BRCM_CC_4345_CHIP_ID) { + bus->ci->chip == BRCM_CC_4345_CHIP_ID || + bus->ci->chip == BRCM_CC_4354_CHIP_ID) { cardcap = SDIO_CCCR_BRCM_CARDCAP_CMD_NODEC; } else { cardcap = (SDIO_CCCR_BRCM_CARDCAP_CMD14_SUPPORT | From patchwork Tue Nov 6 03:50:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 10669569 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3ED3913AD for ; Tue, 6 Nov 2018 03:50:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F27429F53 for ; Tue, 6 Nov 2018 03:50:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 22BF529F5E; Tue, 6 Nov 2018 03:50:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C5A2A29FD6 for ; Tue, 6 Nov 2018 03:50:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387462AbeKFNOD (ORCPT ); Tue, 6 Nov 2018 08:14:03 -0500 Received: from mail-eopbgr810120.outbound.protection.outlook.com ([40.107.81.120]:58734 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387399AbeKFNOC (ORCPT ); Tue, 6 Nov 2018 08:14:02 -0500 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=tthAy8Pvr2uBpo7utpUevQyzxJgDW3O8p+NULyC2Nk8=; b=Tt+yngCTjgt8iHYEBjTPeos+XMcb4rwrZffUhiccWtWrgWWBVQGQErryU07K7b8dTdrqIqXNV9aKsKE/EwzacGbDjLNVP4exnGcLFiYMYHtDmrwIcaWCCGOuQe25/UNoO0MhJkh93Pys3FdNRfDRIZLolLcagFhzVKAYoypi080= Received: from BY1PR0601MB1436.namprd06.prod.outlook.com (10.162.111.23) by BY1PR0601MB1142.namprd06.prod.outlook.com (10.160.196.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.27; Tue, 6 Nov 2018 03:50:31 +0000 Received: from BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979]) by BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979%3]) with mapi id 15.20.1294.032; Tue, 6 Nov 2018 03:50:31 +0000 From: Chi-Hsien Lin To: "linux-wireless@vger.kernel.org" CC: "brcm80211-dev-list@broadcom.com" , brcm80211-dev-list , Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Madhan Mohan R , Chi-Hsien Lin Subject: [PATCH 11/11] brcmfmac: disable command decode in sdio_aos for 4373 Thread-Topic: [PATCH 11/11] brcmfmac: disable command decode in sdio_aos for 4373 Thread-Index: AQHUdYPcAa2eRkQ2iEuwGIRBoR8eFA== Date: Tue, 6 Nov 2018 03:50:30 +0000 Message-ID: <1541476188-75475-12-git-send-email-chi-hsien.lin@cypress.com> References: <1541476188-75475-1-git-send-email-chi-hsien.lin@cypress.com> In-Reply-To: <1541476188-75475-1-git-send-email-chi-hsien.lin@cypress.com> Accept-Language: en-US, zh-TW Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [12.110.209.245] x-clientproxiedby: MWHPR2201CA0082.namprd22.prod.outlook.com (2603:10b6:301:5e::35) To BY1PR0601MB1436.namprd06.prod.outlook.com (2a01:111:e400:522c::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chi-Hsien.Lin@cypress.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR0601MB1142;6:ZaeHJGDIDkhVTDdFgJbXsPJ6iLX9SWg39bd7b3SamBmKNaobLdNJJn8zoNl0L7O2/5EC9eEaZyxt1SdYbVvOx34sXt3t+55kmiRpxVqR+0Y6zc7icosBngR3wA3FkdSOoTHvyXfCpnsfQ8LxfnaQjCaaFV5UgN5WRAmdoE+9s/4mzFBMfBsFRT9Vllfj8F4Fiyew37FSrmbx0aaFpFFmQn713dn0x5V8rAOn8M3f0FGWV6/SZgvwapcwjZwcGIds5/rFMbvqMXYPoWnEPGjmyn7+7wSKv8iQjju/O6XDM7prEARcUiklUA6Hx6ZK1+9W82aL1jWF0YKQ9be9Ix2Thhibp6/WoJvgAgcKtIG4SFyd5Lu0k/Hxu7cZVVzwrHa8PfbBnkymDt6eaAcxvyeiRk6Uz71NfgRLKG0sHLynQK/inrZRby6oj+nv3niKtBW4iKx9FlwJdN/8uPgtR0XCOw==;5:PBV25Kq4W/8M6qfDScfZf73dvyACh460uXYzM6gFFlgKHCI/4McayYhMlu4PJquUIUvCtuQiCgeEPikZz5IqmEZiRZiglvJeaqdGKMbC2QcHNi4Oun7tSE1yj8vf7K624tI7VIE94FKYqZd/jZiKfyNiIqQ3nyMi/mlDPQD9LTM=;7:fjeIR10Z4NgsWMH8xs7k7akFH2cwablcmbzk09KqiTpoKQRQKWM4Lfm8qAxiMIpQYIaYGX52YlZZjyYMrwciI+BL2UOqCNH2RvVQbsVKSXQyA/J7TQSN1mGjKRh0l351mE+Yottfif7MnwRiBru8CA== x-ms-office365-filtering-correlation-id: 36174a38-3fd6-4dbb-ddc7-08d6439aff30 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:BY1PR0601MB1142; x-ms-traffictypediagnostic: BY1PR0601MB1142: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(258095267146985); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231382)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:BY1PR0601MB1142;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0601MB1142; x-forefront-prvs: 0848C1A6AA x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(136003)(396003)(376002)(366004)(39860400002)(346002)(199004)(189003)(6506007)(36756003)(386003)(102836004)(186003)(2906002)(6916009)(8936002)(54906003)(5660300001)(81156014)(5640700003)(81166006)(14454004)(26005)(8676002)(476003)(486006)(2351001)(2616005)(446003)(97736004)(11346002)(6436002)(106356001)(105586002)(6512007)(256004)(6486002)(14444005)(4326008)(3846002)(6116002)(7736002)(68736007)(99286004)(72206003)(53936002)(305945005)(76176011)(66066001)(2501003)(107886003)(86362001)(316002)(71200400001)(71190400001)(52116002)(25786009)(478600001)(2900100001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR0601MB1142;H:BY1PR0601MB1436.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: cRZ7EsOaXecaLVcrnUT4SH9z6/bt+gRFfgKgh+xqGWJOy6eUXewwDdSQnhtHXTpw0UD2vFre2Uvy2oYpgtngEToFdJDqd7t4uuhyovAGD2VLedXYhMy/+x+nO8Vxt7eKts7FJMzVsgHVh5Cn+yoluQcg+6bT/7VENFjfitnPlHntOfEJ/PQ5h4ItBr/oXwulFWWl3piPLhuC+90xZ+yExKGSCn7ivjkK8AXjV6hbAURWM0XCu6ccI8fqFvRjKvUFUZVHVU8StLEtIET5VQpbtzrjiJHKcphWpqJMNHS+MGnoLlEJxIeb8NQQQz8k92HJULu1/M4u/8KU4ab2HTyEYw/NGKCtvmqACmVPvXmPAwM= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 36174a38-3fd6-4dbb-ddc7-08d6439aff30 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Nov 2018 03:50:31.0485 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0601MB1142 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Madhan Mohan R By disabling command decode, sdiod_aos module supports the detection of sdio command line toggle only and generates a wakeup request to PMU and to sdiod core. It does not decode any sdio command and generates no response to any command. Signed-off-by: Madhan Mohan R Signed-off-by: Chi-Hsien Lin --- 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 337e72b7787c..e8a8037be82c 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -3370,6 +3370,7 @@ static void brcmf_sdio_sr_init(struct brcmf_sdio *bus) } if (bus->ci->chip == CY_CC_43012_CHIP_ID || + bus->ci->chip == CY_CC_4373_CHIP_ID || bus->ci->chip == BRCM_CC_4339_CHIP_ID || bus->ci->chip == BRCM_CC_4345_CHIP_ID || bus->ci->chip == BRCM_CC_4354_CHIP_ID) {