From patchwork Mon Sep 13 08:30:45 2021 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: 511505 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, 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 6B698C433FE for ; Mon, 13 Sep 2021 08:34:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 574A260FBF for ; Mon, 13 Sep 2021 08:34:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238311AbhIMIfo (ORCPT ); Mon, 13 Sep 2021 04:35:44 -0400 Received: from mail-mw2nam12on2049.outbound.protection.outlook.com ([40.107.244.49]:21169 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238018AbhIMIey (ORCPT ); Mon, 13 Sep 2021 04:34:54 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d4oyzP7BkRRnwOLrQ7PyDDbhaDinniZMBd/d0n4/fp8yAbIaBzemsh0wS3akjcY1L9cxxY7VV54oYwPgIyO/0cGwoMKAwPcl8yCg41PxDq0+8clJap1h1cRfhjKfclq121rGR4H9XgQY4ZNWu3aYnAxM9mF8jDQB9X5AcZUcwujCSKhCbnYv3JLdKjtmd+Nypok4VAsiB66W8sI34Ymf1lPHh/i89ZTCM2aKvPEiWoj9Gbb6J0K/DEOHAZ4xJtrKRvpkcrXjra6KJSFGsVooe9yzPLnBVuFaf5qi2T0Sb1ghHnMuVTOIvQbrgqVDwPU9TsoarpJNQs04pWqFahcGww== 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; bh=CL6kGT2QHAhGRM20d/8PBao0Aj6Hch0u2ifyJUm8i/c=; b=IP0zQYJ5RTjoHzT3Cdv0EQGoZJchn6V7p7dSJwMchAoCUzkUbjFW7kUS+sRmc/4BjvCetQ1CWQ/soEDn8ZZh9ANFvtA0x+JYe4YwN4lBMGTtEhZ4wcVLR1PTDmeH/ghscS3UK/wn/aT5NM27Yp3+QIUtDB0XGk1uv/Gtm56Nf6lxWKlQNkg3vafI5kSYOVi+zbS2eNR+slnB/l4jwAqYqPc6ZbzLG9J66/b1VVbwF4q0Br9PQPmogbZnBei0ehjlKFueD0UYXABxxAxsZCp0OyRpJJaSHDcYILSvyYHuVjTK8bKy8nvkVCGqCNkuUR3HGjGPvQ3OVBTa6PttT5TctA== 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=CL6kGT2QHAhGRM20d/8PBao0Aj6Hch0u2ifyJUm8i/c=; b=T3XFEgoebgOCSvCdREtw3bn6pIl78J2CSHXotwf9ZCpTOOugtJ9XjpsZV8eTHbbnzBZcVGXCnmmtDThNDtKK4+wsppVadg3/vGHIaSCzTF2NPa27nb7U0EehY0QQuvRtNNuw1GLlIt7yHF3PwzAvaoFMOsdYd1rayBW1/+dI9p0= 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 SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SN6PR11MB2717.namprd11.prod.outlook.com (2603:10b6:805:60::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.16; Mon, 13 Sep 2021 08:32:32 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 08:32:32 +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 v2 33/33] staging: wfx: early exit of PDS is not correct Date: Mon, 13 Sep 2021 10:30:45 +0200 Message-Id: <20210913083045.1881321-34-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 08:32:02 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5341d9ea-297c-4e04-f3d6-08d97690f6e3 X-MS-TrafficTypeDiagnostic: SN6PR11MB2717: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2512; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xL50k952gihxJ+N3Av/1sgEHCkg5ssi34qgGJ/4/LwSSM53yPtt6/uhu/ajbmFEGGJIoYFjCr3DUu1qMZLuf9nz3xza9ij6IezV9yCYfGYwNHodMkz4/vXAC6g60ME/UQdsHjzcPkkFsRXlLRJOq7W3k3A2owqS5DJHyHxKzC1Ae4xamdFYH79cV8AVuB/a3/4BHrh8CCu0Xtxj3NhGIAArTKdpHGtNmDweRVou/vtrBqqeAdqNRshDPlVXx5cXijycoQPNkpP2aczEbrR5fNh3RTgs93tbpAZEEEIhcakTuuSo9A+MCjhvNINI1huH8jqjrDL6+isAF0gaZmfo6H+SwFRmM/Ooh+vxyfU17ZvQMQSV/rgoCwwGY0lKyDStOEr/jBkhEMECbNQ21bT0P6+8kmHXfFiEo7EhBrhH6ddyV+6X6Wf1bF9YhHVtTodSr9YrGVOxMJT5zRQGpHYJgy1F1nsB6n/Kb8k6MDvtZZe4D1VVtN/yvP9F99Y27yRKjn+Mag7GWlNpElk/GcSROupqCbKSow1rOUnmrKu2WGhi6wRGynx8jelriqHDEF76nYSLzeBp0PpJcFiQq7Cw5eK/e67GC/1LEyV7EyyiW41DPIQBkNM7B8QHsW+ILVNGq24wD5zYT7nISqLhZQ9W4KELXzcU2inJGsENYKJC/yxYbod1k/usgJHiyyJJHcErJYmJh2wCarWiyrj8yfaUU1w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(4326008)(2906002)(107886003)(26005)(66946007)(38100700002)(52116002)(7696005)(1076003)(956004)(36756003)(316002)(8676002)(38350700002)(186003)(8936002)(83380400001)(54906003)(66556008)(66476007)(508600001)(6486002)(5660300002)(6666004)(86362001)(2616005)(4744005)(66574015); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?rIRE/3S+7/IQGDUbHKqNe/TzP?= =?utf-8?q?B8Q2KdeQMGY/tTE8/qCKJ8jn4x0+ynZn8Bsz3rhHjJcvxOPiweaRgb5g?= =?utf-8?q?F0oh/XfspxdnMqJ6Ym/a8utn6ZVgaFnFrl+hYUADGnTr3ff0NXFxbZCF?= =?utf-8?q?dfYukkoM3HXcXI4rwTzxBKVv9hXCxHD7GnS+vMp65v4buJwnGacw22yY?= =?utf-8?q?cI/Zjc7E+DvPhZyg2yv/Q5vvUjMR9eWIWbZyDJD4JaDwaCu263xSj4Vc?= =?utf-8?q?WA843u5h/Tdcfw0yPV7xqXOOprAMLHaYoWkw2rtDpGkx5M+etydC0M60?= =?utf-8?q?nQlXXGUvMoyUf+TRAm4ageo4gyEub8Wg2oIDu1k9+Pm9WOOKsXD/sFM7?= =?utf-8?q?p0zYR1UCdw5lGvQpXClwBHitme8ZtWhgMaTuAvFmIF2kw0Yv7QHgX4aV?= =?utf-8?q?/mB5GmEuUcSzflNf5MRmNWJckraQw8ThNA5LxMi5VsPdqOmX9ZIK5gNB?= =?utf-8?q?3ZV6MkqkVQQr+eNybu4SQHoaKrQGmvDQzrRq3dGdLPbO/8bGIcnxtAXW?= =?utf-8?q?qkRSoOsldb88r5zzKj/gw6ZNgSg5O5aPpMaeaIs3M4jHwrPnQIInodAB?= =?utf-8?q?Do7NWv/DhGUvZyjt71cwNnCkhTPtQ5FQBTkoScn/hiXTaqiXl4R/qmin?= =?utf-8?q?iZKwH6wFE5Q0/W2AyVzI0nvIfKdZAjRnrndr1xa915j3UjFiHOS0wPUJ?= =?utf-8?q?ltJb0mGnIEeJ8viiZdQS5uwZLifUsWROimCXiPT0MHnj40kggz5w1VwN?= =?utf-8?q?m1pGXavBMN/7EBkXCiAzDmy9EmY+srebMKHS7oeRzohqKtFB7vbpJMpZ?= =?utf-8?q?6jLSjNJnoIObZ8j/GLhikAz3T3q1JmHrPy+sQGgjC/BwaWA8Hsk4c/rG?= =?utf-8?q?XkM8CMonneDArFKrDoleIlIlucbDwrhcr4iTOxal6FD/ZCj60QBNlWZv?= =?utf-8?q?E0BsEjIghc7jSqi+cSIDxeuPhGztBuBTnwQgu32MmMUUSh5dQqmvT60p?= =?utf-8?q?61h/LlsEiy2tx6LCxD1LO77C84oakx5tp3DKKUEdz50rjzhfuSd6XuqZ?= =?utf-8?q?KSGeSvOEJL+6FSjB4WTvy9JL1BAcZsNH1sIvHzrH9pupm2iWiO/NQrNa?= =?utf-8?q?z/1kTI6Yg7gCWC7C4uj8HefrmgamCNT7t7rFyTOp/GkuSRDsL8Dtv42w?= =?utf-8?q?yqtPlyam/814GLRWy/cy0KKobIVWa6uA5GNMBlNYZc3ClMKmWptd0Vdi?= =?utf-8?q?X8GOCX5N80MTyS5hNud5n5lgJgVbsol8izFTETVXoewzQVE1I4t9RYh3?= =?utf-8?q?jmuYnLSJQPCjGTT5asdi6/EETJc28nqqV3+9eyNdKTHVtf5TOKYWjpEK?= =?utf-8?q?lScqRfWiuVsn9V7Mz5sLeHNMFcYFfjz?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5341d9ea-297c-4e04-f3d6-08d97690f6e3 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:32:04.1626 (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: fpRq9wrVS7JpegK6ahcklzLb/Te8UgoGExhnsnjXZ/QDYFE5mr/VJskAyncZrwKEFtKMmYdzQi4BA6t77OyXgw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2717 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller If PDS data is not correct, the device is unlikely to work. Worse, the pinmux maybe it misconfigured and it can generate IRQ-storms. Therefore, do not try to start-up the device if PDS is invalid. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 4386e9957ee6..b24ff4b31b72 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -409,7 +409,9 @@ int wfx_probe(struct wfx_dev *wdev) dev_dbg(wdev->dev, "sending configuration file %s\n", wdev->pdata.file_pds); - wfx_send_pdata_pds(wdev); + err = wfx_send_pdata_pds(wdev); + if (err) + goto err0; wdev->poll_irq = false; err = wdev->hwbus_ops->irq_subscribe(wdev->hwbus_priv);