Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Apr 2000 13:44:02 -0400 (EDT)
From:      Bill Paul <wpaul@skynet.ctr.columbia.edu>
To:        issei@ace.heart.ne.jp
Cc:        bugs@freebsd.org
Subject:   Re: kern/17866: vr0 hung up
Message-ID:  <200004081744.NAA22322@skynet.ctr.columbia.edu>
In-Reply-To: <200004081705.CAA60012@ace.heart.ne.jp> from "issei@heart.ne.jp" at Apr 9, 2000 02:05:43 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, 
issei@heart.ne.jp had to walk into mine and say:
> 
> >Description:
> 
> I'm using corega FirstEtherII PCI-TX. This device is recognized as vr0 
> and this card worked good in 3.4-RELEASE. 

Grrr. When you make a bug report, you need to describe *all* of
your hardware, not just the bits that you think are interesting.
FreeBSD 4.0 supports DMA for some IDE disk controllers now; I'll
bet that you have an IDE disk, and now the controller is running
in DMA mode with the ata driver instead of PIO mode like it did
with the older wd driver. This is an important thing to know, because
the VIA Rhine II chip also uses DMA.

It's important to tell people what kind of CPU you have, what other
devices you have in your machine, and what the NIC is plugged into
(hub? switch? crossover cable to other machine?) so that people
have some idea what might be going wrong. All you're saying now is
"it doesn't work" which isn't good enough. I can't fix a problem if
I can't duplicate it, and I can't duplicate it if I don't know what
your hardware is like.

> When I try to transfer large files in 4.0-RELEASE, 
> it hung up and printed out error message such as,
> 
> Apr  8 16:07:34 ace /kernel: vr0: rx error: unknown rx error   
> 
> >How-To-Repeat:
> 
> It's easy to repeat, transfer large file such as FTP, NFS, etc..

No, it is not easy to repeat. It is easy to repeat *for you* because
you happen to have the correct hardware combination for duplicating
the problem. If it was that easy to repeat, others would have
reported the same problem by now, which they didn't.

> >Fix:
> 
> Sorry, I dont know.

I don't know either, but I'm including a small patch for if_vr.c
which should make it reset the interface when this problem occurs.
This is not the proper fix, but until I have more information, it's
the best I can do.

Just in case it's not clear, what I want you to do is apply this
patch, and then tell me what if any difference it makes. To apply
the patch, save this message to a file (i.e. /tmp/vr.patch) and
then do the following:

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

You can then either make a new kernel or compile and load a new
if_vr.ko module (if you're using loadable modules).

-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"
=============================================================================

*** if_vr.c.orig	Sat Apr  8 17:26:18 2000
--- if_vr.c	Sat Apr  8 17:31:22 2000
***************
*** 948,956 ****
  	m_adj(m_new, sizeof(u_int64_t));
  
  	c->vr_mbuf = m_new;
- 	c->vr_ptr->vr_status = VR_RXSTAT;
  	c->vr_ptr->vr_data = vtophys(mtod(m_new, caddr_t));
  	c->vr_ptr->vr_ctl = VR_RXCTL | VR_RXLEN;
  
  	return(0);
  }
--- 948,956 ----
  	m_adj(m_new, sizeof(u_int64_t));
  
  	c->vr_mbuf = m_new;
  	c->vr_ptr->vr_data = vtophys(mtod(m_new, caddr_t));
  	c->vr_ptr->vr_ctl = VR_RXCTL | VR_RXLEN;
+ 	c->vr_ptr->vr_status = VR_RXSTAT;
  
  	return(0);
  }
***************
*** 1014,1021 ****
  				printf("unknown rx error\n");
  				break;
  			}
! 			vr_newbuf(sc, cur_rx, m);
! 			continue;
  		}
  
  		/* No errors; receive the packet. */	
--- 1014,1021 ----
  				printf("unknown rx error\n");
  				break;
  			}
! 			vr_init(sc);
! 			return;
  		}
  
  		/* No errors; receive the packet. */	
***************
*** 1317,1322 ****
--- 1317,1324 ----
  		if (m_head->m_len < VR_MIN_FRAMELEN) {
  			m_new->m_pkthdr.len += VR_MIN_FRAMELEN - m_new->m_len;
  			m_new->m_len = m_new->m_pkthdr.len;
+ 			bzero(mtod(m_new, char *) + m_new->m_pkthdr.len,
+ 			    VR_MIN_FRAMELEN - m_new->m_pkthdr.len);
  		}
  		f = c->vr_ptr;
  		f->vr_data = vtophys(mtod(m_new, caddr_t));


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




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