public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Roger Quadros <rogerq@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>,
	davem@davemloft.net, maciej.fijalkowski@intel.com,
	kuba@kernel.org, edumazet@google.com, vigneshr@ti.com,
	linux-omap@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 net-next 4/6] net: ethernet: ti: am65-cpsw: Add suspend/resume support
Date: Thu, 1 Dec 2022 16:19:34 +0100	[thread overview]
Message-ID: <Y4jGBtWurJ4tmHOc@lunn.ch> (raw)
In-Reply-To: <c41064a1-9da7-d848-6f9f-e1f3b722c063@kernel.org>

On Thu, Dec 01, 2022 at 01:44:28PM +0200, Roger Quadros wrote:
> Hi,
> 
> On 01/12/2022 13:40, Paolo Abeni wrote:
> > On Tue, 2022-11-29 at 15:34 +0200, Roger Quadros wrote:
> >> @@ -555,11 +556,26 @@ static int am65_cpsw_nuss_ndo_slave_open(struct net_device *ndev)
> >>  	struct am65_cpsw_common *common = am65_ndev_to_common(ndev);
> >>  	struct am65_cpsw_port *port = am65_ndev_to_port(ndev);
> >>  	int ret, i;
> >> +	u32 reg;
> >>  
> >>  	ret = pm_runtime_resume_and_get(common->dev);
> >>  	if (ret < 0)
> >>  		return ret;
> >>  
> >> +	/* Idle MAC port */
> >> +	cpsw_sl_ctl_set(port->slave.mac_sl, CPSW_SL_CTL_CMD_IDLE);
> >> +	cpsw_sl_wait_for_idle(port->slave.mac_sl, 100);
> >> +	cpsw_sl_ctl_reset(port->slave.mac_sl);
> >> +
> >> +	/* soft reset MAC */
> >> +	cpsw_sl_reg_write(port->slave.mac_sl, CPSW_SL_SOFT_RESET, 1);
> >> +	mdelay(1);
> >> +	reg = cpsw_sl_reg_read(port->slave.mac_sl, CPSW_SL_SOFT_RESET);
> >> +	if (reg) {
> >> +		dev_err(common->dev, "soft RESET didn't complete\n");
> > 
> > I *think* Andrew was asking for dev_dbg() here, but let's see what he
> > has to say :)
> 
> In the earlier revision we were not exiting with error, so dev_dbg()
> was more appropriate there.
> In this revision we error out so I thought dev_err() was ok.

Yes, i would agree. It is fatal, so dev_err() is appropriate.

What is not shown here is the return value. I think it is -EBUSY? I'm
wondering if -ETIMEDOUT is better?

	  Andrew

  reply	other threads:[~2022-12-01 15:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29 13:34 [PATCH v4 net-next 0/6] net: ethernet: ti: am65-cpsw: Fix set channel operation Roger Quadros
2022-11-29 13:34 ` [PATCH v4 net-next 1/6] Revert "net: ethernet: ti: am65-cpsw: Fix hardware switch mode on suspend/resume" Roger Quadros
2022-11-29 13:34 ` [PATCH v4 net-next 2/6] Revert "net: ethernet: ti: am65-cpsw: retain PORT_VLAN_REG after suspend/resume" Roger Quadros
2022-11-29 13:34 ` [PATCH v4 net-next 3/6] Revert "net: ethernet: ti: am65-cpsw: Add suspend/resume support" Roger Quadros
2022-11-29 13:34 ` [PATCH v4 net-next 4/6] net: ethernet: ti: am65-cpsw: Add suspend/resume support Roger Quadros
2022-12-01 11:40   ` Paolo Abeni
2022-12-01 11:44     ` Roger Quadros
2022-12-01 15:19       ` Andrew Lunn [this message]
2022-12-02 13:41         ` Roger Quadros
2022-11-29 13:35 ` [PATCH v4 net-next 5/6] net: ethernet: ti: am65-cpsw: retain PORT_VLAN_REG after suspend/resume Roger Quadros
2022-11-29 13:35 ` [PATCH v4 net-next 6/6] net: ethernet: ti: am65-cpsw: Fix hardware switch mode on suspend/resume Roger Quadros

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=Y4jGBtWurJ4tmHOc@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rogerq@kernel.org \
    --cc=vigneshr@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