Subject: Re: PR/30505 - Audio skipping
To: None <thorpej@netbsd.org, gnats-admin@netbsd.org,>
From: David Brownlee <abs@NetBSD.org>
List: netbsd-bugs
Date: 10/12/2005 10:00:04
The following reply was made to PR kern/30505; it has been noted by GNATS.

From: David Brownlee <abs@NetBSD.org>
To: Pavel Cahyna <pavel.cahyna@st.mff.cuni.cz>
Cc: port-i386@netbsd.org, tron@zhadum.org.uk, gnats-bugs@netbsd.org
Subject: Re: PR/30505 - Audio skipping
Date: Wed, 12 Oct 2005 10:59:04 +0100 (BST)

  	I've knocked up a quick diff to 3.x to make the receiver lock-up
  	workaround conditional on link1 being set on the fxp interface.
  	It will report if the workaround may be needed at bootup.
 
  	It could be cleaned up, but it fixes the issue for me...
 
 Index: sys/dev/ic/i82557.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/ic/i82557.c,v
 retrieving revision 1.89.10.1
 diff -u -p -r1.89.10.1 i82557.c
 --- sys/dev/ic/i82557.c	16 Aug 2005 11:53:22 -0000	1.89.10.1
 +++ sys/dev/ic/i82557.c	12 Oct 2005 09:40:20 -0000
 @@ -663,12 +663,12 @@ fxp_get_info(struct fxp_softc *sc, u_int
   		}
   	}
 
 -	/* Receiver lock-up workaround detection. */
 +	/* Receiver lock-up workaround detection. (FXPF_RECV_WORKAROUND) */
 +	/* Due to false positives we make it conditional on setting link1 */
   	fxp_read_eeprom(sc, &data, 3, 1);
   	if ((data & 0x03) != 0x03) {
 -		aprint_verbose("%s: Enabling receiver lock-up workaround\n",
 +		aprint_verbose("%s: May need receiver lock-up workaround\n",
   		    sc->sc_dev.dv_xname);
 -		sc->sc_flags |= FXPF_RECV_WORKAROUND;
   	}
   }
 
 @@ -1711,6 +1711,11 @@ fxp_init(struct ifnet *ifp)
   	 */
   	fxp_load_ucode(sc);
 
 +	if ((sc->sc_ethercom.ec_if.if_flags & IFF_LINK1))
 +		sc->sc_flags |= FXPF_RECV_WORKAROUND;
 +	else
 +		sc->sc_flags &= ~FXPF_RECV_WORKAROUND;
 +
   	/*
   	 * This copy is kind of disgusting, but there are a bunch of must be
   	 * zero and must be one bits in this structure and this is the easiest
 
 -- 
  		David/absolute       -- www.NetBSD.org: No hype required --