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: <db4cb7b6-42f0-17de-7e9f-ab28977edf78@oss.nxp.com>
Date: Mon, 19 Jun 2023 09:17:02 +0300
From: "Radu Pirea (OSS)" <radu-nicolae.pirea@....nxp.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: hkallweit1@...il.com, linux@...linux.org.uk, davem@...emloft.net,
 edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
 richardcochran@...il.com, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org, sebastian.tobuschat@....com
Subject: Re: [PATCH net-next v1 13/14] net: phy: nxp-c45-tja11xx: reset PCS if
 the link goes down

On 17.06.2023 00:00, Andrew Lunn wrote:
> On Fri, Jun 16, 2023 at 04:53:22PM +0300, Radu Pirea (NXP OSS) wrote:
>> During PTP testing on early TJA1120 engineering samples I observed that
>> if the link is lost and recovered, the tx timestamps will be randomly
>> lost. To avoid this HW issue, the PCS should be reseted.
>>
>> Resetting the PCS will break the link and we should reset the PCS on
>> LINK UP -> LINK DOWN transition, otherwise we will trigger and infinite
>> loop of LINK UP -> LINK DOWN events.
> 
>> +static int tja1120_read_status(struct phy_device *phydev)
>> +{
>> +     unsigned int link = phydev->link;
>> +     int ret;
> 
> Maybe consider using link_change_notify:
> 
>          /**
>           * @link_change_notify: Called to inform a PHY device driver
>           * when the core is about to change the link state. This
>           * callback is supposed to be used as fixup hook for drivers
>           * that need to take action when the link state
>           * changes. Drivers are by no means allowed to mess with the
>           * PHY device structure in their implementations.
>           */
>          void (*link_change_notify)(struct phy_device *dev);
> 
> Seems like a fixup to me.
> 
>        Andrew

Ok. link_change_notify seems the right callback for this fix.
Thank you.

-- 
Radu P.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ