Article View: linux.kernel.netdev
Article #21609Re: [PATCH net] net: ibm: emac: attach the fixed-link PHY with of_phy_connect()
From: Linkui Xiao
Date: Tue, 24 Nov 2026 08:39
Date: Tue, 24 Nov 2026 08:39
38 lines
10205 bytes
10205 bytes
Hi Andrew, Thanks for the review. > The whole point of fixed-link is that it works like a real PHY. You > should not special case it other than when creating it and destroying > it. You should call phy_start/phy_stop. When start is called, phylib > will call the adjust link callback, same as a real PHY, and setup the > MAC as needed. Done. v3 drops both the hand called emac_adjust_link() and v2's phy_read_status(): the fixed PHY is attached with of_phy_connect() and started with phy_start(), and phylib resolves the link and calls the callback. phy_stop() comes from phy_disconnect() in emac_remove() and on the probe error path. The only special casing left is creating and destroying the fixed PHY. phy_start() stays in emac_init_phy() rather than moving to emac_open(), because that is where this driver already starts the phy-handle PHY (emac_mdio_init_phy()). Moving only the fixed link to open/close would special case it again, and moving both paths is a larger change to code I cannot test here. Say the word and I will send that to net-next separately. I was wrong that a fixed link has no reason to run the state machine. emac_adjust_link() does not program the MAC either, it only copies speed, duplex and pause into dev->phy, which emac_configure() reads at open. phy_start() is called from emac_init_phy(), before register_netdev(), so the state machine is queued before userspace can bring the interface up. v3 is posted as a new thread. Cross compiled for powerpc out of ppc44x_defconfig with W=1, clean. No hardware here, so no runtime test. Thanks, Linkui
Technical Details
Message-ID:
<20261124083957.2480682-1-xiaolinkui@126.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370116-linux-kernel-netdev=dewy.ruReferences:
<20261112075321.3903875-1-xiaolinkui@126.com> <ef2eb733-4b94-4c2e-9165-0b324733a482@lunn.ch> <20261123091012.730441-1-xiaolinkui@126.com> <4ed4f82b-3ff8-467b-9127-bdc29d498ae4@lunn.ch>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370116-linux-kernel-netdev=dewy.ru From: xiaolinkui@126.com (Linkui Xiao) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net] net: ibm: emac: attach the fixed-link PHY with of_phy_connect() Date: Tue, 24 Nov 2026 16:39:57 +0800 Organization: Usenet Network Message-ID: <20261124083957.2480682-1-xiaolinkui@126.com> References: <20261112075321.3903875-1-xiaolinkui@126.com> <ef2eb733-4b94-4c2e-9165-0b324733a482@lunn.ch> <20261123091012.730441-1-xiaolinkui@126.com> <4ed4f82b-3ff8-467b-9127-bdc29d498ae4@lunn.ch> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="4091163"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:3MlswfoA8k2yNeHRc47kvetBbkM= sha256:0R0N4vrsVijDjUha6TrKtdBydTnx2yiaGwo77oM09LE= sha1:QxPEoV1F2YM8ln0WB7tIg6PNM/E= sha256:xve5X5ruEj9a+gm+2LV8XNorQHvrybCKhhFSzdaL3Wc= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 29FEE125DE3; Tue, 24 Nov 2026 11:41:20 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.048 X-Spam-Status: No, score=-3.048 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=126.com X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Cbtggm57UH3x; Tue, 24 Nov 2026 11:41:17 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-370116-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=126.com X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id D9081125DD7; Tue, 24 Nov 2026 11:41:08 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id BC91D24174; Tue, 24 Nov 2026 08:41:06 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795509666; b=HCQ13yZ4HDBBU/HZmpHKf2O0/xksPpxUKMis6gsQ4T6c1cQvyw8nkDrvOFQsjGxWMtx9 QCUSsmBhN2Lqiww7O9HPFPOvoBVaGRYz2HBfXGNzOccRds6KzSqdloePWvP5Cw4lj4Cug JaXe+aVx/fkwcQyHZUjkyVIjntkprtAapFD9S0lrRnQyEu6MtPg2QmOcxmRG/7jMWbxlc qdWqUY1LyTClEgvIUh006SOOExpR8KpNJ+DmM8QQnA87s9FC69Pi6sD41aq7WIcdO3wfj +6gZpKioE3CsQrblm6fPDwEW+E2ug1YpyrMnuq/XbczywV8K0UY/LRe3Hisnq5i2u4Q== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795509666; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:From:To: Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To:References: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Transfer-Encoding:X-CM-TRANSID:X-Coremail-Antispam: X-CM-SenderInfo; bh=LLFwVtKDDdrBbmQl5AzXD5u/y9ekHppzu7EmZ71WArU=; b=poMtaQtDOEneuC1p94PKrrkTz6ppM2T0Kp2HDlfojXVMWk1Rnv0Vs8bd/kXlZthKtTpt HnyTt9OCIU0+YsBf0mZKkJx3ESMxFAYRjWXVbG7HMpaO7oqFH8leGZ0ebCqx6vtP523Ns 2fpVe5Wv0dd543FvBQ0YmzFInBFEfKtiIiNvippbij/xWj+0Sq6Nj3iJBpwwoK83BS6UD KJ4G/F9TcRN0Jje17vQmZUiazUxaFS5XcG9T2QGW+kq/vh7syt6EDzeq/gj2TfwiqBUSV bFzjAjxWP/3dt8J7ijfPPYXdIJqo8kNWisexs0NQl3PE1L5ASIGINWdWlHzrDH3jFSw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=126.com header.i=@126.com header.a=rsa-sha256 header.s=s110527 header.b=OwF9OGky; dmarc=pass header.from=126.com; spf=pass smtp.mailfrom=126.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 13C4D606A681; Tue, 24 Nov 2026 08:41:06 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=126.com header.i=@126.com header.a=rsa-sha256 header.s=s110527 header.b=OwF9OGky X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=117.135.210.8 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795509655; b=RkyJNa47jkgo2gfG7wDt2ehOJQu4ncmRh1eiH7txxqZ54npwsx8q46lnopUFqUgnNmEv iQU1wZmkMsa3LrdNW6Q6V4ENaWlvsgX2It84daVmglZbv3DPzbMj/5ceNn+rKOYlStLQt XNBh0F65XUkP4OqjalWsliELPp+g2cglIj9izrJofN+XpP8ooiQ6nyUHnzK+z3UlU8vXj t5HMdMTvK5BpKgUZ2an5BsN9bDxCPFssdXx6F7ozvO/CJ8qzwLQwQoYIndZNcneeKLL5w chDqkhoQIYZdS3nT07q0BtQwBLEdkgUATRQWU1vH5TJXnuMx0BRtTyMD1Jd8o6BDUzg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795509655; h=DMARC-Filter:DKIM-Signature:Received:From:To:Cc:Subject:Date: Message-Id:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-CM-TRANSID:X-Coremail-Antispam: X-CM-SenderInfo; bh=LLFwVtKDDdrBbmQl5AzXD5u/y9ekHppzu7EmZ71WArU=; b=FgJdTXIAsiiogqlnS1X4lZe3E6jd8rfDtq83b42IQF3Ba96fpLAz0HfNKeMSjtdl5aqZ bm3Z2/InLn25u98ZFg36BsJBjz1VT6ZsUITB9IpNmDCeLqZLkwEujKwCeF8UXCwtkn2mX r5z/jxzjYkt2Mdm8dcg+uuSx/BRbCu4RDY1IaI7FqjQJ1yh2yoEjbklO96uh+S6TGsHxC 07QEknZUnxTNkkX5Gwe9O6SQEMS+B+nNhI4DvFlRzFzGoniZuz+V408BZIbH2NF/AtkiW h7BfRV5CCV9fYHAawzNiKjr6mOsiqJSG1Gy0AH9GlmiJHXyH6fAP2fETOs7rLfCHc5Q== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=126.com; spf=pass smtp.mailfrom=126.com; dkim=pass header.d=126.com header.i=@126.com header.a=rsa-sha256 header.s=s110527 header.b=OwF9OGky; arc=none smtp.remote-ip=117.135.210.8 X-Received: from m16.mail.126.com (m16.mail.126.com [117.135.210.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 05F05606A69B; Tue, 24 Nov 2026 08:40:53 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 05F05606A69B X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=126.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=126.com X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=LL FwVtKDDdrBbmQl5AzXD5u/y9ekHppzu7EmZ71WArU=; b=OwF9OGkyhkG4KRk9wT IqleHjt3Uu/TnTZv1VP45tgekaaMeCZMLO5UwM8BZmrYuSpAaIr+PJtbbnLnQLIl TmVXmsK/6J4N3WfrJLDysx0fPrmIj72dhIyw7xZFXEYgIGPoBqlPtb3SHd17MbPN yuc9O6r6AJ9L3Ic7KqfvWb13E= X-Received: from localhost.localdomain (unknown []) by gzsmtp4 (Coremail) with SMTP id PykvCgD3_8VfTQVrT2gGEA--.38055S2; Tue, 24 Nov 2026 16:39:59 +0800 (CST) X-Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, rosenp@gmail.com, jacob.e.keller@intel.com, daniel.machon@microchip.com, chunkeey@gmail.com, kees+treewide@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Linkui Xiao <xiaolinkui@kylinos.cn> X-Mailer: git-send-email 2.25.1 X-In-Reply-To: <4ed4f82b-3ff8-467b-9127-bdc29d498ae4@lunn.ch> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-CM-TRANSID: PykvCgD3_8VfTQVrT2gGEA--.38055S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxJF1rtr47Xw17uF1DurW3Jrb_yoW8Wr4kpF W2q3WDWrs5JF4IvFnrC3y8Cr9akF1kJFWjyryrGrW5AF98Gr12qrZrK3y2yFW5C3Z5Gryj vw48JasxXa93taDanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0zE_Ma3UUUUU= X-CM-SenderInfo: p0ld0z5lqn3xa6rslhhfrp/xtbBlR+GXWsFTV9h0gAA3e