Bug 4414 - Problem: USB bus hangs after 'lsusb -vv' with HP psc1210 printer/scanner
Summary: Problem: USB bus hangs after 'lsusb -vv' with HP psc1210 printer/scanner
Status: REJECTED INVALID
Alias: None
Product: Drivers
Classification: Unclassified
Component: USB (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Greg Kroah-Hartman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-27 22:17 UTC by Joel
Modified: 2005-06-01 14:34 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.11.5
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
Output from dmesg before running Andrew's script (9.22 KB, text/plain)
2005-03-30 01:14 UTC, Joel
Details
Output from cat (debugfs)/uhci/*7.2 (1.46 KB, text/plain)
2005-03-30 01:16 UTC, Joel
Details
Output from dmesg after running Andrew's script (30.22 KB, text/plain)
2005-03-30 01:17 UTC, Joel
Details
Followup to last comment (176 bytes, text/plain)
2005-04-01 23:37 UTC, Joel
Details

Description Joel 2005-03-27 22:17:25 UTC
Description:
  The usb bus seems to lock up when used for more than trivial transfers
  if the HP psc1210 printer/scanner is powered up. One way to trigger
  this is to repeatedly run the 'lsusb -vv' command. Attempting to
  actually use the psc1210 will usually eventually cause a hang.
  The hang can be cleared by powering the printer/scanner down then back up.
  Additional info: xsane often cannot find the scanner, but sometimes
  it will. If it finds it, it may or may not be able to scan.

How reproducable: Frequent, but not always.

Hardware: FIC VA503+ Motherbord with on-board USB 1.1 controller

Keywords: usb, uhci, "hp psc1210"

Version:
  Linux version 2.6.11.5 (joeld@localhost.localdomain)
    (gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)) 
    #2 SMP Sat Mar 26 23:07:03 PST 2005

Environment:
  SSH_AGENT_PID=2526
  KDE_MULTIHEAD=false
  HOSTNAME=localhost.localdomain
  DM_CONTROL=/var/run/xdmctl
  SHELL=/bin/bash
  TERM=xterm
  HISTSIZE=1000
  XDM_MANAGED=/var/run/xdmctl/xdmctl-:0,maysd,mayfn,sched,method=classic,auto
 
GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/joeld/.gtkrc-2.0:/home/joeld/.kde/share/config/gtkrc
  GS_LIB=/home/joeld/.fonts
  GTK_RC_FILES=/etc/gtk/gtkrc:/home/joeld/.gtkrc:/home/joeld/.kde/share/config/gtkrc
  WINDOWID=35651591
  QTDIR=/usr/lib/qt-3.3
  KDE_STARTUP_ENV=localhost.localdomain;1111987671;958313;2639_TIME50915
  USER=joeld
  XCURSOR_SIZE=
  SSH_AUTH_SOCK=/tmp/ssh-mQbNNn2525/agent.2525
  KDEDIR=/usr
  SESSION_MANAGER=local/localhost.localdomain:/tmp/.ICE-unix/2633
  KONSOLE_DCOP=DCOPRef(konsole-2691,konsole)
  MAIL=/var/spool/mail/joeld
 
PATH=/usr/kerberos/sbin:/sbin:/usr/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/home/joeld/bin
  DESKTOP_SESSION=default
  _=/usr/bin/env
  INPUTRC=/etc/inputrc
  PWD=/home/joeld/test
  KONSOLE_DCOP_SESSION=DCOPRef(konsole-2691,session-2)
  LANG=en_US.UTF-8
  SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
  HOME=/root
  SHLVL=6
  XCURSOR_THEME=default
  LOGNAME=joeld
  DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-gjDutESk11
  LESSOPEN=|/usr/bin/lesspipe.sh %s
  VIMRUNTIME=/usr/share/vim/vim63
  DISPLAY=:0.0
  G_BROKEN_FILENAMES=1
  XAUTHORITY=/tmp/xauth.XXXX0Xd2FG
  COLORTERM=

ver_linux output:
  If some fields are empty or look unusual you may have an old version.
  Compare to the current minimal requirements in Documentation/Changes.
   
  Linux localhost.localdomain 2.6.11.5 #2 SMP Sat Mar 26 23:07:03 PST 2005 i586
i586 i386 GNU/Linux
   
  Gnu C                  3.4.2
  Gnu make               3.80
  binutils               2.15.92.0.2
  util-linux             2.12a
  mount                  2.12a
  module-init-tools      3.1-pre5
  e2fsprogs              1.35
  reiserfsprogs          line
  reiser4progs           line
  pcmcia-cs              3.2.7
  quota-tools            3.12.
  PPP                    2.4.2
  isdn4k-utils           3.3
  nfs-utils              1.0.6
  Linux C Library        2.3.4
  Dynamic linker (ldd)   2.3.4
  Procps                 3.2.3
  Net-tools              1.60
  Kbd                    1.12
  Sh-utils               5.2.1
  udev                   039
  Modules Loaded         ppp_deflate zlib_deflate zlib_inflate bsd_comp
ppp_async crc_ccitt ppp_generic slhc snd_sb16 snd_opl3_lib snd_hwdep
snd_sb16_dsp snd_sb_common snd_mpu401_uart snd_rawmidi

Content of /proc/cpuinfo:
  processor	: 0
  vendor_id	: AuthenticAMD
  cpu family	: 5
  model		: 13
  model name	: AMD-K6(tm)-III Processor
  stepping	: 0
  cpu MHz		: 551.498
  cache size	: 256 KB
  physical id	: 0
  siblings	: 1
  fdiv_bug	: no
  hlt_bug		: no
  f00f_bug	: no
  coma_bug	: no
  fpu		: yes
  fpu_exception	: yes
  cpuid level	: 1
  wp		: yes
  flags		: fpu vme de pse tsc msr mce cx8 pge mmx pni syscall 3dnowext 3dnow k6_mtrr
  bogomips	: 1081.34

Contents of /proc/modules:
  ppp_deflate 4320 - - Live 0xd28b8000
  zlib_deflate 21720 - - Live 0xd28cb000
  zlib_inflate 16480 - - Live 0xd28be000
  bsd_comp 5120 - - Live 0xd289e000
  ppp_async 9344 - - Live 0xd28a9000
  crc_ccitt 1568 - - Live 0xd2895000
  ppp_generic 20052 - - Live 0xd28a3000
  slhc 5952 - - Live 0xd2898000
  snd_sb16 9576 - - Live 0xd0843000
  snd_opl3_lib 8352 - - Live 0xd083f000
  snd_hwdep 6592 - - Live 0xd083c000
  snd_sb16_dsp 8032 - - Live 0xd0824000
  snd_sb_common 13120 - - Live 0xd0837000
  snd_mpu401_uart 5888 - - Live 0xd0827000
  snd_rawmidi 19104 - - Live 0xd082b000

Contents of /proc/ioports:
  0000-001f : dma1
  0020-0021 : pic1
  0040-0043 : timer0
  0050-0053 : timer1
  0060-006f : keyboard
  0080-008f : dma page reg
  00a0-00a1 : pic2
  00c0-00df : dma2
  00f0-00ff : fpu
  0170-0177 : ide1
  01f0-01f7 : ide0
  0220-022f : SoundBlaster
  02f8-02ff : serial
  0376-0376 : ide1
  0378-037a : parport0
  0388-038b : SoundBlaster FM
  03c0-03df : vga+
  03f6-03f6 : ide0
  0cf8-0cff : PCI conf1
  6000-60ff : 0000:00:07.3
  d000-dfff : PCI Bus #01
    d000-d0ff : 0000:01:00.0
  e000-e00f : 0000:00:07.1
    e000-e007 : ide0
    e008-e00f : ide1
  e400-e41f : 0000:00:07.2
    e400-e41f : uhci_hcd

Contents of /proc/iomem:
  00000000-0009fbff : System RAM
  0009fc00-0009ffff : reserved
  000a0000-000bffff : Video RAM area
  000c0000-000c7fff : Video ROM
  000f0000-000fffff : System ROM
  00100000-0fffefff : System RAM
    00100000-00308c36 : Kernel code
    00308c37-003d8dbf : Kernel data
  0ffff000-0ffff7ff : ACPI Non-volatile Storage
  e0000000-e3ffffff : PCI Bus #01
    e0000000-e3ffffff : 0000:01:00.0
      e0000000-e3ffffff : aty128fb FB
  e4000000-e5ffffff : PCI Bus #01
    e5000000-e5003fff : 0000:01:00.0
      e5000000-e5003fff : aty128fb MMIO
  e6000000-e7ffffff : 0000:00:00.0
  ffff0000-ffffffff : reserved


lspci -vvv
  00:00.0 Host bridge: VIA Technologies, Inc. VT82C598 [Apollo MVP3] (rev 04)
  	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping-
SERR- FastB2B-
  	Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort-
<MAbort- >SERR- <PERR+
  	Latency: 16
  	Region 0: Memory at e6000000 (32-bit, prefetchable) [size=32M]
  	Capabilities: [a0] AGP version 1.0
  		Status: RQ=8 Iso- ArqSz=0 Cal=0 SBA+ ITACoh- GART64- HTrans- 64bit- FW-
AGP3- Rate=x1,x2
  		Command: RQ=1 ArqSz=0 Cal=0 SBA+ AGP+ GART64- 64bit- FW- Rate=x1
  
  00:01.0 PCI bridge: VIA Technologies, Inc. VT82C598/694x [Apollo MVP3/Pro133x
AGP] (prog-if 00 [Normal decode])
  	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping-
SERR- FastB2B-
  	Status: Cap- 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort-
<MAbort+ >SERR- <PERR-
  	Latency: 0
  	Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
  	I/O behind bridge: 0000d000-0000dfff
  	Memory behind bridge: e4000000-e5ffffff
  	Prefetchable memory behind bridge: e0000000-e3ffffff
  	Secondary status: 66Mhz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort-
<MAbort- <SERR- <PERR-
  	BridgeCtl: Parity- SERR- NoISA+ VGA+ MAbort- >Reset- FastB2B-
  
  00:07.0 ISA bridge: VIA Technologies, Inc. VT82C586/A/B PCI-to-ISA [Apollo VP]
(rev 47)
  	Control: I/O+ Mem+ BusMaster+ SpecCycle+ MemWINV- VGASnoop- ParErr- Stepping+
SERR- FastB2B-
  	Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort-
<MAbort- >SERR- <PERR-
  	Latency: 0
  
  00:07.1 IDE interface: VIA Technologies, Inc.
VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06) (prog-if 8a
[Master SecP PriP])
  	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping-
SERR- FastB2B-
  	Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort-
<MAbort- >SERR- <PERR-
  	Latency: 64
  	Region 4: I/O ports at e000 [size=16]
  
  00:07.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1
Controller (rev 02) (prog-if 00 [UHCI])
  	Subsystem: VIA Technologies, Inc. (Wrong ID) USB Controller
  	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping-
SERR- FastB2B-
  	Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort-
<MAbort- >SERR- <PERR-
  	Latency: 64, Cache Line Size 08
  	Interrupt: pin D routed to IRQ 10
  	Region 4: I/O ports at e400 [size=32]
  
  00:07.3 Non-VGA unclassified device: VIA Technologies, Inc. VT82C586B ACPI
(rev 10)
  	Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping-
SERR- FastB2B-
  	Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort-
<MAbort- >SERR- <PERR-
  	Interrupt: pin ? routed to IRQ 9
  
  01:00.0 VGA compatible controller: ATI Technologies Inc Rage 128 RF/SG AGP
(prog-if 00 [VGA])
  	Subsystem: ATI Technologies Inc Magnum/Xpert128/X99/Xpert2000
  	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping+
SERR- FastB2B-
  	Status: Cap+ 66Mhz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort-
<MAbort- >SERR- <PERR-
  	Latency: 64 (2000ns min), Cache Line Size 08
  	Interrupt: pin A routed to IRQ 0
  	Region 0: Memory at e0000000 (32-bit, prefetchable) [size=64M]
  	Region 1: I/O ports at d000 [size=256]
  	Region 2: Memory at e5000000 (32-bit, non-prefetchable) [size=16K]
  	Capabilities: [50] AGP version 2.0
  		Status: RQ=32 Iso- ArqSz=0 Cal=0 SBA+ ITACoh- GART64- HTrans- 64bit- FW-
AGP3- Rate=x1,x2
  		Command: RQ=8 ArqSz=0 Cal=0 SBA+ AGP+ GART64- 64bit- FW- Rate=x1
  	Capabilities: [5c] Power Management version 1
  		Flags: PMEClk- DSI- D1+ D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
  		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
  

Misc Information:

Output from ps claxg (filtered for relevant processes):

  1     0  3912  1830  15   0  2768  796 usb_st D    ?          0:00 ptal-mlcd
  0     0  3913  2707  16   0  1584  576 usb_st D+   pts/3      0:00 lsusb
Comment 1 Andrew Morton 2005-03-27 22:22:55 UTC
Please make things hang again and then do

dmesg -c
echo t > /proc/sysrq-trigger
dmesg -s 1000000 > foo

and attach foo to this bug.

Thanks.
Comment 2 Alan Stern 2005-03-28 07:33:35 UTC
Here's some more debugging you can try.  Turn on USB verbose debugging in the
kernel configuration (CONFIG_USB_DEBUG) and rebuild the USB drivers.  Since you
appear to have your USB host controller drivers built into the kernel, add the
"uhci-hcd.debug=3" parameter to the kernel boot line.  If instead you build
uhci-hcd as a module, use the "debug=3" parameter on the modprobe line.

Then mount a debugfs filesystem (say on /sys/kernel/debug), and after the hang
occurs make a copy of /sys/kernel/debug/uhci/*7.2 and post it.

Also post the output from dmesg after the hang but _before_ running the script
that Andrew suggested.
Comment 3 Joel 2005-03-30 01:14:55 UTC
Created attachment 4814 [details]
Output from dmesg before running Andrew's script
Comment 4 Joel 2005-03-30 01:16:36 UTC
Created attachment 4815 [details]
Output from cat (debugfs)/uhci/*7.2
Comment 5 Joel 2005-03-30 01:17:37 UTC
Created attachment 4816 [details]
Output from dmesg after running Andrew's script
Comment 6 Alan Stern 2005-04-01 10:14:31 UTC
Did you notice the last two lines in your first dmesg log:

    uhci_hcd 0000:00:07.2: host system error, PCI problems?
    uhci_hcd 0000:00:07.2: host controller halted, very bad!

They indicate a hardware-related problem of some sort.  Maybe something wrong
with the USB controller itself, or maybe something wrong with the motherboard. 
You may be able to clear the error by doing "rmmod uhci-hcd" followed by
"modprobe uhci-hcd".  But that's just a temporary solution, since the problem
will most likely recur.

In the end you may have no choice but to replace the motherboard.
Comment 7 Joel 2005-04-01 23:37:29 UTC
Created attachment 4843 [details]
Followup to last comment
Comment 8 Alan Stern 2005-04-05 08:13:29 UTC
The fact that it works with Windows doesn't mean much.  Linux uses the hardware
in different ways.  In case you're interested, here's what the hardware manual
has to say about that error:

Host System Error. The Host Controller sets this bit to 1 when a serious error
occurs during a host system access involving the Host Controller module. In a
PCI system, conditions that set this bit to 1 include PCI Parity error, PCI
Master Abort, and PCI Target Abort.

Just how serious those three possibilities are is a matter of opinion.  You can
always try buying an add-on PCI USB controller card, in case the problem is in
the onboard controller.
Comment 9 Andrew Morton 2005-05-25 21:19:56 UTC
Does 2.6.12-rc5 still exhibit this problem?

If so, are we screwed?
Comment 10 Joel 2005-05-30 22:55:32 UTC
2.6.12-rc5 still exhibits the problem -- the behavior is exactly the same.
I guess we're screwed. Oh well, I took Alan's advice and bought a $10 add-on usb
card, and it works fine.

Note You need to log in before you can comment on or make changes to this bug.