Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1503896pxu; Sat, 24 Oct 2020 12:56:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCKo402i/UbsPrznkyaNwpYAQjVlNEFusUnBwrYzxx4FeiL80yFTaOYuzTbdOb3ekZcrZ7 X-Received: by 2002:a17:906:ce5c:: with SMTP id se28mr7654290ejb.365.1603569402369; Sat, 24 Oct 2020 12:56:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603569402; cv=none; d=google.com; s=arc-20160816; b=Qxl7y8CQtfH6lJWvWP7Iae/MJiBpHvnnSSFxu7yktG/zWemcxc26YlEstGDZBMO+1H 53VzqNHJOiVjUcPhgzeprgWU4y++AfC2v1NbbkcmgbOb0TBysxjqW9S8mvZhFTcq+ub6 4sXQJ9GWAYgByA9xu9MXe8oyJw6ZrUJUGGetyX8BvKecKqqAMJbIvW+I/HLh4OOuvhFN fNy6nwIg1Tu0Nc8tOvKFdYaGr/yl/sHmXrJN2twO7flVwgqCwz0jX0kRs8vpap4gSaMH KuFS3mC4uUyofeBkNU9mh6j1W6uW+969UZ28FPcr1dPhB8r36kSs/Nhv7VbKlPRaDrf/ 25iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Q2qXgGdzj4L8j+jXytIL6k3GCXZEZ2jHlP9NdG+kfiE=; b=VxjAV1PO7F7K8jTYv/QAXLYE+d+/jB650/lV3r0AhHNFQJFdDPJSaWO0to2nkj/dVA ZLJ9CRD2PhsAOWjaxPKmbV+HL/QEs4ohXfIttSg4IBdYZ7KKpac3y7/g54W/TX7juM7v WRA4Xu4PWyRRvSqBpZ0kQgWQNhTuj2YCEhUAqaO2/26SITix/wLH7DD9pG0td4rBZrFU ENdL9wkLcSWJrRxjERD6eVOKqwOmLoJD9c8O24JIMiXEnfxntIXDYV+YEwpLOZXbl2nB HZzAiSH/QFqEBr4kRM6inxAPyXccFhYUmksoCCTgLzSwaSlnpeaZZ6I3KG1s4rQqbsy0 4zGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=v6P6XV8J; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s3si3833036ejj.426.2020.10.24.12.56.19; Sat, 24 Oct 2020 12:56:42 -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=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=v6P6XV8J; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763679AbgJXSK0 (ORCPT + 99 others); Sat, 24 Oct 2020 14:10:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763671AbgJXSKZ (ORCPT ); Sat, 24 Oct 2020 14:10:25 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22262C0613CE; Sat, 24 Oct 2020 11:10:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Q2qXgGdzj4L8j+jXytIL6k3GCXZEZ2jHlP9NdG+kfiE=; b=v6P6XV8JYqUM6/zC/DDUpY1DU 4PHk9E5aL7cwy6rKP5XYKCneMBaeH/bRzTFlBU+AGj5UBEFqvixuHwmEzhGGM9uclyHqTOP9wxKMM 3zEDdo+7/E2GA8czNSzZ0/dYOl0NUeDGnb9TameVLMeYKGszVH6pUuAIBNHjOpcqeMoZuZ9WQFitG rtrHfEKq27ZZzCnzEt/QgGz49qtkc01RR5AzOrfp2NePO7g1bcND9W9a1AtAvyqyAemws4+yJd2d9 dOINIn7OemizW22oPhf9ZRpym3naGc7prKhkChWNBWbQ7c9jbZonFsavDX0pbC0l0z19veLnuk7dG 2BN/C1u+Q==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:50478) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kWNzR-0004wn-5p; Sat, 24 Oct 2020 19:10:05 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1kWNzF-0001EU-BE; Sat, 24 Oct 2020 19:09:53 +0100 Date: Sat, 24 Oct 2020 19:09:53 +0100 From: Russell King - ARM Linux admin To: Andrew Lunn Cc: Ioana Ciornei , Heiner Kallweit , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Alexandru Ardelean , Andre Edich , Antoine Tenart , Baruch Siach , Christophe Leroy , Dan Murphy , Divya Koppera , Florian Fainelli , Hauke Mehrtens , Jerome Brunet , Kavya Sree Kotagiri , Linus Walleij , Marco Felsch , Marek Vasut , Martin Blumenstingl , Mathias Kresin , Maxim Kochetkov , Michael Walle , Neil Armstrong , Nisar Sayed , Oleksij Rempel , Philippe Schenker , Willy Liu , Yuiko Oshino Subject: Re: [RFC net-next 0/5] net: phy: add support for shared interrupts Message-ID: <20201024180952.GG1551@shell.armlinux.org.uk> References: <20201024121412.10070-1-ioana.ciornei@nxp.com> <20201024171705.GK745568@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201024171705.GK745568@lunn.ch> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: Russell King - ARM Linux admin Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 24, 2020 at 07:17:05PM +0200, Andrew Lunn wrote: > > - Every PHY driver gains a .handle_interrupt() implementation that, for > > the most part, would look like below: > > > > irq_status = phy_read(phydev, INTR_STATUS); > > if (irq_status < 0) { > > phy_error(phydev); > > return IRQ_NONE; > > } > > > > if (irq_status == 0) > > return IRQ_NONE; > > > > phy_trigger_machine(phydev); > > > > return IRQ_HANDLED; > > Hi Ioana > > It looks like phy_trigger_machine(phydev) could be left in the core, > phy_interrupt(). It just needs to look at the return code, IRQ_HANDLED > means trigger the state machine. Is this appropriate for things such as the existing user of handle_interrupt - vsc8584_handle_interrupt() ? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!