Various whitespace fixes, and turn 'No packet to start' message to DPRINTF().
Mostly inspired by Christian Limpach's patch in port-next68k/16978.
This commit is contained in:
parent
88203d9c69
commit
e8895ed0a1
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: mb8795.c,v 1.24 2001/06/16 09:18:46 dbj Exp $ */
|
/* $NetBSD: mb8795.c,v 1.25 2002/05/18 14:33:35 jdolecek Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998 Darrin B. Jewell
|
* Copyright (c) 1998 Darrin B. Jewell
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@ -718,7 +718,7 @@ mb8795_start(ifp)
|
|||||||
if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING)
|
if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
DPRINTF(("%s: mb8795_start()\n",sc->sc_dev.dv_xname));
|
DPRINTF(("%s: mb8795_start()\n", sc->sc_dev.dv_xname));
|
||||||
|
|
||||||
#if (defined(DIAGNOSTIC))
|
#if (defined(DIAGNOSTIC))
|
||||||
{
|
{
|
||||||
@ -728,7 +728,8 @@ mb8795_start(ifp)
|
|||||||
/* @@@ I used to panic here, but then it paniced once.
|
/* @@@ I used to panic here, but then it paniced once.
|
||||||
* Let's see if I can just reset instead. [ dbj 980706.1900 ]
|
* Let's see if I can just reset instead. [ dbj 980706.1900 ]
|
||||||
*/
|
*/
|
||||||
printf("%s: transmitter not ready\n", sc->sc_dev.dv_xname);
|
printf("%s: transmitter not ready\n",
|
||||||
|
sc->sc_dev.dv_xname);
|
||||||
mb8795_reset(sc);
|
mb8795_reset(sc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -743,8 +744,8 @@ mb8795_start(ifp)
|
|||||||
|
|
||||||
IF_DEQUEUE(&ifp->if_snd, sc->sc_tx_mb_head);
|
IF_DEQUEUE(&ifp->if_snd, sc->sc_tx_mb_head);
|
||||||
if (sc->sc_tx_mb_head == 0) {
|
if (sc->sc_tx_mb_head == 0) {
|
||||||
printf("%s: No packet to start\n",
|
DPRINTF(("%s: No packet to start\n",
|
||||||
sc->sc_dev.dv_xname);
|
sc->sc_dev.dv_xname));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -763,9 +764,7 @@ mb8795_start(ifp)
|
|||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
error = bus_dmamap_load_mbuf(sc->sc_tx_dmat,
|
error = bus_dmamap_load_mbuf(sc->sc_tx_dmat,
|
||||||
sc->sc_tx_dmamap,
|
sc->sc_tx_dmamap, sc->sc_tx_mb_head, BUS_DMA_NOWAIT);
|
||||||
sc->sc_tx_mb_head,
|
|
||||||
BUS_DMA_NOWAIT);
|
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
u_char *buf = sc->sc_txbuf;
|
u_char *buf = sc->sc_txbuf;
|
||||||
@ -820,7 +819,6 @@ mb8795_start(ifp)
|
|||||||
if (ifp->if_bpf)
|
if (ifp->if_bpf)
|
||||||
bpf_mtap(ifp->if_bpf, sc->sc_tx_mb_head);
|
bpf_mtap(ifp->if_bpf, sc->sc_tx_mb_head);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************/
|
/****************************************************************/
|
||||||
@ -926,7 +924,8 @@ mb8795_rxdma_shutdown(arg)
|
|||||||
{
|
{
|
||||||
struct mb8795_softc *sc = arg;
|
struct mb8795_softc *sc = arg;
|
||||||
|
|
||||||
DPRINTF(("%s: mb8795_rxdma_shutdown(), restarting.\n",sc->sc_dev.dv_xname));
|
DPRINTF(("%s: mb8795_rxdma_shutdown(), restarting.\n",
|
||||||
|
sc->sc_dev.dv_xname));
|
||||||
|
|
||||||
nextdma_start(sc->sc_rx_nd, DMACSR_SETREAD);
|
nextdma_start(sc->sc_rx_nd, DMACSR_SETREAD);
|
||||||
}
|
}
|
||||||
@ -1011,7 +1010,7 @@ mb8795_rxdma_continue(arg)
|
|||||||
* buffers instead so we drop older packets instead
|
* buffers instead so we drop older packets instead
|
||||||
* of newer ones.
|
* of newer ones.
|
||||||
*/
|
*/
|
||||||
if (((sc->sc_rx_loaded_idx+1)%MB8795_NRXBUFS) != sc->sc_rx_handled_idx) {
|
if (((sc->sc_rx_loaded_idx+1)%MB8795_NRXBUFS) != sc->sc_rx_handled_idx){
|
||||||
sc->sc_rx_loaded_idx++;
|
sc->sc_rx_loaded_idx++;
|
||||||
sc->sc_rx_loaded_idx %= MB8795_NRXBUFS;
|
sc->sc_rx_loaded_idx %= MB8795_NRXBUFS;
|
||||||
map = sc->sc_rx_dmamap[sc->sc_rx_loaded_idx];
|
map = sc->sc_rx_dmamap[sc->sc_rx_loaded_idx];
|
||||||
|
Loading…
Reference in New Issue
Block a user