linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Modi, Geet" <geet.modi@ti.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "Bajjuri, Praneeth" <praneeth@ti.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [EXTERNAL] Re: [EXTERNAL] Re: [PATCH] net: phy: dp83867: perform soft reset and retain established link
Date: Wed, 31 Mar 2021 20:36:54 +0000	[thread overview]
Message-ID: <4838EA12-7BF4-4FF2-8305-7446C3498DDF@ti.com> (raw)
In-Reply-To: <YGSk4W4mW8JQPyPl@lunn.ch>

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


  reply	other threads:[~2021-03-31 20:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24  1:00 [PATCH] net: phy: dp83867: perform soft reset and retain established link praneeth
2021-03-24 12:32 ` Andrew Lunn
     [not found]   ` <404285EC-BBF0-4482-8454-3289C7AF3084@ti.com>
2021-03-31 16:35     ` [EXTERNAL] " Andrew Lunn
2021-03-31 20:36       ` Modi, Geet [this message]
2021-05-28 16:32       ` Bajjuri, Praneeth
2021-05-28 16:52         ` Andrew Lunn
     [not found]           ` <5480BEB5-B540-4BB6-AC32-65CB27439270@ti.com>
     [not found]             ` <EC713CBF-D669-4A0E-ADF2-093902C03C49@ti.com>
2021-06-01 19:18               ` [EXTERNAL] " Andrew Lunn
2021-06-01 23:52                 ` [EXTERNAL] " Modi, Geet
2021-06-10  0:47                 ` Bajjuri, Praneeth
2021-06-10  0:43         ` [PATCH v2] " praneeth
2021-06-10  4:07           ` Andrew Lunn
2021-06-10  5:53             ` Johannes Pointner
2021-06-11 17:05               ` Bajjuri, Praneeth
2021-06-14  8:17                 ` Johannes Pointner
2021-06-11 17:20           ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4838EA12-7BF4-4FF2-8305-7446C3498DDF@ti.com \
    --to=geet.modi@ti.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=praneeth@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).