lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 17 May 2020 22:51:50 +0200
From:   Andrew Lunn <>
To:     Chris Healy <>
Cc:     David Miller <>,
        netdev <>,
        Florian Fainelli <>,
        Heiner Kallweit <>,
        Michal Kubecek <>
Subject: Re: [PATCH net-next 4/7] net: phy: marvell: Add support for
 amplitude graph

> > +static int marvell_vct5_amplitude_distance(struct phy_device *phydev,
> > +                                          int meters)
> > +{
> > +       int mV_pair0, mV_pair1, mV_pair2, mV_pair3;
> > +       int distance;
> > +       u16 reg;
> > +       int err;
> > +
> > +       distance = meters * 1000 / 805;
> With this integer based meters representation, it seems to me that we
> are artificially reducing the resolution of the distance sampling.
> For a 100 meter cable, the Marvell implementation looks to support 124
> sample points.  This could result in incorrect data reporting as two
> adjacent meter numbers would resolve to the same disatance value
> entered into the register.  (eg - 2 meters = 2 distance  3 meters = 2
> distance)
> Is there a better way of doing this which would allow for userspace to
> use the full resolution of the hardware?

Hi Chris

I don't see a simple solution to this.

PHYs/vendors seem to disagree about the ratio. Atheros use
824. Marvell use 805. I've no idea what Broadcom, aQuantia uses. We
would need to limit the choice of step to multiples of whatever the
vendor picks as its ratio. If the user picks a step of 2m, the driver
needs to return an error and say sorry, please try 2.488 meter steps
for Marvell, 2.427 meter steps on Atheros, and who knows what for
Broadcom. And when the user requests data just for 1-25 meters, the
driver needs to say sorry, try again with 0.824-24.62, or maybe
0.805-24.955. That is not a nice user experience.

It is easy for you to disable this conversion. Do you see a noticeable
difference in the quality of the results?


Powered by blists - more mailing lists