View | Details | Raw Unified | Return to bug 258580
Collapse All | Expand All

(-)b/sys/dev/vte/if_vte.c (-1 / +10 lines)
Lines 1605-1613 vte_tick(void *arg) Link Here
1605
static void
1605
static void
1606
vte_reset(struct vte_softc *sc)
1606
vte_reset(struct vte_softc *sc)
1607
{
1607
{
1608
	uint16_t mcr;
1608
	uint16_t mcr, mdcsc;
1609
	int i;
1609
	int i;
1610
1610
1611
	mdcsc = CSR_READ_2(sc, VTE_MDCSC);
1611
	mcr = CSR_READ_2(sc, VTE_MCR1);
1612
	mcr = CSR_READ_2(sc, VTE_MCR1);
1612
	CSR_WRITE_2(sc, VTE_MCR1, mcr | MCR1_MAC_RESET);
1613
	CSR_WRITE_2(sc, VTE_MCR1, mcr | MCR1_MAC_RESET);
1613
	for (i = VTE_RESET_TIMEOUT; i > 0; i--) {
1614
	for (i = VTE_RESET_TIMEOUT; i > 0; i--) {
Lines 1625-1630 vte_reset(struct vte_softc *sc) Link Here
1625
	CSR_WRITE_2(sc, VTE_MACSM, 0x0002);
1626
	CSR_WRITE_2(sc, VTE_MACSM, 0x0002);
1626
	CSR_WRITE_2(sc, VTE_MACSM, 0);
1627
	CSR_WRITE_2(sc, VTE_MACSM, 0);
1627
	DELAY(5000);
1628
	DELAY(5000);
1629
1630
	/*
1631
	 * On some SoCs (like Vortex86DX3) MDC speed control register value
1632
	 * needs to be restored to original value instead of default one,
1633
	 * otherwise some PHY registers may fail to be read.
1634
	 */
1635
	if (mdcsc != MDCSC_DEFAULT)
1636
		CSR_WRITE_2(sc, VTE_MDCSC, mdcsc);
1628
}
1637
}
1629
1638
1630
static void
1639
static void

Return to bug 258580