From mark@summersault.com  Sat Dec 21 17:41:01 2002
Return-Path: <mark@summersault.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 7B92A37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 21 Dec 2002 17:41:01 -0800 (PST)
Received: from nollie.summersault.com (nollie.summersault.com [208.10.44.140])
	by mx1.FreeBSD.org (Postfix) with SMTP id D9C4B43EDC
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 21 Dec 2002 17:41:00 -0800 (PST)
	(envelope-from mark@summersault.com)
Received: (qmail 72736 invoked by uid 1002); 22 Dec 2002 01:40:50 -0000
Message-Id: <20021222014050.72735.qmail@nollie.summersault.com>
Date: 22 Dec 2002 01:40:50 -0000
From: Mark Stosberg <mark@summersault.com>
Reply-To: Mark Stosberg <mark@summersault.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: trouble with VIA EPIA 5000 system- WRITE command failed	
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         46455
>Category:       i386
>Synopsis:       trouble with VIA EPIA 5000 system- WRITE command failed
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    sos
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 21 17:50:02 PST 2002
>Closed-Date:    Mon Aug 11 12:40:33 PDT 2003
>Last-Modified:  Mon Aug 11 12:40:33 PDT 2003
>Originator:     Mark Stosberg
>Release:        FreeBSD 4.7-RELEASE i386
>Organization:
>Environment:
>Description:

I recently upgraded my home FreeBSD machine to a system based around the VIA
EPIA 5000 motherboard.  (Which is a great system that's small, fanless, and cheap ).

FreeBSD 4.7 has worked well on this hardware with a few exceptions. Currently I'm experiencing a
critical problem that leaves my computer unusable after just an hour or so of uptime.
There appears to a problem with hard disk writes, followed by immediate failure
of my USB keyboard to work. Here's what the logs report:

###
Dec 18 18:53:14 asana /kernel: ad1: WRITE command timeout tag=0 serv=0 - resetting
Dec 18 18:53:49 asana /kernel: ata0: resetting devices .. done
Dec 18 18:53:49 asana /kernel: ad1: WRITE command timeout tag=0 serv=0 - resetting
Dec 18 18:53:49 asana /kernel: ata0: resetting devices .. done
Dec 18 18:53:49 asana /kernel: ad1: WRITE command timeout tag=0 serv=0 - resetting
Dec 18 18:53:49 asana /kernel: ata0: resetting devices .. done
Dec 18 18:53:49 asana /kernel: ad1: WRITE command timeout tag=0 serv=0 - resetting
Dec 18 18:53:49 asana /kernel: ad1: timeout waiting for cmd=ef s=d0 e=00
Dec 18 18:53:49 asana /kernel: ad1: trying fallback to PIO mode
Dec 18 18:53:49 asana /kernel: ata0: resetting devices .. done
Dec 18 18:56:21 asana /kernel: uhub1: at uhub0 port 2 (addr 2) disconnected
Dec 18 18:56:21 asana /kernel: ukbd0: detached
Dec 18 18:56:31 asana /kernel: uhub1: detached
Dec 18 18:58:45 asana /kernel: uhub0: port error, restarting port 2
Dec 18 18:59:06 asana /kernel: uhub0: device problem, disabling port 1
###

What's happening with the USB related entries there is that I have un-plugged
and re-plugged the keyboard, but it won't recognize it at this point.
My "dmesg" output is attached for full system details. Here are some additional notes:

- The drive is brand new, attached with new 80 wire IDE cables.

- I've been trying to get APM to work, specifically get the hard drive to spin
  down. I never got that to work, and eventually tried disabling APM in
  kernel.conf and rc.conf. Either way, these desk errors still happen.
  I suspect that the APM workings of FreeBSD and/or the BIOS could be related. 

- My USB keyboard (the "Happy Hacking" keyboard), has exhibited other weird
  behavior before.  At least once, some weird characters were ghost-typed into
  the terminal window I was working in, and then the computer rebooted with a
  kernel panic.  Another time, the keyboard registered the same key press over
  and over, even though the key wasn't being pressed. I use the exact same
  model on a Mac at work without problems.

- My computer dual-boots into Linux from the same drive. I have now been using
  Linux for a couple of days without any problems with disk writes, or the USB
  keyboard. Considering this, along with the drive and hardware being new, I
  strongly suspect that the issue is with FreeBSD's interaction with the
  hardware and not the hardeware itself. 

I asked around on the "-hardware" list first and didn't get a response. I could
upgrade the system to -CURRENT if that might help. 

Thanks for any suggestions!

    Mark

http://mark.stosberg.com/

>How-To-Repeat:

I have not yet been able to isolate what causes the problem. However, with
guidance, I could perhaps turn on some debugging to better illuminate what's happening. 
	
>Fix:

Here's my "dmesg" output: 

---  ---
Copyright (c) 1991-2002 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD 4.7-RELEASE #0: Wed Dec 18 19:40:55 EST 2002
    root@asana.summersault.com:/usr/src/sys/compile/ASANA_EDEN-2002-12-18
Timecounter "i8254"  frequency 1193182 Hz
CPU: VIA C3 Samuel 2 (533.36-MHz 686-class CPU)
  Origin = "CentaurHauls"  Id = 0x673  Stepping = 3
  Features=0x803035<FPU,DE,TSC,MSR,MTRR,PGE,MMX>
real memory  = 260046848 (253952K bytes)
config> enable apm
avail memory = 249487360 (243640K bytes)
Preloaded elf kernel "kernel" at 0xc037e000.
Preloaded userconfig_script "/boot/kernel.conf" at 0xc037e09c.
Preloaded elf module "snd_via82c686.ko" at 0xc037e0ec.
Preloaded elf module "snd_pcm.ko" at 0xc037e194.
md0: Malloc disk
Using $PIR table, 5 entries at 0xc00fdc70
apm0: <APM BIOS> on motherboard
apm: found APM BIOS v1.2, connected at v1.2
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <Host to PCI bridge> on motherboard
pci0: <PCI bus> on pcib0
pcib1: <PCI to PCI bridge (vendor=1106 device=8601)> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
pci1: <Trident model 8500 VGA-compatible display device> at 0.0 irq 10
isab0: <PCI to ISA bridge (vendor=1106 device=8231)> at device 17.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <VIA 8231 ATA100 controller> port 0xd000-0xd00f at device 17.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
uhci0: <VIA 83C572 USB controller> port 0xd400-0xd41f irq 3 at device 17.2 on pci0
usb0: <VIA 83C572 USB controller> on uhci0
usb0: USB revision 1.0
uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhub1: Chicony  Generic USB Hub, class 9/0, rev 1.10/1.00, addr 2
uhub1: 1 port with 0 removable, bus powered
ukbd0: Chicony  PFU-65 USB Keyboard, rev 1.10/1.00, addr 3, iclass 3/1
kbd0 at ukbd0
uhci1: <VIA 83C572 USB controller> port 0xd800-0xd81f irq 3 at device 17.3 on pci0
usb1: <VIA 83C572 USB controller> on uhci1
usb1: USB revision 1.0
uhub2: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
chip1: <PCI to Other bridge (vendor=1106 device=8235)> at device 17.4 on pci0
pcm0: <VIA VT82C686A> port 0xe400-0xe403,0xe000-0xe003,0xdc00-0xdcff irq 5 at device 17.5 on pci0
vr0: <VIA VT6102 Rhine II 10/100BaseTX> port 0xe800-0xe8ff mem 0xe4001000-0xe40010ff irq 10 at device 18.0 on pci0
vr0: Ethernet address: 00:40:63:c1:1a:5f
miibus0: <MII bus> on vr0
ukphy0: <Generic IEEE 802.3u media interface> on miibus0
ukphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
xl0: <3Com 3c905B-TX Fast Etherlink XL> port 0xec00-0xec7f mem 0xe4000000-0xe400007f irq 11 at device 20.0 on pci0
xl0: Ethernet address: 00:01:02:bd:77:24
miibus1: <MII bus> on xl0
xlphy0: <3Com internal media interface> on miibus1
xlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
orm0: <Option ROMs> at iomem 0xc0000-0xcbfff,0xcc000-0xcffff,0xd0000-0xd97ff on isa0
fdc0: ready for input in output
fdc0: cmd 3 failed at out byte 1 of 3
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: model Generic PS/2 mouse, device ID 0
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A
sio1: configured irq 3 not in bitmap of probed irqs 0
ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
ppc0: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
ad1: 19073MB <WDC WD200BB-75CAA0> [38752/16/63] at ata0-slave UDMA100
acd0: CDROM <SR244W> at ata1-master PIO4
Mounting root from ufs:/dev/ad1s1a
WARNING: / was not properly dismounted




>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->sos 
Responsible-Changed-By: kris 
Responsible-Changed-When: Sun Jul 13 00:13:03 PDT 2003 
Responsible-Changed-Why:  
Assign to ATA maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=46455 
State-Changed-From-To: open->closed 
State-Changed-By: sos 
State-Changed-When: Mon Aug 11 12:38:02 PDT 2003 
State-Changed-Why:  
You should upgrade to at least 4.8 to get better ATA support, 
maybe to 5.1 where ATA is much enhanced since the -stable series. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=46455 
>Unformatted:
