Module Name: src
Committed By: martin
Date: Sat Mar 26 17:04:03 UTC 2016
Modified Files:
src/sys/arch/arm/rockchip: rockchip_emac.c
Log Message:
David Binderman in port-arm/51013: masking of rxbdtlen happened before
the value was read - move it down a few lines.
To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/rockchip/rockchip_emac.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/rockchip/rockchip_emac.c
diff -u src/sys/arch/arm/rockchip/rockchip_emac.c:1.13 src/sys/arch/arm/rockchip/rockchip_emac.c:1.14
--- src/sys/arch/arm/rockchip/rockchip_emac.c:1.13 Tue Feb 9 08:32:08 2016
+++ src/sys/arch/arm/rockchip/rockchip_emac.c Sat Mar 26 17:04:03 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: rockchip_emac.c,v 1.13 2016/02/09 08:32:08 ozaki-r Exp $ */
+/* $NetBSD: rockchip_emac.c,v 1.14 2016/03/26 17:04:03 martin Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <[email protected]>
@@ -29,7 +29,7 @@
#include "opt_rkemac.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rockchip_emac.c,v 1.13 2016/02/09 08:32:08 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rockchip_emac.c,v 1.14 2016/03/26 17:04:03 martin Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -521,7 +521,6 @@ rkemac_init(struct ifnet *ifp)
EMAC_WRITE(sc, EMAC_RXRINGPTR_REG, sc->sc_rxq.r_physaddr);
EMAC_WRITE(sc, EMAC_TXRINGPTR_REG, sc->sc_txq.t_physaddr);
- control &= ~EMAC_CONTROL_RXBDTLEN;
control = EMAC_READ(sc, EMAC_CONTROL_REG);
if (ifp->if_flags & IFF_PROMISC) {
control |= EMAC_CONTROL_PROM;
@@ -534,6 +533,7 @@ rkemac_init(struct ifnet *ifp)
control |= EMAC_CONTROL_DISBC;
}
+ control &= ~EMAC_CONTROL_RXBDTLEN;
control |= __SHIFTIN(RKEMAC_RX_RING_COUNT, EMAC_CONTROL_RXBDTLEN);
control &= ~EMAC_CONTROL_TXBDTLEN;
control |= __SHIFTIN(RKEMAC_TX_RING_COUNT, EMAC_CONTROL_TXBDTLEN);