From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (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 66C04E572; Wed, 17 Apr 2024 09:29:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713346178; cv=none; b=EI6liq/zmddVUafUZSN7/4Ro/BkGKw1Sfotnshkx03Ozvpa+HkNiIaVGC4E5X84Ay7FxSMoY37M9pE82HPKW+moQceFUbID1NtkCX7V/I20xO50KsxphiXkz0nGwz+1Tk571nCHJxiyrrFrd81mNnSuZJTRiveYRymUbyBt0sb0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713346178; c=relaxed/simple; bh=dAfMsMXvSUEMSWs22Y7XybMcFB2joyu4CM9IB29HTNY=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=ecSsszWEBfngpLzp0pZ3A2Br2nGK4ojo76/MvIiaKnQ/4LiRoF2abKzqtB16LgDBCCoHPdWiKapo19qVJNP0H5p+J2hIDHXkj9jDGEilDe7S9dxaQX21ltuqWW0zNMBiXWBJrj1YH4C/HLv8Vzub7/6q5ChFFioodnKaF1omGmc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=mhwQPRAl; arc=none smtp.client-ip=217.70.183.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="mhwQPRAl" Received: by mail.gandi.net (Postfix) with ESMTPSA id C1E9040003; Wed, 17 Apr 2024 09:29:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1713346173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=j3i344ERuSxhSsjZp4G790f+W4T/PKZQWnrVfudLzaQ=; b=mhwQPRAl2eAxgm367WvffpWd2HLo4U9HRWSem6zyjyJ4qTy+wDutGvj550D/e+ToldascP mD6PDSlmlwsqRAAIdY2F5HL1J0VuFuLEQXBXpASBgc773GYY2DIeruPSNIfeZQgLz38wtZ HPlxt9dfu/J813/WWZTz3dXqSN2KlTIhVzpOAxRCdML9ylMtidCRvcduhqxpZ3eFivDi1j jY2w1UyhmXOEXZ9i9CXjnOYwblYD1bhYgHrJtqKMyBjjZv543catHdGXquiH5xY9anoTkQ U2pWEoVvcXWgV56po0F7Nm0O6rq3tBf7xnpDjIY2GUT2bDaIdLIcnqWxRzixyg== Date: Wed, 17 Apr 2024 11:30:09 +0200 (CEST) From: Romain Gantois To: Serge Semin cc: Romain Gantois , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Magnus Damm , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Russell King , =?ISO-8859-15?Q?Cl=E9ment_L=E9ger?= , Thomas Petazzoni , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, "Russell King (Oracle)" , Maxime Chevallier Subject: Re: [PATCH net-next v3 2/5] net: stmmac: introduce pcs_init/pcs_exit stmmac operations In-Reply-To: <42chuecdt7dpgm6fcrtt2crifvv5hflmtnmdrw5fvk3r7pwjgu@hlcv56dbeosf> Message-ID: <77722ced-4956-0e70-9492-c7b2e8557253@bootlin.com> References: <20240415-rzn1-gmac1-v3-0-ab12f2c4401d@bootlin.com> <20240415-rzn1-gmac1-v3-2-ab12f2c4401d@bootlin.com> <42chuecdt7dpgm6fcrtt2crifvv5hflmtnmdrw5fvk3r7pwjgu@hlcv56dbeosf> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-GND-Sasl: romain.gantois@bootlin.com Hi Serge, On Tue, 16 Apr 2024, Serge Semin wrote: > I am currently working on my Memory-mapped DW XPCS patchset cooking: > https://lore.kernel.org/netdev/20231205103559.9605-1-fancer.lancer@gmail.com/ > The changes in this series seems to intersect to what is/will be > introduced in my patchset. In particular as before I am going to > use the "pcs-handle" property for getting the XPCS node. If so what > about collecting PCS-related things in a single place. Like this: > > int stmmac_xpcs_setup(struct net_device *ndev) > { > ... > > if (priv->plat->pcs_init) { > return priv->plat->pcs_init(priv); /* Romain' part */ > } else if (fwnode_property_present(priv->plat->port_node, "pcs-handle")) { > /* My DW XPCS part */ > } else if (priv->plat->mdio_bus_data && priv->plat->mdio_bus_data->has_xpcs) { > /* Currently implemented procedure */ > } > > ... > } That seems like a good idea to me, although those setup functions would have to be renamed to stmmac_pcs_setup/exit. Thanks, -- Romain Gantois, Bootlin Embedded Linux and Kernel engineering https://bootlin.com