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

(-)if_re.c (-7 / +14 lines)
Lines 184-189 static void re_driver_stop __P((struct re_sof Link Here
184
184
185
static void re_hw_phy_config		__P((struct re_softc *));
185
static void re_hw_phy_config		__P((struct re_softc *));
186
static void re_init			__P((void *));
186
static void re_init			__P((void *));
187
static void re_init_locked		__P((void *));
187
static int  re_var_init			__P((struct re_softc *));
188
static int  re_var_init			__P((struct re_softc *));
188
static void re_reset			__P((struct re_softc *));
189
static void re_reset			__P((struct re_softc *));
189
static void re_stop			__P((struct re_softc *));
190
static void re_stop			__P((struct re_softc *));
Lines 7077-7088 static void re_init_unlock(void *xsc) /* Software & Link Here
7077
        return;
7078
        return;
7078
}
7079
}
7079
7080
7080
static void re_init(void *xsc)  	/* Software & Hardware Initialize */
7081
static void re_init_locked(void *xsc)  	/* Software & Hardware Initialize */
7081
{
7082
{
7082
        struct re_softc		*sc = xsc;
7083
        struct re_softc		*sc = xsc;
7083
        struct ifnet		*ifp;
7084
        struct ifnet		*ifp;
7084
7085
7085
        RE_LOCK(sc);
7086
        ifp = RE_GET_IFNET(sc);
7086
        ifp = RE_GET_IFNET(sc);
7087
7087
7088
        if (re_link_ok(sc)) {
7088
        if (re_link_ok(sc)) {
Lines 7093-7099 static void re_init(void *xsc) /* Software & Hardwar Link Here
7093
7093
7094
        sc->re_link_chg_det = 1;
7094
        sc->re_link_chg_det = 1;
7095
        re_start_timer(sc);
7095
        re_start_timer(sc);
7096
}
7096
7097
7098
static void re_init(void *xsc)  	/* Software & Hardware Initialize */
7099
{
7100
        struct re_softc		*sc = xsc;
7101
7102
        RE_LOCK(sc);
7103
	re_init_locked(sc);
7097
        RE_UNLOCK(sc);
7104
        RE_UNLOCK(sc);
7098
}
7105
}
7099
7106
Lines 8442-8448 static void re_int_task(void *arg, int npending) Link Here
8442
                        if ((status & RE_ISR_FIFO_OFLOW) &&
8449
                        if ((status & RE_ISR_FIFO_OFLOW) &&
8443
                            (!(status & (RE_ISR_RX_OK | RE_ISR_TX_OK | RE_ISR_RX_OVERRUN)))) {
8450
                            (!(status & (RE_ISR_RX_OK | RE_ISR_TX_OK | RE_ISR_RX_OVERRUN)))) {
8444
                                re_reset(sc);
8451
                                re_reset(sc);
8445
                                re_init(sc);
8452
                                re_init_locked(sc);
8446
                                sc->rx_fifo_overflow = 0;
8453
                                sc->rx_fifo_overflow = 0;
8447
                                CSR_WRITE_2(sc, RE_ISR, RE_ISR_FIFO_OFLOW);
8454
                                CSR_WRITE_2(sc, RE_ISR, RE_ISR_FIFO_OFLOW);
8448
                        }
8455
                        }
Lines 8453-8459 static void re_int_task(void *arg, int npending) Link Here
8453
8460
8454
        if (status & RE_ISR_SYSTEM_ERR) {
8461
        if (status & RE_ISR_SYSTEM_ERR) {
8455
                re_reset(sc);
8462
                re_reset(sc);
8456
                re_init(sc);
8463
                re_init_locked(sc);
8457
        }
8464
        }
8458
8465
8459
        switch(sc->re_type) {
8466
        switch(sc->re_type) {
Lines 8518-8524 static void re_int_task_8125(void *arg, int npending) Link Here
8518
8525
8519
        if (status & RE_ISR_SYSTEM_ERR) {
8526
        if (status & RE_ISR_SYSTEM_ERR) {
8520
                re_reset(sc);
8527
                re_reset(sc);
8521
                re_init(sc);
8528
                re_init_locked(sc);
8522
        }
8529
        }
8523
8530
8524
        RE_UNLOCK(sc);
8531
        RE_UNLOCK(sc);
Lines 8750-8756 caddr_t data; Link Here
8750
                                error =re_alloc_buf(sc);
8757
                                error =re_alloc_buf(sc);
8751
8758
8752
                                if (error == 0) {
8759
                                if (error == 0) {
8753
                                        re_init(sc);
8760
                                        re_init_locked(sc);
8754
                                }
8761
                                }
8755
                                RE_UNLOCK(sc);
8762
                                RE_UNLOCK(sc);
8756
8763
Lines 8773-8779 caddr_t data; Link Here
8773
        case SIOCSIFFLAGS:
8780
        case SIOCSIFFLAGS:
8774
                RE_LOCK(sc);
8781
                RE_LOCK(sc);
8775
                if (ifp->if_flags & IFF_UP) {
8782
                if (ifp->if_flags & IFF_UP) {
8776
                        re_init(sc);
8783
                        re_init_locked(sc);
8777
                } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
8784
                } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
8778
                        re_stop(sc);
8785
                        re_stop(sc);
8779
                }
8786
                }

Return to bug 256757