linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH] nvme: Add support for NVMe 1.3 Timestamp Feature
Date: Wed, 12 Jul 2017 19:24:26 -0400	[thread overview]
Message-ID: <20170712232425.GC8388@localhost.localdomain> (raw)
In-Reply-To: <20170712221101.1715-1-jonathan.derrick@intel.com>

On Wed, Jul 12, 2017@04:11:01PM -0600, Jon Derrick wrote:
> +void nvme_set_timestamp(struct nvme_ctrl *ctrl)
> +{
> +	u64 cur_ms;
> +	u8 ts[8] = { 0, };
> +	int status;
> +	u32 result;
> +
> +	cur_ms = ktime_to_ms(ktime_get_real());
> +	put_unaligned_le64(cur_ms, &ts[0]);
> +
> +	status = nvme_set_features(ctrl, NVME_FEAT_TIMESTAMP, 0, ts, 8,
> +			&result);
> +	if (status < 0)
> +		dev_warn_once(ctrl->device,
> +			"could not set timestamp (%08x)\n", result);
> +}

We don't actually need 'result' for this feature. It won't mean anything
for the feature, and it's actually not going to be set if status < 0,
but we'd want see the value of 'status' if it's != 0.

  reply	other threads:[~2017-07-12 23:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12 22:11 [PATCH] nvme: Add support for NVMe 1.3 Timestamp Feature Jon Derrick
2017-07-12 23:24 ` Keith Busch [this message]
2017-07-13  7:01 ` Sagi Grimberg
2017-07-18 21:12   ` Jon Derrick
2017-07-13  7:35 ` Christoph Hellwig
2017-07-18 21:13   ` Jon Derrick

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=20170712232425.GC8388@localhost.localdomain \
    --to=keith.busch@intel.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).