lkml.org 
[lkml]   [2021]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [EXTERNAL] Re: [EXTERNAL] Re: [PATCH] net: phy: dp83867: perform soft reset and retain established link
Date
Hi Andrew,

If Link is present, the current reset will reset the registers including the link and Host will need to re-program all the registers. With the change proposed, it will reset the state machine while keeping the register content.

My understanding is that below API is called to perform the soft reset and not complete wipe of PHY. Do you agree ?


.soft_reset = dp83867_phy_reset,


Regards,
Geet



See below difference between the two reset from DP83867 datasheet.

8.5.5.3 Global Software Reset
A global software reset is accomplished by setting bit 15 of register CTRL (address 0x001F) to 1. This bit resets
all the internal circuits in the PHY including IEEE-defined registers and all the extended registers. The global
software reset resets the device such that all registers are reset to default values and the hardware configuration
values are maintained.
8.5.5.4 Global Software Restart
A global software restart is accomplished by setting bit 14 of register CTRL (0x001F) to 1. This action resets all
the PHY circuits except the registers in the Register File.




In DP83822 linux, the API is calling the software reset and we are aligning DP83867 implementaiton with DP83822.


Regards,
Geet



On 3/31/21, 9:35 AM, "Andrew Lunn" <andrew@lunn.ch> wrote:

> > as per datasheet: https://www.ti.com/lit/ds/symlink/dp83867cr.pdf
>
> > 8.6.26 Control Register (CTRL)
> > do SW_RESTART to perform a reset not including the registers and is
> > acceptable to do this if a link is already present.
>
>
>
> I don't see any code here to determine if the like is present. What if
> the cable is not plugged in?
>
> This API is primarily used for reset. Link Status is checked thru different
> register. This shall not impact the cable plug in/out. With this change, it
> will align with DP83822 driver API.

So why is there the comment:

> > and is
> > acceptable to do this if a link is already present.

That kind of says, it is not acceptable to do this if the link is not
present. Which is why i'm asking.

Andrew

\
 
 \ /
  Last update: 2021-03-31 22:38    [W:0.094 / U:2.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site