From owner-freebsd-current@FreeBSD.ORG Wed Dec 10 12:56:28 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADE8D106564A for ; Wed, 10 Dec 2008 12:56:28 +0000 (UTC) (envelope-from CQG00620@nifty.ne.jp) Received: from mail.asahi-net.or.jp (mail2.asahi-net.or.jp [202.224.39.198]) by mx1.freebsd.org (Postfix) with ESMTP id 83F4F8FC12 for ; Wed, 10 Dec 2008 12:56:28 +0000 (UTC) (envelope-from CQG00620@nifty.ne.jp) Received: from asahi-net.jp (l207029.dynamic.ppp.asahi-net.or.jp [218.219.207.29]) by mail.asahi-net.or.jp (Postfix) with ESMTP id 25732615CD for ; Wed, 10 Dec 2008 21:56:26 +0900 (JST) Date: Wed, 10 Dec 2008 21:56:25 +0900 From: WATANABE Kazuhiro To: freebsd-current User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.7 Emacs/21.3 (i386--freebsd) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Message-Id: <20081210125627.25732615CD@mail.asahi-net.or.jp> Subject: [patch] de(4) has not worked on 8-current since Feb 13 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 12:56:28 -0000 Hi, all. My de(4) NICs has not worked on 8-current since Feb 13. I've tried to checkout the 8-current source tree from the CVS repository with a number of "-D" options and re-compiled it. As a result a kernel which is made from sources with "cvs checkout -D '2008-02-12 00:00 UTC' src" works well with the de(4) NICs. But with '2008-02-13 00:00 UTC' and the later date, the kernel cannot send data from the NICs. Receiving data are fine. For example: $ scp other_host:/boot/kernel/kernel . Password: kernel 100% 4717KB 943.5KB/s 00:05 $ scp /boot/kernel/kernel other_host: Password: kernel 1% 192KB 0.0KB/s - stalled -^CKilled by signal 2. $ The latest 8-current has the same problem. And these NICs works well on 7.0-RELEASE. To resolve the problem, I have to restore a change which was commited to sys/i386/i386/busdma_machdep.c revision 1.91. http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/i386/i386/busdma_machdep.c#rev1.91 Here is a patch. But I don't know the meaning of this :-( --- sys/i386/i386/busdma_machdep.c.orig 2008-12-08 20:33:16.000000000 +0900 +++ sys/i386/i386/busdma_machdep.c 2008-12-08 21:24:43.000000000 +0900 @@ -585,7 +585,7 @@ * Count the number of bounce pages * needed in order to complete this transfer */ - vaddr = (vm_offset_t)buf; + vaddr = trunc_page((vm_offset_t)buf); vendaddr = (vm_offset_t)buf + buflen; while (vaddr < vendaddr) { @@ -594,7 +594,7 @@ run_filter(dmat, paddr) != 0) { map->pagesneeded++; } - vaddr += (PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK)); + vaddr += PAGE_SIZE; } CTR1(KTR_BUSDMA, "pagesneeded= %d\n", map->pagesneeded); } I've tested the patch on the latest 8-current with the following NICs. * SMC EtherPower10/100 $ uname -a FreeBSD aries.sign.local 8.0-CURRENT FreeBSD 8.0-CURRENT #4: Tue Dec 9 15:03:24 JST 2008 nabe@capricorn:/FreeBSD/obj/pc98/HEAD/pc98/FreeBSD/HEAD/src/sys/LEFTEYE pc98 $ dmesg | grep '^de[0-9]' de0: port 0x6000-0x607f mem 0x20410000-0x2041007f irq 3 at device 13.0 on pci0 de0: SMC 9332BDT 21140A [10-100Mb/s] pass 2.0 de0: WARNING: using obsoleted if_watchdog interface de0: Ethernet address: 00:00:c0:xx:xx:xx de0: [ITHREAD] * Corega FastEther PCI-TX $ uname -a FreeBSD scorpio.sign.local 8.0-CURRENT FreeBSD 8.0-CURRENT #4: Tue Dec 9 15:01:10 JST 2008 nabe@capricorn:/FreeBSD/obj/i386/HEAD/FreeBSD/HEAD/src/sys/GENERIC i386 $ dmesg | grep '^de[0-9]' de0: port 0xe000-0xe07f mem 0xd9001000-0xd900107f irq 11 at device 15.0 on pci0 de0: 21140A [10-100Mb/s] pass 2.2 de0: WARNING: using obsoleted if_watchdog interface de0: Ethernet address: 00:00:f4:xx:xx:xx de0: [ITHREAD] --- WATANABE Kazuhiro (CQG00620@nifty.ne.jp)