NetBSD Problem Report #20608

Received: (qmail 1555 invoked by uid 605); 7 Mar 2003 07:58:00 -0000
Message-Id: <20030307075759.84D5711152@narn.netbsd.org>
Date: Thu,  6 Mar 2003 23:57:59 -0800 (PST)
From: jfm@caslon.dk
Sender: gnats-bugs-owner@netbsd.org
Reply-To: jfm@caslon.dk
To: gnats-bugs@gnats.netbsd.org
Subject: Built-in mc0 ethernet does not work (gives timeout errors) on Apple Network Server
X-Send-Pr-Version: www-1.0

>Number:         20608
>Category:       port-macppc
>Synopsis:       Built-in mc0 ethernet does not work (gives timeout errors) on Apple Network Server
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-macppc-maintainer
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 07 07:59:00 +0000 2003
>Closed-Date:    
>Last-Modified:  
>Originator:     John Fox Maule
>Release:        1-6 macppc
>Organization:
>Environment:
NetBSD hubble.caslon.dk 1.6 NetBSD 1.6 (HUBBLE) #12: Mon Mar  3 23:28:04 CET 2003     gljohmau@hubble.caslon.dk:/usr/src/sys/arch/macppc/compile/HUBBLE macppc
>Description:
Apple Network Server 500 and 700
Built-in mc0 ethernet does not work (gives timeout errors)
http://www.netbsd.org/Ports/macppc/models.html#ANS

>How-To-Repeat:
Boot netbsd on Apple Network Server
ifconfig mc0 inet 192.168.1.1 netmask 255.255.255.0 up
Try network connectivity ping etc.

>Fix:
Check if its an ANS AAPL,ShinerESB and set sc->sc_plscc = 1; ANS uses AAUI
Diffs to v1.5
Tested on my ANS 700 works. 

*** /root/backup/usr/src/sys/arch/macppc/dev/if_mc.c	Mon Mar  3 13:51:33 2003
--- /usr/src/sys/arch/macppc/dev/if_mc.c	Mon Mar  3 23:25:42 2003
***************
*** 58,63 ****
--- 58,65 ----

  #define MC_BUFSIZE 0x800

+ #define PORTSEL_AAUI PORTSEL_AUI + ENPLSIO
+ 
  hide int	mc_match __P((struct device *, struct cfdata *, void *));
  hide void	mc_attach __P((struct device *, struct device *, void *));
  hide void	mc_init __P((struct mc_softc *sc));
***************
*** 113,118 ****
--- 115,121 ----
  	struct mc_softc *sc = (struct mc_softc *)self;
  	u_int8_t myaddr[ETHER_ADDR_LEN];
  	u_int *reg;
+         int ofroot;

  	sc->sc_node = ca->ca_node;

***************
*** 179,187 ****
  	sc->sc_biucc = XMTSP_64;
  	sc->sc_fifocc = XMTFW_16 | RCVFW_64 | XMTFWU | RCVFWU |
  	    XMTBRST | RCVBRST;
! 	/*sc->sc_plscc = PORTSEL_10BT;*/
! 	sc->sc_plscc = PORTSEL_GPSI | ENPLSIO;
! 
  	/* mcsetup returns 1 if something fails */
  	if (mcsetup(sc, myaddr)) {
  		printf("mcsetup returns non zero\n");
--- 182,201 ----
  	sc->sc_biucc = XMTSP_64;
  	sc->sc_fifocc = XMTFW_16 | RCVFW_64 | XMTFWU | RCVFWU |
  	    XMTBRST | RCVBRST;
!         
!         if ((ofroot = OF_finddevice("/")) != -1) {
!                 char compat[32];
! 
!                 memset(compat, 0, sizeof compat);
!                 OF_getprop(ofroot, "compatible", compat, sizeof compat);
!                 if (strcmp(compat, "AAPL,ShinerESB") == 0)
!                 /* Detected Apple Network Server */
!                 sc->sc_plscc = PORTSEL_AAUI;
!         }
!         else {
!                 sc->sc_plscc = PORTSEL_GPSI | ENPLSIO;
!         }
!                 
  	/* mcsetup returns 1 if something fails */
  	if (mcsetup(sc, myaddr)) {
  		printf("mcsetup returns non zero\n");

>Release-Note:
>Audit-Trail:
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.