Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Fix some big-endian issues. stge(4) now works on...



details:   https://anonhg.NetBSD.org/src/rev/315022568cc0
branches:  trunk
changeset: 580947:315022568cc0
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Mon May 16 21:35:32 2005 +0000

description:
Fix some big-endian issues. stge(4) now works on sparc64 with hardware
checksums.

diffstat:

 sys/dev/pci/if_stge.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (48 lines):

diff -r f2b23cf7c18b -r 315022568cc0 sys/dev/pci/if_stge.c
--- a/sys/dev/pci/if_stge.c     Mon May 16 21:18:34 2005 +0000
+++ b/sys/dev/pci/if_stge.c     Mon May 16 21:35:32 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_stge.c,v 1.26 2005/05/13 06:36:22 wiz Exp $ */
+/*     $NetBSD: if_stge.c,v 1.27 2005/05/16 21:35:32 bouyer Exp $      */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.26 2005/05/13 06:36:22 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.27 2005/05/16 21:35:32 bouyer Exp $");
 
 #include "bpfilter.h"
 
@@ -903,15 +903,15 @@
                csum_flags = 0;
                if (m0->m_pkthdr.csum_flags & M_CSUM_IPv4) {
                        STGE_EVCNT_INCR(&sc->sc_ev_txipsum);
-                       csum_flags |= htole64(TFD_IPChecksumEnable);
+                       csum_flags |= TFD_IPChecksumEnable;
                }
 
                if (m0->m_pkthdr.csum_flags & M_CSUM_TCPv4) {
                        STGE_EVCNT_INCR(&sc->sc_ev_txtcpsum);
-                       csum_flags |= htole64(TFD_TCPChecksumEnable);
+                       csum_flags |= TFD_TCPChecksumEnable;
                } else if (m0->m_pkthdr.csum_flags & M_CSUM_UDPv4) {
                        STGE_EVCNT_INCR(&sc->sc_ev_txudpsum);
-                       csum_flags |= htole64(TFD_UDPChecksumEnable);
+                       csum_flags |= TFD_UDPChecksumEnable;
                }
 
                /*
@@ -1507,8 +1507,8 @@
         */
        memset(sc->sc_txdescs, 0, sizeof(sc->sc_txdescs));
        for (i = 0; i < STGE_NTXDESC; i++) {
-               sc->sc_txdescs[i].tfd_next =
-                   (uint64_t) STGE_CDTXADDR(sc, STGE_NEXTTX(i));
+               sc->sc_txdescs[i].tfd_next = htole64(
+                   STGE_CDTXADDR(sc, STGE_NEXTTX(i)));
                sc->sc_txdescs[i].tfd_control = htole64(TFD_TFDDone);
        }
        sc->sc_txpending = 0;



Home | Main Index | Thread Index | Old Index