Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci - initialise sk_rx_hiaddr and sk_tx_hiaddr



details:   https://anonhg.NetBSD.org/src/rev/240bc922effc
branches:  trunk
changeset: 837923:240bc922effc
user:      mrg <mrg%NetBSD.org@localhost>
date:      Thu Dec 27 08:13:50 2018 +0000

description:
- initialise sk_rx_hiaddr and sk_tx_hiaddr
- use MSK_ADDR_LO() and MSK_ADDR_HI()
- expand a debug message
- remove unused softc members

diffstat:

 sys/dev/pci/if_msk.c    |  12 +++++++-----
 sys/dev/pci/if_mskvar.h |   3 +--
 2 files changed, 8 insertions(+), 7 deletions(-)

diffs (73 lines):

diff -r d7cd0f13d5f4 -r 240bc922effc sys/dev/pci/if_msk.c
--- a/sys/dev/pci/if_msk.c      Thu Dec 27 07:56:43 2018 +0000
+++ b/sys/dev/pci/if_msk.c      Thu Dec 27 08:13:50 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_msk.c,v 1.81 2018/12/08 13:31:31 bouyer Exp $ */
+/* $NetBSD: if_msk.c,v 1.82 2018/12/27 08:13:50 mrg Exp $ */
 /*     $OpenBSD: if_msk.c,v 1.79 2009/10/15 17:54:56 deraadt Exp $     */
 
 /*
@@ -52,7 +52,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.81 2018/12/08 13:31:31 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.82 2018/12/27 08:13:50 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -429,6 +429,7 @@
        sc_if->sk_cdata.sk_rx_prod = 0;
        sc_if->sk_cdata.sk_rx_cons = 0;
        sc_if->sk_cdata.sk_rx_cnt = 0;
+       sc_if->sk_cdata.sk_rx_hiaddr = 0;
 
        /* Mark the first ring element to initialize the high address. */
        sc_if->sk_cdata.sk_rx_hiaddr = 0;
@@ -484,6 +485,7 @@
        sc_if->sk_cdata.sk_tx_prod = 0;
        sc_if->sk_cdata.sk_tx_cons = 0;
        sc_if->sk_cdata.sk_tx_cnt = 0;
+       sc_if->sk_cdata.sk_tx_hiaddr = 0;
 
        /* Mark the first ring element to initialize the high address. */
        sc_if->sk_cdata.sk_tx_hiaddr = 0;
@@ -1022,9 +1024,9 @@
 
        sk_win_write_2(sc, SK_STAT_BMU_LIDX, MSK_STATUS_RING_CNT - 1);
        sk_win_write_4(sc, SK_STAT_BMU_ADDRLO,
-           sc->sk_status_map->dm_segs[0].ds_addr);
+           MSK_ADDR_LO(sc->sk_status_map->dm_segs[0].ds_addr));
        sk_win_write_4(sc, SK_STAT_BMU_ADDRHI,
-           (u_int64_t)sc->sk_status_map->dm_segs[0].ds_addr >> 32);
+           MSK_ADDR_HI(sc->sk_status_map->dm_segs[0].ds_addr));
        if (sc->sk_type == SK_YUKON_EC &&
            sc->sk_rev == SK_YUKON_EC_REV_A1) {
                /* WA for dev. #4.3 */
@@ -1900,7 +1902,7 @@
 
        *txidx = frag;
 
-       DPRINTFN(2, ("msk_encap: completed successfully\n"));
+       DPRINTFN(2, ("msk_encap: successful: %u entries\n", entries));
 
        return (0);
 }
diff -r d7cd0f13d5f4 -r 240bc922effc sys/dev/pci/if_mskvar.h
--- a/sys/dev/pci/if_mskvar.h   Thu Dec 27 07:56:43 2018 +0000
+++ b/sys/dev/pci/if_mskvar.h   Thu Dec 27 08:13:50 2018 +0000
@@ -1,5 +1,5 @@
 /*     $OpenBSD: if_mskvar.h,v 1.3 2006/12/28 16:34:42 kettenis Exp $  */
-/*     $NetBSD: if_mskvar.h,v 1.20 2018/10/21 00:51:12 jmcneill Exp $  */
+/*     $NetBSD: if_mskvar.h,v 1.21 2018/12/27 08:13:50 mrg Exp $       */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -198,7 +198,6 @@
        u_int8_t                sk_fibertype;
        u_int8_t                sk_type;
        u_int8_t                sk_rev;
-       u_int32_t               sk_workaround;
        u_int8_t                sk_macs;        /* # of MACs */
        const char              *sk_name;
        u_int32_t               sk_ramsize;     /* amount of RAM on NIC */



Home | Main Index | Thread Index | Old Index