From patchwork Tue May 5 12:37:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 219880 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FAD3C47247 for ; Tue, 5 May 2020 12:40:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0B52320735 for ; Tue, 5 May 2020 12:40:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="cmqiCfJL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729019AbgEEMiU (ORCPT ); Tue, 5 May 2020 08:38:20 -0400 Received: from mail-eopbgr680041.outbound.protection.outlook.com ([40.107.68.41]:21169 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728820AbgEEMiR (ORCPT ); Tue, 5 May 2020 08:38:17 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N7goQeyxUWFKBEGlfQ+yiFkFW4mI8J+PpogtRXO82IQR0Wp6L6OSfDepiel1GUfI7xTGdD0601uuASoZyudizsKQh5e6v6ItxpD2j8QfKqSnQGZWj5fc7B7xt4OGmo1TYoVHmOrF3GtvxDWK48TvdmxIl7JX2si/ih7zpyj2nNjMxczzSPqkaxz6lgbdOi0bZi4vjv8feqTAZEaZO/+TZKz/emrUllbcZFc0UZSQvKfnrBmbcQecCyKdeElbgZLO30dvVBFV2mdh30ySTPZPqxTy1IV0uCwCusbEltUMkt5MOOLK6InUURYPW8xmdsxtDCzg6IUWHjfF9k/1TkA9jQ== 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=kg0fpV6J8wbKQWde4/vMX8w/mrW9jr6sKX+MkbzvZ0c=; b=hzKwesXYc5zAbYzt54aNT6Q8ASYRzueQZsCrfXWxt15vY+6EOoRN+aC64uYWlnd/xeVeBtf3NAZXLa4S2n5hvOhtdEnBjCccka+QCyNpoERsd8qGh7RUyrKHDgmiUYc2hlzI7Fsvl+R2r8oHs+aJv2Wi3U3XaDmSiveUjz/LzbwQMymz6CBq58M78SWffe5R7okvwcV0cKFig82Tv7xHa+WjrmEUmDiiizpl0etkc1ajOZkWvXaYjP3jgNjEBJmbgmYQEzawv5Sl8hFKy4zSzIhgM9Ai83sPLqBxvpdOUVP6xVZS9/Y431cFL8SwcwAWgelQDl8rucDJ0SfU4MYhHA== 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=kg0fpV6J8wbKQWde4/vMX8w/mrW9jr6sKX+MkbzvZ0c=; b=cmqiCfJLahr+WYRpRKksawian0jL4NW8BsX4bMQ8u8SN3438lcCaQpwZVrOAOljncQOEmyG5i3ds42l9pxG8Lpyeco1tQq0aV2zPMYrodr48nYrz5X/f2Gfsg1CZDLhRYzFRwn7ZJikceVPaoV2kb68idOvuHzv/jSTZd7u306g= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1824.namprd11.prod.outlook.com (2603:10b6:300:110::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.19; Tue, 5 May 2020 12:38:13 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe%10]) with mapi id 15.20.2958.030; Tue, 5 May 2020 12:38:13 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 01/15] staging: wfx: add support for hardware revision 2 and further Date: Tue, 5 May 2020 14:37:43 +0200 Message-Id: <20200505123757.39506-2-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200505123757.39506-1-Jerome.Pouiller@silabs.com> References: <20200505123757.39506-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR3P189CA0022.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:52::27) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.home (2a01:e35:2435:66a0:1265:30ff:fefd:6e7f) by PR3P189CA0022.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:52::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20 via Frontend Transport; Tue, 5 May 2020 12:38:11 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [2a01:e35:2435:66a0:1265:30ff:fefd:6e7f] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ccc18d7c-1497-4030-2bcc-08d7f0f12d20 X-MS-TrafficTypeDiagnostic: MWHPR11MB1824: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4941; X-Forefront-PRVS: 0394259C80 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: u+YekbkNR/WwYp4Anam3WRL5tpErzLki6T8uWaPZF6Gug7jRaTwyELz6L4nylNHHGi20iKgg5e/FRIzbJnR5adhVjIJU2s+wpdsUhDJY2BxjwxNrSwl8SRvm0DzeVKsen8QDO9UB24xQQX9jK/TwfU44+Vhq+vU3ymgLd59KBpMcd4ZtiWh9xD1KXdo3Wwwb7B6bt/S2B2QW+jXjFgc1CGlMQeNa6wlEoVmR9HqzolOxGKoJZOfeXTEFVbu2KxpQ6RFo+ckkwtfH4ZT6K9hqice4lJgFYmGD2b8Pr/UTGvkuJd/gZKdX35ycyMBxHslkwASdxZPPSyBUa1I60FYxkYgMCN4Cc2AYGJc7PhYNLmfXhF7Iwnstb7D6yf+daCKKMN7OXDLfxW2/DLHk7lZO0AZ9I2D/M1OOOVQffZ46RW5zVKjBI1BV4VSJWx+5WPCGR8k2sL/S22/uOdTiidj3xhgqBWNFFZRC5IEx3b1lEp2h2mtRAAHA1oStHMM9ufBW7R3HEMJPWrACpEU/1Vh8ZQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(136003)(396003)(39850400004)(366004)(376002)(346002)(33430700001)(86362001)(6666004)(107886003)(8886007)(1076003)(6512007)(6486002)(66574012)(4744005)(36756003)(5660300002)(2906002)(66476007)(6506007)(16526019)(186003)(52116002)(66946007)(66556008)(54906003)(2616005)(4326008)(8936002)(8676002)(316002)(33440700001)(478600001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Gxy/EqGBBFuMgtlxlzCgZoD2V2TcyqCU5ly6t6cNAbT6li+L/mSmwfzROT+8vB7j2PKYEKWl8b1gIktyQR26EVpIXD4Cuad78f4A+MpUvLHae7xbSN8tl5i3YgnaAzaLu9Ic61K2Cj09buLguzGmAWGtJTVzb1V5KjjWFP9IzE9swgxcoM5d5qbXtdfwG2Gm76ucJwFbZBfjRueEOTtgGNub8qhctoL1CDR3kRLqO1+PdXSc3ji1Kaz2AlosJZsZ+FaKQgpkSajigdINwa8Xl92WncKM6A0kpfKO3GCMxXGYIPVY4xHGuhOMyg91P1kWlJBoZd2h+iSYnQSVnb0Jq3QcMlyc9vbKYToNs2/OGHtVxg+7ylqp3/Xvn0oK3tx0MUXPYMqf5n7dglIrqH2P2toNwfQGE2NBZbQT++/FT+nIjlOIigilclusG0u8r+ZaxmJCLcEuaIPtItnY/0a0+VxdRyCrRzoXjjd59Q63YvEwgzZvS/PeZSP0mSrqlLdRaACcQpL8zFhepPkQEkUeU4iXoMyc2B7DPR5FbW4KYdXEBYS5WLSEqhwUGwWp9KvBD0HW1Do4XMFS3NO4KUplB9NJLY6gMq5SAgdWbZnpUy6lgFQ3UlIka9b9RFTgoiENPJBV87gCCKaAwvHWgvJFHFbyVITssdo1KljKjyBCtOJvw0A9kpxTQDRZj9aTRoIgqKT9Za0mjpRvKpSMsSG6eFfdaKu5JGo2+t6IZPZYbJAhz2Q/ItoiGTwHf3/4M5JKFqVvFScf9nmGyDaxcC/8P/Xl+DjpJLQKiNdjI/11B/R8GDs9DzxVoNagIiZBTVdiyVSeXmHqbxKBH173vknUNycXmHdUy3+xdTqv/YH5F2w= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: ccc18d7c-1497-4030-2bcc-08d7f0f12d20 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2020 12:38:13.5980 (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: ihUWIp8X/qkyMMYDWIVtVlyD+6MH92CO2bj5FidEwW/pR89zbqweMgRd2toGUIuWI2/Hi+9qfwGYRIQiSDMr0w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1824 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Currently, the driver explicitly exclude support for chip with version number it does not know. However, it unlikely that any futur hardware change would break the driver. Therefore, we prefer to invert the test and only exclude the versions we know the driver does not support. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/fwio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wfx/fwio.c b/drivers/staging/wfx/fwio.c index 9d61082c1e6c..e2f914296677 100644 --- a/drivers/staging/wfx/fwio.c +++ b/drivers/staging/wfx/fwio.c @@ -360,7 +360,7 @@ int wfx_init_device(struct wfx_dev *wdev) dev_dbg(wdev->dev, "initial config register value: %08x\n", reg); hw_revision = FIELD_GET(CFG_DEVICE_ID_MAJOR, reg); - if (hw_revision == 0 || hw_revision > 2) { + if (hw_revision == 0) { dev_err(wdev->dev, "bad hardware revision number: %d\n", hw_revision); return -ENODEV; From patchwork Tue May 5 12:37:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 219887 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1DB1EC47258 for ; Tue, 5 May 2020 12:38:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EA0B120735 for ; Tue, 5 May 2020 12:38:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="C4NZGn2v" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729040AbgEEMiX (ORCPT ); Tue, 5 May 2020 08:38:23 -0400 Received: from mail-eopbgr680041.outbound.protection.outlook.com ([40.107.68.41]:21169 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728905AbgEEMiV (ORCPT ); Tue, 5 May 2020 08:38:21 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WclLI/0sVU7P9GDFcBNjourF+Z/IJgStgqenhHnWVxUhxPDtKVuQGcLCyXb3ksbOtrv+TEBfDWief2cjeVysvirafucYKPK4XB1v6yfFmwf2eynnc48yc0CRkGHDATe+FV3YXhQqe//xSslVX/Ak/wiMz6qQFZjsLFQ1rgX1lvKBhwmJBF3zg9s/5lw2d9JBhKgYada37fLPvJb7vgJW6Oqd6fwstW9PPjtXD2Espw0HmhaSgNcRCUt7nhJY2bC0HknQPW8ENvVkjjQpryCrZgEdiVTTSlNMAFE708v5/zNvKQxNXvUp8E7MXIEshw4Lrre5KtvNlSNs8JCEreZZwg== 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=H8vGgHyHnPGPOF1YWFtZk/kRrA+ZPjDjlBfPtzkeBtE=; b=iRctM9V7TrKmDQE4mYwD+sdBcxu/fZ9s1c7/h8aBMvgMVoGTBPQhW0xarUjWF3P5zyZbP0xO9Z9UzcmqVs2wAo0SX3xQE+NSU87+psXSPtb/s10D8JLleDvTDgBPxkx2HImeX8RjKM0esjTxL489yKthhdZMpLvHJTgsv3yl/9jd/YfCwAElQqtbBNx+LUz8fVuVx67PtUf5Y2a3TYQVD8XY53SLX8mGGSMEmxFxtrnVQu8DsvxVQ5kKLj88dBya+qRimv8q7zTQguo219nVMecS6lmXQAd0WQp/5QBO9dxOkIcg+/UGDqTvi0GuvkVM5/qreaIjbfw/uwxYXyq5UQ== 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=H8vGgHyHnPGPOF1YWFtZk/kRrA+ZPjDjlBfPtzkeBtE=; b=C4NZGn2vjk202iVTqHRtwRNvt19QkHYoXN8IS6keDHSFfAn4vDVospk1PWF7XX0zJdJbaUQ7l1R7GD3n9a0JtNV2LLt/CVyAMUgLZZAfaKxrj7p9f53b70D4JoqyoT4ve8wzxdAxheZlGAWEvE2krUOcYm6GvOENZwFaqemB0Bg= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1824.namprd11.prod.outlook.com (2603:10b6:300:110::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.19; Tue, 5 May 2020 12:38:16 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe%10]) with mapi id 15.20.2958.030; Tue, 5 May 2020 12:38:16 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 02/15] staging: wfx: reduce timeout for chip initial start up Date: Tue, 5 May 2020 14:37:44 +0200 Message-Id: <20200505123757.39506-3-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200505123757.39506-1-Jerome.Pouiller@silabs.com> References: <20200505123757.39506-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR3P189CA0022.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:52::27) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.home (2a01:e35:2435:66a0:1265:30ff:fefd:6e7f) by PR3P189CA0022.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:52::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20 via Frontend Transport; Tue, 5 May 2020 12:38:13 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [2a01:e35:2435:66a0:1265:30ff:fefd:6e7f] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bd98bebb-69f0-49bf-3d4d-08d7f0f12e83 X-MS-TrafficTypeDiagnostic: MWHPR11MB1824: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-Forefront-PRVS: 0394259C80 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nSoXxKGIpt9uaq50KWLTIbkC61+w1yBOGthmsMtIvXqsVpS+NhdiXOn8/szZ4z050d1Ix/xrYvNM0xw7VuCRFWmZFQTAZBozEdnk3F4+J6aXgeQGiE3LDw3nHc/BCbn7fwAUwkOI4ezetpV9MzQvQzx2Llku9i7BvIrEbGp1KnyufVpqs9P9I3b3h9OGEd5WNS0SVEBuqSM2XcV9Q9fB1lkENwIx8lHc0Dj/bVoYTQAVXJWcr6TAz04ndJIm9CoFib+oXvYx1FwuKRRn8WJT5vYIsXY68Nw/MYfo6nhYBMkbVi7r+KbPAZgNlpsa02mNik8mpnMFzy+nOKZ36WfUjRt2EHEKZyZLyktlUlXbU23TfndKfokV7q/cDicWMusbfywzWypcG6HIhcFlNgh9bWtECveNKRXL4ZIfbNlD/GMgvDpGwysUKkorK0mAuE5nHS1W9W+bD1KSDMZ3hGrgwxZjC7pFWHvfR9OKeixf/5jbi/xpm0TQZhJVUVyRe6L4AR0hft1khFY2SGNooWULTQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(136003)(396003)(39850400004)(366004)(376002)(346002)(33430700001)(86362001)(6666004)(107886003)(8886007)(1076003)(6512007)(6486002)(4744005)(36756003)(5660300002)(2906002)(66476007)(6506007)(16526019)(186003)(52116002)(66946007)(66556008)(54906003)(2616005)(4326008)(8936002)(8676002)(316002)(33440700001)(478600001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: SaKm2ISjGz3lQOWUGLE26Iquehe5Z2351YY5B77P5ZJkNPNglw80o9//BcNyul9RqAzoCKdkDMEkDon6ysa/Meu3bqxgcVq9NLkgTqElIMCb/14kosBcqBGcJXbWna3jhVXiVkRxLivdhmH0b3gcQQEQ0aEhl6DU/S1ZRD/U1IK9v509A4dDk7hkeiMYqbgAuG4Q6NViPuo/2WtQqaVFEj9ixUC+z47VoYW2u8mD3+gwG9eWDbqS4BlYWkfzpojxKqj/o0HIvghW40+kgkyco+JTbAyjnEhHQGdcTbz7FpAM0b03iVoNj8er1y0zllKXRta082u2CwQJRPnO0I7O3GSEuHerUv65SNkMiqRSGvM6wIyy7HTTHFysBVSxZ074RLRWiRsGMZStjZ6rg3F+w9xM7+1ccQhST6LAWrRp5Gk+demEn1R1IFE6PaKgwO/iCmaolcuEK2HNq91l5boQION8gFI8cS+Vsh+bZs5RbqA9/EzYGCKHHu+nRIu5a1OtVygmLprtSpblpRohafEv9nx3iV0dbhHkMgP4h/40s+yJpTSHQv5Aiou0/5hwiI1c/I6lQo0EvdsuVayRl0awcPSmN0k2gF6FdmIiKTsTn1BLK1VMX4KjrtmnfUdqb2dECY5pYDYIZ1iITodMmzfQ0EE7FUW0/Q4VnKHaSCUlnqB4ycQiqbL6GmWD1nT2BrHXSAtrlk3o2ZFD3elZt+jSidnbJFA2AHZXVxTZ7NiUFl67S046fSNTi3Gr85eSNPPDfGiTpVbKpJCjbC3GTggrKQAqAq3pjEhUuJC4wXIhkHIW87BxpdKgq4vLOLZfOeAq69//wD9rQ76R/Z092d+0UpmMue4Nsxn/gO9jpK2UrDU= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: bd98bebb-69f0-49bf-3d4d-08d7f0f12e83 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2020 12:38:15.8770 (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: H16RZVPmpgFbNWKEmCyJLwlAJdpQOIu/4U+6IUxq48+B8/QVPSF7sI0MJh7H3LKVv+GEaooSrqjjUT5l9+cXEA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1824 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller The device take a few hundreds of milliseconds to start. However, the current code wait up to 10 second for the chip. We can safely reduce this value to 1 second. Thanks to that change, it is no more necessary to use an interruptible timeout. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 742a286c9207..ba2e3a6b3549 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -370,8 +370,7 @@ int wfx_probe(struct wfx_dev *wdev) if (err) goto err1; - err = wait_for_completion_interruptible_timeout(&wdev->firmware_ready, - 10 * HZ); + err = wait_for_completion_timeout(&wdev->firmware_ready, 1 * HZ); if (err <= 0) { if (err == 0) { dev_err(wdev->dev, "timeout while waiting for startup indication. IRQ configuration error?\n"); From patchwork Tue May 5 12:37:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 219881 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 199B9C47247 for ; Tue, 5 May 2020 12:39:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E8EF520746 for ; Tue, 5 May 2020 12:39:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="VM/zsOlJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729073AbgEEMie (ORCPT ); Tue, 5 May 2020 08:38:34 -0400 Received: from mail-eopbgr680041.outbound.protection.outlook.com ([40.107.68.41]:21169 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728905AbgEEMi2 (ORCPT ); Tue, 5 May 2020 08:38:28 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fC06jR/QX7Zem+X+UwYAZGrY8ZvJ+vzArUjXKqK535hr+ZKOjItK4FazQyy47EvNNgn0vAdlxOczZcaKpoBDzqLqFjeFfmd5lGzUq7oVlJmTbJbek6uRa7hVZK775EqqNEJsKxKI5fldRWMKZE1anCvjK1wHB4tXXlYQS2pagWAGgy8k7OoGyy/ygcWIvLeIP+5xXrVmsN99AXpUVNh9xXuiSqHhTaMFPtbDkKOU98c6yVVeZnUBves0Ib6tc/acBB0HtQdeW9L35SpMMWzfxlrHUpiBibdO5MrurFC3utqAz6MuOZaLj15uKGQ7po9cUGIdfFYKTkfxluY3otn9zQ== 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=3oLHfgZ0s7fUNykbVNQ7tiAx/HbhMYX0szDllSwRzNw=; b=ZnBS4uggX88AiodcH6F0wVAG9TM9HnwWX64GlARE/3JUBxeRCHMNbBYXyj1eXGHB+/VOOq5Gg7l/Cg7kWwBfFwxNlXkHq1PXKHlcwHE80jk7NtIxuPKxsev4aR3T7Jos3lta+l6DgJZNjg0j0Q0hTHOvHBMKsfed61p+Jf2qQz5qCbSnY2tu93oG3dDlBtmR1frmjX725Q9xIs7/APZWC9mbBosr3L82DUFSCQcdyzYswZOlVjyTziInL9QQ+O867bk5otKaa3636cYx+ccuVCBaBbqokVxWYPLv0aPYvlTd3bHISXoV6EbzCufdxUn4G94AmOBIzUfbUsnUiQotlA== 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=3oLHfgZ0s7fUNykbVNQ7tiAx/HbhMYX0szDllSwRzNw=; b=VM/zsOlJ8zfSoPz4IsbL1zb0SxqeQPtSnHwyiXrustyySWsWL3QdC2rnvAI/vCVI+gKwIuGCdVeQEUflEKT4Uph/xBzi3UgNeclzsW0gr4RdzSowD9LdVeqOOURdIbyONSi0A7zETVAqdk9ONzSqL5xHrFyAOJAesj5QKrPPTIo= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1824.namprd11.prod.outlook.com (2603:10b6:300:110::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.19; Tue, 5 May 2020 12:38:20 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe%10]) with mapi id 15.20.2958.030; Tue, 5 May 2020 12:38:20 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 04/15] staging: wfx: drop useless check Date: Tue, 5 May 2020 14:37:46 +0200 Message-Id: <20200505123757.39506-5-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200505123757.39506-1-Jerome.Pouiller@silabs.com> References: <20200505123757.39506-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR3P189CA0022.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:52::27) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.home (2a01:e35:2435:66a0:1265:30ff:fefd:6e7f) by PR3P189CA0022.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:52::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20 via Frontend Transport; Tue, 5 May 2020 12:38:18 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [2a01:e35:2435:66a0:1265:30ff:fefd:6e7f] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2827726e-73c7-40ec-ef42-08d7f0f1314f X-MS-TrafficTypeDiagnostic: MWHPR11MB1824: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:962; X-Forefront-PRVS: 0394259C80 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YlNl7lGXiBzlPHj/BEFZhFUT1J4i9gdteG3MpXMITbwQAvFM5lbgF9l6j9YorULLyGsuxZxWt0JKlFaBdR+sg3NT2yekD8ITCjdwPmFKPCXjQKsnp7T4boHEoVrvN5JE1/Z4biwzGcU6a9fwQ5oKdz0fJy++Mf9LKbNXmKsF8uAO02ditGUoZklj/9dW/ZsnQqw83APfWn2DKHPTRxosmCBQNiQT/lR2AxqbJj8AdGkYnhqDrVogWKG7+2USBBGDWZfCjpiMSBqbSZoVts8hEar2M/+J6/1ewEofpgh5HhIyZRlZZh2R8+U8Ylyv0L+GZbuiZKZ9SWgIpuPUB7ALeFKkIy9sIIWoSxqLIlE5oYBpNg7LnBTsh+ICjoa2FN1OCOfZeUwOsBtz2r0lSnNSSfT1fiZU3suPzre4NaQ38DFd8cFqw1KmV/bi/cfAoL5ikOJ3Eop2J7CRMSWD44VqHzU4HKgcY+W7mGmx75S2Uunw6lUMKZtuWo5XlYkXlmrR58tpHcnAJIFO+OvfQ6XTug== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(136003)(396003)(39850400004)(366004)(376002)(346002)(33430700001)(86362001)(6666004)(107886003)(8886007)(1076003)(6512007)(6486002)(66574012)(36756003)(5660300002)(2906002)(66476007)(6506007)(16526019)(186003)(52116002)(66946007)(66556008)(54906003)(2616005)(4326008)(8936002)(8676002)(316002)(33440700001)(478600001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: uE3Uq7n6j7evEqgvMoM5NNg8UNeNHSqCYPnJdVHW+6sicnn7okGrtBzAZqZr8qDXCsBNJBa6BbmiVve59pbDi3uGHqG+WhugaYN4AvM7ERj9C2DTagOgzgKdgWzl+k71U0KUEpIDVVY4JAqdenKL+XMZPUbd+3bQIsE709x2o3Vs1cC5midO9F7FXMPzEcSmxEkopg/d2A4MN+1abbW9i5V79xbPBwuHbfyZeusrSKuEAlPdA6LaCCZ1TS7P7lyGs4/MbGnYYfd9wgzruimZrwP7NdGP6b91tCgy/bABpKGrNf/cbIA41Jlzbzn5nu4XhBhWqzaO7VsUi3yyeZ77GL39qzoDYnv96USPl/mrDLhjTTja98ilC15kVrrI8akOmgBlQnALqOEZWWSytDB1MuUZYd1bCOoy4Mf/jOho16H+dlRNlHqqRAfMwSJKFRzQEh/CBsElk7/HSohTFlRGrFUXqvm8uF8t4vlkqdqAA/M36QDopHRK0TDpeYQY4d0c9JBuif3DrTtCLK+hu4691B4eY52rc8iMwosiIPZk8ISCLcTOlkrLF2z3SoriarTU2A7DbelIOxKtJdpUrrHu1oZbeX3Sqq3rwWEmBs60CCGf4UmdfxueXyOFEtfK9JK7lgl7wKB8J+rLsbt2H8Lxye7smAsa6wy2Fcy9OaQovGp9B1DRC9FiMbGRaoW4VyfijclkyIcLJ3AbyqAe6szjdlwiXQj6ATp/PVRSnPR4lrQqch0My+NndDMMxkTSrtNDb1ETB+Hiyt5o+gCFa+zg5Uq4ZySK/QzutyYQS8BsiRkMhtQS4aBlfkqdr/pf6raMchRz/uM+CZZNIyswBce6LqvFmI0EYpguRv38hG/6sBA= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2827726e-73c7-40ec-ef42-08d7f0f1314f X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2020 12:38:20.4120 (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: 0GhKMnM6kWzFVjOJXP6s0inonYtJVQLYTvYbytuovD/rYKbFxB8BodzqRVC3Okx1C5/2GLHO6xZroM0VSxWzZw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1824 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Currently, the ISR check if bus->core is not NULL. But, it is a useless check. bus->core is initialiased before to request IRQ and it is not assigned to NULL when it is released. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bus_sdio.c | 9 +-------- drivers/staging/wfx/bus_spi.c | 4 ---- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/staging/wfx/bus_sdio.c b/drivers/staging/wfx/bus_sdio.c index dedc3ff58d3e..9ac87178270f 100644 --- a/drivers/staging/wfx/bus_sdio.c +++ b/drivers/staging/wfx/bus_sdio.c @@ -91,20 +91,13 @@ static void wfx_sdio_irq_handler(struct sdio_func *func) { struct wfx_sdio_priv *bus = sdio_get_drvdata(func); - if (bus->core) - wfx_bh_request_rx(bus->core); - else - WARN(!bus->core, "race condition in driver init/deinit"); + wfx_bh_request_rx(bus->core); } static irqreturn_t wfx_sdio_irq_handler_ext(int irq, void *priv) { struct wfx_sdio_priv *bus = priv; - if (!bus->core) { - WARN(!bus->core, "race condition in driver init/deinit"); - return IRQ_NONE; - } sdio_claim_host(bus->func); wfx_bh_request_rx(bus->core); sdio_release_host(bus->func); diff --git a/drivers/staging/wfx/bus_spi.c b/drivers/staging/wfx/bus_spi.c index 61e99b09decb..03f95e65d2f9 100644 --- a/drivers/staging/wfx/bus_spi.c +++ b/drivers/staging/wfx/bus_spi.c @@ -140,10 +140,6 @@ static irqreturn_t wfx_spi_irq_handler(int irq, void *priv) { struct wfx_spi_priv *bus = priv; - if (!bus->core) { - WARN(!bus->core, "race condition in driver init/deinit"); - return IRQ_NONE; - } queue_work(system_highpri_wq, &bus->request_rx); return IRQ_HANDLED; } From patchwork Tue May 5 12:37:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 219885 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84F38C47258 for ; Tue, 5 May 2020 12:38:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5BA4620735 for ; Tue, 5 May 2020 12:38:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="VtOxdcZo" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729124AbgEEMiq (ORCPT ); Tue, 5 May 2020 08:38:46 -0400 Received: from mail-eopbgr680041.outbound.protection.outlook.com ([40.107.68.41]:21169 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729075AbgEEMih (ORCPT ); Tue, 5 May 2020 08:38:37 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WyZOdAUg06ZPSarKOwtVZeDHOB5QqqBM6oeH/U9/a9aL3Z3XhEOPxEqPlUauJ5SHNPWfvFKHWEQTk36DIzORMjHXZy7pTQNmk+znvsmu3wgKuKvId7/lD/9qWzX313FU2S6S9hmPtVdJUMxoH77XhvFNezDZ247/w0icTGyX1C1cvyas9eDVrfJoTBPRkD+fSk3lVoFiBTgTefANlcPm4/BNQ7oLBRiadRMFB4HWcyKsYCcjOVZDyYb8WODopulRzw3ZPbl+qB6FHb5R7Ego3dsP6Zph1f8gRGoFGfgAw14VzuEOZLT4rqpfCEWdGmgxw1qXf5boLS6f0hsqLUfFkQ== 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=NMpfck1aDMqtJrUHlkcbaq7MiZYLPBmRtELEHKBmXaQ=; b=FBNElqP6deGRhtAE2CTWGyOiTAJX5UPQ21yDmQHT1lylZEtHRFVkRU325JLPiuyWMlp0gxiUuQrYbGpB503yUU/25wPsEkZ+whSRCLTrTO0qL+8WngnD45jaNrm7k1KD86RBQcSLiUTpH5cX+6j6FuxUDEK+db4Wbhhnm3Ni7h+CLXHhjsgSOSMoKDpoeM98PXKsFyqPvVm4tTDDD2rpxilUqFyX6sXn2beuKK39s7W1xrx0P3y1SABewnjnIhHl6/65FPZ1DnqLI9edi4H0g+Uca81wGXRskCLiQFsNp7k7eAzwiWlLdmCoq0gQT8upOe2tPh3uG7gwZ7kDZcOXow== 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=NMpfck1aDMqtJrUHlkcbaq7MiZYLPBmRtELEHKBmXaQ=; b=VtOxdcZoe9IM8wislvQNVjnuSKt5EV8B5RdS9GnwoOYfc0oKWU5V6CVyzWpnLKd9yv5lmtQIaEHmhDFwOYeCz0fMEwhUpyLZ6G41DeFz4T3B+JwzdOyM6Az4Qn4IhT6Ik7W7U7kBwDocKC5jmK2BizJi0QSr/bwx7Qn86BVoZUA= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1824.namprd11.prod.outlook.com (2603:10b6:300:110::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.19; Tue, 5 May 2020 12:38:24 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe%10]) with mapi id 15.20.2958.030; Tue, 5 May 2020 12:38:24 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 06/15] staging: wfx: use threaded IRQ with SPI Date: Tue, 5 May 2020 14:37:48 +0200 Message-Id: <20200505123757.39506-7-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200505123757.39506-1-Jerome.Pouiller@silabs.com> References: <20200505123757.39506-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR3P189CA0022.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:52::27) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.home (2a01:e35:2435:66a0:1265:30ff:fefd:6e7f) by PR3P189CA0022.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:52::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20 via Frontend Transport; Tue, 5 May 2020 12:38:22 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [2a01:e35:2435:66a0:1265:30ff:fefd:6e7f] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dcd27bac-09f5-4129-ba2d-08d7f0f133c1 X-MS-TrafficTypeDiagnostic: MWHPR11MB1824: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-Forefront-PRVS: 0394259C80 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uWhmmeoW26eetYjWVYZOOZ3K51gB59q7Tt0Ck9YNqsJ8IXbefmLyTNgQZStLfh/9dnINXjfjsdtBgec5Qqdru2p0TGHDXBy/CWxLA0hlpAxqwCkJNSlpvD2Yhd43SjXIgd7rLsfclcT0j/2WShkXmNjHl7QHHWKggbxu+rjldSzxnxxcm6tWJj7+FHPOzv5xgIRKi0xJy6ZH+U2VfNJMADR3oqUjUe/U9S0WrP9/1erV9oCkoXY7Tai5mtovnxB4zerlvt+egNaVn0//yDtLgSf4+fVrSB+DOCZnuyZm/zBfwf/nngdXopjjdsnyQ6iFVD1gxjOMErrhyMCuY51W/aQb96XevJPCUVwBuTEIWhBlBf/WRA3gfN1kOh/2l2WIo68LDVVznz5BfIBlDUv5j+bYojM2rNaWk80l9uvxAmV4i1Vsq6zUhaTb3yb95Hj2MbS0z0PWs6mjUldNaech3RhwXTS6USWIZeO1WSNPJKBmU2PKtTBamF2jcCfSSJplTs7K7AQv/7sWCD8ENXNoPg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(136003)(396003)(39850400004)(366004)(376002)(346002)(33430700001)(86362001)(6666004)(107886003)(8886007)(1076003)(6512007)(6486002)(66574012)(36756003)(5660300002)(2906002)(66476007)(6506007)(16526019)(186003)(52116002)(66946007)(66556008)(54906003)(2616005)(4326008)(8936002)(8676002)(316002)(33440700001)(478600001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: I4+zS1QYWZB+VTgBCAv2GA+dJeMROXNC3rUi8qVVTbM7skaaMt0qV3j5vJQZYPss/zvGt16CcRhulZ6iv4PJPBYRRO+pifNn7iIShGxQ0yb9tcVNCy5VwCAh4czs/6Gy4SUKxYmUgaQrjqo0jBhaPxEcOWpNQMj2L4CvRA9UUfkAYvHng4gFAjfn1+csquvr1/k7JUL1Pvzp046DtGaEiDfR48n0XdAKsVb6Zz70ryccYFUBZHJkveDaI4najpbV/w8lDoGL+gDqap46hTXOlGNmTt4jlsz//xIHn1gsBem47rQ81q5t5oc5Kosdv0gxTfTUKzaDNaFI0U6sNpas3g7NlaULkKccq8sSOl6SmYTn7+OCdK3jJK0nfpLJNDgKtEoqYQ9bukZ9/4X2sf0ymSdbscRqsQ0IPcnufKNbCUSPiMWuKqk2xapfjwk8INLRykC4a33rYdb2OGK9NE1rj3Mn4zptlJZkx+sJ24IeMxw33kxaal7qJ4swksZE4GzP0YcajRf1yXvafu5NNxKEpuDc1rrAq6LRbV81rIcGWL+pyOWqd3BRGF/R6qJOhaLfFVzdNQ9Qmxr8+YErT9DNXOKWzpb/T00Tu5Ep2rB0xqD+GYIiQKpZnJJHPXs+1IATnhWIPGp+1pZLOBU2yWiC952Kg4Xln+sW04RwLOi+qQmSE/PdcuOoVrie9At3PCX8NGoh64E4hOjttQB9uKUZvneI9T4erdXNmukv84/koMhLYAXvKG1lBx9RcFU2A7rhyXd5ZQaOjq9C7boKbdB8baWeAtdjGbL2fZ3xmxeWiOSp78hCpy8L/Oe1LLgmd7SbSlt2b/oxwpLp/GH0ELtzNUAYSjoRoJ85cIMemo5Z/yE= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: dcd27bac-09f5-4129-ba2d-08d7f0f133c1 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2020 12:38:24.6181 (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: Cn3lY4Ul+kogQxEYLoEsyfeSDJm0VTWLDVBFGmKl/mfnQP7+W8leBkqCPaYRANhYOxl6wStid8axk9T5canVqg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1824 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Currently, the SPI implementation use a workqueue to acknowledge IRQ while the SDIO-OOB implementation use a threaded IRQ. The threaded also offers the advantage to allow level triggered IRQs. Uniformize the code and use threaded IRQ in both case. Therefore, prefer level triggered IRQs if the user does not specify it in the DT. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bus_spi.c | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/drivers/staging/wfx/bus_spi.c b/drivers/staging/wfx/bus_spi.c index 03f95e65d2f9..00613d046c3f 100644 --- a/drivers/staging/wfx/bus_spi.c +++ b/drivers/staging/wfx/bus_spi.c @@ -39,7 +39,6 @@ struct wfx_spi_priv { struct spi_device *func; struct wfx_dev *core; struct gpio_desc *gpio_reset; - struct work_struct request_rx; bool need_swab; }; @@ -140,21 +139,21 @@ static irqreturn_t wfx_spi_irq_handler(int irq, void *priv) { struct wfx_spi_priv *bus = priv; - queue_work(system_highpri_wq, &bus->request_rx); - return IRQ_HANDLED; -} - -static void wfx_spi_request_rx(struct work_struct *work) -{ - struct wfx_spi_priv *bus = - container_of(work, struct wfx_spi_priv, request_rx); - wfx_bh_request_rx(bus->core); + return IRQ_HANDLED; } -static void wfx_flush_irq_work(void *w) +static int wfx_spi_irq_subscribe(struct wfx_spi_priv *bus) { - flush_work(w); + u32 flags; + + flags = irq_get_trigger_type(bus->func->irq); + if (!flags) + flags = IRQF_TRIGGER_HIGH; + flags |= IRQF_ONESHOT; + return devm_request_threaded_irq(&bus->func->dev, bus->func->irq, NULL, + wfx_spi_irq_handler, IRQF_ONESHOT, + "wfx", bus); } static size_t wfx_spi_align_size(void *priv, size_t size) @@ -212,21 +211,12 @@ static int wfx_spi_probe(struct spi_device *func) usleep_range(2000, 2500); } - INIT_WORK(&bus->request_rx, wfx_spi_request_rx); bus->core = wfx_init_common(&func->dev, &wfx_spi_pdata, &wfx_spi_hwbus_ops, bus); if (!bus->core) return -EIO; - ret = devm_add_action_or_reset(&func->dev, wfx_flush_irq_work, - &bus->request_rx); - if (ret) - return ret; - - ret = devm_request_irq(&func->dev, func->irq, wfx_spi_irq_handler, - IRQF_TRIGGER_RISING, "wfx", bus); - if (ret) - return ret; + wfx_spi_irq_subscribe(bus); return wfx_probe(bus->core); } From patchwork Tue May 5 12:37:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 219882 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D754CC47254 for ; Tue, 5 May 2020 12:39:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A999920735 for ; Tue, 5 May 2020 12:39:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="ihT53FlW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729093AbgEEMjc (ORCPT ); Tue, 5 May 2020 08:39:32 -0400 Received: from mail-eopbgr680041.outbound.protection.outlook.com ([40.107.68.41]:21169 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729090AbgEEMik (ORCPT ); Tue, 5 May 2020 08:38:40 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SFnx+zMn+SGrfv8KLoswdNk2jkwF2sz8hogbxtRvfdKoR3b1TkLkyzFizeZoF2fqNGya1UbYHgQkIyiWMvodPGUydBemqDR0eRogDn3+Isj45pBICbkPVTOzBOaZRpTwnVG27JK3y3gEyyy6gqL7EEB5l7fJ8JSWcTOPOYvpDF3wWtcsmkF30uhoN7Aik1J7XlYhjKRwDLWWkbcBIMmUtt8ay0YlDBvHKitg7yXBuNL5lqzBVoQwfu/GxbryTmFDOO2dWpzNY4czfxApAfVMyDFVoXr4jzFQCrV6DIPaSc4YlrTd4R3Rkpz/xAMnkPWEteCx0/9ui3cx4kvpdOWkhg== 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=EcUyPk9HZS90+PsFFElskjoPjhRG9AXCGuuvtKpa0IQ=; b=B0C3rXTKnUcu1V3yVT5fpQO195zjvQyT/9fVXTw7XvdspHR+t4NhvtN4Ut3zzD3hgVU9Udsox1ZOcLxPlCtz8VhZA3aOWeZfPnNzHTAa3nWOOCQSVyD9F0rwLurSadSmEQcchvTPnDbaUSXgCP3Pc/zjxHbfpcGPDjj8zJSjvRlGsvVwCvPdR9L0guNnDHE+7QJX3KF9cuyB/+Ht5cdNNO2zsVEwQkSivP0PrQSfiZh5DyA7B1svbLYd6akXBEWTd3HzqNVwuYTxdBiRH7f9BAe0LIDjXVW60kAE1FvTY/O8iDkEjqjGr/0yxtTSusL3QqEgb3t0tJQkGcGb4iXABg== 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=EcUyPk9HZS90+PsFFElskjoPjhRG9AXCGuuvtKpa0IQ=; b=ihT53FlWnxFNCiI+W3+fRQnU2YKM6tkk7mBTb7a06HIy7TkNfoRmusIf16b2sWn76nPVG1174NLH5iCHKSwOBaKQJNPritcAPHE/Nfw9oSm1l79WNo0waEOK0cY8O+5HzzuwhMVRQTDcPz+bfit0XJKJAabx8gpW2GbtS7TiE4Y= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1824.namprd11.prod.outlook.com (2603:10b6:300:110::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.19; Tue, 5 May 2020 12:38:27 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe%10]) with mapi id 15.20.2958.030; Tue, 5 May 2020 12:38:26 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 07/15] staging: wfx: introduce a way to poll IRQ Date: Tue, 5 May 2020 14:37:49 +0200 Message-Id: <20200505123757.39506-8-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200505123757.39506-1-Jerome.Pouiller@silabs.com> References: <20200505123757.39506-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR3P189CA0022.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:52::27) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.home (2a01:e35:2435:66a0:1265:30ff:fefd:6e7f) by PR3P189CA0022.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:52::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20 via Frontend Transport; Tue, 5 May 2020 12:38:24 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [2a01:e35:2435:66a0:1265:30ff:fefd:6e7f] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9fe488cf-928d-4865-c3cc-08d7f0f1350d X-MS-TrafficTypeDiagnostic: MWHPR11MB1824: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-Forefront-PRVS: 0394259C80 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uwy6JxzVHlUPwRXcN0Q21anwH7G3IAIT7nNlFtWEYAaYMam1UxFY4flaD4UGMlMOnwS9ASDeDbkqVB4M12Ls6URu+I2pVc9NWptIvzbFQpap0U7bo07debwYc4EvGhjykmPsowKfEWu7iPuDhF4PoJ6lM9qRnU+Q9EewZnsaZJyUckAYHZHrpYLdSglUi4z9D7u8G6jl5qMABJ2KNCzsWW4On70DNJXSiGn/ZEK4cHOiEatKOpmlXpuCz+w5SOvQqmVy0r/c4ghTArsfHmHlrp0vCKoN4SjxzeaJtgRNHNzmpy5ImOiio6g0EpOrp4K8loJR23XoM7R7k1xZGaO9avPwRh7x5IG65sHfUqFoL6FzUst+hiudl95GUGkMLDcA+NmC8BhzOMKbRpmCGcFjvSzukeyyGVGUvLeJCR62bmYf+yHh//v/we02ob+RlgZ40yv83aftZ0BsKKeBSXE80DzIPhccBwDq8J6L8PT0YS6V8AAjOgR2ysKlGpCKmJ2IIIZSSc7B4cbj63TVDscFdNyovqFETnphsYVXqDRKdF1kiU+WmiQIQbCUQNC5q2PI X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(136003)(396003)(39850400004)(366004)(376002)(346002)(33430700001)(86362001)(6666004)(107886003)(8886007)(1076003)(6512007)(6486002)(66574012)(36756003)(5660300002)(2906002)(66476007)(6506007)(16526019)(186003)(52116002)(66946007)(66556008)(54906003)(2616005)(4326008)(8936002)(8676002)(316002)(33440700001)(478600001)(43043002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: mxtROYWbXqQ0ZOPPXaz/1Irp5fqRWD92XRfdZBlYq+WEN+c9pMkZy7B9QSHgGbqxxXpu6i2zupA45Ovx9DRhl/FIKVeSOGV2fYvHypqtyiUi6B2W/mUdDyJxA3uadV3ey1VchVCNYet3zXMCMtwBI5jeKz6ItS3KebnyP17r9gh+Okq8xv6avk3aON394PEvv7clx11DrD9374znAKd18ESrFesE85PwNHdF0+1SD1g1cxN2M4DdRBTS+/dyTyBqQhLCf9sAQ88x3Q6KhRIj3fqYoykpPnbxLBEmUEBbj2VR65OzgF8hNoMOhOypqW0AJAKf95ne4WwVovc6LgyBcrubXEBeeJVkVi9AE2lVyY9Z1SX0q3UvheECxnrDcFa7BquvVRuvB7Od0p4hVo78QRQoOtncIaoaeb7iAYq0eWYuJwsCJSsG0A2rAaRAIUP8uPeBkecROfuR8ft2V+QpAEHD79e1TG3V8AtPN+FCikIhwvni+SJw4GfIA2k9GVQHyxE6U8szEes4gI2FRnzJ3fZl2JLecEk79x2m7DoXh0tswj3cZ8tIKbvK0lB6zbsHnH7KIYhhIXJOQzZTLiWroNhcLY4k+ZEM3wbNGieksN1rUl16BF8N73O1wrAmbCCRa2DXgQzuHH+0jXyEZfTwvZ4jQNKkeIxP34ZKvQCRpKxiyBxIBLH1XWcvlHZ1K/fnUU/5IQo63pjdKWNE0BqqvwQP7DVKWOEd0iEoxK2WCl8OvodfUNlo2I++8VR0ODrrqseJLhpaX2w1efwuhRLsXAywsWCgQfyZacNCxbDNqjRQg4yz6sD3wCCZ4ABK+ncA6/PXQW25CC6457rv0yQcvdeHIiqexu/esckTc+Qx0Ec= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9fe488cf-928d-4865-c3cc-08d7f0f1350d X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2020 12:38:26.8151 (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: jNtWZfCnAtlpm+fuKb4nj/N/wNN95vNtRMjd+utct2mZygeA7+4lg4ViwbgpOR4V2p8qheel0yR4LadbAGduug== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1824 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller It is possible to check if an IRQ is ending by polling the control register. This function must used with care: if an IRQ fires while the host reads control register, the IRQ can be lost. However, it could be useful in some cases. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 28 ++++++++++++++++++++++++++++ drivers/staging/wfx/bh.h | 1 + 2 files changed, 29 insertions(+) diff --git a/drivers/staging/wfx/bh.c b/drivers/staging/wfx/bh.c index ba7fa0a7cd9a..d3e7eed89c38 100644 --- a/drivers/staging/wfx/bh.c +++ b/drivers/staging/wfx/bh.c @@ -307,6 +307,34 @@ void wfx_bh_request_tx(struct wfx_dev *wdev) queue_work(system_highpri_wq, &wdev->hif.bh); } +/* + * If IRQ is not available, this function allow to manually poll the control + * register and simulate an IRQ ahen an event happened. + * + * Note that the device has a bug: If an IRQ raise while host read control + * register, the IRQ is lost. So, use this function carefully (only duing + * device initialisation). + */ +void wfx_bh_poll_irq(struct wfx_dev *wdev) +{ + ktime_t now, start; + u32 reg; + + start = ktime_get(); + for (;;) { + control_reg_read(wdev, ®); + now = ktime_get(); + if (reg & 0xFFF) + break; + if (ktime_after(now, ktime_add_ms(start, 1000))) { + dev_err(wdev->dev, "time out while polling control register\n"); + return; + } + udelay(200); + } + wfx_bh_request_rx(wdev); +} + void wfx_bh_register(struct wfx_dev *wdev) { INIT_WORK(&wdev->hif.bh, bh_work); diff --git a/drivers/staging/wfx/bh.h b/drivers/staging/wfx/bh.h index 93ca98424e0b..4b73437869e1 100644 --- a/drivers/staging/wfx/bh.h +++ b/drivers/staging/wfx/bh.h @@ -28,5 +28,6 @@ void wfx_bh_register(struct wfx_dev *wdev); void wfx_bh_unregister(struct wfx_dev *wdev); void wfx_bh_request_rx(struct wfx_dev *wdev); void wfx_bh_request_tx(struct wfx_dev *wdev); +void wfx_bh_poll_irq(struct wfx_dev *wdev); #endif /* WFX_BH_H */ From patchwork Tue May 5 12:37:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 219883 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 315F8C47247 for ; Tue, 5 May 2020 12:39:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 05F9420735 for ; Tue, 5 May 2020 12:39:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="I+O6OaWr" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729160AbgEEMiy (ORCPT ); Tue, 5 May 2020 08:38:54 -0400 Received: from mail-eopbgr680041.outbound.protection.outlook.com ([40.107.68.41]:21169 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729115AbgEEMit (ORCPT ); Tue, 5 May 2020 08:38:49 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=etgiWBhro+wph3OPL7GQU72jCaRqNP2xFwF9kYjCsYMozpmqYkK7wIMTu0fJbQZRGhRBgK4D4/xQbQniy5flt7dAZBTUX7IXaXY21xBKuaD1ntcz0fzMtNOJHIJ5NYkl1PmceyO7zUNvW2ibDqKWDbqpZyxe0y2vECpCwQ7XcTXqWzYC52DcyRh9ogWG0+LPrmoe/CkDvHNTDsOh/MOQ269mVDSopKQjlj7RfR5YTZSdCs4EZK7aZhWc0tnTbYkWxpswPA57tdh9TeeC4ur5C32R5xkx9610Vml6wHBapfo3g1C57Zp8tP70xr5ahWuHlm3/bRD0xhrM6qDyGP2j8g== 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=4GBNkwWw5Z5Rrd13zcIw/+v6k11pKV8yRE+roAUh8OA=; b=Ae4BSRe5ef/xTE2PSqmgLbBJMtaoh295GPcNB1LLj7oVYTQ4ygal3m9A2asGdI52sZKC091Q01hK7tvAivIPCCGJAAJGcBmliYri6xd7HR0P4YwIuA3yjIHipV0illGOSWrseoruWeMZf6jqcC+KS2/nQK9NAV4zOwwssBXU9vsgQ3b8AjdGSO0CvLDwfJTEXo5wU60lIo9mniNjrpx4NFst5RI4eTgr2k2e73Lyahfsd2P7cEdnyjc1IuzIodV75chKj6dSZEn0icIfGCskaJUQNi0YrfIP9/e8+h/xAVmI89/k38iE5pXEPrio9UxsnL51jYbb/Are84zgq4QhCw== 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=4GBNkwWw5Z5Rrd13zcIw/+v6k11pKV8yRE+roAUh8OA=; b=I+O6OaWrnkAm/3oqGhja7Y/op97u0V8pECLNeHPi4YudhpmeEXthq9pnnYrrs3jPFHbDzfesRXwDrciU/NmssQMXPnM/SMbtNddKQMsSf+4IGh5TyGTU3r4rfZyQ4pDTXyi2TgyJSKnQPRzG0QXg6tbvaMJSWSCTBvMflKfLfQY= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1824.namprd11.prod.outlook.com (2603:10b6:300:110::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.19; Tue, 5 May 2020 12:38:29 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe%10]) with mapi id 15.20.2958.030; Tue, 5 May 2020 12:38:29 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 08/15] staging: wfx: poll IRQ during init Date: Tue, 5 May 2020 14:37:50 +0200 Message-Id: <20200505123757.39506-9-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200505123757.39506-1-Jerome.Pouiller@silabs.com> References: <20200505123757.39506-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR3P189CA0022.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:52::27) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.home (2a01:e35:2435:66a0:1265:30ff:fefd:6e7f) by PR3P189CA0022.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:52::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20 via Frontend Transport; Tue, 5 May 2020 12:38:27 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [2a01:e35:2435:66a0:1265:30ff:fefd:6e7f] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a3a155c8-c047-4d54-0166-08d7f0f1365d X-MS-TrafficTypeDiagnostic: MWHPR11MB1824: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-Forefront-PRVS: 0394259C80 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4iipnSn1CoMXDyCKQvRv1RP3NnjYX/8jJD6uq8Kx/fXW8dMY1YOAo8ZfTgMCz94x0t2W9lC3vrRmQkRLzL5iP5ZeVQCdHpOQVy5An4kItAb31W5I9BWTUKmlYRxK+5ikGjZ7t+dWO7Ft8EV5r54E7ou2TSj+haSbJ7pH6dvQDLsGeh4koDiMSfHNkPLVVI1r2h+L8u423MEZ6GLrRXBWFxUr0w0r8g71SfAbMLCfxvk8TRJQHF+2mMRL2eQwO6N5w3KMp7S0AvBBQa00RQA4nTJmp+gcWA5Vz7gp+fQXzlDc5meoK/xqO0wWBqxEkBJIQSYPRpoL5y4/Mx3VN4athgzaGIsBMTRLruOdhZEvJV+8qFFn8f3NV6/g17lj3ewymMbDMXnY5DiwKaVi4N1m8B+5epvaq9Y1AxWOXmvhPddm/E1QW223UEEBuAEjvF1YnKnp70KEbuWLS4apMllf5MpIExwJio8J6PM5JQsDJi1ULkTWHLOD74G5VdUOpWMjaNngv8kOQirU2/wzeE+4+w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(136003)(396003)(39850400004)(366004)(376002)(346002)(33430700001)(86362001)(6666004)(107886003)(8886007)(1076003)(6512007)(6486002)(66574012)(36756003)(5660300002)(2906002)(66476007)(6506007)(16526019)(186003)(52116002)(66946007)(66556008)(54906003)(2616005)(4326008)(8936002)(8676002)(316002)(33440700001)(478600001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: N2vCM2cnG5r18aMZEGxDh8x8bYwJFa7H2qmzjtqOz1AZCbTna9CG49kU/TMphkF98gQ8Fh9+ufSZpi7dQWtKWkOG1RIU7r87I+xKHLHGhHEKOxw3NIYN55DCsgDzmK7MK7Aqc+xjfKwis5vy1EL/onZImKSx9gDHHFLpqgqllLBfX1UwyazithzPza8jKUKR660C3h9dcFfU/bKRT6Y101O+c4qfHe/URbsT1ecvix4MizSmDxKRQPFzomjeSpRS01sGvu+6JVpLVwCYZbKvVZfy3qLuQCETvFUp5N+4Ln+Z4TIO0DgEZYnv9N4DKIBVClW7ceeleIpOWmY/3wuFSkmZFga4UUM9/GXnyYBgPgEdtmK5wYhbT3KmQsJcSG3/r5/PyangNCRt2J2bU5mdtTlhi8XtY347kOIAH2n/YY/QnB/V9h+rNQqAByrmiMtt5AztQLNdj8gMnIZ/uIgbDHoyG9Mi6xETj8urlM69bZeKd6ZdEfYxK4I0VM135K7qcYWqfKART8HSyoirxTfdRyydu2oEIqz2GYBG+1jRucLPvssKBF3w3Eo3y9u+wM4JZRTR3TxcksZu8MAZnLPmiT1ZZFt25u/clYIKmtBkl470YtLyP3UX3sYEl8GQ585HXo5LdNZG+Ymtz9Quah1T1vRGlYEVhl5GyTlMKCBE2q8Pwjgc0GqByzQtYSwL1LjvA+VjulLMIioiD2FLpMQjesReO4jwxdt46W4PkJ5X295gbG4T30K48MoxnMBZaJ6RhLlDyMXpWEH08Oeoglq/6xkG/yCyh2XT1zWzAPsL3TZQw2MRdzeGKPOH0NKDrfFumfZakf/ArR7EmuiRyGZtj+N7CjBE2gZtcs1Zn6wSyys= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: a3a155c8-c047-4d54-0166-08d7f0f1365d X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2020 12:38:29.0512 (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: eK8Bbfcd8Po+Aq1vEKEJPeVYrVtvnuA1ga3yx5rr+VtnAf/9Xg75tZpEWgIXuj8Bx9M2/Z9VlwKK/+3fHm4MAw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1824 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller When the chip starts in SDIO mode, the external IRQ (aka Out-Of-Band IRQ) cannot be used before to configure it. Therefore, the first exchanges with the chip have to be done without the OOB IRQ. This patch allow to poll the data until the OOB IRQ is correctly setup. In order to keep the code simpler, this patch also poll data even if OOB IRQ is not used. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 1 + drivers/staging/wfx/bus.h | 2 ++ drivers/staging/wfx/bus_sdio.c | 17 +++++++---------- drivers/staging/wfx/bus_spi.c | 16 +++++++++++++--- drivers/staging/wfx/hif_tx.c | 3 +++ drivers/staging/wfx/main.c | 28 ++++++++++++++++++++-------- drivers/staging/wfx/wfx.h | 1 + 7 files changed, 47 insertions(+), 21 deletions(-) diff --git a/drivers/staging/wfx/bh.c b/drivers/staging/wfx/bh.c index d3e7eed89c38..2572fbcf1a33 100644 --- a/drivers/staging/wfx/bh.c +++ b/drivers/staging/wfx/bh.c @@ -320,6 +320,7 @@ void wfx_bh_poll_irq(struct wfx_dev *wdev) ktime_t now, start; u32 reg; + WARN(!wdev->poll_irq, "unexpected IRQ polling can mask IRQ"); start = ktime_get(); for (;;) { control_reg_read(wdev, ®); diff --git a/drivers/staging/wfx/bus.h b/drivers/staging/wfx/bus.h index 62d6ecabe4cb..0370b6c59863 100644 --- a/drivers/staging/wfx/bus.h +++ b/drivers/staging/wfx/bus.h @@ -25,6 +25,8 @@ struct hwbus_ops { void *dst, size_t count); int (*copy_to_io)(void *bus_priv, unsigned int addr, const void *src, size_t count); + int (*irq_subscribe)(void *bus_priv); + int (*irq_unsubscribe)(void *bus_priv); void (*lock)(void *bus_priv); void (*unlock)(void *bus_priv); size_t (*align_size)(void *bus_priv, size_t size); diff --git a/drivers/staging/wfx/bus_sdio.c b/drivers/staging/wfx/bus_sdio.c index 2f782120e438..6afde2349289 100644 --- a/drivers/staging/wfx/bus_sdio.c +++ b/drivers/staging/wfx/bus_sdio.c @@ -106,8 +106,9 @@ static irqreturn_t wfx_sdio_irq_handler_ext(int irq, void *priv) return IRQ_HANDLED; } -static int wfx_sdio_irq_subscribe(struct wfx_sdio_priv *bus) +static int wfx_sdio_irq_subscribe(void *priv) { + struct wfx_sdio_priv *bus = priv; u32 flags; int ret; u8 cccr; @@ -134,8 +135,9 @@ static int wfx_sdio_irq_subscribe(struct wfx_sdio_priv *bus) "wfx", bus); } -static int wfx_sdio_irq_unsubscribe(struct wfx_sdio_priv *bus) +static int wfx_sdio_irq_unsubscribe(void *priv) { + struct wfx_sdio_priv *bus = priv; int ret; if (bus->of_irq) @@ -156,6 +158,8 @@ static size_t wfx_sdio_align_size(void *priv, size_t size) static const struct hwbus_ops wfx_sdio_hwbus_ops = { .copy_from_io = wfx_sdio_copy_from_io, .copy_to_io = wfx_sdio_copy_to_io, + .irq_subscribe = wfx_sdio_irq_subscribe, + .irq_unsubscribe = wfx_sdio_irq_unsubscribe, .lock = wfx_sdio_lock, .unlock = wfx_sdio_unlock, .align_size = wfx_sdio_align_size, @@ -212,18 +216,12 @@ static int wfx_sdio_probe(struct sdio_func *func, goto err1; } - ret = wfx_sdio_irq_subscribe(bus); - if (ret) - goto err1; - ret = wfx_probe(bus->core); if (ret) - goto err2; + goto err1; return 0; -err2: - wfx_sdio_irq_unsubscribe(bus); err1: sdio_claim_host(func); sdio_disable_func(func); @@ -237,7 +235,6 @@ static void wfx_sdio_remove(struct sdio_func *func) struct wfx_sdio_priv *bus = sdio_get_drvdata(func); wfx_release(bus->core); - wfx_sdio_irq_unsubscribe(bus); sdio_claim_host(func); sdio_disable_func(func); sdio_release_host(func); diff --git a/drivers/staging/wfx/bus_spi.c b/drivers/staging/wfx/bus_spi.c index 00613d046c3f..e8da61fb096b 100644 --- a/drivers/staging/wfx/bus_spi.c +++ b/drivers/staging/wfx/bus_spi.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include "bus.h" @@ -143,8 +144,9 @@ static irqreturn_t wfx_spi_irq_handler(int irq, void *priv) return IRQ_HANDLED; } -static int wfx_spi_irq_subscribe(struct wfx_spi_priv *bus) +static int wfx_spi_irq_subscribe(void *priv) { + struct wfx_spi_priv *bus = priv; u32 flags; flags = irq_get_trigger_type(bus->func->irq); @@ -156,6 +158,14 @@ static int wfx_spi_irq_subscribe(struct wfx_spi_priv *bus) "wfx", bus); } +static int wfx_spi_irq_unsubscribe(void *priv) +{ + struct wfx_spi_priv *bus = priv; + + devm_free_irq(&bus->func->dev, bus->func->irq, bus); + return 0; +} + static size_t wfx_spi_align_size(void *priv, size_t size) { // Most of SPI controllers avoid DMA if buffer size is not 32bit aligned @@ -165,6 +175,8 @@ static size_t wfx_spi_align_size(void *priv, size_t size) static const struct hwbus_ops wfx_spi_hwbus_ops = { .copy_from_io = wfx_spi_copy_from_io, .copy_to_io = wfx_spi_copy_to_io, + .irq_subscribe = wfx_spi_irq_subscribe, + .irq_unsubscribe = wfx_spi_irq_unsubscribe, .lock = wfx_spi_lock, .unlock = wfx_spi_unlock, .align_size = wfx_spi_align_size, @@ -216,8 +228,6 @@ static int wfx_spi_probe(struct spi_device *func) if (!bus->core) return -EIO; - wfx_spi_irq_subscribe(bus); - return wfx_probe(bus->core); } diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index e8f3c5f9ce7b..511ef874a6d9 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -82,6 +82,9 @@ int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request, void *reply, if (async) return 0; + if (wdev->poll_irq) + wfx_bh_poll_irq(wdev); + ret = wait_for_completion_timeout(&wdev->hif_cmd.done, 1 * HZ); if (!ret) { dev_err(wdev->dev, "chip is abnormally long to answer\n"); diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 5d0754b55429..623a9fc31153 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -363,22 +363,24 @@ int wfx_probe(struct wfx_dev *wdev) // prevent bh() to touch it. gpio_saved = wdev->pdata.gpio_wakeup; wdev->pdata.gpio_wakeup = NULL; + wdev->poll_irq = true; wfx_bh_register(wdev); err = wfx_init_device(wdev); if (err) - goto err1; + goto err0; + wfx_bh_poll_irq(wdev); err = wait_for_completion_timeout(&wdev->firmware_ready, 1 * HZ); if (err <= 0) { if (err == 0) { - dev_err(wdev->dev, "timeout while waiting for startup indication. IRQ configuration error?\n"); + dev_err(wdev->dev, "timeout while waiting for startup indication\n"); err = -ETIMEDOUT; } else if (err == -ERESTARTSYS) { dev_info(wdev->dev, "probe interrupted by user\n"); } - goto err1; + goto err0; } // FIXME: fill wiphy::hw_version @@ -400,14 +402,14 @@ int wfx_probe(struct wfx_dev *wdev) "unsupported firmware API version (expect 1 while firmware returns %d)\n", wdev->hw_caps.api_version_major); err = -ENOTSUPP; - goto err1; + goto err0; } err = wfx_sl_init(wdev); if (err && wdev->hw_caps.capabilities.link_mode == SEC_LINK_ENFORCED) { dev_err(wdev->dev, "chip require secure_link, but can't negociate it\n"); - goto err1; + goto err0; } if (wdev->hw_caps.regul_sel_mode_info.region_sel_mode) { @@ -420,7 +422,16 @@ int wfx_probe(struct wfx_dev *wdev) wdev->pdata.file_pds); err = wfx_send_pdata_pds(wdev); if (err < 0) - goto err1; + goto err0; + + wdev->poll_irq = false; + err = wdev->hwbus_ops->irq_subscribe(wdev->hwbus_priv); + if (err) + goto err0; + + err = hif_use_multi_tx_conf(wdev, true); + if (err) + dev_err(wdev->dev, "misconfigured IRQ?\n"); wdev->pdata.gpio_wakeup = gpio_saved; if (wdev->pdata.gpio_wakeup) { @@ -435,8 +446,6 @@ int wfx_probe(struct wfx_dev *wdev) hif_set_operational_mode(wdev, HIF_OP_POWER_MODE_DOZE); } - hif_use_multi_tx_conf(wdev, true); - for (i = 0; i < ARRAY_SIZE(wdev->addresses); i++) { eth_zero_addr(wdev->addresses[i].addr); macaddr = of_get_mac_address(wdev->dev->of_node); @@ -470,6 +479,8 @@ int wfx_probe(struct wfx_dev *wdev) err2: ieee80211_unregister_hw(wdev->hw); err1: + wdev->hwbus_ops->irq_unsubscribe(wdev->hwbus_priv); +err0: wfx_bh_unregister(wdev); return err; } @@ -478,6 +489,7 @@ void wfx_release(struct wfx_dev *wdev) { ieee80211_unregister_hw(wdev->hw); hif_shutdown(wdev); + wdev->hwbus_ops->irq_unsubscribe(wdev->hwbus_priv); wfx_bh_unregister(wdev); wfx_sl_deinit(wdev); } diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 09bbb5da4f06..4eb7762142fc 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -46,6 +46,7 @@ struct wfx_dev { struct wfx_hif hif; struct sl_context sl; struct delayed_work cooling_timeout_work; + bool poll_irq; bool chip_frozen; struct mutex conf_mutex; From patchwork Tue May 5 12:37:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 219886 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B65CC47258 for ; Tue, 5 May 2020 12:38:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0E4B120746 for ; Tue, 5 May 2020 12:38:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="fzfFEynj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729089AbgEEMii (ORCPT ); Tue, 5 May 2020 08:38:38 -0400 Received: from mail-eopbgr770049.outbound.protection.outlook.com ([40.107.77.49]:46720 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728888AbgEEMie (ORCPT ); Tue, 5 May 2020 08:38:34 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vag/VdEF52qDNjaYOQvXJNdwT6ZCkQ34DiPYpAx4YLVmOcOpOMWzngXwVmgQrNcadFfRdEH4/B+zVLKHcqs7IfARg10ZaJVEhVQyJyuSObE5RyHHfy4ore4dEbF4kheV8RwDSij1zJsjfNTkahg8hwR3RLG1kGZPEOrK6UK8gZMP5Qy4HQ3h7eGD3Nv+IpWg7qj2yZAsDQmpPxZjrj+67nIsJII9pR6zbqHARcraAqCUTnNPiN7OyopOsKwZBcqHlS6Y3PONyQkxrThxRjAVrpz1wfUhxqE/UpfDVL3dBh7yiLJzJhtM5WryvIwmbEBrpt9elxUzI3/+2bbD80AeKg== 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=BMsL47ngdy7orka6QlF3LRHzhyGyfTP7NGN5ukbZqqA=; b=SrPSfzIfrzAnb0Y/Uo2X4wbyV9WeR3FwaDLYVnu9ayF87jFHJO5b8MmrBPItxiueXgk5xVTT677W9UXo6sXKHrEEcvceH5E+8UbV9OJyXommSbhzz93eXLW276htn7BQZ39yqwti2Xa8AcKXhLb4dS5uN0n1jk68z1fDSXygbxyIqtIoSdBRL+qBcvkoE2LlBlcgZapTes3v95beVYz/7XMMF/vPdQe6Lu+Jae6SgqyRW+HGGFNObHix9f8wNUbbFNws0/i/HFcrkVPtSw5pm9QW7PSjT7YpDIiMCwn7Akj1V4DmhUBzlPHQdXA9Js4k8s2V+inFdCt+U0XPgADlLA== 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=BMsL47ngdy7orka6QlF3LRHzhyGyfTP7NGN5ukbZqqA=; b=fzfFEynj8FUiO7rm8IzxSku4MaInp1AhOidKB5r2w50tld6w/sLKYg5I6g1a6Xu3opfAbnny/qG41VNNFIhSsa/tJgY+rO5i/D6MlHuP95EAXM6/fyxRhr5JHkL57DywMbgHEfRwqMKf/85zNajYEZZnheTqI2evch+HvL2sCw8= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB2046.namprd11.prod.outlook.com (2603:10b6:300:28::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20; Tue, 5 May 2020 12:38:31 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe%10]) with mapi id 15.20.2958.030; Tue, 5 May 2020 12:38:31 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 09/15] staging: wfx: fix missing 'static' statement Date: Tue, 5 May 2020 14:37:51 +0200 Message-Id: <20200505123757.39506-10-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200505123757.39506-1-Jerome.Pouiller@silabs.com> References: <20200505123757.39506-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR3P189CA0022.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:52::27) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.home (2a01:e35:2435:66a0:1265:30ff:fefd:6e7f) by PR3P189CA0022.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:52::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20 via Frontend Transport; Tue, 5 May 2020 12:38:29 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [2a01:e35:2435:66a0:1265:30ff:fefd:6e7f] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: abd1b201-ed64-47dd-4f9d-08d7f0f137bf X-MS-TrafficTypeDiagnostic: MWHPR11MB2046: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:568; X-Forefront-PRVS: 0394259C80 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WA8eBfzZDYoi314NS4naPuzd6Hfvt4znQwwPq0CcQ5XU2wTwkvFCuKi+VBBK3z2uWZ1YZPUkLAFTYAlr361YIwpWH+WeiTChIjEv1mFMhWcgevWaTqYsbwed9WToYY2y9D71C5rjuuiJDLwUi3+h1pSKhawf0b+NCvNBGYh6vyS7rnEwGg2BDE+72DRneklQhe2wmX0+TtKfNJwGooWiZ+19EcXRY9dn3OxX4jwJz0uaqMKV50hcBgsmdrxkcvsdMyeAIR6SSfP+RwyTW7/qu+nHoEdRSKgI3bHPjSGJCL+WoHIYL98JT/VPIpQKyvVCBS6liTWodfenn9gh2P0DEo6f7MyOZVnPROUtFH7HTRA6kYdnGIQCvqcBZg9D/uh5mvzwYNBCuZTGf9EC/ac2maWuXLL8YE0J4DYw5mFABcdIsAmt7HVEdgNBxLIXL3dtTP9IasS/U86J9iFxtDOzIVQiwv16Hb9bqFnnsgVs+SHKmmZ8eaPGCBXvxqeDoSn4ynh/qgTOnqbP0uymrFDdbw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(366004)(33430700001)(2906002)(36756003)(4744005)(52116002)(86362001)(5660300002)(6486002)(1076003)(8676002)(8936002)(6666004)(107886003)(2616005)(66476007)(66946007)(16526019)(186003)(66556008)(6512007)(8886007)(498600001)(4326008)(6506007)(33440700001)(54906003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: BWmbXO+dO/+c16ncaLEOx88qnYFaIEZGm/3GF7SAMn/g4bEGp+MjvuAbkBejL5FcxuxGQdgL8fgIfObOIpeMFLWnUvlseXTfAaBj0FvD+QVmzbc88VBe3pkkl7jI5TZQVcS6Uuan44cP3qEtqByFGSH6fK+rHJJepKBqbjZUD8gFaz+F3gbysEbOXl2hrhPH05l0wiHD9RIelevjl6u+FXBxgEfJFhyfaFIonWlwkdeFm5fkGr0u2iDdKjQdIEiXo/SjjndhXbvX8hTlrkuIBa8kvHUaifiJpXSrs54cipS+HYyEmn6zMn+TP31KxFT2p3gi9Fas3WzflSgxoyuZaaJ4wNk/T9WrwDOPnVmkm/gf1GBiEIPUULzQhW/y5g+1nAry8MkwMpXb055xCL6m8QrbQu8vQashKGYGk/W1gvorTDLmyH/BeX24Uy1Ern3QuVEUCrkL72VeKfgs1VQStpB++NTVLcT8wyGH8HgdRVuz1OprNo6uq1Va+sBZVnOpG7CjKFdcsXmKzE7b16a+E/N9Th/lga2ROWO7iwUk0rN2Ma3VeNNiR6Vddk3gCPNeVdH5Jl4m9NFxn4s6LrgLkTrj8Bdy7kLrIlpJ/CGWI+oubchvZPNSLowLmhLHPMzu5lxoQAK3Lan2S88osxUr/jbOjKsBgF17Q8vCf5QJR+nkw5DGh3bl7eUhW4jMafXskE9WIlUCBlww5mytvDDLuxJNt9gGZ7lVB8q23+X/+cX/YNw8sO6begb0fE3gw1bL+TziEFJqCb2Dn+e/+IxyOEWrPuoOvVH5EaWw8w7ebNEDO23sSrTOyft7ZNPFC2oVWc9V7XtLUMEsAd7QA0FekC/4Ok3JLwFT7MF42F8PFco= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: abd1b201-ed64-47dd-4f9d-08d7f0f137bf X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2020 12:38:31.3441 (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: 7+MWnA8zhNnR19EO0jkqi+ENIko0QVRFfZSEKFRxEOJyv3T/dOYko92Qz2aXM2lTr7OoQDpdNLxWV0JIzFpClw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB2046 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller The function get_firmware() is only used from fwio.c. It can be declared static. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/fwio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wfx/fwio.c b/drivers/staging/wfx/fwio.c index e2f914296677..85b6a916a7d0 100644 --- a/drivers/staging/wfx/fwio.c +++ b/drivers/staging/wfx/fwio.c @@ -99,8 +99,8 @@ static int sram_write_dma_safe(struct wfx_dev *wdev, u32 addr, const u8 *buf, return ret; } -int get_firmware(struct wfx_dev *wdev, u32 keyset_chip, - const struct firmware **fw, int *file_offset) +static int get_firmware(struct wfx_dev *wdev, u32 keyset_chip, + const struct firmware **fw, int *file_offset) { int keyset_file; char filename[256]; From patchwork Tue May 5 12:37:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 219884 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0CA6C47258 for ; Tue, 5 May 2020 12:39:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C893F20735 for ; Tue, 5 May 2020 12:39:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="YcY3khg6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729214AbgEEMjI (ORCPT ); Tue, 5 May 2020 08:39:08 -0400 Received: from mail-eopbgr770049.outbound.protection.outlook.com ([40.107.77.49]:46720 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729075AbgEEMjE (ORCPT ); Tue, 5 May 2020 08:39:04 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YszpHvSDsg8pNtCokNrZkXBaebzT4rfRjGZLB7UJpz0lbKzYXRZW1bZgpEe3PbhhWUJrbQpLkHm9OLhymfRIYNIdd5RY5Ysz2SwvKz9Y9w1XTnxuTHdXfOD0c7K8Q7PCVHgyEVEaET8aYux+r2QelJcVxy/AAvER0tkc2ME2sguy7WIEYPL9/LRI5+8eqXIrv0mgmX8unGtcOz8eHLp/b9BapK3VzTzXK+iHtnVlDRfy4WcO+2ooMAhWYw90NJnR5AfOs7zog2pgkE7fnCZ2LMY14BUXNftkHLsh2csdvZkO6AA0tphGmR6RTlCiodIHATEQaLb13IbLfncPgdnaew== 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=hvVYFq5Ib859CrVaN8bCL+/Tl/BK9dvkNhn9GJuSDnw=; b=BXhhKsY0CoKuQ5O53ipP8mmrqLVc6zQB3Eu+vrCe5IxJ/8DRqBIKrpWdL0pg2T7xLLnY4lrYXnXk2w5Ipr2qcDY/ZNmdI0nPusDw7bZpuOB7SH8Uyu8RpXfzxqGS46om7//3Q8xiBd0QK9wvQeCN/fntonskYCQwadNBFPznDjjVDcaXWjnZbDcBEfBEU+BZzUhkejQThsPEmSBSlLAFPMi9jfTZmbav0ar6VqfrE5eTMFHd31cKi1d4iRxQja++OsjcRndqFpj6xHOxtobTIj6/jWRYM9gIEHo2N/gCQta6toVTZSPaD3MMCdishy4hygSMo3Ch8DKJoH1FPiVeBw== 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=hvVYFq5Ib859CrVaN8bCL+/Tl/BK9dvkNhn9GJuSDnw=; b=YcY3khg6CjJgz5H4a1wUPr5uSO6uYrCDKJrFhB1CCjxNa8aK3ky7mGZLanhbJ92G2S406U3NaS4/qpBT6Y0gZ6dZtJ3JXMc2Dz7kGrlr8nxsT37L+XWDyMjlDKo9rIW/5DDj9kXKxVWpNK9JxRMy2beJ2GD4DvQ6CR/si9iFKHE= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB2046.namprd11.prod.outlook.com (2603:10b6:300:28::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20; Tue, 5 May 2020 12:38:44 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe%10]) with mapi id 15.20.2958.030; Tue, 5 May 2020 12:38:44 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 15/15] staging: wfx: use kernel types instead of c99 ones Date: Tue, 5 May 2020 14:37:57 +0200 Message-Id: <20200505123757.39506-16-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200505123757.39506-1-Jerome.Pouiller@silabs.com> References: <20200505123757.39506-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR3P189CA0022.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:52::27) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.home (2a01:e35:2435:66a0:1265:30ff:fefd:6e7f) by PR3P189CA0022.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:52::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20 via Frontend Transport; Tue, 5 May 2020 12:38:42 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [2a01:e35:2435:66a0:1265:30ff:fefd:6e7f] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ea508385-2c43-4942-3880-08d7f0f13fcf X-MS-TrafficTypeDiagnostic: MWHPR11MB2046: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:843; X-Forefront-PRVS: 0394259C80 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qYsmir0SyA7LPx+6v/QaSJczhRDSckzNtzmoCgf95W0uUAzjHiBk6nTdqWpsitEPFs0/M1GV2uKM8oRHBP2RSZsAo9ATk731iq8Sr8fhStxT29KjJ+s8CRKiCmgTsh9hI4QZ30P7wKCkXy8u/gOFOfAaIFSmL8BkIjgSw8o4bUxsrcsd09mKUwtu67Tue+5ZzHrzH12AfeStAS5lRww0akfMUdDoVZC0Njr7FjX4kIzMMzJb7Egd5BHXILUWJ59HkJ1d53rDsK7qhO9LNFYVAUYl/AHfdB8GGw4hHJSnrnf+1phpCkZabHQxa6hFOxCKrVMZVBhah6AT0joahpOmaS+rvBGOa5TCA0yCPVnINoacWHLxqsJZO9/b56aPcX7X1chMneGz8iJ3gZk3M4+hPLRunbh5P1+xMLRfTL3ZFuNN5vTNHoG/awNxZl+VmGHZ7VoEgknQYpBEg/p7VJ0WdlqLOpOsRoehYtg0acDsiNzspHtXsOPL7ukuzAAUivr2O2EEftJX52FncM1490r1Tg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(396003)(366004)(346002)(39850400004)(136003)(376002)(33430700001)(2906002)(36756003)(52116002)(86362001)(5660300002)(6486002)(1076003)(8676002)(66574012)(8936002)(6666004)(107886003)(2616005)(66476007)(66946007)(16526019)(186003)(66556008)(6512007)(8886007)(478600001)(4326008)(6506007)(33440700001)(54906003)(316002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: vIIY5hbFvcOb8SdBu/psX0WESD7zKVGPJRpf6al44MYh4u7VDpr/CMiQupsKbOJbAhkBz9iEqdvfDuNtxnbaHyNtaUteWdZ5N6igZCXKXp0h2Dh9ktDwDouKGq66vpjL+W/ViN1Kdo9auGdhVRjhK1berwquPYymzP4wYNWIR8QFHWXFdrfly7yIoRkziO1XsGFeF6bZzUBFGQcH4cqbpytONCl2ELLdEOu4vjgu5S48EH1A7DNyTwv1H7CQk+qvlSHBNKDB5XKkaCT9WxmJWF0vTL2yJ85pXKd/DXxhrg76xQPAoSTdX/E19wwI3LLw36uiQRdZ1yxLZH50TnadabOuz6vqGN1umKhosZBgaz6l7EOFWImsv6oAi/1DOL0hPIPUHnQNbpwfLsnWnDxsj0scirhIiP7+sER/6U+ds4jkrEkOANx5idyeg0c9+FL1FPUWaAQW9jHW4dQatamJk+7kEYu43iuZIOsyvQgTf02HwkUBuzywDeSmq/9K2SSJL4kHRYHrBsRkUnshvixWCC6GIvqY7hsMxkz1ZWg57/fv+AA+9XfSQA40OK48fCmFxNee6U5veielZ/iXQ3WcKUv6Te6SKgVvXUDXnphyci0oA6uWP7x4B19VLeFoqRzPy20AFpV3dansCB0IyjVeByCBCiQsOCO38HOEyPkpvo47Y/k9SqtExck+II2jFpqZ8H0w4vO7R6/i4WQffRc+rMhv13fFOznqCo5k+QkOUxByH/Sxh2oE+5wn4Ga7laT3sq1BadVU5vyWGsFpYyiWyDVKxiNajCIemsjuSXkvCn9SO15ERj981yw3TN5mK8fgNPuqRlSAqdjaU3tGWp/Zm/VM+/FqlNJZnB9gJ87P3JQ= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: ea508385-2c43-4942-3880-08d7f0f13fcf X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2020 12:38:44.6933 (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: R6FH7byR2VblTxADzAnSHx0zHvN2obpf/yVYOT9rtp3QKxcOnErD8fBjuuoAqSf73t5lyBHrVFuDtUD+3JAx3w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB2046 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller The kernel coding style promotes the use of kernel types (u8, u16, u32, etc...) instead of the C99 ones. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx.c | 5 ++--- drivers/staging/wfx/hif_tx_mib.c | 2 +- drivers/staging/wfx/hif_tx_mib.h | 2 +- drivers/staging/wfx/main.c | 4 ++-- drivers/staging/wfx/main.h | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index b083fcace303..58013c019192 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -495,7 +495,7 @@ int hif_update_ie_beacon(struct wfx_vif *wvif, const u8 *ies, size_t ies_len) } int hif_sl_send_pub_keys(struct wfx_dev *wdev, - const uint8_t *pubkey, const uint8_t *pubkey_hmac) + const u8 *pubkey, const u8 *pubkey_hmac) { int ret; struct hif_msg *hif; @@ -529,8 +529,7 @@ int hif_sl_config(struct wfx_dev *wdev, const unsigned long *bitmap) return ret; } -int hif_sl_set_mac_key(struct wfx_dev *wdev, - const uint8_t *slk_key, int destination) +int hif_sl_set_mac_key(struct wfx_dev *wdev, const u8 *slk_key, int destination) { int ret; struct hif_msg *hif; diff --git a/drivers/staging/wfx/hif_tx_mib.c b/drivers/staging/wfx/hif_tx_mib.c index 6fdde5a4c9a1..65381b22437e 100644 --- a/drivers/staging/wfx/hif_tx_mib.c +++ b/drivers/staging/wfx/hif_tx_mib.c @@ -215,7 +215,7 @@ int hif_set_association_mode(struct wfx_vif *wvif, } int hif_set_tx_rate_retry_policy(struct wfx_vif *wvif, - int policy_index, uint8_t *rates) + int policy_index, u8 *rates) { struct hif_mib_set_tx_rate_retry_policy *arg; size_t size = struct_size(arg, tx_rate_retry_policy, 1); diff --git a/drivers/staging/wfx/hif_tx_mib.h b/drivers/staging/wfx/hif_tx_mib.h index bce35eb7eaa0..86683de7de7c 100644 --- a/drivers/staging/wfx/hif_tx_mib.h +++ b/drivers/staging/wfx/hif_tx_mib.h @@ -36,7 +36,7 @@ int hif_set_block_ack_policy(struct wfx_vif *wvif, int hif_set_association_mode(struct wfx_vif *wvif, struct ieee80211_bss_conf *info); int hif_set_tx_rate_retry_policy(struct wfx_vif *wvif, - int policy_index, uint8_t *rates); + int policy_index, u8 *rates); int hif_set_mac_addr_condition(struct wfx_vif *wvif, int idx, const u8 *mac_addr); int hif_set_uc_mc_bc_condition(struct wfx_vif *wvif, diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 18c96b82c66e..25d70ebe9933 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -203,7 +203,7 @@ struct gpio_desc *wfx_get_gpio(struct device *dev, } /* NOTE: wfx_send_pds() destroy buf */ -int wfx_send_pds(struct wfx_dev *wdev, unsigned char *buf, size_t len) +int wfx_send_pds(struct wfx_dev *wdev, u8 *buf, size_t len) { int ret; int start, brace_level, i; @@ -252,7 +252,7 @@ static int wfx_send_pdata_pds(struct wfx_dev *wdev) { int ret = 0; const struct firmware *pds; - unsigned char *tmp_buf; + u8 *tmp_buf; ret = request_firmware(&pds, wdev->pdata.file_pds, wdev->dev); if (ret) { diff --git a/drivers/staging/wfx/main.h b/drivers/staging/wfx/main.h index a0f37c8ce3df..f832ce409fda 100644 --- a/drivers/staging/wfx/main.h +++ b/drivers/staging/wfx/main.h @@ -41,6 +41,6 @@ void wfx_release(struct wfx_dev *wdev); struct gpio_desc *wfx_get_gpio(struct device *dev, int override, const char *label); bool wfx_api_older_than(struct wfx_dev *wdev, int major, int minor); -int wfx_send_pds(struct wfx_dev *wdev, unsigned char *buf, size_t len); +int wfx_send_pds(struct wfx_dev *wdev, u8 *buf, size_t len); #endif