Subject: Re: Anyone using a "NIC" from thinknic.com?
To: None <gillham@vaultron.com>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: port-i386
Date: 08/11/2000 13:33:26
In <200008101609.e7AG9Vh18759@flash.vaultron.com>
gillham@vaultron.com wrote:

> The current revision has a SIS 900 ethernet controller.  The 'sip' driver
> is reporting a "master abort" when I ifconfig it.  I have another
> motherboard (from Amptron) with an SIS 900 that works fine.  So it appears
> to be either the chip revision or something with the motherboard chipset
> that is causing it.

Would you please try the attached patch?

My macppc requires more extra delay()s in sip_set_filter()
to make Rx filter work correctly, but I think it is a different
problem from yours.
---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp

--- if_sip.c.orig	Sat May 13 19:42:55 2000
+++ if_sip.c	Fri Aug 11 13:23:34 2000
@@ -264,6 +264,8 @@
 	SIP_CDRXSYNC((sc), (x), BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); \
 } while (0)
 
+#define SIP_TIMEOUT 1000
+
 void	sip_start __P((struct ifnet *));
 void	sip_watchdog __P((struct ifnet *));
 int	sip_ioctl __P((struct ifnet *, u_long, caddr_t));
@@ -1328,14 +1330,16 @@
 
 	bus_space_write_4(st, sh, SIP_CR, CR_RST);
 
-	for (i = 0; i < 1000; i++) {
-		if ((bus_space_read_4(st, sh, SIP_ISR) &
-		     (ISR_TXRCMP|ISR_RXRCMP)) == (ISR_TXRCMP|ISR_RXRCMP))
-			return;
+	for (i = 0; i < SIP_TIMEOUT; i++) {
+		if ((bus_space_read_4(st, sh, SIP_CR) & CR_RST) == 0)
+			break;
 		delay(2);
 	}
 
-	printf("%s: reset failed to complete\n", sc->sc_dev.dv_xname);
+	if (i == SIP_TIMEOUT)
+		printf("%s: reset failed to complete\n", sc->sc_dev.dv_xname);
+
+	delay(1000);
 }
 
 /*