From nobody Mon Feb 9 21:20:47 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB5B01DF73D for ; Mon, 5 May 2025 08:43:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746434630; cv=none; b=IgheLYMfqUlnrEMpbzvS7K/9fp8MLi3Ml2nq1oiuXtflkWReF1y2tW51o7v5PbxGpY+gHY2XeWtWLwyl7Frn3Obvn3wVQKacOu5kDQstKek+mgz8Md6MYe8TZWcNCR75tlos3iz473Ibj1m6lv4lRfpCiQBtuchnzw61mQBB/kU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746434630; c=relaxed/simple; bh=EKrdrdjRyLeoPTwBO7+5pjftSljEtQ9GICzVJzj1620=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cz4wz5c9blUTUDSVPAzYhN7GVXSp8kAillgXXZZt0KJImnMCODrmFAVHzAZd1jDfji00Im6kPYVz5ka5/tlTNeQuPZTGSeukLshbCGw7oRX8iome2R3fAVfcY+5cmUoFYP5vZ2/s/kWOdOzf6EryJRx8sjtpchR5M1OqKOgkLoo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1uBrQN-0005W7-Al; Mon, 05 May 2025 10:43:43 +0200 Received: from dude04.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::ac]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uBrQM-001CSB-1E; Mon, 05 May 2025 10:43:42 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1uBrQM-003SPv-0x; Mon, 05 May 2025 10:43:42 +0200 From: Oleksij Rempel To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Woojung Huh , Andrew Lunn , Russell King , Thangaraj Samynathan , Rengarajan Sundararajan Cc: Oleksij Rempel , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com, Phil Elwell , Maxime Chevallier , Simon Horman Subject: [PATCH net-next v8 2/7] net: usb: lan78xx: remove explicit check for missing PHY driver Date: Mon, 5 May 2025 10:43:36 +0200 Message-Id: <20250505084341.824165-3-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250505084341.824165-1-o.rempel@pengutronix.de> References: <20250505084341.824165-1-o.rempel@pengutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" RGMII timing correctness relies on the PHY providing internal delays. This is typically ensured via PHY driver, strap pins, or PCB layout. Explicitly checking for a PHY driver here is unnecessary and non-standard. This logic applies to all MACs, not just LAN78xx, and should be left to phylib, phylink, or platform configuration. Drop the check and rely on standard subsystem behavior. Signed-off-by: Oleksij Rempel Reviewed-by: Thangaraj Samynathan --- changes v6: - this patch is added in v6 --- drivers/net/usb/lan78xx.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c index 19db18cf0504..9c0658227bde 100644 --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c @@ -2543,10 +2543,6 @@ static struct phy_device *lan7801_phy_init(struct la= n78xx_net *dev) if (ret < 0) return ERR_PTR(ret); } else { - if (!phydev->drv) { - netdev_err(dev->net, "no PHY driver found\n"); - return ERR_PTR(-EINVAL); - } dev->interface =3D PHY_INTERFACE_MODE_RGMII_ID; /* The PHY driver is responsible to configure proper RGMII * interface delays. Disable RGMII delays on MAC side. --=20 2.39.5