Source-Changes-HG archive

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

[src/netbsd-3]: src/sys/dev/usb Pull up following revision(s) (requested by t...



details:   https://anonhg.NetBSD.org/src/rev/dd45cde94a45
branches:  netbsd-3
changeset: 577481:dd45cde94a45
user:      snj <snj%NetBSD.org@localhost>
date:      Thu Nov 10 23:56:13 2005 +0000

description:
Pull up following revision(s) (requested by tron in ticket #950):
        sys/dev/usb/if_axe.c: revision 1.10
Apply big endian fixes submitted by Garrett D'Amore in PR kern/32032.

diffstat:

 sys/dev/usb/if_axe.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (61 lines):

diff -r 2db0efd22b94 -r dd45cde94a45 sys/dev/usb/if_axe.c
--- a/sys/dev/usb/if_axe.c      Thu Nov 10 19:36:22 2005 +0000
+++ b/sys/dev/usb/if_axe.c      Thu Nov 10 23:56:13 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_axe.c,v 1.7 2005/02/27 00:27:51 perry Exp $ */
+/*     $NetBSD: if_axe.c,v 1.7.2.1 2005/11/10 23:56:13 snj Exp $       */
 
 /*
  * Copyright (c) 1997, 1998, 1999, 2000-2003
@@ -73,7 +73,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.7 2005/02/27 00:27:51 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.7.2.1 2005/11/10 23:56:13 snj Exp $");
 
 #if defined(__NetBSD__)
 #include "opt_inet.h"
@@ -286,7 +286,7 @@
        if (val)
                sc->axe_phyaddrs[0] = phy;
 
-       return (val);
+       return (le16toh(val));
 }
 
 Static void
@@ -298,6 +298,7 @@
        if (sc->axe_dying)
                return;
 
+       val = htole32(val);
        axe_lock_mii(sc);
        axe_cmd(sc, AXE_CMD_MII_OPMODE_SW, 0, 0, NULL);
        err = axe_cmd(sc, AXE_CMD_MII_WRITE_REG, reg, phy, (void *)&val);
@@ -379,6 +380,7 @@
        ifp = GET_IFP(sc);
 
        axe_cmd(sc, AXE_CMD_RXCTL_READ, 0, 0, (void *)&rxmode);
+       rxmode = le16toh(rxmode);
 
        if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) {
        allmulti:
@@ -1230,7 +1232,7 @@
 
                                axe_cmd(sc, AXE_CMD_RXCTL_READ,
                                        0, 0, (void *)&rxmode);
-                               rxmode |= AXE_RXCMD_PROMISC;
+                               rxmode = le16toh(rxmode) | AXE_RXCMD_PROMISC;
                                axe_cmd(sc, AXE_CMD_RXCTL_WRITE,
                                        0, rxmode, NULL);
 
@@ -1240,7 +1242,7 @@
                            sc->axe_if_flags & IFF_PROMISC) {
                                axe_cmd(sc, AXE_CMD_RXCTL_READ,
                                        0, 0, (void *)&rxmode);
-                               rxmode &= ~AXE_RXCMD_PROMISC;
+                               rxmode = le16toh(rxmode) & ~AXE_RXCMD_PROMISC;
                                axe_cmd(sc, AXE_CMD_RXCTL_WRITE,
                                        0, rxmode, NULL);
                                axe_setmulti(sc);



Home | Main Index | Thread Index | Old Index