From nobody Sat Oct 11 12:07:01 2025 Received: from out-186.mta0.migadu.com (out-186.mta0.migadu.com [91.218.175.186]) (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 552FC28D8C2 for ; Tue, 10 Jun 2025 23:31:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.186 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749598316; cv=none; b=Ho5AbfaeKWu3M11iEELVACI0m+i/rBviYwqFXhJVNm3PkLg9OOVQOHqhVgfR1As0qJjQiesP/v/jrgfE2Pv9gfRZPHc1/3M4qbsAPakryqxltr+lhHpYs4/gzPy3uvDseH6gRCpmdit2uURvyKQqCQK73+deXsjYDSQaq+olGuU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749598316; c=relaxed/simple; bh=BpOPhhUmAooZYi+vtPLF6RqGxViWB1xQigFxs2AIdyE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=alNWl+uEtjLA4gQ5zxvAK7A00xrnydq67VDeYZNzd2bekbR02oaLi/iJc7mE5Q4dEL39mHJWHu2XvhLCu5a1Klw9SRW6gUjy2rUaVEuFRSqViCp1mZFnmW23DpLV75WbkGD6USEt/LS/rza+VXhahfGitUkdQpJOj379DI1PC5g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=SI9NIXMH; arc=none smtp.client-ip=91.218.175.186 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="SI9NIXMH" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1749598312; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=c9huAoqeTCtycjuquWPGnK4R6jNSfK5c2rVHkBsZ7MU=; b=SI9NIXMHE6fgC7/YWM1A+Q5xVM2vb4lTDWWhaPWiHkeMNMRwnEnLFhQtByvMLTZyVD6ACU zIAGMG6eYnyjeLMAEAsadeDAxH58zkwQMYmnbCUaqKtSicCYSZqZ4wDkaAULsRqu5l+RUQ D8H+AZ+20urvf5UkR24PcuOQxZZDOHA= From: Sean Anderson To: netdev@vger.kernel.org, Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Russell King Cc: Vineeth Karumanchi , Heiner Kallweit , linux-kernel@vger.kernel.org, Kory Maincent , Daniel Golle , Simon Horman , Christian Marangi , Lei Wei , Vladimir Oltean , Sean Anderson , Alexandre Belloni , Claudiu Manoil , UNGLinuxDriver@microchip.com Subject: [net-next PATCH v6 04/10] net: dsa: ocelot: suppress PHY device scanning on the internal MDIO bus Date: Tue, 10 Jun 2025 19:31:28 -0400 Message-Id: <20250610233134.3588011-5-sean.anderson@linux.dev> In-Reply-To: <20250610233134.3588011-1-sean.anderson@linux.dev> References: <20250610233134.3588011-1-sean.anderson@linux.dev> 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-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" From: Vladimir Oltean This bus contains Lynx PCS devices, and if the lynx-pcs driver ever decided to call mdio_device_register(), it would fail due to mdiobus_scan() having created a dummy phydev for the same address (the PCS responds to standard clause 22 PHY ID registers and can therefore by autodetected by phylib which thinks it's a PHY). On the Seville driver, things are a bit more complicated, since bus creation is handled by mscc_miim_setup() and that is shared with the dedicated mscc-miim driver. Suppress PHY scanning only for the Seville internal MDIO bus rather than for the whole mscc-miim driver, since we know that on NXP T1040, this bus only contains Lynx PCS devices. Signed-off-by: Vladimir Oltean Signed-off-by: Sean Anderson --- (no changes since v1) drivers/net/dsa/ocelot/felix_vsc9959.c | 4 ++++ drivers/net/dsa/ocelot/seville_vsc9953.c | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelo= t/felix_vsc9959.c index 7b35d24c38d7..087d368a59e0 100644 --- a/drivers/net/dsa/ocelot/felix_vsc9959.c +++ b/drivers/net/dsa/ocelot/felix_vsc9959.c @@ -1001,6 +1001,10 @@ static int vsc9959_mdio_bus_alloc(struct ocelot *oce= lot) bus->read_c45 =3D enetc_mdio_read_c45; bus->write_c45 =3D enetc_mdio_write_c45; bus->parent =3D dev; + /* Suppress PHY device creation in mdiobus_scan(), + * we have Lynx PCSs + */ + bus->phy_mask =3D ~0; mdio_priv =3D bus->priv; mdio_priv->hw =3D hw; /* This gets added to imdio_regs, which already maps addresses diff --git a/drivers/net/dsa/ocelot/seville_vsc9953.c b/drivers/net/dsa/oce= lot/seville_vsc9953.c index eb3944ba2a72..28bcdef34a6c 100644 --- a/drivers/net/dsa/ocelot/seville_vsc9953.c +++ b/drivers/net/dsa/ocelot/seville_vsc9953.c @@ -901,6 +901,11 @@ static int vsc9953_mdio_bus_alloc(struct ocelot *ocelo= t) return rc; } =20 + /* Suppress PHY device creation in mdiobus_scan(), + * we have Lynx PCSs + */ + bus->phy_mask =3D ~0; + /* Needed in order to initialize the bus mutex lock */ rc =3D devm_of_mdiobus_register(dev, bus, NULL); if (rc < 0) { --=20 2.35.1.1320.gc452695387.dirty