[PATCH] nvme: fix NSSRS offset in CAP register

Klaus Jensen posted 1 patch 4 years, 6 months ago
Test docker-clang@ubuntu passed
Test docker-quick@centos7 passed
Test asan passed
Test checkpatch passed
Test FreeBSD passed
Test docker-mingw@fedora passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20191023073315.446534-1-its@irrelevant.dk
Maintainers: Max Reitz <mreitz@redhat.com>, Kevin Wolf <kwolf@redhat.com>
include/block/nvme.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] nvme: fix NSSRS offset in CAP register
Posted by Klaus Jensen 4 years, 6 months ago
Fix the offset of the NSSRS field the CAP register.

Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Reported-by: Javier Gonzalez <javier.gonz@samsung.com>
---
 include/block/nvme.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/block/nvme.h b/include/block/nvme.h
index 3ec8efcc435e..fa15b51c33bb 100644
--- a/include/block/nvme.h
+++ b/include/block/nvme.h
@@ -23,7 +23,7 @@ enum NvmeCapShift {
     CAP_AMS_SHIFT      = 17,
     CAP_TO_SHIFT       = 24,
     CAP_DSTRD_SHIFT    = 32,
-    CAP_NSSRS_SHIFT    = 33,
+    CAP_NSSRS_SHIFT    = 36,
     CAP_CSS_SHIFT      = 37,
     CAP_MPSMIN_SHIFT   = 48,
     CAP_MPSMAX_SHIFT   = 52,
-- 
2.23.0


Re: [PATCH] nvme: fix NSSRS offset in CAP register
Posted by John Snow 4 years, 6 months ago

On 10/23/19 3:33 AM, Klaus Jensen wrote:
> Fix the offset of the NSSRS field the CAP register.

From NVME 1.4, section 3 ("Controller Registers"), subsection 3.1.1
("Offset 0h: CAP – Controller Capabilities") CAP_NSSRS_SHIFT is bit 36,
not 33.

> 
> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
> Reported-by: Javier Gonzalez <javier.gonz@samsung.com>
> ---
>  include/block/nvme.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/block/nvme.h b/include/block/nvme.h
> index 3ec8efcc435e..fa15b51c33bb 100644
> --- a/include/block/nvme.h
> +++ b/include/block/nvme.h
> @@ -23,7 +23,7 @@ enum NvmeCapShift {
>      CAP_AMS_SHIFT      = 17,
>      CAP_TO_SHIFT       = 24,
>      CAP_DSTRD_SHIFT    = 32,
> -    CAP_NSSRS_SHIFT    = 33,
> +    CAP_NSSRS_SHIFT    = 36,
>      CAP_CSS_SHIFT      = 37,
>      CAP_MPSMIN_SHIFT   = 48,
>      CAP_MPSMAX_SHIFT   = 52,
> 

I like updating commit messages with spec references; if it can be
updated that would be nice.

Regardless:

Reviewed-by: John Snow <jsnow@redhat.com>


Re: [PATCH] nvme: fix NSSRS offset in CAP register
Posted by Klaus Birkelund 4 years, 6 months ago
On Wed, Oct 23, 2019 at 11:26:57AM -0400, John Snow wrote:
> 
> 
> On 10/23/19 3:33 AM, Klaus Jensen wrote:
> > Fix the offset of the NSSRS field the CAP register.
> 
> From NVME 1.4, section 3 ("Controller Registers"), subsection 3.1.1
> ("Offset 0h: CAP – Controller Capabilities") CAP_NSSRS_SHIFT is bit 36,
> not 33.
> 
> > 
> > Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
> > Reported-by: Javier Gonzalez <javier.gonz@samsung.com>
> > ---
> >  include/block/nvme.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/include/block/nvme.h b/include/block/nvme.h
> > index 3ec8efcc435e..fa15b51c33bb 100644
> > --- a/include/block/nvme.h
> > +++ b/include/block/nvme.h
> > @@ -23,7 +23,7 @@ enum NvmeCapShift {
> >      CAP_AMS_SHIFT      = 17,
> >      CAP_TO_SHIFT       = 24,
> >      CAP_DSTRD_SHIFT    = 32,
> > -    CAP_NSSRS_SHIFT    = 33,
> > +    CAP_NSSRS_SHIFT    = 36,
> >      CAP_CSS_SHIFT      = 37,
> >      CAP_MPSMIN_SHIFT   = 48,
> >      CAP_MPSMAX_SHIFT   = 52,
> > 
> 
> I like updating commit messages with spec references; if it can be
> updated that would be nice.
> 
> Regardless:
> 
> Reviewed-by: John Snow <jsnow@redhat.com>
> 

Sounds good. Can the committer squash that in?


Cheers,
Klaus

Re: [PATCH] nvme: fix NSSRS offset in CAP register
Posted by Max Reitz 4 years, 5 months ago
On 23.10.19 09:33, Klaus Jensen wrote:
> Fix the offset of the NSSRS field the CAP register.
> 
> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
> Reported-by: Javier Gonzalez <javier.gonz@samsung.com>
> ---
>  include/block/nvme.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks; added John’s note and applied to my block branch:

https://github.com/XanClic/qemu/commits/block

Max