lists.openwall.net   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  linux-cve-announce  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]
Message-ID: <159283268232.1456598.9115634655953641273@kwain>
Date:   Mon, 22 Jun 2020 15:31:22 +0200
From:   Antoine Tenart <antoine.tenart@...tlin.com>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     davem@...emloft.net, f.fainelli@...il.com, hkallweit1@...il.com,
        richardcochran@...il.com, alexandre.belloni@...tlin.com,
        UNGLinuxDriver@...rochip.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, thomas.petazzoni@...tlin.com,
        allan.nielsen@...rochip.com, foss@...il.net
Subject: Re: [PATCH net-next v3 6/8] net: phy: mscc: timestamping and PHC support

Hi Andrew,

Quoting Andrew Lunn (2020-06-20 17:21:42)
> > +     /* Retrieve the shared load/save GPIO. Request it as non exclusive as
> > +      * the same GPIO can be requested by all the PHYs of the same package.
> > +      * Ths GPIO must be used with the phc_lock taken (the lock is shared
> > +      * between all PHYs).
> > +      */
> > +     vsc8531->load_save = devm_gpiod_get_optional(&phydev->mdio.dev, "load-save",
> > +                                                  GPIOD_FLAGS_BIT_NONEXCLUSIVE |
> > +                                                  GPIOD_OUT_LOW);
> > +     if (IS_ERR(vsc8531->load_save)) {
> > +             phydev_err(phydev, "Can't get load-save GPIO (%ld)\n",
> > +                        PTR_ERR(vsc8531->load_save));
> > +             return PTR_ERR(vsc8531->load_save);
> > +     }
> > +
> 
> I can understand the GPIO being optional, it is only needed when PTP
> is being used. But i don't see a test anywhere that when PTP is being
> used the GPIO is provided. What actually happens if it is missing and
> somebody tries to use the PTP?

Not much would happen, the time set/get wouldn't be correct.

> Maybe only register the PTP parts with the core if the GPIO has been
> found in DT?

It's not easy, as some versions of the PHY (or the way it's integrated,
I'm not sure) do not need the GPIO. I'll double check, and if it is
required for PHC operations in this series, I'll do that.

Thanks,
Antoine

-- 
Antoine Ténart, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ