Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: nikita.yoush@cogentembedded.com
Cc: fugang.duan@nxp.com, troy.kisky@boundarydevices.com,
	andrew@lunn.ch, eric@nelint.com, tremyfr@gmail.com,
	johannes@sipsolutions.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, cphealy@gmail.com
Subject: Re: [PATCH] net: fec: turn on device when extracting statistics
Date: Sun, 27 Nov 2016 20:29:45 -0500 (EST)	[thread overview]
Message-ID: <20161127.202945.1759992980026862076.davem@davemloft.net> (raw)
In-Reply-To: <1480068120-22137-1-git-send-email-nikita.yoush@cogentembedded.com>

From: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Date: Fri, 25 Nov 2016 13:02:00 +0300

> +	int i, ret;
> +
> +	ret = pm_runtime_get_sync(&fep->pdev->dev);
> +	if (IS_ERR_VALUE(ret)) {
> +		memset(data, 0, sizeof(*data) * ARRAY_SIZE(fec_stats));
> +		return;
> +	}

This really isn't the way to do this.

When the device is suspended and the clocks are going to be stopped,
you must fetch the statistic values into a software copy and provide
those if the device is suspended when statistics are requested.

  parent reply	other threads:[~2016-11-28  1:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-25 10:02 [PATCH] net: fec: turn on device when extracting statistics Nikita Yushchenko
2016-11-27  6:25 ` Andy Duan
2016-11-28  1:29 ` David Miller [this message]
2016-11-28  7:06   ` Nikita Yushchenko
2016-11-28 14:11     ` David Miller

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=20161127.202945.1759992980026862076.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=andrew@lunn.ch \
    --cc=cphealy@gmail.com \
    --cc=eric@nelint.com \
    --cc=fugang.duan@nxp.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikita.yoush@cogentembedded.com \
    --cc=tremyfr@gmail.com \
    --cc=troy.kisky@boundarydevices.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