[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5ba6bbf2-52e4-49d0-b6e2-134fb25ebe4c@lunn.ch>
Date: Thu, 9 Jan 2025 16:59:46 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Basharath Hussain Khaja <basharath@...thit.com>
Cc: danishanwar@...com, rogerq@...nel.org, andrew+netdev@...n.ch,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, robh@...nel.org, krzk+dt@...nel.org,
conor+dt@...nel.org, nm@...com, ssantosh@...nel.org,
tony@...mide.com, richardcochran@...il.com, parvathi@...thit.com,
schnelle@...ux.ibm.com, rdunlap@...radead.org,
diogo.ivo@...mens.com, m-karicheri2@...com, horms@...nel.org,
jacob.e.keller@...el.com, m-malladi@...com,
javier.carrasco.cruz@...il.com, afd@...com, s-anna@...com,
linux-arm-kernel@...ts.infradead.org, netdev@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-omap@...r.kernel.org, pratheesh@...com, prajith@...com,
vigneshr@...com, praneeth@...com, srk@...com, rogerq@...com,
krishna@...thit.com, pmohan@...thit.com, mohan@...thit.com
Subject: Re: [RFC PATCH 02/10] net: ti: prueth: Adds ICSSM Ethernet driver
> + emac->phy_node = of_parse_phandle(eth_node, "phy-handle", 0);
> + if (!emac->phy_node) {
> + dev_err(prueth->dev, "couldn't find phy-handle\n");
> + ret = -ENODEV;
> + goto free;
> + }
> +
> + ret = of_get_phy_mode(eth_node, &emac->phy_if);
> + if (ret) {
> + dev_err(prueth->dev, "could not get phy-mode property err %d\n",
> + ret);
> + goto free;
> + }
> +
> + /* connect PHY */
> + emac->phydev = of_phy_connect(ndev, emac->phy_node,
> + &icssm_emac_adjust_link, 0, emac->phy_if);
> + if (!emac->phydev) {
> + dev_dbg(prueth->dev, "couldn't connect to phy %s\n",
> + emac->phy_node->full_name);
> + ret = -EPROBE_DEFER;
> + goto free;
> + }
of_phy_get_and_connect() will simplify this.
> + /* remove unsupported modes */
> + phy_remove_link_mode(emac->phydev, ETHTOOL_LINK_MODE_10baseT_Half_BIT);
> + phy_remove_link_mode(emac->phydev, ETHTOOL_LINK_MODE_10baseT_Full_BIT);
It only does 100Mbps?
> + if (of_property_read_bool(eth_node, "ti,no-half-duplex")) {
Is this becasue 100baseT_Half is broken in some versions of the
hardware?
> + phy_remove_link_mode(emac->phydev,
> + ETHTOOL_LINK_MODE_100baseT_Half_BIT);
> + }
> +
> + phy_remove_link_mode(emac->phydev, ETHTOOL_LINK_MODE_Pause_BIT);
> + phy_remove_link_mode(emac->phydev, ETHTOOL_LINK_MODE_Asym_Pause_BIT);
Is this really needed? I've not checked, but if you don't call
phy_support_sym_pause() or phy_support_asym_pause(), i would of
expected phylib to default to no pause?
> +static const struct of_device_id prueth_dt_match[];
Please avoid forward references. If you need the match table, define
it here.
Andrew
Powered by blists - more mailing lists