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/f1915caec3f7
branches:  trunk
changeset: 939070:f1915caec3f7
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 f8ea0cdc67b6 -r f1915caec3f7 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