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: <20200625132226.GC2548@localhost>
Date:   Thu, 25 Jun 2020 06:22:26 -0700
From:   Richard Cochran <richardcochran@...il.com>
To:     Antoine Tenart <antoine.tenart@...tlin.com>
Cc:     davem@...emloft.net, andrew@...n.ch, f.fainelli@...il.com,
        hkallweit1@...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 v4 6/8] net: phy: mscc: timestamping and PHC
 support

On Tue, Jun 23, 2020 at 04:30:12PM +0200, Antoine Tenart wrote:
> @@ -978,9 +1483,32 @@ static int __vsc8584_init_ptp(struct phy_device *phydev)
>  
>  	vsc85xx_ts_eth_cmp1_sig(phydev);
>  
> +	vsc8531->mii_ts.rxtstamp = vsc85xx_rxtstamp;
> +	vsc8531->mii_ts.txtstamp = vsc85xx_txtstamp;
> +	vsc8531->mii_ts.hwtstamp = vsc85xx_hwtstamp;
> +	vsc8531->mii_ts.ts_info  = vsc85xx_ts_info;
> +	phydev->mii_ts = &vsc8531->mii_ts;
> +
> +	memcpy(&vsc8531->ptp->caps, &vsc85xx_clk_caps, sizeof(vsc85xx_clk_caps));
> +
> +	vsc8531->ptp->ptp_clock = ptp_clock_register(&vsc8531->ptp->caps,
> +						     &phydev->mdio.dev);
> +	if (IS_ERR(vsc8531->ptp->ptp_clock))
> +		return PTR_ERR(vsc8531->ptp->ptp_clock);

The ptp_clock_register() method can also return NULL:

 * Returns a valid pointer on success or PTR_ERR on failure.  If PHC
 * support is missing at the configuration level, this function
 * returns NULL, and drivers are expected to gracefully handle that
 * case separately.

Thanks,
Richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ