*** if_xl.c 1998/09/25 17:43:57 1.54 --- if_xl.c 1998/10/05 23:22:34 *************** *** 1702,1707 **** --- 1702,1708 ---- cd->xl_tx_free = &cd->xl_tx_chain[0]; cd->xl_tx_tail = cd->xl_tx_head = NULL; + sc->xl_txeoc = 1; return(0); } *************** *** 1937,1951 **** if (sc->xl_cdata.xl_tx_head == NULL) { ifp->if_flags &= ~IFF_OACTIVE; sc->xl_cdata.xl_tx_tail = NULL; if (sc->xl_want_auto) xl_autoneg_mii(sc, XL_FLAG_SCHEDDELAY, 1); } else { ! if (CSR_READ_4(sc, XL_DMACTL) & XL_DMACTL_DOWN_STALLED || ! !CSR_READ_4(sc, XL_DOWNLIST_PTR)) { ! CSR_WRITE_4(sc, XL_DOWNLIST_PTR, vtophys(sc->xl_cdata.xl_tx_head->xl_ptr)); ! CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_DOWN_UNSTALL); ! } } return; --- 1938,1953 ---- if (sc->xl_cdata.xl_tx_head == NULL) { ifp->if_flags &= ~IFF_OACTIVE; sc->xl_cdata.xl_tx_tail = NULL; + sc->xl_txeoc = 1; if (sc->xl_want_auto) xl_autoneg_mii(sc, XL_FLAG_SCHEDDELAY, 1); } else { ! sc->xl_txeoc = 0; ! CSR_WRITE_4(sc, XL_COMMAND, XL_CMD_DOWN_STALL); ! xl_wait(sc); ! CSR_WRITE_4(sc, XL_DOWNLIST_PTR, vtophys(sc->xl_cdata.xl_tx_head->xl_ptr)); ! CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_DOWN_UNSTALL); } return; *************** *** 2267,2287 **** * Queue the packets. If the TX channel is clear, update * the downlist pointer register. */ ! CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_DOWN_STALL); ! xl_wait(sc); ! ! if (CSR_READ_4(sc, XL_DOWNLIST_PTR)) { ! sc->xl_cdata.xl_tx_tail->xl_next = start_tx; ! sc->xl_cdata.xl_tx_tail->xl_ptr->xl_next = ! vtophys(start_tx->xl_ptr); ! sc->xl_cdata.xl_tx_tail->xl_ptr->xl_status &= ! ~XL_TXSTAT_DL_INTR; ! } else { sc->xl_cdata.xl_tx_head = start_tx; sc->xl_cdata.xl_tx_tail = cur_tx; ! CSR_WRITE_4(sc, XL_DOWNLIST_PTR, vtophys(start_tx->xl_ptr)); } - CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_DOWN_UNSTALL); XL_SEL_WIN(7); --- 2269,2289 ---- * Queue the packets. If the TX channel is clear, update * the downlist pointer register. */ ! if (sc->xl_cdata.xl_tx_head == NULL) { sc->xl_cdata.xl_tx_head = start_tx; sc->xl_cdata.xl_tx_tail = cur_tx; ! if (sc->xl_txeoc) { ! sc->xl_txeoc = 0; ! CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_DOWN_STALL); ! xl_wait(sc); ! CSR_WRITE_4(sc, XL_DOWNLIST_PTR, ! vtophys(start_tx->xl_ptr)); ! CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_DOWN_UNSTALL); ! } ! } else { ! sc->xl_cdata.xl_tx_tail->xl_next = start_tx; ! sc->xl_cdata.xl_tx_tail = start_tx; } XL_SEL_WIN(7); *** if_xlreg.h 1998/09/25 17:43:57 1.16 --- if_xlreg.h 1998/10/05 01:02:47 *************** *** 554,559 **** --- 554,560 ---- u_int8_t xl_want_auto; u_int8_t xl_autoneg; u_int8_t xl_stats_no_timeout; + u_int8_t xl_txeoc; caddr_t xl_ldata_ptr; struct xl_list_data *xl_ldata; struct xl_chain_data xl_cdata;