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: <Y/LE1SzlpKcWHAti@lunn.ch>
Date:   Mon, 20 Feb 2023 01:54:45 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Horatiu Vultur <horatiu.vultur@...rochip.com>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        hkallweit1@...il.com, linux@...linux.org.uk, davem@...emloft.net,
        edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
        richardcochran@...il.com
Subject: Re: [PATCH net-next v2] net: phy: micrel: Add support for
 PTP_PF_PEROUT for lan8841

> +static int lan8841_ptp_set_target(struct kszphy_ptp_priv *ptp_priv, u8 event,
> +				  s64 sec, u32 nsec)
> +{
> +	struct phy_device *phydev = ptp_priv->phydev;
> +	int ret;
> +
> +	ret = phy_write_mmd(phydev, 2, LAN8841_PTP_LTC_TARGET_SEC_HI(event),
> +			    upper_16_bits(sec));
> +	ret |= phy_write_mmd(phydev, 2, LAN8841_PTP_LTC_TARGET_SEC_LO(event),
> +			     lower_16_bits(sec));
> +	ret |= phy_write_mmd(phydev, 2, LAN8841_PTP_LTC_TARGET_NS_HI(event) & 0x3fff,
> +			     upper_16_bits(nsec));
> +	ret |= phy_write_mmd(phydev, 2, LAN8841_PTP_LTC_TARGET_NS_LO(event),
> +			     lower_16_bits(nsec));

ORing together error codes generally does not work. MDIO transactions
can sometimes give ETIMEDOUT, or EINVAL. Combine those and i think you
get ENOKEY, which is going to be interesting to track down.

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ