From patchwork Tue Jan 16 06:14:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wright Feng X-Patchwork-Id: 10166059 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 152D0603B5 for ; Tue, 16 Jan 2018 06:13:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 198902811E for ; Tue, 16 Jan 2018 06:13:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D9B9281DB; Tue, 16 Jan 2018 06:13:06 +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 498C42811E for ; Tue, 16 Jan 2018 06:13:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750772AbeAPGM7 (ORCPT ); Tue, 16 Jan 2018 01:12:59 -0500 Received: from mail-sn1nam02on0111.outbound.protection.outlook.com ([104.47.36.111]:41380 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750764AbeAPGM5 (ORCPT ); Tue, 16 Jan 2018 01:12:57 -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=GW4bz4eeKuIcoILp4IVvRrqSx4yiKY8kBKaAOud0zSQ=; b=lYlOWrMnnWoxWPuVWi92hF+k52Q2EH+4piK+xSncXu0bCrF/YDFWRtQzZJWfBX67ST7S1OkncofqGEKMc+ilj/skiN+rwj8dw7Rppke5hhBO4Qbmf86yONnIicDtf6YGYZlrtPHAglSfDZQOU86O09elJZgwHlQRdhdNjLamx1w= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Wright.Feng@cypress.com; Received: from localhost (61.222.14.99) by MWHPR0601MB3593.namprd06.prod.outlook.com (2603:10b6:301:7b::36) 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 06:12:54 +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 Subject: [PATCH v3] brcmfmac: fix CLM load error for legacy chips when user helper is enabled Date: Tue, 16 Jan 2018 14:14:06 +0800 Message-Id: <1516083246-16013-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: OS2PR01CA0101.jpnprd01.prod.outlook.com (2603:1096:602:1::19) To MWHPR0601MB3593.namprd06.prod.outlook.com (2603:10b6:301:7b::36) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 234fb4f2-2697-4117-ab20-08d55ca82ec6 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(48565401081)(4534125)(4602075)(4627221)(201703031133081)(201702281549075)(2017052603307)(7153060)(7193020); SRVR:MWHPR0601MB3593; X-Microsoft-Exchange-Diagnostics: 1; MWHPR0601MB3593; 3:U5wGGMr+699MGdTFv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ALhp2+K0wcBbZgKhB+k/0tgWY6v0Mu1AuF3Fza2nFlKUzlJsBz8nwFa/JWi7mm50XyjFOrd/V4LiN0RkFWIUMN/4KGx/JfYL8x6R6MQsyWMVPxu3KN8SIulICJLs5E8HKsHw1spG1eCMLWm2tw2vCrW7ZKGzKgDl+KyAOcD+OnKbKIhm7yyJNI2LFBzBATuyoB2zEIUVN9EsppAJBE8Z9XjrlyC8p0vp/Z8C05CTDYyX0pHQ7IbHtctYl+E0IHlDOacPxv3SyocIcZkZVNx/U2itel5JiqK4SktlF+b9duGtzF3QOElNN9/0FgqwEdDjE61NDtsauV52YpWx/Oo6s; 4:pPt09XK6noPSXcAtW6M0WOIGr1YHGIWzuFw5KJr+VwuYfqDozNESj/+JLw6brsGGWJlFO4A3Km71ZavKFlP0LrnctgKRnfIyVCF5GPZuXutcMOst060OnHmDWR7NeE5OallAMguFV1e2vzjfTqJ+tpqOQAVN641laE0BJvIdRXRFnCN4qVCbTirpGq8+iqVVwsqOJIuAi4glhWmDs9cNprBXrM9dZm0q052gKas+UGS/j9YegEXcbzg9q+qCC89pl0EgLGDuknw8O5OW0+huRYdzROkJANJUU7uBslj5zu8gRivRTgWY9wpUhlPj5vFf X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(258095267146985); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231023)(944501161)(93006095)(93001095)(6055026)(6041268)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123564045)(6072148)(201708071742011); SRVR:MWHPR0601MB3593; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:MWHPR0601MB3593; X-Forefront-PRVS: 0554B1F54F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6069001)(376002)(39380400002)(346002)(396003)(39860400002)(366004)(189003)(199004)(478600001)(8676002)(72206003)(6636002)(6666003)(6486002)(26005)(53936002)(16526018)(81156014)(81166006)(316002)(50226002)(16586007)(68736007)(7736002)(8936002)(5660300001)(2906002)(305945005)(76506005)(59450400001)(48376002)(97736004)(3846002)(6116002)(6496006)(575784001)(51416003)(86362001)(52116002)(386003)(47776003)(106356001)(25786009)(36756003)(66066001)(4326008)(50466002)(105586002); DIR:OUT; SFP:1102; SCL:1; SRVR:MWHPR0601MB3593; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; MWHPR0601MB3593; 23:SLV+ysmAUsW0JQyAYkRsSlsogjeeZVEtqQHe2rg?= =?us-ascii?Q?NfURM2c90WL8jkZMYGXwqzNcKTvCru/Ni6OI3uvh6Tzs4lsSTPDnPrVIUBK7?= =?us-ascii?Q?f+Wski5Ls5tuOLBWzx1zaQYqnDJslood/6nrI1q6RqLKIT5B4lXahlLevL2w?= =?us-ascii?Q?3lfn++SP3FTflUow35Jx5RXvjiDQeQh032tUOkx1m/TfkZb1xCCbpOgMTZfX?= =?us-ascii?Q?dDn99/wst3R67g5WxDqizU0H1VkoTE9d6OOwlkEM0+6xs8GbNDjZK12OXiT/?= =?us-ascii?Q?7MlxwAda73IRSW2bMSEUo3z+QaIBBqgR5HQD3fLfUuzUqljlhASKpHtlIkGj?= =?us-ascii?Q?VUBRO5xo0KkzbuUw/p7QtmCYJcgO7b6lkBtTyrIMVvtK1yoacxWXBXt1mwdZ?= =?us-ascii?Q?Sx72yi96XzbNNEq2rhaVzAXqz73V48gFZJ3IR42jUabAn1YgD1avddKGaXkm?= =?us-ascii?Q?qX8v+L5DkFaTGy/uqPuJ7KjwRscP/gDL3lhsMS1MyOjeAkSyT3RMYs4RU7On?= =?us-ascii?Q?VLTNKJJiXGDqDkzinBXEjM6Q9IONmYreTptynwQT3kEdrVXY9vHsPPNYrXJe?= =?us-ascii?Q?fE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PNuWFBq1utmEMTEoU=; 5:UTxQKixweKXNhABsLSpEyjdR6HU6zvHwuYzR2u0XHTJaVcYQvfXsWEi+lZhk9jvbi+k9JslhFt21OZPjlrMj5UB0aXHXExgsp719um1m8vwP45muNC5Qx8h+yFwsKqyhIWw4BEAo2B2rIBDUSwsveLf9AnS7+Q7Gz+9wR7pkVFg=; 24:i7A0OtzjxROiDWFbkD1C1wVt8UrAgMXSFhMV/lqyQwZ0J3DyQbidLCBEVqLkVuCmWGME+IH/IRlE0GstnArUgLhiopENoevcmAhz8jY3SDM=; 7:BYjskd/RoGahfRlS94KnEquFpzmH6ayW2CQr4EQKtz4qQm0Qj2DEeSJyD7QoUR1uyvsH9BBJqhlyyAC1yr5Ycva+uPupR1tyRMiIX/HptKGi13CS38oPFwtTzcZGGGnwXmBsrpxLyZvnmwUa6da4EgkyVURgZEq3SoOJZ2vFdbYbsSvpCRxcCr/ADZSWT6loeNnNqNvW9BsiyYEOenLVzFaQ8zipEH5ys9Cijr6U4MHkglq1f5XVb04f2UtcQVJ9 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2018 06:12:54.7294 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 234fb4f2-2697-4117-ab20-08d55ca82ec6 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR0601MB3593 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(). Signed-off-by: Wright Feng Reviewed-by: Arend van Spriel --- v2: remove retry from patch v1 v3: remove redundant 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..b0ef0e7 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(%d), device may have limited channels available\n", + err); + return 0; } chunk_buf = kzalloc(sizeof(*chunk_buf) + MAX_CHUNK_LEN - 1, GFP_KERNEL);