Received: by 2002:ab2:2997:0:b0:1ec:cbc4:63fb with SMTP id n23csp348364lqb; Thu, 29 Feb 2024 02:53:38 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXOP15OzZ+Ks8/Y3wwvFM4cJPRa3R0FAcRFAYJeBIJ3J5tRmXvhAlwVAd+p4yIZ917Qd4zSIzlJXsMyQA32bBXB3HcVU9O6hUNEtuz9Og== X-Google-Smtp-Source: AGHT+IH3cITNAMg9nP3sGNAIrbb63PL2JUXPZFC8xOvmOBq4dl9Lto4rPmHeJ40e6C5kwwX5NYZj X-Received: by 2002:a50:cb88:0:b0:566:13a2:3008 with SMTP id k8-20020a50cb88000000b0056613a23008mr1259875edi.6.1709204018696; Thu, 29 Feb 2024 02:53:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709204018; cv=pass; d=google.com; s=arc-20160816; b=Y23dDx3n/uhBcKPXkuE9QUuDiBrsRCb4G6f1Sl/Ps0p9KpQKkXYscYPEfyTOphMs8h sAfgBc5OGw2G7SmIcZmCflERnzNkvxXcDpfWPhPIOoejICNAY7XY+9UcV4zn0ACieOuF d2K+11lH/6Z9UgqmhmtS6taEqz5S/nOMVbuPjjGfd6M4E9S5pp8uXkRhmewT+Qs9/ttV cAUR5p0GpY5Z442qDYZ7LAi1/98DsG4MoInqyo1lSXzZ4FA/XqdtjnNATu9exvUQAVAN 0apsUrR0PAMiF21FSVDuGY/0G78gP0ZQDpC3FRBJdVS1jnLiey5jjKmhB6Yy8yNMbJ0l dYvA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:content-language:accept-language :message-id:date:thread-index:thread-topic:subject:cc:to:from; bh=0uibw2WCgfCnb18i+8RwvUUHMU+2xtcMcjP/xcb+j84=; fh=CrDPfPlgkeovG7op10fbcGzHGY6r1dnuK3p4aI6pv3Y=; b=o08Jj7FxKZpp0rNwIJH/e2+3rEAjtPcgXDP0ewkpp1bwvrzcvr/Fw76103r1QKjT7h v9FYE8b6emBG1JgNBmNh6qzLXq8J7V6rIxcP2J6NAfZIFHt1jtiS+eH/pJUnQKI279SK yJZSJAoRA2jiGw31a8f29IgqRkLiNt3QgHLksVOoreuM+C1Mj3D5zffOzzqIPzy/zfhy 7NbezymuxLgkd20xe8gsMFQExN9D907rGNJP5kybmJ2Libc+UgArTPNm+C41ruo9FJFK aBOu+e7SApDeWIwINzmdKzoKOEYEbTFY1qNyvWTGZmJrzs0aoT4LoCIPkadhGImlBSQ4 mpNg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=actia.se); spf=pass (google.com: domain of linux-kernel+bounces-86582-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86582-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id k11-20020a508acb000000b00564432b527dsi476851edk.551.2024.02.29.02.53.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 02:53:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-86582-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=actia.se); spf=pass (google.com: domain of linux-kernel+bounces-86582-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86582-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 5B7211F2500E for ; Thu, 29 Feb 2024 10:53:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 37FD87A72A; Thu, 29 Feb 2024 10:53:28 +0000 (UTC) Received: from mail.actia.se (mail.actia.se [212.181.117.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6DE4F79DCF; Thu, 29 Feb 2024 10:53:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.181.117.226 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709204007; cv=none; b=nI7ZAHuERxihbUKQ4gdMB2F2EImRvq6Ln7rjDYCOHvfkvFaIxPDdKMQDmimKkz+Vbcvg3nTTbi5mld9n3mAeS0jllGCFQarStTdzkAwBVGxWeguBVR2LSjjurwzHmbo4bMjeW65tWyquscH5oD8/XN8CKG55eWdj2wHODfAdoXI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709204007; c=relaxed/simple; bh=o7cbmOCpAyj2Lh1VjiptfXjVn33mIRYdRiUPQYlEcn8=; h=From:To:CC:Subject:Date:Message-ID:Content-Type:MIME-Version; b=MIsYusJujqmD5K6ob0r01Ms/A/ss/DKBRMiTo7rSx/kWd2Q0u9QuWYapb/Fnoj/N82DKYMgdHsGS96pSrbo9xOhsyiYIK4X3sROp6U+y+bk3OsQkqciP2PWrPrrXz8O9Fb9Zq4oRp7BSbwRHqrQhbSjVxpf2MvUIrWHHFEnDkfk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=actia.se; spf=pass smtp.mailfrom=actia.se; arc=none smtp.client-ip=212.181.117.226 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=actia.se Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=actia.se Received: from S036ANL.actianordic.se (10.12.31.117) by S036ANL.actianordic.se (10.12.31.117) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 29 Feb 2024 11:53:15 +0100 Received: from S036ANL.actianordic.se ([fe80::e13e:1feb:4ea6:ec69]) by S036ANL.actianordic.se ([fe80::e13e:1feb:4ea6:ec69%4]) with mapi id 15.01.2507.035; Thu, 29 Feb 2024 11:53:15 +0100 From: John Ernberg To: Wei Fang CC: Shenwei Wang , Clark Wang , NXP Linux Team , "David S. Miller" , Eric Dumazet , Jakub Kicinski , "Paolo Abeni" , Heiner Kallweit , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , John Ernberg Subject: [PATCH net v2 0/2] net: fec: Fixes to suspend / resume with mac_managed_pm Thread-Topic: [PATCH net v2 0/2] net: fec: Fixes to suspend / resume with mac_managed_pm Thread-Index: AQHaav1+R0XAsBAPyEuuMQx/2+BDqQ== Date: Thu, 29 Feb 2024 10:53:14 +0000 Message-ID: <20240229105256.2903095-1-john.ernberg@actia.se> Accept-Language: en-US, sv-SE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.43.0 x-esetresult: clean, is OK x-esetid: 37303A2958D72955637266 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Since the introduction of mac_managed_pm in the FEC driver there were some discrepancies regarding power management of the PHY. This failed on our board that has a permanently powered Microchip LAN8700R attached to the FEC. Although the root cause of the failure can be traced back to f166f890c8f0 ("net: ethernet: fec: Replace interrupt driven MDIO with polled IO") and probably even before that, we only started noticing the problem going from 5.10 to 6.1. Since 557d5dc83f68 ("net: fec: use mac-managed PHY PM") is actually a fix to most of the power management sequencing problems that came with power managing the MDIO bus which for the FEC meant adding a race with FEC resume (and phy_start() if netif was running) and PHY resume. That it worked before for us was probably just luck... Thanks to Wei's response to my report at [1] I was able to pick up his patch and start honing in on the remaining missing details. [1]: https://lore.kernel.org/netdev/1f45bdbe-eab1-4e59-8f24-add177590d27@ac= tia.se/ v2: - Completely different approach that should be much more correct (Wei Fang, Jakub Kucinski) - Re-target to net tree, because I have fixes tags now v1: https://lore.kernel.org/netdev/20240212105010.2258421-1-john.ernberg@ac= tia.se/ John Ernberg (1): net: fec: Suspend and resume the PHY Wei Fang (1): net: fec: Set mac_managed_pm during probe drivers/net/ethernet/freescale/fec_main.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) --=20 2.43.0