From patchwork Tue Dec 14 12:16:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Schenker X-Patchwork-Id: 12675901 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9743DC433F5 for ; Tue, 14 Dec 2021 12:17:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231834AbhLNMRE (ORCPT ); Tue, 14 Dec 2021 07:17:04 -0500 Received: from mail-zr0che01on2122.outbound.protection.outlook.com ([40.107.24.122]:35264 "EHLO CHE01-ZR0-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231878AbhLNMQ4 (ORCPT ); Tue, 14 Dec 2021 07:16:56 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iW1SWwnsQNDNNeeIYRQr8kGZp5xEmAsXq6VIT/S+KscBgsGLNwBmonIvdR8SPvBhfUO1qfVmkFhUExq/WTcCn8l42HJY338YET5riid0Y3zjVLmMQwu2iM/H+Pw44vWzhxBJIlVIGQlkFaXi1W9XInD0LwFoxj2HcH5ND9VNaUU2dHMJtZHwuTKffRYI2YZhsyYvjsEy4Z8EkaSMEz2t/EKw5dczxyIhSCiiTpVu26Vlk4mRm/i6Pz144BC6VyoAI1nPmM2xQ+tKii/DsaRkIbzMWKJf3ISFn6ngohXydudk1UZyvuUifQvDMgjFJJVGYVcvrpcvab2BK6QbmIO7/g== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=v3eOj4qiai22fOPOt13QN1y/qp7600LQSeJ3J+9UUY0=; b=gQgrXGFNkAMz0+fdxfLHWUBN8/8db0HeW6cgYUjrCS7W9YSyFbqU0UiaL2XbdP9NoN97gUY3kAmzenJaUH7rCyAxZLu75GuHKRwcaRnYnaZDbrJ7Y6S0J+kakeS56XNxOV4XzhBIuEi+WbVItoQk1vOrZ1nct330FrJPvAco+AgBxOEniZZDeON57+0J+kNweoMyNpPWs4deRVbVJHVPwc+zU2IkKmtD8E/JYC6eJOmoL8pjsmgCjt2KijctevKHvBVPBIF6RdTUB6gDL72+/6gXm03KFVfFj4pqd84MAsEl/Yz+Y+At3/FB6cgtxycUAjO4TuPQeSeCizBcgCmTcg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=toradex.com; dmarc=pass action=none header.from=toradex.com; dkim=pass header.d=toradex.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toradex.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=v3eOj4qiai22fOPOt13QN1y/qp7600LQSeJ3J+9UUY0=; b=fIhhPaZG1dn8N9pZywGrOVJN2kUKK1Pw+ME/ammo3K6Fx/B/L0KAc+9DeSvBVvVc3+sMuLon4x2j2225fYjtccHBdXiT6p2OxfPQoovZviAoHOP776UojBLfdvSZcZ9QVDN2/IQP02IsEssrjIGlkh8pEmYBpnnPkbP/hVfEkv4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=toradex.com; Received: from ZR0P278MB0377.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:34::14) by ZR0P278MB0234.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:36::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.17; Tue, 14 Dec 2021 12:16:52 +0000 Received: from ZR0P278MB0377.CHEP278.PROD.OUTLOOK.COM ([fe80::e5c4:5c29:1958:fbea]) by ZR0P278MB0377.CHEP278.PROD.OUTLOOK.COM ([fe80::e5c4:5c29:1958:fbea%8]) with mapi id 15.20.4778.018; Tue, 14 Dec 2021 12:16:52 +0000 From: Philippe Schenker To: netdev@vger.kernel.org, Joakim Zhang , "David S . Miller" , Russell King , Andrew Lunn Cc: Heiner Kallweit , Francesco Dolcini , Jakub Kicinski , Fabio Estevam , Fugang Duan , Philippe Schenker , linux-kernel@vger.kernel.org Subject: [PATCH net-next 3/3] net: fec: reset phy on resume after power-up Date: Tue, 14 Dec 2021 13:16:38 +0100 Message-Id: <20211214121638.138784-4-philippe.schenker@toradex.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211214121638.138784-1-philippe.schenker@toradex.com> References: <20211214121638.138784-1-philippe.schenker@toradex.com> X-ClientProxiedBy: ZR0P278CA0167.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:45::15) To ZR0P278MB0377.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:34::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 69a714ce-cbc4-4997-bbd2-08d9befb9cde X-MS-TrafficTypeDiagnostic: ZR0P278MB0234:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4941; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: z/eM5PKz5UDXQKWCP64iTAjpy0JANs40InVoAL5K0dYROIcJjGUBwDb8ZjG3QCICRDhMjQ9D1ISROfEkles/aj3hXQbie2bshc6zixniif1mxYZXXbAoShZGtyfU+gDbfV2rOM3g0h1wFWTqvzUdyqAWU/uv/HE+nN/hlxHar5AqytcLzHbbArsEsJ91G/l5nucJZUn+m/BCZ5OHqfwR5d1MRzLW1D6SyFCkCv6BIoKUMZ3lK1TFez5H5t/c73etUO5ckK5Xy/qaP7V9GU1Okjg8CzKhSMHoea5hg0RDR4naoad+IIOvH6vooONFssRxwC7MoH/4WXzuoRvXdFYmQ6mS2h/qaEurpGmshWTHAG203zVxjsnekCbE0minoEx6p82/SDxAzKi8Qms5G4f0gytYGeR1WpiqrsfOxcNHCnFAH+JClZpdiQk5piSkpGRQJJXP28Pa4dFdfZdf2jGk3EMzLkG7Ah/ySZNAKsw0gu944hSPdsSgo/PdHjH0HwO/Px0Mkro/6UmhHdWyx/ivcPN7YCNo2rG7qR5E7+WgvW7kF7/6v5O9EdExixHuktN/U3E9Jl/TYNG5WemCx9O9mcsxnjV/SVi3JF09uvgQr5Mp6CqUFEqiUNcJ3s82uO7T6aD1nMTrb/Q19v4KG5NscflkgaVN0RLwBuazNVIXt3+ZerwrolKLtdY1t0qgqP/FId8Vg+xTCHKSVl5DXjK/Mw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:ZR0P278MB0377.CHEP278.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(4636009)(39850400004)(346002)(376002)(396003)(136003)(366004)(8936002)(86362001)(6506007)(66946007)(52116002)(316002)(6486002)(54906003)(5660300002)(2616005)(1076003)(508600001)(38350700002)(38100700002)(4326008)(8676002)(186003)(6666004)(26005)(36756003)(6512007)(44832011)(83380400001)(66476007)(66556008)(7416002)(4744005)(110136005)(2906002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: WOWTzSg95kdKx8sSH3Ca17ldVG7nxAr6qc/T5luJopyVOL7DlJqS2K/dJvaK02LssLF4s+QNQUfhDh8EuwdXqeGpT8UDNlDy3OFg7pyy3fnLFnUGbyVEOgWjisx6LnflVZUThcBPYklwpdnhT4c2AkLucWyF1Yozix8h59rS2ISd0f1eV1z9JIYSq3bYrcwJw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Fzxq5fmyJMm9NR39IQ/PYENuR7djEysUBFt1ga9pZCsC/z+4biipgmu44+WrpjDi02gNY7rmATyZRKZtjDvEfBQo7OdQAwpIS94u/h64EPntlHFlYMVPLnhqwWetHFsvpOqWsTNS7Ir8jR6jRNG2VE4pIFW+LbVXk1CF5uO59+TnPcbPcmNkRgHxrGJy7QeN4XIInhX2zs2w/W0mPiDbNTVdCw9WvUHfvjW3XYCz7guDjzR/c1+CpU6mVxoYzKbD6Xu5SVFcmrmVsLwchK/FZwpZ6JbAKRASU98ci9J8shVid16y/CpR21MLhd5tl6KRd8Dg4llTQnBylXAIimEs2GdhcxejyVRwdUP//EdRSEPQATDpZ+XIXkoLQq6T6D76Il839eCt+NPIV5nYmSnasvvyJrTCNriQ== X-OriginatorOrg: toradex.com X-MS-Exchange-CrossTenant-Network-Message-Id: 69a714ce-cbc4-4997-bbd2-08d9befb9cde X-MS-Exchange-CrossTenant-AuthSource: ZR0P278MB0377.CHEP278.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2021 12:16:52.8413 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d9995866-0d9b-4251-8315-093f062abab4 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jHU/R5Xi7yCWxiaFwX1DDl5I6u/D2UF1L8h026ipOdwZFyWzQSgVx/ZHjLD2dtOi3fDP1SW5aJrMRpU3RyPxqeKIrIt1J/mLrM8zrp01pjI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: ZR0P278MB0234 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Reset the eth PHY after resume in case the power was switched off during suspend, this is required by some PHYs if the reset signal is controlled by software. Signed-off-by: Philippe Schenker --- drivers/net/ethernet/freescale/fec_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 1b1f7f2a6130..c29eddbb0155 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -4086,6 +4086,7 @@ static int __maybe_unused fec_resume(struct device *dev) ret = regulator_enable(fep->reg_phy); if (ret) return ret; + phy_reset_after_power_on(ndev->phydev); } rtnl_lock();