Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci/ixgbe fix little-endian dependence



details:   https://anonhg.NetBSD.org/src/rev/98b9871cd60f
branches:  trunk
changeset: 379226:98b9871cd60f
user:      ryo <ryo%NetBSD.org@localhost>
date:      Thu May 20 22:36:08 2021 +0000

description:
fix little-endian dependence

diffstat:

 sys/dev/pci/ixgbe/ix_txrx.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 308a70c2be1a -r 98b9871cd60f sys/dev/pci/ixgbe/ix_txrx.c
--- a/sys/dev/pci/ixgbe/ix_txrx.c       Thu May 20 10:39:32 2021 +0000
+++ b/sys/dev/pci/ixgbe/ix_txrx.c       Thu May 20 22:36:08 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ix_txrx.c,v 1.77 2021/05/20 10:39:32 msaitoh Exp $ */
+/* $NetBSD: ix_txrx.c,v 1.78 2021/05/20 22:36:08 ryo Exp $ */
 
 /******************************************************************************
 
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.77 2021/05/20 10:39:32 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.78 2021/05/20 22:36:08 ryo Exp $");
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -1125,7 +1125,7 @@ ixgbe_txeof(struct tx_ring *txr)
                 *   or the slot has the DD bit set.
                 */
                if (kring->nr_kflags < kring->nkr_num_slots &&
-                   txd[kring->nr_kflags].wb.status & IXGBE_TXD_STAT_DD) {
+                   le32toh(txd[kring->nr_kflags].wb.status) & IXGBE_TXD_STAT_DD) {
                        netmap_tx_irq(ifp, txr->me);
                }
                return false;
@@ -1150,7 +1150,7 @@ ixgbe_txeof(struct tx_ring *txr)
                if (eop == NULL) /* No work */
                        break;
 
-               if ((eop->wb.status & IXGBE_TXD_STAT_DD) == 0)
+               if ((le32toh(eop->wb.status) & IXGBE_TXD_STAT_DD) == 0)
                        break;  /* I/O not complete */
 
                if (buf->m_head) {



Home | Main Index | Thread Index | Old Index