linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Moyer <jmoyer@redhat.com>
To: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, linux-nvdimm@ml01.01.org,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	linux-acpi@vger.kernel.org, Len Brown <lenb@kernel.org>
Subject: Re: [PATCH] nfit, nd_blk: BLK status register is only 32 bits
Date: Mon, 24 Aug 2015 13:02:17 -0400	[thread overview]
Message-ID: <x49wpwkbox2.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <1440109658-29164-1-git-send-email-ross.zwisler@linux.intel.com> (Ross Zwisler's message of "Thu, 20 Aug 2015 16:27:38 -0600")

Ross Zwisler <ross.zwisler@linux.intel.com> writes:

> Only read 32 bits for the BLK status register in read_blk_stat().
>
> The format and size of this register is defined in the
> "NVDIMM Driver Writer's guide":
>
> http://pmem.io/documents/NVDIMM_Driver_Writers_Guide.pdf
>
> Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
> Reported-by: Nicholas Moulin <nicholas.w.moulin@linux.intel.com>

Looks fine,

Reviewed-by: Jeff Moyer <jmoyer@redhat.com>

However, now that you've drawn attention to that code, I'll note that
there is no checking of the pending or retry bits.  In fact,
ACPI_NFIT_CONTROL_BUFFERED isn't even checked upon loading the tables.
Is this on a todo list somewhere?

Cheers,
Jeff

> ---
>  drivers/acpi/nfit.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c
> index 7c2638f..8689ee1 100644
> --- a/drivers/acpi/nfit.c
> +++ b/drivers/acpi/nfit.c
> @@ -1009,7 +1009,7 @@ static void wmb_blk(struct nfit_blk *nfit_blk)
>  		wmb_pmem();
>  }
>  
> -static u64 read_blk_stat(struct nfit_blk *nfit_blk, unsigned int bw)
> +static u32 read_blk_stat(struct nfit_blk *nfit_blk, unsigned int bw)
>  {
>  	struct nfit_blk_mmio *mmio = &nfit_blk->mmio[DCR];
>  	u64 offset = nfit_blk->stat_offset + mmio->size * bw;
> @@ -1017,7 +1017,7 @@ static u64 read_blk_stat(struct nfit_blk *nfit_blk, unsigned int bw)
>  	if (mmio->num_lines)
>  		offset = to_interleave_offset(offset, mmio);
>  
> -	return readq(mmio->base + offset);
> +	return readl(mmio->base + offset);
>  }
>  
>  static void write_blk_ctl(struct nfit_blk *nfit_blk, unsigned int bw,

  reply	other threads:[~2015-08-24 17:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-20 22:27 [PATCH] nfit, nd_blk: BLK status register is only 32 bits Ross Zwisler
2015-08-24 17:02 ` Jeff Moyer [this message]
2015-08-24 17:40   ` Ross Zwisler

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=x49wpwkbox2.fsf@segfault.boston.devel.redhat.com \
    --to=jmoyer@redhat.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@ml01.01.org \
    --cc=rjw@rjwysocki.net \
    --cc=ross.zwisler@linux.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).