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]
Date:   Sun, 7 Oct 2018 20:17:54 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Florian Fainelli <f.fainelli@...il.com>
Cc:     Richard Cochran <richardcochran@...il.com>, netdev@...r.kernel.org,
        devicetree@...r.kernel.org, David Miller <davem@...emloft.net>,
        Jacob Keller <jacob.e.keller@...el.com>,
        Mark Rutland <mark.rutland@....com>,
        Miroslav Lichvar <mlichvar@...hat.com>,
        Rob Herring <robh+dt@...nel.org>,
        Willem de Bruijn <willemb@...gle.com>
Subject: Re: [PATCH V2 net-next 4/5] net: mdio: of: Register discovered MII
 time stampers.

> > +	if (err == -ENOENT)
> > +		return NULL;
> > +	else if (err)
> > +		return ERR_PTR(err);
> > +
> > +	if (args.args_count >= 1)
> > +		port = args.args[0];
> 
> If it's greater than one, than it is an error, and it should be flagged
> as such.
> 
> The idea looks good though, should of_find_mii_timestamper() somehow be
> made conditional to CONFIG_PTP and we should have a stub for when it is
> disabled?

Hi Florian

There already is a stub. But register return -EOPNOTSUPP.

 
> > +
> > +	return register_mii_timestamper(args.np, port);

So this returns EOPNOTUP

> > +}
> > +
> >  static int of_mdiobus_register_phy(struct mii_bus *mdio,
> >  				    struct device_node *child, u32 addr)
> >  {
> > +	struct mii_timestamper *mii_ts;
> >  	struct phy_device *phy;
> >  	bool is_c45;
> >  	int rc;
> >  	u32 phy_id;
> >  
> > +	mii_ts = of_find_mii_timestamper(child);
> > +	if (IS_ERR(mii_ts))
> > +		return PTR_ERR(mii_ts);
> > +

and this returns EOPNOPTSUPP, so the PHY is not registered :-(

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ