Subject: kern/24805: CFG_EDBMASTEN bit will be reset compulsorily in sip_init()
To: None <gnats-bugs@gnats.netbsd.org>
From: HITOSHI Osada <QFH02545@nifty.com>
List: netbsd-bugs
Date: 03/17/2004 00:08:24
>Number:         24805
>Category:       kern
>Synopsis:       CFG_EDBMASTEN bit will be reset compulsorily in sip_init()
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 16 15:09:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 1.6.2
>Organization:
None
>Environment:
System: NetBSD that 1.6.2 NetBSD 1.6.2 (THATK7) #67: Tue Mar 16 20:06:07 JST 2004 that@that:/Sources/NetBSD-src/release-1-6/src/sys/arch/i386/compile/THATK7 i386
Architecture: i386
Machine: i386
>Description:
	In sip_init(), EDBMASTEN bit will be reset compulsorily. 
	This bug also exists in -current.

>How-To-Repeat:

>Fix:
	Keep EDBMASTEN bit in sip_attach().

*** if_sip.c.1.6.2	Tue Mar 16 23:57:40 2004
--- if_sip.c	Wed Mar 17 00:00:21 2004
***************
*** 818,823 ****
--- 818,827 ----
  	if (SIP_SIS900_REV(sc,SIS_REV_635) ||
  	    SIP_SIS900_REV(sc,SIS_REV_900B))
  		sc->sc_cfg |= (CFG_PESEL | CFG_RNDCNT);
+ 
+ 	if (SIP_SIS900_REV(sc,SIS_REV_635) ||
+ 	    SIP_SIS900_REV(sc,SIS_REV_900B)) 
+ 		sc->sc_cfg |= (bus_space_read_4(sc->sc_st, sc->sc_sh, SIP_CFG) & CFG_EDBMASTEN);
  #endif
  
  	(*sip->sip_variant->sipv_read_macaddr)(sc, pa, enaddr);
***************
*** 2261,2267 ****
  #else
  	if ((SIP_SIS900_REV(sc, SIS_REV_635) ||
  	     SIP_SIS900_REV(sc, SIS_REV_900B)) &&
! 	    (bus_space_read_4(sc->sc_st, sc->sc_sh, SIP_CFG) & CFG_EDBMASTEN)) {
  		sc->sc_txcfg = TXCFG_MXDMA_64;
  		sc->sc_rxcfg = RXCFG_MXDMA_64;
  	} else {
--- 2265,2271 ----
  #else
  	if ((SIP_SIS900_REV(sc, SIS_REV_635) ||
  	     SIP_SIS900_REV(sc, SIS_REV_900B)) &&
! 	    (sc->sc_cfg & CFG_EDBMASTEN)) {
  		sc->sc_txcfg = TXCFG_MXDMA_64;
  		sc->sc_rxcfg = RXCFG_MXDMA_64;
  	} else {
>Release-Note:
>Audit-Trail:
>Unformatted: