Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic no need to swap pt.cmd.cdwXX at nvme_set_number_o...



details:   https://anonhg.NetBSD.org/src/rev/783b3ac9fcea
branches:  trunk
changeset: 944247:783b3ac9fcea
user:      ryo <ryo%NetBSD.org@localhost>
date:      Thu Sep 24 09:59:11 2020 +0000

description:
no need to swap pt.cmd.cdwXX at nvme_set_number_of_queues(). cmd.cdwXX will be swapped in nvme_pt_fill().

diffstat:

 sys/dev/ic/nvme.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r 0539e63f7d21 -r 783b3ac9fcea sys/dev/ic/nvme.c
--- a/sys/dev/ic/nvme.c Thu Sep 24 09:37:07 2020 +0000
+++ b/sys/dev/ic/nvme.c Thu Sep 24 09:59:11 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nvme.c,v 1.50 2020/09/22 11:53:10 kardel Exp $ */
+/*     $NetBSD: nvme.c,v 1.51 2020/09/24 09:59:11 ryo Exp $    */
 /*     $OpenBSD: nvme.c,v 1.49 2016/04/18 05:59:50 dlg Exp $ */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.50 2020/09/22 11:53:10 kardel Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.51 2020/09/24 09:59:11 ryo Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1624,8 +1624,8 @@
 
        memset(&pt, 0, sizeof(pt));
        pt.cmd.opcode = NVM_ADMIN_SET_FEATURES;
-       htolem32(&pt.cmd.cdw10, NVM_FEATURE_NUMBER_OF_QUEUES);
-       htolem32(&pt.cmd.cdw11, ((nq - 1) << 16) | (nq - 1));
+       pt.cmd.cdw10 = NVM_FEATURE_NUMBER_OF_QUEUES;
+       pt.cmd.cdw11 = ((nq - 1) << 16) | (nq - 1);
 
        memset(&state, 0, sizeof(state));
        state.pt = &pt;



Home | Main Index | Thread Index | Old Index