Subject: Re: vr and media 100baseTX not working
To: None <teijo.ronka@gmail.com>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: current-users
Date: 05/14/2007 23:04:17
[please don't use HTML mail otherwise it will be caught by spam filter]

teijo.ronka@gmail.com wrote:

> Thank you for your reply. Here a snip from dmesg:
> 
> vr0 at pci0 dev 18 function 0: VIA VT6102 (Rhine II) 10/100 Ethernet
> ALKD: Picked IRQ 23 with weight 0
> vr0: interrupting at ioapic0 pin 23 (irq 5)
> vr0: Ethernet address: 00:04:61:4e:4d:ac
> ukphy0 at vr0 phy 1: Generic IEEE 802.3u media interface
> ukphy0: OUI 0x0002c6, model 0x0032, rev. 8
> ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
> 
> I'm quite sure, that it worked on current kernel dated 8.4.2006.

Hmm. What type of hub are you using (switch or dumb)?
Did the old kernel show the similar
"vr0: transmit aborted" and "vr0: restarting"
messages sometimes?

Anyway, could you try the attached patch or
the following compiled kernel?

http://www.ceres.dti.ne.jp/~tsutsui/netbsd/netbsd-i386-vr-patch-20070514.gz

--- if_vr.c.orig	2007-03-04 19:30:38.000000000 +0900
+++ if_vr.c	2007-05-14 22:51:28.000000000 +0900
@@ -947,13 +947,17 @@
 			vr_rxeoc(sc);
 
 
-		if (status & (VR_ISR_BUSERR | VR_ISR_TX_UNDERRUN)) {
+		if (status & (VR_ISR_BUSERR | VR_ISR_TX_UNDERRUN |
+		    VR_ISR_TX_ABRT | VR_ISR_TX_ABRT2)) {
 			if (status & VR_ISR_BUSERR)
 				printf("%s: PCI bus error\n",
 				    sc->vr_dev.dv_xname);
 			if (status & VR_ISR_TX_UNDERRUN)
 				printf("%s: transmit underrun\n",
 				    sc->vr_dev.dv_xname);
+			if (status & (VR_ISR_TX_ABRT | VR_ISR_TX_ABRT2))
+				printf("%s: transmit aborted\n",
+				    sc->vr_dev.dv_xname);
 			/* vr_init() calls vr_start() */
 			dotx = 0;
 			(void)vr_init(ifp);
@@ -965,14 +969,9 @@
 			vr_txeof(sc);
 		}
 
-		if (status &
-		    (VR_ISR_TX_ABRT | VR_ISR_TX_ABRT2 | VR_ISR_TX_UDFI)) {
-			if (status & (VR_ISR_TX_ABRT | VR_ISR_TX_ABRT2))
-				printf("%s: transmit aborted\n",
-				    sc->vr_dev.dv_xname);
-			if (status & VR_ISR_TX_UDFI)
-				printf("%s: transmit underflow\n",
-				    sc->vr_dev.dv_xname);
+		if (status & VR_ISR_TX_UDFI) {
+			printf("%s: transmit underflow\n",
+			    sc->vr_dev.dv_xname);
 			ifp->if_oerrors++;
 			dotx = 1;
 			vr_txeof(sc);


---
Izumi Tsutsui