Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Feb 1999 16:37:14 -0500 (EST)
From:      Bill Paul <wpaul@skynet.ctr.columbia.edu>
To:        clkao@CirX.ORG (Chia-liang Kao)
Cc:        current@FreeBSD.ORG
Subject:   Re: problem with vr0
Message-ID:  <199902032137.QAA07284@skynet.ctr.columbia.edu>
In-Reply-To: <199902031623.AAA43583@genius.cirx.org> from "Chia-liang Kao" at Feb 4, 99 00:23:47 am

next in thread | previous in thread | raw e-mail | index | archive | help
Of all the gin joints in all the towns in all the world, Chia-liang Kao 
had to walk into mine and say:
[chop]

> * - Can you show me the output of the following:
> * 
> *   pciconf -r pci0:19:0 0xc
> * 
> *   I want to see what the latency timer setting looks like.
> It shows `0x00002008'

Hmm... Alright, I have a patch I'd like you to try. I don't know that
this will really have an effect, but I'm curious to see what it does.
If this doesn't work, then the only other thing I can think of is if
you can give me login access to your machine so that I can try some
experiments.

Anyway, to apply the patch, do the following:

- Save this message to /tmp/vr.patch (or something similar).
- Become root.
- Type the following:

	# cd /sys/pci
	# patch < /tmp/vr.patch

- Compile a new kernel and boot it.

Let me know if this has any effect on the card's behavior.

-Bill

-- 
=============================================================================
-Bill Paul            (212) 854-6020 | System Manager, Master of Unix-Fu
Work:         wpaul@ctr.columbia.edu | Center for Telecommunications Research
Home:  wpaul@skynet.ctr.columbia.edu | Columbia University, New York City
=============================================================================
 "It is not I who am crazy; it is I who am mad!" - Ren Hoek, "Space Madness"
=============================================================================

*** ../CVSWORK/sys_pci/if_vr.c	Mon Feb  1 16:25:52 1999
--- if_vr.c	Wed Feb  3 16:11:24 1999
***************
*** 899,905 ****
  	vm_offset_t		pbase, vbase;
  #endif
  	u_char			eaddr[ETHER_ADDR_LEN];
! 	u_int32_t		command;
  	struct vr_softc		*sc;
  	struct ifnet		*ifp;
  	int			media = IFM_ETHER|IFM_100_TX|IFM_FDX;
--- 899,905 ----
  	vm_offset_t		pbase, vbase;
  #endif
  	u_char			eaddr[ETHER_ADDR_LEN];
! 	u_int32_t		command, lat;
  	struct vr_softc		*sc;
  	struct ifnet		*ifp;
  	int			media = IFM_ETHER|IFM_100_TX|IFM_FDX;
***************
*** 988,993 ****
--- 988,1002 ----
  		goto fail;
  	}
  
+ 	/* bump up the latency timer a little */
+ 	command = pci_conf_read(config_id, VR_PCI_LATENCY_TIMER);
+ 	lat = (command & 0x0000FF00) >> 8;
+ 	if (lat < 64) {
+ 		command &= 0xFFFF00FF;
+ 		command |= 0x00004000;
+ 		pci_conf_write(config_id, VR_PCI_LATENCY_TIMER, command);
+ 	}
+ 
  	/* Reset the adapter. */
  	vr_reset(sc);
  
***************
*** 1675,1680 ****
--- 1684,1692 ----
  
  	VR_CLRBIT(sc, VR_TXCFG, VR_TXCFG_TX_THRESH);
  	VR_SETBIT(sc, VR_TXCFG, VR_TXTHRESH_STORENFWD);
+ 
+ 	/* Adjust configuration a little */
+ 	CSR_WRITE_2(sc, VR_BCR0, 0x0006);
  
  	/* Init circular RX list. */
  	if (vr_list_rx_init(sc) == ENOBUFS) {

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902032137.QAA07284>