diff options
author | wpaul <wpaul@FreeBSD.org> | 2001-01-19 23:55:07 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 2001-01-19 23:55:07 +0000 |
commit | 43abd651dd5f7bc88adaa95d41ba92c493ef3feb (patch) | |
tree | 056b6642f664d30399a18b668c8147b24d687bc7 /sys/dev/vr | |
parent | 1a613000805b6793f1e8b2e2fca1afecd69beba8 (diff) | |
download | FreeBSD-src-43abd651dd5f7bc88adaa95d41ba92c493ef3feb.zip FreeBSD-src-43abd651dd5f7bc88adaa95d41ba92c493ef3feb.tar.gz |
Bug fixes that I've put together while working on a project in the office:
if_vr: handle the case where vr_encap() returns failure: bust out of the
packet sending loop instead of panicking. Also add some missing
newlines to some printf()s.
if_dc: The miibus_read and miibus_write methods keep swapping in and
out of MII mode by fiddling with CSR6 for cards with MII PHYs.
This is a hack to support the original Macronix 98713 card which
has built-in NWAY that uses an MII-like management interface
even though it uses serial transceivers. Conditionalize this
so that we only do this on 98713 chips, since it does bad things
to genuine tulip chips (and maybe other clones).
Diffstat (limited to 'sys/dev/vr')
-rw-r--r-- | sys/dev/vr/if_vr.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c index 7c3729f..662e7be 100644 --- a/sys/dev/vr/if_vr.c +++ b/sys/dev/vr/if_vr.c @@ -1262,14 +1262,14 @@ static int vr_encap(sc, c, m_head) MGETHDR(m_new, M_DONTWAIT, MT_DATA); if (m_new == NULL) { - printf("vr%d: no memory for tx list", sc->vr_unit); + printf("vr%d: no memory for tx list\n", sc->vr_unit); return(1); } if (m_head->m_pkthdr.len > MHLEN) { MCLGET(m_new, M_DONTWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); - printf("vr%d: no memory for tx list", + printf("vr%d: no memory for tx list\n", sc->vr_unit); return(1); } @@ -1346,7 +1346,11 @@ static void vr_start(ifp) sc->vr_cdata.vr_tx_free = cur_tx->vr_nextdesc; /* Pack the data into the descriptor. */ - vr_encap(sc, cur_tx, m_head); + if (vr_encap(sc, cur_tx, m_head)) { + IF_PREPEND(&ifp->if_snd, m_head); + cur_tx = NULL; + break; + } if (cur_tx != start_tx) VR_TXOWN(cur_tx) = VR_TXSTAT_OWN; |