Source-Changes-HG archive

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

[src/netbsd-9]: src/sys/dev/pci Pull up following revision(s) (requested by r...



details:   https://anonhg.NetBSD.org/src/rev/147349ec38e4
branches:  netbsd-9
changeset: 946101:147349ec38e4
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Nov 16 18:21:45 2020 +0000

description:
Pull up following revision(s) (requested by rin in ticket #1133):

        sys/dev/pci/if_wm.c: revision 1.696

Fix little-endian dependence in wm_rxeof(), by which packets cannot be
received by 82574 and successors on big-endian machines.

Tested by aarch64eb with I210-T1 on ROCKPro64.

Thanks msaitoh for discussion!
XXX
pullup to netbsd-9 and netbsd-8

diffstat:

 sys/dev/pci/if_wm.c |  16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diffs (46 lines):

diff -r 9d30e8b63a39 -r 147349ec38e4 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Sat Nov 14 15:38:43 2020 +0000
+++ b/sys/dev/pci/if_wm.c       Mon Nov 16 18:21:45 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.645.2.9 2020/11/04 11:48:26 martin Exp $   */
+/*     $NetBSD: if_wm.c,v 1.645.2.10 2020/11/16 18:21:45 martin Exp $  */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.645.2.9 2020/11/04 11:48:26 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.645.2.10 2020/11/16 18:21:45 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -8875,9 +8875,11 @@
        struct wm_softc *sc = rxq->rxq_sc;
 
        if (sc->sc_type == WM_T_82574)
-               return EXTRXC_STATUS(rxq->rxq_ext_descs[idx].erx_ctx.erxc_err_stat);
+               return EXTRXC_STATUS(
+                   le32toh(rxq->rxq_ext_descs[idx].erx_ctx.erxc_err_stat));
        else if ((sc->sc_flags & WM_F_NEWQUEUE) != 0)
-               return NQRXC_STATUS(rxq->rxq_nq_descs[idx].nqrx_ctx.nrxc_err_stat);
+               return NQRXC_STATUS(
+                   le32toh(rxq->rxq_nq_descs[idx].nqrx_ctx.nrxc_err_stat));
        else
                return rxq->rxq_descs[idx].wrx_status;
 }
@@ -8888,9 +8890,11 @@
        struct wm_softc *sc = rxq->rxq_sc;
 
        if (sc->sc_type == WM_T_82574)
-               return EXTRXC_ERROR(rxq->rxq_ext_descs[idx].erx_ctx.erxc_err_stat);
+               return EXTRXC_ERROR(
+                   le32toh(rxq->rxq_ext_descs[idx].erx_ctx.erxc_err_stat));
        else if ((sc->sc_flags & WM_F_NEWQUEUE) != 0)
-               return NQRXC_ERROR(rxq->rxq_nq_descs[idx].nqrx_ctx.nrxc_err_stat);
+               return NQRXC_ERROR(
+                   le32toh(rxq->rxq_nq_descs[idx].nqrx_ctx.nrxc_err_stat));
        else
                return rxq->rxq_descs[idx].wrx_errors;
 }



Home | Main Index | Thread Index | Old Index