From owner-freebsd-bugs Sat Apr 8 10:40:46 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from skynet.ctr.columbia.edu (skynet.ctr.columbia.edu [128.59.64.70]) by hub.freebsd.org (Postfix) with SMTP id 6770C37BB70 for ; Sat, 8 Apr 2000 10:40:36 -0700 (PDT) (envelope-from wpaul@skynet.ctr.columbia.edu) Received: (from wpaul@localhost) by skynet.ctr.columbia.edu (8.6.12/8.6.9) id NAA22322; Sat, 8 Apr 2000 13:44:04 -0400 From: Bill Paul Message-Id: <200004081744.NAA22322@skynet.ctr.columbia.edu> Subject: Re: kern/17866: vr0 hung up To: issei@ace.heart.ne.jp Date: Sat, 8 Apr 2000 13:44:02 -0400 (EDT) Cc: bugs@freebsd.org In-Reply-To: <200004081705.CAA60012@ace.heart.ne.jp> from "issei@heart.ne.jp" at Apr 9, 2000 02:05:43 am X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 4089 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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