diff --git a/sys/dev/pci/if_msk.c b/sys/dev/pci/if_msk.c index d60f31575ca8..c45b7e859005 100644 --- a/sys/dev/pci/if_msk.c +++ b/sys/dev/pci/if_msk.c @@ -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 -__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 #include @@ -429,6 +429,7 @@ msk_init_rx_ring(struct sk_if_softc *sc_if) 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 @@ msk_init_tx_ring(struct sk_if_softc *sc_if) 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 @@ mskc_reset(struct sk_softc *sc) 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 @@ msk_encap(struct sk_if_softc *sc_if, struct mbuf *m_head, u_int32_t *txidx) *txidx = frag; - DPRINTFN(2, ("msk_encap: completed successfully\n")); + DPRINTFN(2, ("msk_encap: successful: %u entries\n", entries)); return (0); } diff --git a/sys/dev/pci/if_mskvar.h b/sys/dev/pci/if_mskvar.h index ebcc6b66222f..3df8df535396 100644 --- a/sys/dev/pci/if_mskvar.h +++ b/sys/dev/pci/if_mskvar.h @@ -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 @@ struct sk_softc { 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 */