ae_write_mbuf() broke with the last change; revert.

This commit is contained in:
scottr 2000-09-13 05:16:47 +00:00
parent b5377930e3
commit 7eb72c4f15

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ae.c,v 1.68 2000/07/30 21:41:59 briggs Exp $ */
/* $NetBSD: if_ae.c,v 1.69 2000/09/13 05:16:47 scottr Exp $ */
/*
* Device driver for National Semiconductor DS8390/WD83C690 based ethernet
@ -113,12 +113,9 @@ ae_write_mbuf(sc, m, buf)
int buf;
{
u_char *data, savebyte[2];
u_int16_t *pshort;
int len, wantbyte;
u_short totlen = 0;
pshort = (u_int16_t *) &savebyte[0];
wantbyte = 0;
for (; m ; m = m->m_next) {
@ -130,7 +127,7 @@ ae_write_mbuf(sc, m, buf)
if (wantbyte) {
savebyte[1] = *data;
bus_space_write_region_2(sc->sc_buft,
sc->sc_bufh, buf, pshort, 1);
sc->sc_bufh, buf, savebyte, 1);
buf += 2;
data++;
len--;
@ -139,7 +136,7 @@ ae_write_mbuf(sc, m, buf)
/* Output contiguous words. */
if (len > 1) {
bus_space_write_region_2(sc->sc_buft,
sc->sc_bufh, buf, pshort, len >> 1);
sc->sc_bufh, buf, data, len >> 1);
buf += len & ~1;
data += len & ~1;
len &= 1;
@ -155,7 +152,7 @@ ae_write_mbuf(sc, m, buf)
if (wantbyte) {
savebyte[1] = 0;
bus_space_write_region_2(sc->sc_buft, sc->sc_bufh,
buf, pshort, 1);
buf, savebyte, 1);
}
return (totlen);
}