Received: by 10.213.65.68 with SMTP id h4csp2366136imn; Thu, 5 Apr 2018 13:43:42 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/VlWjyiTWcnXx0rs/r0LuX1/VvvRjgVjxHDZv5pVDVyG0u2ht3b5owQggMzSKLZFqBFSyA X-Received: by 10.98.163.153 with SMTP id q25mr18396501pfl.189.1522961022357; Thu, 05 Apr 2018 13:43:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522961022; cv=none; d=google.com; s=arc-20160816; b=BNE2FHUBSfykhCUvfzOQadwXhUssXc+46BakwkqC3AvSDd43hg7izXlzEUlZUz5XuD tE52y8yASRZTaf4qjtsOqYilL2pxH3GNwkTwc9yfEGzGeJJdsFLAqCghkTva08JBoZ4/ dMVqkYk66cVbbwVLiuzRh1Io9MVnoDQr6ONS5AKmZDa8n2+OS/WeM/Rfbtt3zTcPsHpl 7S307U4/L/psAC1dd+E+ohC+AoER5fJ7EL1gNRqnb30i1fzT9xs52/wgZ1fYzm+2u2nJ 005EP4vB+1hd+Ll7qt+vccJyoVZWVkw+aPaL/D8hKDZLAPm7GfkJCXjgpuSDOEXwwpAE KBsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=PoLoSsCHZWXJZdscwVS0B1verwGOIPuSzc/bqLIJVag=; b=03BLrFmVRZoTU3IX0t5nzy1vB0BemerWANpIiGJxQAKlze7GN4Xtqbs95n6Fh/hMlJ exVS40qn4NpJQ0EkLhbzq4xoP14MI6UyKJplnbDmqILUaZPOcfRAfMfH5vDrFN5MKger efNDd3tIfZ6g68QUg/1niCz4S8We92nu9klCNFh3fPK74H3wNEq6px4kLYfrNPnbyQHl ftF4nCt2f9BuHAgxctFpW8Isn0asVdjB7FOQQBny8JQWcAVeUGBi7gv+C3DIhS0NYaV3 bW5FLNSYOPzKJ+6yz42nm1bLhYVHV/oqwu/MGtwtUB+ogtbr3x0sTGXTxenFynQMt+aS nrAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=OgWMs+H2; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k6-v6si6599153pla.509.2018.04.05.13.43.28; Thu, 05 Apr 2018 13:43:42 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=OgWMs+H2; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751638AbeDEUlC (ORCPT + 99 others); Thu, 5 Apr 2018 16:41:02 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:40292 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751846AbeDEUk6 (ORCPT ); Thu, 5 Apr 2018 16:40:58 -0400 Received: by mail-wm0-f66.google.com with SMTP id x4so10691673wmh.5; Thu, 05 Apr 2018 13:40:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=PoLoSsCHZWXJZdscwVS0B1verwGOIPuSzc/bqLIJVag=; b=OgWMs+H2zHPgSlfePBIg1kJXuM8B8I8YCEDOUlZgmjm3QZ5XkmoAvnnFyumJ3AQtD6 XTatDFxKcY0E7atZG+XWYhmKgqO5ab+fYEK3PIjUW3FD0OIRrMAazWh6K0DVjGtCll6i Q/mS09QGfZ75z6fYdct/kVpNeJJpNj5fqNWOlnRMMItFKQtVNtIt7rSO1gcckRQjTPDk kr8RGb7M9HGEG6yEdwF0yQT3Nc9zF/NjbJPGggL2M2mgg9pxbQZHmISpk0lTyYMy1YSF 1QcFCaOMFNYT/zO33ZSawfr7yxYPFzZkzpkyz047Ra2ov7Cft1H+Hk0a7SgyfaKQZjpd 9itQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=PoLoSsCHZWXJZdscwVS0B1verwGOIPuSzc/bqLIJVag=; b=uDs1VunLlX7fqI0FmJ96yFVjctSf+eOAcP9nwY8j3WywlJKymeoD7j2RHoTkZxV8kr kUm2bXKmQhDzCAkTd4IFS4ZHmlkQl/wtUtM6zG8zWZ5mY3/6Z+Y3rmLqacCUcWCfo5we IN1WTMOmsvbeVWX6Pt/hKWVOz4ygqtULrz3NfjQ7dNi8Bh17WumIE+0qRIltOImvIxyd bHegt6vzOtqiHLgpMHpRJAW65D7pVoY08zKQT/XET1PoQB3JrZVtS8bwT/LCCkHlZ07J ywy2sfMihM84JZbjx1Mlf3q5/sfNFThUHzqbU+WLV9z0RxaRCqVjclRwIcOd5Wtsv3c/ juGg== X-Gm-Message-State: ALQs6tBOr6u5e7IyP6irGqOT9YXqFqyV+U8uWecc6NWr5ObuetZMKbeF EX5H9RYuMJwgAckWejaO4x5xtvW6 X-Received: by 10.46.120.24 with SMTP id t24mr2279570ljc.68.1522960856256; Thu, 05 Apr 2018 13:40:56 -0700 (PDT) Received: from localhost (87-57-30-174-static.dk.customer.tdc.net. [87.57.30.174]) by smtp.gmail.com with ESMTPSA id p22sm1438496ljg.39.2018.04.05.13.40.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Apr 2018 13:40:55 -0700 (PDT) From: Esben Haabendal To: netdev@vger.kernel.org Cc: Esben Haabendal , Rasmus Villemoes , Andrew Lunn , Florian Fainelli , linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2] net: phy: marvell: Enable interrupt function on LED2 pin Date: Thu, 5 Apr 2018 22:40:29 +0200 Message-Id: <20180405204029.665-1-esben.haabendal@gmail.com> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180405133504.12257-1-esben.haabendal@gmail.com> References: <20180405133504.12257-1-esben.haabendal@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index 0e0978d8a0eb..a6ad0255c512 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -828,6 +828,22 @@ static int m88e1121_config_init(struct phy_device *phydev) return marvell_config_init(phydev); } +static int m88e1318_config_init(struct phy_device *phydev) +{ + if (phy_interrupt_is_valid(phydev)) { + int err = phy_modify_paged( + phydev, MII_MARVELL_LED_PAGE, + 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); + if (err < 0) + return err; + } + + return m88e1121_config_init(phydev); +} + static int m88e1510_config_init(struct phy_device *phydev) { int err; @@ -870,7 +886,7 @@ static int m88e1510_config_init(struct phy_device *phydev) phydev->advertising &= ~pause; } - return m88e1121_config_init(phydev); + return m88e1318_config_init(phydev); } static int m88e1118_config_aneg(struct phy_device *phydev) @@ -2086,7 +2102,7 @@ static struct phy_driver marvell_drivers[] = { .features = PHY_GBIT_FEATURES, .flags = PHY_HAS_INTERRUPT, .probe = marvell_probe, - .config_init = &m88e1121_config_init, + .config_init = &m88e1318_config_init, .config_aneg = &m88e1318_config_aneg, .read_status = &marvell_read_status, .ack_interrupt = &marvell_ack_interrupt, -- 2.16.3