Subject: kern/12619: panic: _bus_dmamap_sync
To: None <gnats-bugs@gnats.netbsd.org>
From: H.Saito <saito@densan.co.jp>
List: netbsd-bugs
Date: 04/11/2001 22:43:56
>Number:         12619
>Category:       kern
>Synopsis:       bug of sys/dev/pci/if_de.c
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 11 22:45:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     H.Saito
>Release:        1.5
>Organization:
>Environment:
    DCP-R5000/30(DENSAN Compact-PCI bus Board, 21143 SYM port)
    big-endian, mips1, ELF
System: NetBSD vw5 1.5 NetBSD 1.5 (GENERIC) #4: Mon Apr 9 16:40:41 JST 2001 saito@vw4:/user5/NetBSD-1.5/usr/src/sys/arch/devos/compile/GENERIC devos

>Description:
    I cannot use 100base TX(SYM) with autonegotiation.
    De handler only use 10base-T port, when I connect to 
    10BASE-T/100BASE-FX switching HUB.

>How-To-Repeat:
>Fix:
   You need to define TULIP_AUTONEGO macro.

--- if_de.c.org	Thu Mar 23 16:01:37 2000
+++ if_de.c	Tue Apr 10 12:38:58 2001
@@ -374,6 +374,16 @@
 	}
 	TULIP_CSR_WRITE(sc, csr_sia_general, mi->mi_gpcontrol);
 	TULIP_CSR_WRITE(sc, csr_sia_general, mi->mi_gpdata);
+#if (defined TULIP_AUTONEGO)
+	if (sc->tulip_media == TULIP_MEDIA_UNKNOWN) {
+	    TULIP_CSR_WRITE(sc, csr_command, TULIP_CSR_READ(sc, csr_command) & ~TULIP_CMD_PORTSELECT);
+	    TULIP_CSR_WRITE(sc, csr_sia_connectivity, 1);
+	    TULIP_CSR_WRITE(sc, csr_status, 0x1000);
+	} else {
+	    TULIP_CSR_WRITE(sc, csr_sia_tx_rx, 0);
+	    TULIP_CSR_WRITE(sc, csr_sia_connectivity, 0);
+	}
+#endif
     } else if (mi->mi_type == TULIP_MEDIAINFO_MII
 	       && sc->tulip_probe_state != TULIP_PROBE_INACTIVE) {
 	int idx;
@@ -768,7 +778,9 @@
     if (event == TULIP_MEDIAPOLL_TXPROBE_OK || event == TULIP_MEDIAPOLL_LINKPASS) {
 	if (event == TULIP_MEDIAPOLL_LINKPASS) {
 	    /* XXX Check media status just to be sure */
+#if !(defined TULIP_AUTONEGO)
 	    sc->tulip_probe_media = TULIP_MEDIA_10BASET;
+#endif
 #if defined(TULIP_DEBUG)
 	} else {
 	    sc->tulip_dbg.dbg_txprobes_ok[sc->tulip_probe_media]++;
@@ -4091,7 +4132,12 @@
 		tulip_ifstart(&sc->tulip_if);
 	}
     }
-    if (sc->tulip_flags & TULIP_NEEDRESET) {
+#if (defined TULIP_AUTONEGO)
+    if (sc->tulip_flags & (TULIP_NEEDRESET | TULIP_PRINTMEDIA))
+#else
+    if (sc->tulip_flags & TULIP_NEEDRESET)
+#endif
+    {
 	tulip_reset(sc);
 	tulip_init(sc);
     }
>Release-Note:
>Audit-Trail:
>Unformatted: