Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2609210ybk; Tue, 12 May 2020 03:50:07 -0700 (PDT) X-Google-Smtp-Source: APiQypIM6QGTUVq7+6PV5MhJtbgJ4YDO2TTAdcqhICJnS1cJpwsZA2pM/fIdPVxjP6RQVfoYDZXa X-Received: by 2002:a17:906:4bc9:: with SMTP id x9mr16766953ejv.27.1589280607276; Tue, 12 May 2020 03:50:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1589280607; cv=pass; d=google.com; s=arc-20160816; b=0+0NsG7kiEnaATH6DvmxdgrGv6EIR7SmI4ITm9hXG8g8lAEazdpwizfLS1j4T/TOfv E2/UQBw8zdJD6FEXkeuoJKQJlkky175RdDIvNo8BX9bkuEszmtoHP2P85vhnce/7H3Ui vJmPdedLjCgaFeIrO84YoDAa/KXixmjSWgjcMN1sq65lW1tT97Ho4RgFWHi3e3sYe77f P8VPZeFaDTw/24tQ4sIp6HOQI4d8dFoLyngUZqqAx2enHdmjt8g1c5fgQAHOUDR4hKs/ 7CZcXnir19FBkgZEkA820k5TxcigJLmudbA6EXeH3eK7m/BOqo+Zt5FiNt6VaGOQMcdr My7g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :message-id:subject:cc:to:from:date:dkim-signature; bh=/INPiDwLm7Y7o+u+nwaJB2Eas52FPS76u7R1hv6MwSc=; b=Km2hN5qawcg6ZZ1OygLu5upf3E9cfsxSylTWsvb4p7kza5PsNLRGQsKRU0/yxkRBZ4 Br/Cid/5bUi1V4aHuoKIdFFcc7xjsNLRG30SbEubQ/gile/CPc8k5cR/9FQMZITddWUT FrFuQBMuL9fEU2C2trjhj6pJrVCvM/dJi5AgGcSCQdcmWVXfXeryqpbDtO8n5h8PhTmf NYt2iSIMSF9UHIDW+iBZZjTeCxhPfdyWS2EZSjQ0+TaMS8M6QiK1bvZNkigXsx8vc7u6 F9fQtDfAm7mSv+6xHRuy9AcQGnZwiTV1s7G91izOR7tRemPH6Xt75DRy0iEvjsufACC2 1MuA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Synaptics.onmicrosoft.com header.s=selector2-Synaptics-onmicrosoft-com header.b=GnzuB0Ia; arc=pass (i=1 spf=pass spfdomain=synaptics.com dkim=pass dkdomain=synaptics.com dmarc=pass fromdomain=synaptics.com); 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 ox16si7498857ejb.427.2020.05.12.03.49.44; Tue, 12 May 2020 03:50:07 -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=@Synaptics.onmicrosoft.com header.s=selector2-Synaptics-onmicrosoft-com header.b=GnzuB0Ia; arc=pass (i=1 spf=pass spfdomain=synaptics.com dkim=pass dkdomain=synaptics.com dmarc=pass fromdomain=synaptics.com); 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 S1729399AbgELKqS (ORCPT + 99 others); Tue, 12 May 2020 06:46:18 -0400 Received: from mail-mw2nam10on2052.outbound.protection.outlook.com ([40.107.94.52]:6240 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726187AbgELKqR (ORCPT ); Tue, 12 May 2020 06:46:17 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nmM3tnvcO3FesllDvt4JdHxbiIKR6RZgfc9AdnKiEk2h6NQ219g3y0HCNotWOT1KSqypvyMRHv/W1jmKcdBotYrBZW9kUEwARdA1TDgGrL6XaVeOH73yhjgK8V3jK4URtHpWVs37rY+QhrP/ia4QmszBq5dw+oJPlE8xo7yCjM5ZpBhLvdkC2Q44vI4WXFqT1wd4o9PCsJx0Sy5Mqfl3GvSzrvZ+eol4xbSO7luNoPN2RQl9TRPePvPkl4A6BrNVHw4/YW0oJL8WZnAJBbWvbUsDKVwOht53Oc7Bfqb5ZIFaPw4wuj19u/PeJxNFHiB3eG500dG2/RsW5rhcIPQqog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/INPiDwLm7Y7o+u+nwaJB2Eas52FPS76u7R1hv6MwSc=; b=HXZSmUGvIWMCIxVE9gQ0EdvXAVLraFnnBtoWGyrGrbdtrUIJw8dXaUJcU8sMInDrB9mNX848lybZndqXFhbXQFNzbhqbnxtYEQGCvm+IMnQoVB536CaHqwLelqEusrIQKlKKoFF46FTbxOat0UC2hyWWfrJyO9+JgZUpEvC/RJ3CLsaCqdDammGmJt+k64wyjrAdV8ndqo8uc/ReUCIUKcIR0+s1HDij7gW9B0qK/uGNzuh2JB81fxwMkKFNTSh6S5B2M1qtdELVBU6Mt0M84rRHuVXehNkVuhsdiGxarMmPhpBVpCE9CN4xTnitdmRrdFWGSrR/YV1uKAcazbj8fg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=synaptics.com; dmarc=pass action=none header.from=synaptics.com; dkim=pass header.d=synaptics.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector2-Synaptics-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/INPiDwLm7Y7o+u+nwaJB2Eas52FPS76u7R1hv6MwSc=; b=GnzuB0Ia4wqqAg2qF1RSbawSiiPmeweN8URbZETpAzdfG7wygDUpshHi+P6+5Ft9SI6udBwrz2GfAmAVHMMxifpoJ/6DndzpLtUNf4NCiNi6B6DvzyqVjX8ZBvOMpy5kxUDmj7iKbwKAZCen27rrI3EXhTwNqHvp1Pv0RHJeDvc= Authentication-Results: lunn.ch; dkim=none (message not signed) header.d=none;lunn.ch; dmarc=none action=none header.from=synaptics.com; Received: from BYAPR03MB3573.namprd03.prod.outlook.com (2603:10b6:a02:ae::15) by BYAPR03MB3671.namprd03.prod.outlook.com (2603:10b6:a02:ab::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.33; Tue, 12 May 2020 10:46:14 +0000 Received: from BYAPR03MB3573.namprd03.prod.outlook.com ([fe80::d8fb:de22:43b7:fcb7]) by BYAPR03MB3573.namprd03.prod.outlook.com ([fe80::d8fb:de22:43b7:fcb7%7]) with mapi id 15.20.2979.033; Tue, 12 May 2020 10:46:14 +0000 Date: Tue, 12 May 2020 18:46:01 +0800 From: Jisheng Zhang To: Andrew Lunn , Florian Fainelli , Heiner Kallweit , Russell King , "David S. Miller" Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: phy: realtek: clear interrupt during init for rtl8211f Message-ID: <20200512184601.40b1758a@xhacker.debian> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-ClientProxiedBy: TY2PR04CA0004.apcprd04.prod.outlook.com (2603:1096:404:f6::16) To BYAPR03MB3573.namprd03.prod.outlook.com (2603:10b6:a02:ae::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from xhacker.debian (124.74.246.114) by TY2PR04CA0004.apcprd04.prod.outlook.com (2603:1096:404:f6::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.26 via Frontend Transport; Tue, 12 May 2020 10:46:12 +0000 X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) X-Originating-IP: [124.74.246.114] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: afde11a5-79be-4b60-8234-08d7f661b146 X-MS-TrafficTypeDiagnostic: BYAPR03MB3671: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1824; X-Forefront-PRVS: 0401647B7F X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ILxHXgg2+LXI8su7+Vb3fRZhDVJN6bJbmqz33boEJADp7em9piFixK/TE9Xrc4lncCLVBhQFFoPqkMY2BWCNZmMhdYNoMGydCRt7mjkClsitP0hsRie0n0z3l6d6uUQkpNlwLcHuJRi9+PmqZDVYhe7xXdtg3pWFktYDgq+Yp4Fgxpxcit5VqUJcNDhoanwn4LsuAUJKhhoatQdDJApdMlUrijerLVPkAGVz7nr2BBgMQyKoyQS5wfLuuk44tLP76S65YFhPcJaEZzQtlYlS7fRUxSLTEhKKLNxy42jgmqwEKjznD3vNSGuTEp6O82MqsXhCYiAZlIBz67ZoizPVFdI7/erXYI43SjDxO+DKqfQIn3xhHoBbXX84oT90sHoqvtTvYxQRWrtpK/XSaFjbpVQPZxf5TGziVoE9MgULEP9bQwUBS2m+WhfGUUbvrdd1YaajMOd7UwWE2oACWpashIYI/mRuq0hji5cZBbtD7ju+9AIi83xkn91oytaPoH0FtetBlretkzauEK+jD3NvmQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR03MB3573.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(366004)(33430700001)(9686003)(956004)(6666004)(6506007)(26005)(498600001)(4326008)(186003)(16526019)(66476007)(110136005)(8676002)(7696005)(66556008)(52116002)(33440700001)(55016002)(66946007)(86362001)(8936002)(2906002)(1076003)(5660300002)(4744005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: iOYBRQIeITUv/oAxnoTsETHZ0qEefNfO7Z4Zk0HdkWbb1/3tbygHa3Ix9jrRWG+eenS31h1SDSCTvCuHkRIKa7iwuTmYSTWNALKL8C64D7lEeaMFktEfFoZjdUmVNIkfCNS9Za3z68fAJW4a1emOrIL4LJK7II+7oP8CF7/wcmjUjYQhPPrJm6Owe975kOuqcacyud/yLLCdOZ6ZNEFYmGkQcMbLNZ/yov7n9fzEFpiBcGu2KOTESpPVSFdrjS5Lz/rmK/N6QVSIIFhweUC4eNE9VEC8HdfD5QViHPE1farJHHP23NtYhssApHUs4MQVu0XWg5N//zxlyPRvvZ/vMzCSlb/BInP3xKgdcmAc+2XBgmp3z9dwkC9/f2gaXsjIu9hbb5cnHrl7GXYPPm3srst1f8wdmyndWwv1jLZWZvhMeOMAq3vxUvnQeMAym46WxVz9+jJt0KNFQjgVslgUDlVhyUiKIEocPVdTDR+9T4X8JtxdBxnu12cUe1zYcn/l X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-Network-Message-Id: afde11a5-79be-4b60-8234-08d7f661b146 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2020 10:46:14.5571 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: by2KEl96S1e9FqGR81cPApUlzrPo21vcAjKwqrfSWFi1Qko/wK24635kvFa4pI+tT89c+F9lD/faJwWcgkN+6A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR03MB3671 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The PHY Register Accessible Interrupt is enabled by default, so there's such an interrupt during init. In PHY POLL mode case, the INTB/PMEB pin is alway active, it is not good. Clear the interrupt by calling rtl8211f_ack_interrupt(). Signed-off-by: Jisheng Zhang --- drivers/net/phy/realtek.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index 2d99e9de6ee1..398607268a3c 100644 --- a/drivers/net/phy/realtek.c +++ b/drivers/net/phy/realtek.c @@ -179,6 +179,10 @@ static int rtl8211f_config_init(struct phy_device *phydev) u16 val_txdly, val_rxdly; int ret; + ret = rtl8211f_ack_interrupt(phydev); + if (ret < 0) + return ret; + switch (phydev->interface) { case PHY_INTERFACE_MODE_RGMII: val_txdly = 0; -- 2.26.2