Received: by 10.213.65.68 with SMTP id h4csp2030313imn; Thu, 5 Apr 2018 07:52:18 -0700 (PDT) X-Google-Smtp-Source: AIpwx48ZUkKe2DocpzB6R+S7ah9hhgPS6d3Xx4REK/z6uh2nHvqDZ/fSfgLXY9UO/ORZ+dtpTGRd X-Received: by 10.98.189.14 with SMTP id a14mr10856733pff.30.1522939938595; Thu, 05 Apr 2018 07:52:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522939938; cv=none; d=google.com; s=arc-20160816; b=otYuiTRPBzPj6AJDKOSXxq6AE0FEC1KzorG/bLHbgmlimHkjiNk3CC0Svw1RP47daa Vy9h2F/YLqtgcN6FYUCt4yIjcF3FM6h7XTeGMEwNcbLvv8uVUsuEt+EKPyl8yzNPY82s LfMsjOeDXhsWHh6RXFz888GXD3car5prCV1i9pVZq/bg1aPEdu9HRmKObkRe/7dIlkYm 5ctGPLDbh8joo8KlYlyT2vX+JvixYFqY6brFzUySy/sn0Con9IKhfHqOJ5chUFyLvvtT qjg94NtlTzJc/GepwiBUkRRITUpQoqbNqPUTp9F70WCct+2Ha7uCqmXw7baR/K04CjHJ ScaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:cc:to :from:arc-authentication-results; bh=WceqfCnWapNnqkKWY26fdU2e6MjFH0WDXapFj8Btloc=; b=VcT8vBEVyuKsTbquuTg+A51tGfqYAiNSHgYpILRa1xXCFuhvM4erzu3W1uiOWRxSg+ WDwNTK9G+t4X0f2Bl7gfcX3tsQC8wRCwZU7bPty+V4s3YFXBo6cMe5SPkh5nUZg++sbl KWCfz+ki+VlbWpHqmC/WsFoIlNjxjw5otqh5TPU0r7QWhdLIMiApw8eVZYUcswNdsoQ3 Z5EGKHenNKwAP1ORTXv3XSWVgZMiuj7ne1xX2yIPUAeWpRDI42OFDPRiCJKOkCtz75HW Z/qUtQt9OkU4Fm7YgimEHBhJz3h6W9t4YABrQCkQRD/wASuexOy9pXiLnNeyQd0YmUdM okSA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 197si5555124pge.78.2018.04.05.07.52.04; Thu, 05 Apr 2018 07:52:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751562AbeDEOBB convert rfc822-to-8bit (ORCPT + 99 others); Thu, 5 Apr 2018 10:01:01 -0400 Received: from hqemgate15.nvidia.com ([216.228.121.64]:13435 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751368AbeDEOA7 (ORCPT ); Thu, 5 Apr 2018 10:00:59 -0400 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate15.nvidia.com id ; Thu, 05 Apr 2018 07:01:09 -0700 Received: from HQMAIL104.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Thu, 05 Apr 2018 07:00:50 -0700 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Thu, 05 Apr 2018 07:00:50 -0700 Received: from BGMAIL102.nvidia.com (10.25.59.11) by HQMAIL104.nvidia.com (172.18.146.11) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Thu, 5 Apr 2018 14:00:57 +0000 Received: from BGMAIL102.nvidia.com (10.25.59.11) by bgmail102.nvidia.com (10.25.59.11) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Thu, 5 Apr 2018 14:00:54 +0000 Received: from BGMAIL102.nvidia.com ([::1]) by bgmail102.nvidia.com ([fe80::250a:5992:4657:28e%20]) with mapi id 15.00.1347.000; Thu, 5 Apr 2018 14:00:54 +0000 From: Bhadram Varka To: Esben Haabendal CC: Esben Haabendal , Rasmus Villemoes , Andrew Lunn , Florian Fainelli , open list , "netdev@vger.kernel.org" Subject: RE: [PATCH] net: phy: marvell: Enable interrupt function on LED2 pin Thread-Topic: [PATCH] net: phy: marvell: Enable interrupt function on LED2 pin Thread-Index: AQHTzOMZopkF1giP8Ue0qxO7VwjMg6PyMPug Date: Thu, 5 Apr 2018 14:00:53 +0000 Message-ID: <4d9e0665abf7408988fc4ce20c26a08f@bgmail102.nvidia.com> References: <20180405133504.12257-1-esben.haabendal@gmail.com> In-Reply-To: <20180405133504.12257-1-esben.haabendal@gmail.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.25.73.182] MIME-Version: 1.0 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Esben, -----Original Message----- From: netdev-owner@vger.kernel.org On Behalf Of Esben Haabendal Sent: Thursday, April 05, 2018 7:05 PM To: netdev@vger.kernel.org Cc: Esben Haabendal ; Rasmus Villemoes ; Andrew Lunn ; Florian Fainelli ; open list Subject: [PATCH] net: phy: marvell: Enable interrupt function on LED2 pin From: Esben Haabendal The LED2[2]/INTn pin on Marvell 88E1318S as well as 88E1510/12/14/18 needs to be configured to be usable as interrupt not only when WOL is enabled, but whenever we rely on interrupts from the PHY. Signed-off-by: Esben Haabendal Cc: Rasmus Villemoes --- drivers/net/phy/marvell.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index 0e0978d8a0eb..f03a510f1247 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -457,6 +457,21 @@ static int marvell_of_reg_init(struct phy_device *phydev) } #endif /* CONFIG_OF_MDIO */ +static int m88e1318_config_intr(struct phy_device *phydev) { + int err; + + err = marvell_config_intr(phydev); + if (err) + return err; + + /* Setup LED[2] as interrupt pin (active low) */ + return phy_modify(phydev, MII_88E1318S_PHY_LED_TCR, + MII_88E1318S_PHY_LED_TCR_FORCE_INT, + MII_88E1318S_PHY_LED_TCR_INTn_ENABLE | + MII_88E1318S_PHY_LED_TCR_INT_ACTIVE_LOW); Can we move this part of the code to m88e1121_config_init() ? Every time whether we disable or enable the interrupts this part of code will execute. Thanks!