Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4233066pxb; Mon, 27 Sep 2021 12:15:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzdd/kVs+yeJMDh3aa14y+SqlSWZKKRlw+ed4SOTsuDH2ONcUl1RsxAEr+db0s7fkYDVbe X-Received: by 2002:a17:906:8151:: with SMTP id z17mr1956027ejw.468.1632770118155; Mon, 27 Sep 2021 12:15:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632770118; cv=none; d=google.com; s=arc-20160816; b=WYrjdwFLvcfX3yuYU0fAjEwHHPGT5JDSiqLeM56cjzfwSYpLoOiECw1notCksHunfp SV0r7YUGam71EvVYoHIcbMk6AM777y9T5bG1ELZuZPOCHY+rBo59aOXVu/80QexvSGOc fWas9UefWrm+F3eOhwselDTiXU4pJW8t0fyD56sjxqhEjJZaMBYsti5kRkxz5dD9KKhw 9IuUaP3/Am6Zzedk+9mGXZdllI8H+b5xcVXwS7WOPmiBQtCCdqEnTlg1ReuhKITjzWOx wZfp7gaT6ZGS5JwYSECsqx1jpu2QB7ABdYI5/ne0ohDBYSutpG9p8Up/OMiwfHo6+x7z MjfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Mh3yzrEcylJtn9qpK9BS26cL4bktBLXdV9NfJgr9pkE=; b=N06NJrFB+b6l7KbETn1AmTpSZUAaNPkXpTEv/h/vDJipVHo5pW42BDQjGGHysWpz7C 0s0d87fOw6A6w4Jx6YpD1Dq+MCSq5tAt6GFgHp3ud1Hy7g/pbi79zBBX/3DXmqUUrMfs WUdqBii7YdQpqljj42PFp/PCtwodkHU8uoee4MBl48pNDMoshMR08Kl8X5zzyJlhbh7a Cv1kX/3IJ7rQ6bjhzcq7ZF9SqfJrwC1hgGsKdC+XlaieC5wDxYCwI88SPzssADlgNVYp YS9qiEXGxFcHLIt91vnJard043yd689ljuU7ePRVpj4cCEfbvYq0Z9GeE85mtps0CDxZ FIIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=VtaXEGSD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m19si19406389edj.245.2021.09.27.12.14.53; Mon, 27 Sep 2021 12:15:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=VtaXEGSD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236382AbhI0TM3 (ORCPT + 99 others); Mon, 27 Sep 2021 15:12:29 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:34400 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235964AbhI0TM2 (ORCPT ); Mon, 27 Sep 2021 15:12:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=Mh3yzrEcylJtn9qpK9BS26cL4bktBLXdV9NfJgr9pkE=; b=VtaXEGSDXcFg5ttxnKr9X1K0lX +eazji396RJZYvzxxeYFIqkRQV7nfY80eMaefttMmK5HixKgp6G8nTliASfcpcdjRSuMQWkVRnW0x xr+LFC2bei3f0wvhuy7wIDp5U/oLWTrj7voxHXe2ACf3/u++k2kW5+s0cGSF9OY5IB7k=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1mUw1U-008Ubl-9q; Mon, 27 Sep 2021 21:10:44 +0200 Date: Mon, 27 Sep 2021 21:10:44 +0200 From: Andrew Lunn To: Asmaa Mnebhi Cc: Linus Walleij , Andy Shevchenko , "open list:GPIO SUBSYSTEM" , netdev , linux-kernel , ACPI Devel Maling List , Jakub Kicinski , Bartosz Golaszewski , "David S. Miller" , "Rafael J. Wysocki" , David Thompson Subject: Re: [PATCH v3 1/2] gpio: mlxbf2: Introduce IRQ support Message-ID: References: <20210923202216.16091-1-asmaa@nvidia.com> <20210923202216.16091-2-asmaa@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Asmaa>> Thank you very much for the detailed and clear explanation! > we only enable/support link up/down interrupts. QA has tested > bringing up/down the network interface +200 times in a loop. The micrel driver currently only uses two interrupts of the available 8. So it will be hard to trigger the problem with the current driver. Your best way to trigger it is going to bring the link down as soon as it goes up. So you get first a link up, and then a link down very shortly afterwards. There is however nothing stopping developers making use of the other interrupts. That will then increase the likelihood of problems. What does help you is that the interrupt register is clear on read. So the race condition window is small. > The software interrupt and handler is not registered > based on the GPIO interrupt but rather a HW interrupt which is > common to all GPIO pins (irrelevant here, but this is edge triggered): > ret = devm_request_irq(dev, irq, mlxbf2_gpio_irq_handler, > IRQF_SHARED, name, gs); IRQF_SHARED implied level. You cannot have a shared interrupt which is using edges. Andrew