Message ID | 20180423152249.5f1deb65@xhacker.debian |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show
Return-Path: <netdev-owner@vger.kernel.org> X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=synaptics.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=Synaptics.onmicrosoft.com header.i=@Synaptics.onmicrosoft.com header.b="Gr2cBf0d"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40TyhJ1Gfqz9s0x for <patchwork-incoming-netdev@ozlabs.org>; Mon, 23 Apr 2018 17:26:56 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754150AbeDWHXa (ORCPT <rfc822;patchwork-incoming-netdev@ozlabs.org>); Mon, 23 Apr 2018 03:23:30 -0400 Received: from mail-bn3nam01on0052.outbound.protection.outlook.com ([104.47.33.52]:28989 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751785AbeDWHXS (ORCPT <rfc822;netdev@vger.kernel.org>); Mon, 23 Apr 2018 03:23:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector1-synaptics-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Lm+bF5eYVspogI2RsnQEVw8I3dN08e8STJ/VYaVxh5o=; b=Gr2cBf0dxxQVDuTrlMfHapoJGTpbx3uAT1eHV1Bz+bhQZnkqZBYTpJZF+fBcpjMjnH6XNQdDvylaQebhUJsHavxvO7lHLAjRpZ4bKXL4xgr3I/p/2uCI5H31rbkKvsrFa4VP5amMBCxR9aR3aa37d+9KN92acgB92TuYRnzdhFU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jisheng.Zhang@synaptics.com; Received: from xhacker.debian (124.74.246.114) by BN6PR03MB2625.namprd03.prod.outlook.com (2603:10b6:404:59::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.12; Mon, 23 Apr 2018 07:23:14 +0000 Date: Mon, 23 Apr 2018 15:22:49 +0800 From: Jisheng Zhang <Jisheng.Zhang@synaptics.com> To: Andrew Lunn <andrew@lunn.ch>, Florian Fainelli <f.fainelli@gmail.com>, "David S. Miller" <davem@davemloft.net>, Bhadram Varka <vbhadram@nvidia.com> Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jingju Hou <Jingju.Hou@synaptics.com> Subject: [PATCH v2] net: phy: marvell: clear wol event before setting it Message-ID: <20180423152249.5f1deb65@xhacker.debian> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Originating-IP: [124.74.246.114] X-ClientProxiedBy: OSAPR01CA0063.jpnprd01.prod.outlook.com (2603:1096:604:a::27) To BN6PR03MB2625.namprd03.prod.outlook.com (2603:10b6:404:59::8) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:BN6PR03MB2625; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2625; 3:Ngsik/gRPp5eK30WMrYtpFVLRNDEpDQi7oWK3iY/qfhOjk3HDd318b5PQiN2ictehN2BVPtnOGVZi8Abx0zyu//ZLIolvrHGMOGooUj4W6Fv+0UYnBn0TTi6MjeFf68bAo3HyqBwm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fRoC+niG9gtaUJS4goCBylAjbV7PZOWg/rWeZ/abIAsJX/sQqPX+T3OKsTUgAOQz4pyA2xXz/6HAaBGbTgXqtdgZHUT2Vr4OPdiwy9ON2tzO6L5tlnYbDorKfkU0hVUIuPNBLNCEH3c95wWi/cujXNRu4cSB915Nu5rUdKoVkmVwjQAlcSWlj3Vts5a0g2Lpv3NCh; 4:TWMlYdTV/rrgL6aQ2SLFQZScKcg3/K7SYXC+EX/rlFVZtLbrS5v+jS1ECVPjxjDpNe22wwAPiD+PbSNCZ7Q/GJo8lPY9+mw8Oi6rullHaw8qKxq8wyMASWav75yScLKMl5CEva9DpUBIniiMH5pv/ZQhEzKm3xuQcIaXuzp+iruSQqBlvjFcuURDxJhUym4Lt+tfD3m+HwIs7eAo1PJz2FOWV7X0cis1yW3ShmLEYhluaGEi77IEPoVTTkgh1I4vKMWcf1lNz0lTy2OWqY+uyw== X-Microsoft-Antispam-PRVS: <BN6PR03MB262589DA02821BC32A30DD61ED890@BN6PR03MB2625.namprd03.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(3231232)(944501410)(52105095)(93006095)(93001095)(10201501046)(3002001)(6041310)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011); SRVR:BN6PR03MB2625; BCL:0; PCL:0; RULEID:; SRVR:BN6PR03MB2625; X-Forefront-PRVS: 06515DA04B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(396003)(39850400004)(39380400002)(366004)(346002)(316002)(6666003)(26005)(50466002)(110136005)(50226002)(386003)(6506007)(7696005)(86362001)(52116002)(2906002)(3846002)(66066001)(81166006)(23726003)(1076002)(47776003)(16526019)(55016002)(33896004)(72206003)(8676002)(230700001)(6116002)(8936002)(186003)(7736002)(305945005)(4326008)(39060400002)(9686003)(476003)(5660300001)(25786009)(478600001)(956004)(107886003)(53936002)(39210200001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2625; H:xhacker.debian; FPR:; SPF:None; LANG:en; MLV:ovrnspm; PTR:InfoNoRecords; Received-SPF: None (protection.outlook.com: synaptics.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2625; 23:eIAr21DSh+Pl2FuwXGWNgtRNCsYLnQWzalLIyUAhgJteREslTWoGbNyl9/pZBfA+LTRrlSRGTy+ZG2VOiu243dQnmrg/zW6biz+ilacHllLIHLvaz0NbXH/MZuVEFgnp1CqG5TT3Vo/ilyiTFVTHsaC5O8t3n0flcvejVzZIhdBYW+iJa6pzrW90M/T6Igf2//NjkhDYRkCxRRkQK7V3AAiYiGYsSckThknq6eBIukL6QN64GoCbEjWf/Th2Ou+iWlz+l56wRvPslDgJW9aCoOfrHf4RA2K0Xv2+YpOmFw7vs8aMPBa6S80Kzmm6NpvigExK3gJv6vqEGD63ivMqBcAs7dWpJP8a4EWFAOmtf40sa3VcoNh+l7mzRn0T99Sd4eIe3dJMav7E45dr6n8906FkW5sqmLaZtDY3hHzMb4sk9lywR/HcwKKfq0CQH2VBbr/Kz0pDpaPdsN91IuqbEZxDiFEGWUcp7ComrjlggqjkAONbOkDuSrMkVFpSWcdAQWKJexBwcfwKYzTynDSS23yL/r47RkPn4G4WHHN2gnd02pQ6clwcvJsbLUAl/eyL8rvreNm0rmR0vYTLFwt037mdl+rzLLjkrk5frZrs7/NGdwbeN3t7w7Ozt5e20E6lhG/OMhWqvuJt2SbG+RkFVsjJgKr/rsBMykahpTR6SuPQnBAqD9fixDA8rZqBFAI/xRcAajPXjlZRfjJ16GF3il6gYfOovhPrBo4/p3ye+TEr7g5f9jFvxjfrcWvTBXPNCdSGXP3SuJ8Ld0IktbeChMW6AC1GzD1WeEt4kDFarHJhCYDQaSws6Wo4R7NjiNwL896VmFJg4Lug6BvpwCcRBzxnFwn6D1dRAyB7qm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+WcSHHTePAlBg/cNrdfSQnj7BNblV4g=; 24:kiYb+F4qr1dL3Ywhy6Ro0sT8z6cw9JrsJOiqEnNbdiH/WsrSLQOfXmpPKJ1hXozrINMmebemD2i/LMdsgttOrYSt4AxkVG6zGSkk1VdQkdY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2625; 7:HDF8PfZIvsxFoC6vmST04GbFy5f/+gd636fFUFSCcXlPqhfEKYlKchv+4rBMRWxP5dX4LcrXUfgBmQ+rze9sifIelRXiEZUOCNVWvIbOBUqai4mzakCq7l/9De+WfaQG5ZXSomB7YyFeSGwO1jNeFjiLespMbfKg5Oudb/9JB2FyZnUNYeiSaM1fVHeWVrdOp1V7yelFl/DoLlNqyT/iBukXu3g4SEwd58fxEVQyAMTdOpKfZY7dxhD7S43/ixoN X-MS-Office365-Filtering-Correlation-Id: 0849615e-97c6-4a42-0544-08d5a8eb14cc X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2018 07:23:14.0440 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0849615e-97c6-4a42-0544-08d5a8eb14cc X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR03MB2625 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: <netdev.vger.kernel.org> X-Mailing-List: netdev@vger.kernel.org |
Series |
[v2] net: phy: marvell: clear wol event before setting it
|
expand
|
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index c22e8e383247..25e2a099b71c 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -1393,6 +1393,15 @@ static int m88e1318_set_wol(struct phy_device *phydev, if (err < 0) goto error; + /* If WOL event happened once, the LED[2] interrupt pin + * will not be cleared unless we reading the interrupt status + * register. If interrupts are in use, the normal interrupt + * handling will clear the WOL event. Clear the WOL event + * before enabling it if !phy_interrupt_is_valid() + */ + if (!phy_interrupt_is_valid(phydev)) + phy_read(phydev, MII_M1011_IEVENT); + /* Enable the WOL interrupt */ err = __phy_modify(phydev, MII_88E1318S_PHY_CSIER, 0, MII_88E1318S_PHY_CSIER_WOL_EIE);