[PATCH v2 1/8] phy: generic: add error trace to detect PHY issue in uclass
Patrick DELAUNAY
patrick.delaunay at st.com
Fri Feb 21 15:37:19 CET 2020
Hi Marek,
> From: Marek Vasut <marex at denx.de>
> 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
More information about the U-Boot
mailing list