All of lore.kernel.org
 help / color / mirror / Atom feed
From: jonathan.derrick@intel.com (Jon Derrick)
Subject: [PATCH 1/1] nvme : Add sysfs entry for NVMe CMBs when appropriate
Date: Tue, 27 Sep 2016 17:17:04 -0600	[thread overview]
Message-ID: <20160927231703.GA6694@localhost.localdomain> (raw)
In-Reply-To: <1475014513-18083-2-git-send-email-sbates@raithlin.com>

Hi Stephen,

Thanks for reviving the CMB discussions. Everything seems reasonable to
me, but I must question if we want a 'show' without a 'control'.
Consider if the 'control' ends up requiring an API that supercedes the
'show' in a more natural way.

Otherwise I'm for this.

>  	}
> 
> -	if (readl(dev->bar + NVME_REG_VS) >= NVME_VS(1, 2))
> +	/*
> +	 * CMBs can currently only exist on >=1.2 PCIe devices. We only
> +	 * populate sysfs if a CMB is implemented. Note that we add the
> +	 * CMB attribute to the nvme_ctrl kobj which removes the need to remove
> +	 * it on exit. Since nvme_dev_attrs_group has no name we can pass
> +	 * NULL as final argument to sysfs_add_file_to_group.
> +	 */
> +
> +	if (readl(dev->bar + NVME_REG_VS) >= NVME_VS(1, 2)) {
>  		dev->cmb = nvme_map_cmb(dev);
> 
> +		if (readl(dev->bar + NVME_REG_CMBSZ)) {
Small nit: we have this value cached in dev->cmbsz. So unless something
has changed in the configuration, we could use that instead.

  reply	other threads:[~2016-09-27 23:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-27 22:15 [PATCH 0/1] nvme : Add sysfs entry for NVMe CMBs when appropriate Stephen Bates
2016-09-27 22:15 ` [PATCH 1/1] " Stephen Bates
2016-09-27 23:17   ` Jon Derrick [this message]
2016-09-28  0:10     ` Stephen Bates
2016-10-05  8:22   ` Sagi Grimberg
2016-10-05 14:38     ` Stephen Bates
2016-10-05 16:50       ` Sagi Grimberg
2016-10-05 17:48         ` Stephen Bates
2016-10-05 18:20           ` J Freyensee

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=20160927231703.GA6694@localhost.localdomain \
    --to=jonathan.derrick@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.