From patchwork Tue Jan 16 09:26:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wright Feng X-Patchwork-Id: 10166257 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.web.codeaurora.org (Postfix) with ESMTP id 7BD27601E7 for ; Tue, 16 Jan 2018 09:25:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7447D201F5 for ; Tue, 16 Jan 2018 09:25:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 68C3C23B3C; Tue, 16 Jan 2018 09:25:51 +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=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 B617D201F5 for ; Tue, 16 Jan 2018 09:25:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751145AbeAPJZt (ORCPT ); Tue, 16 Jan 2018 04:25:49 -0500 Received: from mail-bl2nam02on0117.outbound.protection.outlook.com ([104.47.38.117]:58592 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750878AbeAPJZr (ORCPT ); Tue, 16 Jan 2018 04:25:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cycorp.onmicrosoft.com; s=selector1-cypress-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=StLLVKyoSsa9W2VPqwEOepDJ3Av83F8cAeeM4kLSzto=; b=Wtq2fdAeU6Nx/TZZWV5g/Rqo1ISuCLN5fwq4b2k53E+1Fs1actAsLD5gUKQ4Zl4nuJL3kJn28P8ElzWAnHipP6dmRUQe9Umk/jKWRXiHbeOLExSAvKjaQNYV8JAjhI6InNuKtwpU9J76BjPCRWiNbFuutfrW78EIAZKICJikcvo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Wright.Feng@cypress.com; Received: from localhost (61.222.14.99) by DM5PR0601MB3589.namprd06.prod.outlook.com (2603:10b6:4:7c::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Tue, 16 Jan 2018 09:25:44 +0000 From: Wright Feng To: arend.vanspriel@broadcom.com, franky.lin@broadcom.com, hante.meuleman@broadcom.com, kvalo@codeaurora.org, chi-hsien.lin@cypress.com Cc: wright.feng@cypress.com, linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, stable@vger.kernel.org Subject: [PATCH v4] brcmfmac: fix CLM load error for legacy chips when user helper is enabled Date: Tue, 16 Jan 2018 17:26:50 +0800 Message-Id: <1516094814-16528-1-git-send-email-wright.feng@cypress.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [61.222.14.99] X-ClientProxiedBy: TY1PR06CA0037.apcprd06.prod.outlook.com (2a01:111:e400:5972::47) To DM5PR0601MB3589.namprd06.prod.outlook.com (2603:10b6:4:7c::11) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5dec2d6f-0a69-4764-55eb-08d55cc31f26 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534125)(4602075)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603307)(7153060)(7193020); SRVR:DM5PR0601MB3589; X-Microsoft-Exchange-Diagnostics: 1; DM5PR0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OeLKThbksCL0/x0oh2+lg7UetUK5iBo8RNXi4GOG/tXiFpux40tlR8lwclzmt4V7KvV+A9VvrnFNDDShoQ8GBqpkkC2yzgaOrcnL2u9wLnQI0gTJHNvjhAi4oOB9GcXr2RL6KQWUc5Bo/mHepSVGs6LIAro+nTxn6AXUmv+ae1WCwMBFmI3L0btukB6vKegR/uRmYq4kDOHMfauZt+CVIZIlDJUdFk5O/vn0eYvUDcKvRAl8rFliRkZWnKR4DI1JFRUdy+8v7A2jhTdVFLMwfNsozYVq924PkzM679TDi/AI4x7FlkTAIcg5mqWmDRczih7WBWu2UaQuCRO6jXqrX5aGTDPbZ+QpYpmztNtsA1U6U3lhwu3; 4:MY6EMTAQb2WuLDnJT6SXHlBRNM41Jy1pQ+exSkM/t/Bc9qzvTZZh8SzoRl5F2zfjmR/JUL65T/72jNVmo0f7Rz0qKRKrmGeh9dIFRQq0wmyb/Op61Mr57sHn9ZqnGQFAKw4pWNdq8wNUqBwVlej5zTjZoYMd89FHRJMyq6aja5w7IFP5F8qGBNvumWscYcEyfkl0t8FvVM2F/spMPPgwQTEhZvC4OOve/WoFsNOM4G+otuLg+H9d01ZizY0QwFaYTeK3kY07+jdbw3ckbRlQ8XrxBl2KQDkTNblyNsiw3h9giKy4Vy7G8/kdgsgr/JdzyApwc2xdDssUhO3yn8rJHI0/JfxiW6L3VLI9Dd3/cOc= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(258095267146985); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231023)(944501161)(6055026)(6041268)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123564045)(6072148)(201708071742011); SRVR:DM5PR0601MB3589; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:DM5PR0601MB3589; X-Forefront-PRVS: 0554B1F54F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6069001)(346002)(366004)(376002)(396003)(39380400002)(39860400002)(199004)(189003)(6486002)(4326008)(2906002)(53936002)(8676002)(68736007)(25786009)(76506005)(305945005)(106356001)(72206003)(478600001)(50226002)(81156014)(81166006)(7736002)(8936002)(66066001)(59450400001)(386003)(105586002)(48376002)(52116002)(51416003)(6496006)(36756003)(316002)(5660300001)(47776003)(16586007)(26005)(6666003)(6636002)(50466002)(97736004)(3846002)(6116002)(575784001)(86362001)(16526018); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR0601MB3589; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR0601MB3589; 23:yqMm7a8tLV2qARTuudQqVBjNwF7FFunPTgbB3wn?= =?us-ascii?Q?CpmZ2urXMsUi9w8d2Er4lmPaBNfMoZcR1AgufuUH8sbUGPybXfU9Wl7jzGhs?= =?us-ascii?Q?qkoEIOYd0xDGtpUUZSqnnV55IK6VRQ++J+gNybfNLgWi8Wwavbyy1orFe1kQ?= =?us-ascii?Q?JqxADZ6zOBg+FCEsCgPGPFW8QaG9G/2TjV1TiV4KdEzvZ54Pc9lbYYQReZ8u?= =?us-ascii?Q?zjeZXuUIGTWcHSqlM503R8vCvDEV0zgPNS9C8iMKu6zJyULZ/3caJi6OimcN?= =?us-ascii?Q?5xuXh7niJ7rTNJ6tk8K/O9vtyK/fks52MUjY7uKyjEh2X6oJxhRYAogCURqF?= =?us-ascii?Q?/GEDOztiL9+tD4VbEfe4K3u5Sv/m4WzeepJvJ4KuBOWfsbMzfVPnDDrHSz+C?= =?us-ascii?Q?/pzLktmbDbaptyvVKvqBJm0V27hUmErAq3I2OWIHKFF3o+gDe2cw5BjebNQc?= =?us-ascii?Q?D6uSTfvEQkeHzlHQ+RfhGnkjK9q9YiBh90h9SnX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qRr+gtvK55gFf5lA1WE+EGDMxT+nvUjmypXBsncW6BxOGjv/ceBUZvyVGms5Opd7CUirWHETzv5Ey/b95UHJAgwWRElk/ABjKDnXKVEouM78fo3xeavMarIrlUObRE=; 5:/VXQWHYk2w4UWRcmnhHHzEm1SCxjGyahYkDa7HE6J6kHn003S65vfMPuVpeh18fv8oMSYDXYUAYCRndMGM8gQrADRpkk0FiYGrEC5vbUnE02oWFtIXfP14KXjTOPB2mUYTAAQYA7l07a2jG92kuQbGTZPOGzokR/BLQ+7TnwJas=; 24:EPBn8T3OnomsSXe2w3P4zqXh37UAj7WK9CQ+dnApxmxXCOPBphQ+Q9t2gGpHuy6NmBVtjzxOAkwMx8aMgf0qlRoHPgjn7TqbjuYuY5+s4Bk=; 7:IslFhApc4iUB087uJ8Kjaz3UcpWf9BabvPZgG6wpkaBlIyeI+0r5CF/feodrmr+/Kr9gCpP8RnYQt7zYq8fv8R6ZC9L6jINU8U32EMYHuQY3ztIdd8Qc9Gk6zpaBFt49WsRq3LVwUpVXp5mVorB+FzNf3RA/rvTZOTcD136Twhud5V5OYrmK+jZF5MUfqWtKvbOxA/iqKx1eScEXdOLMtDYQ2bJgcPTiu83XuFS99MsM+UJpNZISeJQJx99/FuM+ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2018 09:25:44.8777 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5dec2d6f-0a69-4764-55eb-08d55cc31f26 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR0601MB3589 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 For legacy chips without CLM blob files, kernel with user helper function returns -EAGAIN when we request_firmware(), and then driver got failed when bringing up legacy chips. We expect the CLM blob file for legacy chip is not existence in firmware path, but the -ENOENT error is transferred to -EAGAIN in firmware_class.c with user helper. Because of that, we continue with CLM data currently present in firmware if getting error from doing request_firmware(). Cc: stable@vger.kernel.org # v4.15.y Reviewed-by: Arend van Spriel Signed-off-by: Wright Feng --- v2: remove retry from patch v1 v3: remove redundant log print v4: modify log print --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c index 6a59d06..9be0b05 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c @@ -182,12 +182,9 @@ static int brcmf_c_process_clm_blob(struct brcmf_if *ifp) err = request_firmware(&clm, clm_name, dev); if (err) { - if (err == -ENOENT) { - brcmf_dbg(INFO, "continue with CLM data currently present in firmware\n"); - return 0; - } - brcmf_err("request CLM blob file failed (%d)\n", err); - return err; + brcmf_info("no clm_blob available(err=%d), device may have limited channels available\n", + err); + return 0; } chunk_buf = kzalloc(sizeof(*chunk_buf) + MAX_CHUNK_LEN - 1, GFP_KERNEL);