AW: [PATCH v2 2/3] phy: Realtek Otto SerDes driver
markus.stockhausen at gmx.de
markus.stockhausen at gmx.de
Fri Oct 11 09:10:48 PDT 2024
> -----Ursprüngliche Nachricht-----
> Von: Krzysztof Kozlowski <krzk at kernel.org>
> Gesendet: Montag, 7. Oktober 2024 21:32
> An: Markus Stockhausen <markus.stockhausen at gmx.de>; linux-phy at lists.infradead.org; chris.packham at alliedtelesis.co.nz; devicetree at vger.kernel.org
> Betreff: Re: [PATCH v2 2/3] phy: Realtek Otto SerDes driver
> ..
> > +static ssize_t rtsds_dbg_reset_write(struct file *file, const char __user *userbuf,
> > + size_t count, loff_t *ppos)
> > +{
> > + struct seq_file *seqf = file->private_data;
> > + struct rtsds_macro *macro = dev_get_drvdata(seqf->private);
> > + struct rtsds_ctrl *ctrl = macro->ctrl;
> > + int ret, reset, sid = macro->sid;
> > +
> > + ret = kstrtou32_from_user(userbuf, count, 10, &reset);
> > + if (ret || reset != 1)
> > + return ret;
> > +
> > + rtsds_phy_reset_int(ctrl, sid);
> > +
> > + return count;
> > +}
> > +DEFINE_SHOW_STORE_ATTRIBUTE(rtsds_dbg_reset);
>
> That's not a debugfs interface. Drop reset.
>
Hi Krzysztof,
thanks for all your feedback and kickstarting me into this all. I went back to
the drawing board. A overhauled version will be available over the weekend.
Regarding the debug interface I have a question left:
The current state of exploration and understanding of the four different SoCs
boils down that 3 debug writing functions will improve further testing and
development very much.
- reset SerDes -> used to compensate for link hangs (because of wrong firmware)
- change mode -> I will change it so it will only accept supported modes
- modify registers -> I can go without that.
One may ask why? There are a lot of different devices out there and I have only
one of each series. So if the driver provides this debugging flexibility users
(especially of OpenWrt) can assist in analyzing/testing without complete rebuilds.
What will be the way forward here without dropping the code?
Last but not least: I expect the v3 version to have ~1/3 of the code changed.
Shall I still give this a v3 tag?
Best regards.
Markus
More information about the linux-phy
mailing list