From owner-freebsd-bugs Mon Apr 17 6:34:44 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from heart.ne.jp (ns.numata.aomori.aomori.jp [210.164.220.226]) by hub.freebsd.org (Postfix) with ESMTP id 7548537B6C7 for ; Mon, 17 Apr 2000 06:34:36 -0700 (PDT) (envelope-from issei@guru.gr.jp) Received: from localhost (konbu.guru.gr.jp [210.164.220.228]) by heart.ne.jp (8.9.3/8.9.3) with ESMTP id WAA04849; Mon, 17 Apr 2000 22:34:18 +0900 (JST) To: wpaul@skynet.ctr.columbia.edu Cc: bugs@freebsd.org Subject: Re: kern/17866: vr0 hung up From: Issei Numata In-Reply-To: <200004101524.LAA24995@skynet.ctr.columbia.edu> References: <20000410202748O.issei@guru.gr.jp> <200004101524.LAA24995@skynet.ctr.columbia.edu> X-Mailer: Mew version 1.94.1 on XEmacs 21.1 (Canyonlands) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20000417223529J.issei@guru.gr.jp> Date: Mon, 17 Apr 2000 22:35:29 +0900 X-Dispatcher: imput version 20000113(IM136) Lines: 233 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Here is a story what happend in my PC. My network configuration is Router | | +-+------------------+ |Corega First SWII 8P|Switching Hub +-+-----+-------+----+ | | | vr0 vr0 xl0 | | | Host A Host B Host C 4.0 3.4 2.2.8 The each vr0 cards are corega FirstEtherII PCI-TX. This card support 100/10 auto negotiation and the switching hub has also. I check hub's lamp and each vr0 card connect with 100 full duplex mode. As well as, I check xl0 connect with 10 half duplex mode. Of course, above 3 hosts have same netmask. First, I copied all distribution of RELEASE-4.0 to Host B, then I tried to boot Host A by floppies and tried to install RELEASE-4.0 via ftp from Host B. However, after 10 or 15 bin files were transfered, the vr0 was stalled and continuing was impossible. So, I changed my NIC to other card (de0 shown in appendix) and continue to install. Next, I changed my NIC to FirstEtherII again and reboot. The booting was normal and it seemed work everything good. Then, I tried to ftp form Host A to Host B. The login was successful and I could look at directory and get some files. However, when I tried to get large file, the vr0 said "unknown rx error" and network was stalled. Whenever I tried to obtain 6M bytes files, stalling ratio was 100%. If the file size was small, it had never stalled. Next, I tried to ftp same file from Host C. Of course the performance was declined, but in this case, NIC worked goods and never stalled. I tried two more examination yesterday. First, I set ata disk mode to PIO and tried to ftp from Host B. In this case, the NIC worked good and never stalled. Next, I set ata disk mode to DMA again, ftp from Host B and save it as /dev/null. In this case, the NIC worked good and never stalled. In conclusion, my PC's NIC is stalled when 1) using 100 Full Duplex 2) using DMA mode for ata disk 3) trying to transfer large file and write to disk at the same time. Of course I tried to your patch. But my PC's NIC was still stalled in above condition. At this point, I understood this problem is caused by DMA. But I don't know where is the problem. vr0 driver? ata driver? or my PC's chipset? Please show me suggestion if possible. I will try to continue examination if available. By the way, I found tiny non-fatal bug in if_vr.c The function vr_rxeof() always prints out "unknown rx error" even if the error is clearly. I show you quick (but not smart) patch. After fixing, my PC says "FIFO overflow" when stalled. *** if_vr.c.old Mon Apr 17 21:09:20 2000 --- if_vr.c Mon Apr 17 21:09:58 2000 *************** *** 988,994 **** if (rxstat & VR_RXSTAT_RXERR) { ifp->if_ierrors++; printf("vr%d: rx error: ", sc->vr_unit); ! switch(rxstat & 0x000000FF) { case VR_RXSTAT_CRCERR: printf("crc error\n"); break; --- 988,994 ---- if (rxstat & VR_RXSTAT_RXERR) { ifp->if_ierrors++; printf("vr%d: rx error: ", sc->vr_unit); ! switch(rxstat & 0x000000FF & ~VR_RXSTAT_RXERR) { case VR_RXSTAT_CRCERR: printf("crc error\n"); break; Finally, I will show you my PC's configuration again. * * HOST A * Copyright (c) 1992-2000 The FreeBSD Project. Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. FreeBSD 4.0-STABLE #0: Mon Apr 17 01:58:47 JST 2000 issei@ace.heart.ne.jp:/usr/src/sys/compile/ACE Timecounter "i8254" frequency 1193182 Hz CPU: AMD-K6(tm) 3D processor (400.91-MHz 586-class CPU) Origin = "AuthenticAMD" Id = 0x58c Stepping = 12 Features=0x8021bf AMD Features=0x80000800 real memory = 268427264 (262136K bytes) sio0: gdb debugging port avail memory = 257208320 (251180K bytes) Preloaded elf kernel "kernel" at 0xc03d1000. md0: Malloc disk npx0: on motherboard npx0: INT 16 interface pcib0: on motherboard pci0: on pcib0 pcib1: at device 1.0 on pci0 pci1: on pcib1 isab0: at device 7.0 on pci0 isa0: on isab0 atapci0: port 0xe000-0xe00f at device 7.1 on pci0 ata0: at 0x1f0 irq 14 on atapci0 chip1: at device 7.3 on pci0 pci0: at 8.0 irq 11 vr0: port 0xe400-0xe47f mem 0xec000000-0xec00007f irq 10 at device 10.0 on pci0 vr0: Ethernet address: 00:90:cc:01:34:bc miibus0: on vr0 amphy0: on miibus0 amphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto vr0: supplying EUI64: 00:90:cc:ff:fe:01:34:bc de0: port 0xe800-0xe87f mem 0xec001000-0xec00107f irq 9 at device 11.0 on pci0 de0: ACCTON EN1203 21040 [10Mb/s] pass 2.4 de0: address 00:00:e8:0d:df:ca fdc0: at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0 fdc0: FIFO enabled, 8 bytes threshold fd0: <1440-KB 3.5" drive> on fdc0 drive 0 atkbdc0: at port 0x60,0x64 on isa0 atkbd0: irq 1 on atkbdc0 vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 sc0: on isa0 sc0: VGA <16 virtual consoles, flags=0x200> sio0 at port 0x3f8-0x3ff irq 4 flags 0x90 on isa0 sio0: type 16550A sio1 at port 0x2f8-0x2ff irq 3 on isa0 sio1: type 16550A ppc0: at port 0x378-0x37f irq 7 on isa0 ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode ppc0: FIFO with 16/16/16 bytes threshold ppi0: on ppbus0 lpt0: on ppbus0 lpt0: Interrupt-driven port plip0: on ppbus0 ad0: 19574MB [39770/16/63] at ata0-master using UDMA33 Mounting root from ufs:/dev/ad0s1a vr0: starting DAD for fe80:0001::0290:ccff:fe01:34bc vr0: DAD complete for fe80:0001::0290:ccff:fe01:34bc - no duplicates found de0: autosense failed: cable problem? * * HOST B * Copyright (c) 1992-1999 FreeBSD Inc. Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. FreeBSD 3.4-STABLE #4: Fri Mar 31 19:39:05 JST 2000 issei@konbu.guru.gr.jp:/usr/src/sys/compile/KONBu Timecounter "i8254" frequency 1193182 Hz CPU: Cyrix 6x86MX (200.46-MHz 686-class CPU) Origin = "CyrixInstead" Id = 0x601 Stepping = 1 DIR=0x1453 Features=0x80a135 real memory = 268435456 (262144K bytes) avail memory = 257495040 (251460K bytes) Preloaded elf kernel "kernel" at 0xc033e000. Probing for devices on PCI bus 0: chip0: rev 0x01 on pci0.0.0 chip1: rev 0x01 on pci0.1.0 ide_pci0: rev 0x01 on pci0.1.1 chip2: rev 0x01 on pci0.1.3 vr0: rev 0x06 int a irq 9 on pci0.10.0 vr0: Ethernet address: 00:90:99:16:b2:a6 vr0: autoneg complete, link status good (full-duplex, 100Mbps) ncr0: rev 0x11 int a irq 12 on pci0.11.0 vga0: rev 0x00 int a irq 11 on pci0.12.0 Probing for devices on the ISA bus: sc0 on isa sc0: VGA color <16 virtual consoles, flags=0x0> atkbdc0 at 0x60-0x6f on motherboard atkbd0 irq 1 on isa psm0 not found sio0 at 0x3f8-0x3ff irq 4 flags 0x10 on isa sio0: type 16550A sio1 at 0x2f8-0x2ff irq 3 on isa sio1: type 16550A fdc0 at 0x3f0-0x3f7 irq 6 drq 2 on isa fdc0: FIFO enabled, 8 bytes threshold fd0: 1.44MB 3.5in wdc0 at 0x1f0-0x1f7 irq 14 on isa wdc0: unit 0 (wd0): wd0: 17206MB (35239680 sectors), 34960 cyls, 16 heads, 63 S/T, 512 B/S wdc1 not found at 0x170 wt0 not found at 0x300 mcd0 not found at 0x300 matcdc0 not found at 0x230 scd0 not found at 0x230 ppc0 at 0x378 irq 7 on isa ppc0: W83877AF chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode ppc0: FIFO with 16/16/16 bytes threshold ppi0: on ppbus 0 plip0: on ppbus 0 adv0 not found at 0x330 bt0 not found at 0x134 aha0 not found at 0x134 vga0 at 0x3b0-0x3df maddr 0xa0000 msize 131072 on isa npx0 on motherboard npx0: INT 16 interface sb0 at 0x220 irq 5 drq 1 on isa snd0: sbxvi0 at drq 5 on isa snd0: sbmidi0 at 0x330 on isa snd0: Waiting 15 seconds for SCSI devices to settle sa0 at ncr0 bus 0 target 3 lun 0 sa0: Removable Sequential Access SCSI-2 device sa0: 10.000MB/s transfers (10.000MHz, offset 8) da1 at ncr0 bus 0 target 1 lun 0 da1: Fixed Direct Access SCSI-2 device da1: 10.000MB/s transfers (10.000MHz, offset 8) da1: 1222MB (2503872 512 byte sectors: 255H 63S/T 155C) cd0 at ncr0 bus 0 target 2 lun 0 cd0: Removable CD-ROM SCSI-2 device cd0: 4.629MB/s transfers (4.629MHz, offset 8) cd0: cd present [64770 x 2048 byte records] changing root device to wd0s1a da0 at ncr0 bus 0 target 0 lun 0 da0: Fixed Direct Access SCSI-2 device da0: 10.000MB/s transfers (10.000MHz, offset 8) da0: 2063MB (4226725 512 byte sectors: 255H 63S/T 263C) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message