changeset 7893:e456c5186900

6729383 sfe driver gets reset timeout panic on sparc
author Alan Duboff <Alan.Duboff@Sun.COM>
date Tue, 21 Oct 2008 00:16:15 -0700
parents c60b20c62dc0
children 452169e7d840
files usr/src/uts/common/io/sfe/sfe.c usr/src/uts/common/io/sfe/sfe_mii.h usr/src/uts/common/io/sfe/sfe_util.c usr/src/uts/common/io/sfe/sfe_util.h usr/src/uts/common/io/sfe/sfereg.h
diffstat 5 files changed, 16 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/common/io/sfe/sfe.c	Tue Oct 21 10:24:39 2008 +0800
+++ b/usr/src/uts/common/io/sfe/sfe.c	Tue Oct 21 00:16:15 2008 -0700
@@ -55,7 +55,7 @@
 #include "sfe_util.h"
 #include "sfereg.h"
 
-char	ident[] = "sis900/dp83815 driver";
+char	ident[] = "sis900/dp83815 driver v" "2.6.1t29os";
 
 /* Debugging support */
 #ifdef DEBUG_LEVEL
@@ -537,7 +537,7 @@
 	OUTL(dp, IMR, 0);
 	lp->isr_pended |= INL(dp, ISR) & lp->our_intr_bits;
 
-	OUTL(dp, RFCR, 0);
+	OUTLINL(dp, RFCR, 0);
 
 	OUTL(dp, CR, CR_RST | CR_TXR | CR_RXR);
 	drv_usecwait(10);
@@ -822,8 +822,8 @@
 	DPRINTF(4, (CE_CONT, CONS "%s: %s: called", dp->name, __func__));
 
 	if ((dp->rxmode & RXMODE_ENABLE) == 0) {
-		/* disalbe rx filter */
-		OUTL(dp, RFCR, 0);
+		/* disable rx filter */
+		OUTLINL(dp, RFCR, 0);
 		return (GEM_SUCCESS);
 	}
 
@@ -862,9 +862,9 @@
 		/* Disable Rx filter and load mac address */
 		for (i = 0; i < ETHERADDRL/2; i++) {
 			/* For sis900, index is in word */
-			OUTL(dp, RFCR,
+			OUTLINL(dp, RFCR,
 			    (RFADDR_MAC_SIS900+i) << RFCR_RFADDR_SHIFT_SIS900);
-			OUTL(dp, RFDR, (mac[i*2+1] << 8) | mac[i*2]);
+			OUTLINL(dp, RFDR, (mac[i*2+1] << 8) | mac[i*2]);
 		}
 
 		bcopy(mac, lp->mac_addr, ETHERADDRL);
@@ -873,13 +873,13 @@
 	/* Load Multicast hash table */
 	for (i = 0; i < hash_size; i++) {
 		/* For sis900, index is in word */
-		OUTL(dp, RFCR,
+		OUTLINL(dp, RFCR,
 		    (RFADDR_MULTICAST_SIS900 + i) << RFCR_RFADDR_SHIFT_SIS900);
-		OUTL(dp, RFDR, hash_tbl[i]);
+		OUTLINL(dp, RFDR, hash_tbl[i]);
 	}
 
 	/* Load rx filter mode and enable rx filter */
-	OUTL(dp, RFCR, RFCR_RFEN | mode);
+	OUTLINL(dp, RFCR, RFCR_RFEN | mode);
 
 	return (GEM_SUCCESS);
 }
@@ -2295,7 +2295,7 @@
  */
 /* ======================================================== */
 DDI_DEFINE_STREAM_OPS(sfe_ops, nulldev, nulldev, sfeattach, sfedetach,
-    nodev, NULL, D_MP, NULL, ddi_quiesce_not_supported);
+	nodev, NULL, D_MP, NULL, ddi_quiesce_not_supported);
 
 static struct modldrv modldrv = {
 	&mod_driverops,	/* Type of module.  This one is a driver */
--- a/usr/src/uts/common/io/sfe/sfe_mii.h	Tue Oct 21 10:24:39 2008 +0800
+++ b/usr/src/uts/common/io/sfe/sfe_mii.h	Tue Oct 21 00:16:15 2008 -0700
@@ -30,7 +30,6 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
  * DAMAGE.
  */
-#pragma ident	"%Z%%M%	%I%	%E% SMI"	/* sfe device driver */
 
 /*
  * sfe_mii.h : MII registers
--- a/usr/src/uts/common/io/sfe/sfe_util.c	Tue Oct 21 10:24:39 2008 +0800
+++ b/usr/src/uts/common/io/sfe/sfe_util.c	Tue Oct 21 00:16:15 2008 -0700
@@ -31,8 +31,6 @@
  * DAMAGE.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"	/* sfe device driver */
-
 /*
  * System Header files.
  */
--- a/usr/src/uts/common/io/sfe/sfe_util.h	Tue Oct 21 10:24:39 2008 +0800
+++ b/usr/src/uts/common/io/sfe/sfe_util.h	Tue Oct 21 00:16:15 2008 -0700
@@ -31,8 +31,6 @@
  * DAMAGE.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"	/* sfe device driver */
-
 #ifndef _SFE_UTIL_H_
 #define	_SFE_UTIL_H_
 #include <sys/mac.h>
@@ -66,9 +64,13 @@
 #define	OUTW(dp, p, v)	\
 	ddi_put16((dp)->regs_handle, \
 		(void *)((caddr_t)((dp)->base_addr) + (p)), v)
-#define	OUTL(dp, p, v)	\
+#define	OUTL(dp, p, v)  \
 	ddi_put32((dp)->regs_handle, \
-		(void *)((caddr_t)((dp)->base_addr) + (p)), v)
+	    (void *)((caddr_t)((dp)->base_addr) + (p)), v)
+#define	OUTLINL(dp, p, v) \
+	ddi_put32((dp)->regs_handle, \
+	    (void *)((caddr_t)((dp)->base_addr) + (p)), v); \
+	(void) INL((dp), (p))
 #define	INB(dp, p)	\
 	ddi_get8((dp)->regs_handle, \
 		(void *)(((caddr_t)(dp)->base_addr) + (p)))
--- a/usr/src/uts/common/io/sfe/sfereg.h	Tue Oct 21 10:24:39 2008 +0800
+++ b/usr/src/uts/common/io/sfe/sfereg.h	Tue Oct 21 00:16:15 2008 -0700
@@ -31,8 +31,6 @@
  * DAMAGE.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"	/* sfe device driver */
-
 #ifndef	_SFEREG_H_
 #define	_SFEREG_H_
 /*