Subject: Re: 10/100 ethernet cards - followup
To: None <Thilo.Manske@HEH.Uni-Oldenburg.DE>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: port-macppc
Date: 04/23/2000 05:42:50
In <20000422193721.A23996@WintelKiller.T>
Thilo.Manske@HEH.Uni-Oldenburg.DE wrote:

> rtl  (RealTek 8139) does not work, it can send but doesn't receive
>      anything

Does it send out any packet? When I'm tracking this
my 8139 on macppc does not seem to send any data
though it can receive packets with the attached patch.

---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp

--- /sys/dev/ic/rtl81x9.c	Mon Apr 10 16:42:56 2000
+++ rtl81x9.c	Wed Apr 19 22:38:44 2000
@@ -122,6 +122,7 @@
 #endif
 
 #include <machine/bus.h>
+#include <machine/endian.h>
 
 #include <dev/mii/mii.h>
 #include <dev/mii/miivar.h>
@@ -866,7 +867,7 @@
 
 	while((CSR_READ_1(sc, RL_COMMAND) & RL_CMD_EMPTY_RXBUF) == 0) {
 		rxbufpos = sc->rl_cdata.rl_rx_buf + cur_rx;
-		rxstat = *(u_int32_t *)rxbufpos;
+		rxstat = le32toh(*(u_int32_t *)rxbufpos);
 
 		/*
 		 * Here's a totally undocumented fact for you. When the