Message ID | 20191217161318.31402-13-Jerome.Pouiller@silabs.com (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Johannes Berg |
Headers | show
Return-Path: <SRS0=hdaX=2H=vger.kernel.org=linux-wireless-owner@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6B1896C1 for <patchwork-linux-wireless@patchwork.kernel.org>; Tue, 17 Dec 2019 16:20:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3C78621835 for <patchwork-linux-wireless@patchwork.kernel.org>; Tue, 17 Dec 2019 16:20:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="p8nNXClC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728419AbfLQQOp (ORCPT <rfc822;patchwork-linux-wireless@patchwork.kernel.org>); Tue, 17 Dec 2019 11:14:45 -0500 Received: from mail-eopbgr770072.outbound.protection.outlook.com ([40.107.77.72]:46565 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728120AbfLQQOp (ORCPT <rfc822;linux-wireless@vger.kernel.org>); Tue, 17 Dec 2019 11:14:45 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K9pgFKdNoHYXGWr0EVLAx0SztIwhP3vFiBVoc1sttZIsL29QlLX1lRzBrPkUj+HSdCR2Mwgxb+fzvgSV36jP4ZR9rlnitMAheRMY1wQ4mrL6SrUdoeS1Ohtvj9GBeiqop2XuGpndiGhB7uR6+zVLB8ZB3nsCvfC222SGM3FJUNdDRJV5PjTVxZuqP4NjvNDqQCsUoLpFvhxitvM122Vru4h2IlWY1kow/KC9z3ffcRM8QRZ4kKM6mGXF9QLwwoTncQKHHE7Czt/PuutGaAUvX9D00Kmqmb2svsuo6bDMlBRVv2cOM2ScJ+FJETEZnxvQbfUqkkFAL6Ids/xvdGwtsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nc9K3j/CNlVDo001+UrNKBkibFPlvivaSl3q5jhndzM=; b=fcXb6//Mne9hkIaeC9mtOJcWbp7qzM9aK90dVDkRHVdpxZZYfx9FIvKIe0bR446NL82V9hd1t9lgl2wDmW8CBAiGEhEYvek2jN9FX5PmnFmkys2n8rYGl2uzPkJnQb/HCJfWDv6ztxfC/pXLRxsq0vnDrSNv1iP8kXgYUTB9Y0t0z9bgmrXrWarKf0ra5TNwV8UP9zuBgmc/78RsnO5uvCpUe7DtrCCVRo1ex1y41pZi6jS0dBDvqouDgeg+YSCQAz4o5g9D2yJ9bdxrrWk5TDl3fx84ppwcSrxI2DgNCcwmv1W6iUb9bTYhZsKuJJLuks9VF/mRGiJsgSG2cU/0QA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nc9K3j/CNlVDo001+UrNKBkibFPlvivaSl3q5jhndzM=; b=p8nNXClCois/pXPiAYyaJRUv8IbIls+uFU4v2EVbxkoy7HpIR4+FdL+Z+wWh7QzETJuoNh9XiE6l9WEn4l/ibbhe2BF2JQH2Si1UGK9Uq6t6bK8Q1VaAJFyzkMzoz8aIbWTNuPKGPVaKKnAHozScBVcThnhbb4onjEB4aildplc= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (10.255.180.22) by MN2PR11MB3678.namprd11.prod.outlook.com (20.178.254.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.16; Tue, 17 Dec 2019 16:14:42 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::f46c:e5b4:2a85:f0bf]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::f46c:e5b4:2a85:f0bf%4]) with mapi id 15.20.2538.019; Tue, 17 Dec 2019 16:14:42 +0000 From: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= <Jerome.Pouiller@silabs.com> To: "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>, "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org> CC: "netdev@vger.kernel.org" <netdev@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Kalle Valo <kvalo@codeaurora.org>, "David S . Miller" <davem@davemloft.net>, =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= <Jerome.Pouiller@silabs.com> Subject: [PATCH v2 12/55] staging: wfx: don't print useless error messages Thread-Topic: [PATCH v2 12/55] staging: wfx: don't print useless error messages Thread-Index: AQHVtPUXXn3HquIu9U2QGPrXCg+47g== Date: Tue, 17 Dec 2019 16:14:42 +0000 Message-ID: <20191217161318.31402-13-Jerome.Pouiller@silabs.com> References: <20191217161318.31402-1-Jerome.Pouiller@silabs.com> In-Reply-To: <20191217161318.31402-1-Jerome.Pouiller@silabs.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: PR0P264CA0174.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1c::18) To MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.24.0 x-originating-ip: [37.71.187.125] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 11b05e8a-e8a7-492f-13bc-08d7830c3995 x-ms-traffictypediagnostic: MN2PR11MB3678: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: <MN2PR11MB3678BC7D200870797D7BCFE793500@MN2PR11MB3678.namprd11.prod.outlook.com> x-ms-oob-tlc-oobclassifiers: OLM:3968; x-forefront-prvs: 02543CD7CD x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(346002)(396003)(39840400004)(366004)(136003)(199004)(189003)(6512007)(66574012)(1076003)(478600001)(86362001)(8936002)(110136005)(316002)(2616005)(26005)(6506007)(5660300002)(36756003)(6486002)(66946007)(66476007)(66556008)(64756008)(66446008)(71200400001)(52116002)(85182001)(81166006)(81156014)(8676002)(54906003)(107886003)(15650500001)(2906002)(4326008)(186003)(85202003);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR11MB3678;H:MN2PR11MB4063.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: silabs.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: sEOWjkteBovVlwF4FGytumDfIl/5nZTwJ9AYSkwXAZA+0Eg8tVX75a+4Iv/s5Jw2wEmJAa+G16fWXdr0AGpH11b47pxsO+1SwX/EGGAunvi49p32cwnN9a6Z4cmFDfaJWItOPYYyCr5Xcjs/iPKc5awlFX4VEopk495Pq1LzBDZU6DvBIWUNBl5Ji8QHyl/22QSaW0lTga1JwsBozReb1RZP6nLlM5QpTccgMXk1ERPkGM75Hr7TMZJxthyzj/Yn5MhitEbl0s4aAjjJCVLZBqPD4oxBKBPkAuNS/KEE12ZAtaAcy+1CloCoq+yru9CktgxB4NPDIkPdIRbuzFjc2LPavDNppPwhAYv0CB5PchvAS6VzGrXP+2o5wY2OOAx6AMtiiQrd/OOwoqxeLEnbg+dMHrlc1Gn/ath2/RAnarctWL/SWy/uZKYCPfgWFZXy Content-Type: text/plain; charset="utf-8" Content-ID: <70F12EFE96451F4FB2BDF3ABECBBC9C2@namprd11.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 11b05e8a-e8a7-492f-13bc-08d7830c3995 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Dec 2019 16:14:42.6721 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: S2mwGQk8DqiQ0SKm5sKcO6+A9PkgGSuJ/8zTxtDy8bvsqrs9PixeKfWJm5rW1FBGC/6LkFED+DghOsuz1UMDXw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3678 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: <linux-wireless.vger.kernel.org> X-Mailing-List: linux-wireless@vger.kernel.org |
Series |
Improve wfx driver
|
expand
|
diff --git a/drivers/staging/wfx/fwio.c b/drivers/staging/wfx/fwio.c index dbf8bda71ff7..47e627bf0f8e 100644 --- a/drivers/staging/wfx/fwio.c +++ b/drivers/staging/wfx/fwio.c @@ -61,7 +61,7 @@ #define DCA_TIMEOUT 50 // milliseconds #define WAKEUP_TIMEOUT 200 // milliseconds -static const char * const fwio_error_strings[] = { +static const char * const fwio_errors[] = { [ERR_INVALID_SEC_TYPE] = "Invalid section type or wrong encryption", [ERR_SIG_VERIF_FAILED] = "Signature verification failed", [ERR_AES_CTRL_KEY] = "AES control key not initialized", @@ -220,22 +220,16 @@ static int upload_firmware(struct wfx_dev *wdev, const u8 *data, size_t len) static void print_boot_status(struct wfx_dev *wdev) { - u32 val32; + u32 reg; - sram_reg_read(wdev, WFX_STATUS_INFO, &val32); - if (val32 == 0x12345678) { - dev_info(wdev->dev, "no error reported by secure boot\n"); - } else { - sram_reg_read(wdev, WFX_ERR_INFO, &val32); - if (val32 < ARRAY_SIZE(fwio_error_strings) && - fwio_error_strings[val32]) - dev_info(wdev->dev, "secure boot error: %s\n", - fwio_error_strings[val32]); - else - dev_info(wdev->dev, - "secure boot error: Unknown (0x%02x)\n", - val32); - } + sram_reg_read(wdev, WFX_STATUS_INFO, ®); + if (reg == 0x12345678) + return; + sram_reg_read(wdev, WFX_ERR_INFO, ®); + if (reg < ARRAY_SIZE(fwio_errors) && fwio_errors[reg]) + dev_info(wdev->dev, "secure boot: %s\n", fwio_errors[reg]); + else + dev_info(wdev->dev, "secure boot: Error %#02x\n", reg); } static int load_firmware_secure(struct wfx_dev *wdev)