Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Drop AXEN_MEDIUM_ALWAYS_ONE (from Linux), which ...



details:   https://anonhg.NetBSD.org/src/rev/d0edabcadc01
branches:  trunk
changeset: 448626:d0edabcadc01
user:      rin <rin%NetBSD.org@localhost>
date:      Wed Feb 06 07:31:38 2019 +0000

description:
Drop AXEN_MEDIUM_ALWAYS_ONE (from Linux), which reduces drop erros in RX.

diffstat:

 sys/dev/usb/if_axen.c |  15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diffs (43 lines):

diff -r aa34370f7083 -r d0edabcadc01 sys/dev/usb/if_axen.c
--- a/sys/dev/usb/if_axen.c     Wed Feb 06 07:28:34 2019 +0000
+++ b/sys/dev/usb/if_axen.c     Wed Feb 06 07:31:38 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_axen.c,v 1.25 2019/02/06 07:28:01 rin Exp $ */
+/*     $NetBSD: if_axen.c,v 1.26 2019/02/06 07:31:38 rin Exp $ */
 /*     $OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $ */
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.25 2019/02/06 07:28:01 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.26 2019/02/06 07:31:38 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -269,9 +269,8 @@
        if ((mii->mii_media_active & IFM_GMASK) == IFM_FDX)
                val |= AXEN_MEDIUM_FDX;
 
-       val |= (AXEN_MEDIUM_RECV_EN | AXEN_MEDIUM_ALWAYS_ONE);
-       val |= (AXEN_MEDIUM_RXFLOW_CTRL_EN | AXEN_MEDIUM_TXFLOW_CTRL_EN);
-
+       val |= AXEN_MEDIUM_RXFLOW_CTRL_EN | AXEN_MEDIUM_TXFLOW_CTRL_EN |
+           AXEN_MEDIUM_RECV_EN;
        switch (IFM_SUBTYPE(mii->mii_media_active)) {
        case IFM_1000_T:
                val |= AXEN_MEDIUM_GIGA | AXEN_MEDIUM_EN_125MHZ;
@@ -586,9 +585,9 @@
        DPRINTF(("axen: Monitor mode = 0x%02x\n", val));
 
        /* set medium type */
-       ctl = AXEN_MEDIUM_GIGA | AXEN_MEDIUM_FDX | AXEN_MEDIUM_ALWAYS_ONE |
-             AXEN_MEDIUM_RXFLOW_CTRL_EN | AXEN_MEDIUM_TXFLOW_CTRL_EN;
-       ctl |= AXEN_MEDIUM_RECV_EN;
+       ctl = AXEN_MEDIUM_GIGA | AXEN_MEDIUM_FDX | AXEN_MEDIUM_EN_125MHZ |
+           AXEN_MEDIUM_RXFLOW_CTRL_EN | AXEN_MEDIUM_TXFLOW_CTRL_EN |
+           AXEN_MEDIUM_RECV_EN;
        wval = htole16(ctl);
        DPRINTF(("axen: set to medium mode: 0x%04x\n", ctl));
        axen_cmd(sc, AXEN_CMD_MAC_WRITE2, 2, AXEN_MEDIUM_STATUS, &wval);



Home | Main Index | Thread Index | Old Index