From owner-freebsd-current Wed Feb 3 13:30:37 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA26235 for freebsd-current-outgoing; Wed, 3 Feb 1999 13:30:37 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from skynet.ctr.columbia.edu (skynet.ctr.columbia.edu [128.59.64.70]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id NAA26228 for ; Wed, 3 Feb 1999 13:30:33 -0800 (PST) (envelope-from wpaul@skynet.ctr.columbia.edu) Received: (from wpaul@localhost) by skynet.ctr.columbia.edu (8.6.12/8.6.9) id QAA07284; Wed, 3 Feb 1999 16:37:16 -0500 From: Bill Paul Message-Id: <199902032137.QAA07284@skynet.ctr.columbia.edu> Subject: Re: problem with vr0 To: clkao@CirX.ORG (Chia-liang Kao) Date: Wed, 3 Feb 1999 16:37:14 -0500 (EST) Cc: current@FreeBSD.ORG In-Reply-To: <199902031623.AAA43583@genius.cirx.org> from "Chia-liang Kao" at Feb 4, 99 00:23:47 am X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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