Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic One more fix for big-endian machines.



details:   https://anonhg.NetBSD.org/src/rev/3e177b1f4a11
branches:  trunk
changeset: 942534:3e177b1f4a11
user:      rin <rin%NetBSD.org@localhost>
date:      Tue Nov 10 07:39:12 2020 +0000

description:
One more fix for big-endian machines.

Now, ld(4) at nvme(4) works perfectly for aarch64eb!

Tested on ROCKPro64 and qemu-system-aarch64.

diffstat:

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

diffs (27 lines):

diff -r 586078499770 -r 3e177b1f4a11 sys/dev/ic/nvme.c
--- a/sys/dev/ic/nvme.c Tue Nov 10 06:58:46 2020 +0000
+++ b/sys/dev/ic/nvme.c Tue Nov 10 07:39:12 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nvme.c,v 1.51 2020/09/24 09:59:11 ryo Exp $    */
+/*     $NetBSD: nvme.c,v 1.52 2020/11/10 07:39:12 rin 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.51 2020/09/24 09:59:11 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.52 2020/11/10 07:39:12 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1377,7 +1377,7 @@
                if ((flags & NVME_CQE_PHASE) != q->q_cq_phase)
                        break;
 
-               ccb = &q->q_ccbs[cqe->cid];
+               ccb = &q->q_ccbs[lemtoh16(&cqe->cid)];
 
                if (++q->q_cq_head >= q->q_entries) {
                        q->q_cq_head = 0;



Home | Main Index | Thread Index | Old Index