From: Patrick DELAUNAY Date: Fri, 21 Feb 2020 14:37:19 +0000 Subject: [PATCH v2 1/8] phy: generic: add error trace to detect PHY issue in uclass In-Reply-To: <8bd74f07-98a0-4ca7-d189-a55c01ce08a1@denx.de> References: <20200218083836.6369-1-patrick.delaunay@st.com> <8bd74f07-98a0-4ca7-d189-a55c01ce08a1@denx.de> Message-ID: <2dee9efe9c034d0cad4076b946ddb3ef@SFHDAG6NODE3.st.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Marek, > From: Marek Vasut > Sent: mardi 18 f?vrier 2020 18:40 > > On 2/18/20 9:38 AM, Patrick Delaunay wrote: > [...] > > static inline struct phy_ops *phy_dev_ops(struct udevice *dev) { @@ > > -109,56 +110,86 @@ int generic_phy_get_by_name(struct udevice *dev, > > const char *phy_name, int generic_phy_init(struct phy *phy) { > > struct phy_ops const *ops; > > + int ret; > > > > if (!phy) > > return 0; > > ops = phy_dev_ops(phy->dev); > > > > - return ops->init ? ops->init(phy) : 0; > > + ret = ops->init ? ops->init(phy) : 0; > > if (!ops->init) > return 0; > ret = ops->init(); > if (ret) > dev_err... > > return ret; > > Please fix globally. Yes it is more clear, I am the v3 serie > > + if (ret) > > + dev_err(phy->dev, "PHY: Failed to init %s: %d.\n", > > + phy->dev->name, ret); > > + > > + return ret; > [...] Regards, Patrick