Subject: Re: 19991204 snapshot.
To: None <mjreilly@flashcom.net>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: port-macppc
Date: 12/11/1999 18:41:31
On Sat, 11 Dec 1999 21:04:00 -0500
Matthew Reilly <mjreilly@flashcom.net> wrote:
> I used the new files from cvs with no patches. Now it's a different
> message I get whem I try to bring up the interface:
>
> tlp1: receive ring overrun
>
> tlp1: incoming packet spilled, resetting
Yoops, I forgot to byte-swap the receive descriptors...
Try this patch. (I'm also going to commit it to the tree, but anoncvs
won't update immediately).
-- Jason R. Thorpe <thorpej@nas.nasa.gov>
Index: tulipvar.h
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/ic/tulipvar.h,v
retrieving revision 1.22
diff -c -r1.22 tulipvar.h
*** tulipvar.h 1999/12/11 00:33:02 1.22
--- tulipvar.h 1999/12/12 02:40:07
***************
*** 447,457 ****
struct mbuf *__m = __rxs->rxs_mbuf; \
\
__m->m_data = __m->m_ext.ext_buf; \
! __rxd->td_bufaddr1 = __rxs->rxs_dmamap->dm_segs[0].ds_addr; \
! __rxd->td_bufaddr2 = TULIP_CDRXADDR((sc), TULIP_NEXTRX((x))); \
__rxd->td_ctl = \
! ((__m->m_ext.ext_size - 1) << TDCTL_SIZE1_SHIFT) | TDCTL_CH; \
! __rxd->td_status = TDSTAT_OWN|TDSTAT_Rx_FS|TDSTAT_Rx_LS; \
TULIP_CDRXSYNC((sc), (x), BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); \
} while (0)
--- 447,460 ----
struct mbuf *__m = __rxs->rxs_mbuf; \
\
__m->m_data = __m->m_ext.ext_buf; \
! __rxd->td_bufaddr1 = \
! htole32(__rxs->rxs_dmamap->dm_segs[0].ds_addr); \
! __rxd->td_bufaddr2 = \
! htole32(TULIP_CDRXADDR((sc), TULIP_NEXTRX((x)))); \
__rxd->td_ctl = \
! htole32(((__m->m_ext.ext_size - 1) << TDCTL_SIZE1_SHIFT) | \
! TDCTL_CH); \
! __rxd->td_status = htole32(TDSTAT_OWN|TDSTAT_Rx_FS|TDSTAT_Rx_LS); \
TULIP_CDRXSYNC((sc), (x), BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); \
} while (0)