From aledema@iol.it  Wed Jan  3 15:37:28 2001
Return-Path: <aledema@iol.it>
Received: from libero.sunshine.ale (ppp-212-113.33-151.iol.it [151.33.113.212])
	by hub.freebsd.org (Postfix) with ESMTP id 1DCA737B400
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  3 Jan 2001 15:37:27 -0800 (PST)
Received: by libero.sunshine.ale (Postfix, from userid 1001)
	id A82F25E68; Thu,  4 Jan 2001 00:37:16 +0100 (CET)
Message-Id: <20010103233716.A82F25E68@libero.sunshine.ale>
Date: Thu,  4 Jan 2001 00:37:16 +0100 (CET)
From: aledema@iol.it
Reply-To: aledema@iol.it
To: FreeBSD-gnats-submit@freebsd.org
Subject: USB support broken in SMP kernel
X-Send-Pr-Version: 3.2

>Number:         24059
>Category:       kern
>Synopsis:       USB support broken in SMP kernel
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 03 15:40:01 PST 2001
>Closed-Date:    Thu Nov 04 04:57:20 GMT 2004
>Last-Modified:  Thu Nov 04 04:57:20 GMT 2004
>Originator:     Alessandro de Manzano
>Release:        FreeBSD 4.2-STABLE i386
>Organization:
no
>Environment:


FreeBSD libero.sunshine.ale 4.2-STABLE FreeBSD 4.2-STABLE #0: Mon Jan  1
20:43:09 CET 2001 root@libero.sunshine.ale:/usr/obj/usr/src/sys/LIBERO2 i386

Motherboard Microstar MS-6321 (694D Pro), dual socket 370 ATX board.
Running with #2 Intel Celeron 433Mhz CPUs and 96Mb RAM.

Here is the "usbdevs -v output":

Controller /dev/usb0:
addr 1: self powered, config 1, UHCI root hub(0x0000), VIA(0x0000), rev
0x0100
 port 1 powered
 port 2 powered
Controller /dev/usb1:
addr 1: self powered, config 1, UHCI root hub(0x0000), VIA(0x0000), rev
0x0100
 port 1 powered
 port 2 powered


Here is the complete dmesg output (I've enabled USB debug options in kernel)

Copyright (c) 1992-2001 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.2-STABLE #0: Mon Jan  1 20:43:09 CET 2001
    root@libero.sunshine.ale:/usr/obj/usr/src/sys/LIBERO2
Timecounter "i8254"  frequency 1193182 Hz
CPU: Pentium II/Pentium II Xeon/Celeron (434.32-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x665  Stepping = 5
  Features=0x183fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR>
real memory  = 100597760 (98240K bytes)
avail memory = 93802496 (91604K bytes)
Programming 24 pins in IOAPIC #0
IOAPIC #0 intpin 2 -> irq 0
FreeBSD/SMP: Multiprocessor motherboard
 cpu0 (BSP): apic id:  0, version: 0x00040011, at 0xfee00000
 cpu1 (AP):  apic id:  1, version: 0x00040011, at 0xfee00000
 io0 (APIC): apic id:  2, version: 0x00170011, at 0xfec00000
Preloaded elf kernel "kernel" at 0xc03d0000.
Pentium Pro MTRR support enabled
md0: Malloc disk
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <Host to PCI bridge> on motherboard
pci0: <PCI bus> on pcib0
pcib2: <VIA 82C598MVP (Apollo MVP3) PCI-PCI (AGP) bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib2
pci1: <VGA-compatible display device> at 0.0 irq 16
isab0: <VIA 82C686 PCI-ISA bridge> at device 7.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <VIA 82C686 ATA66 controller> port 0xc000-0xc00f at device 7.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
uhci0: <VIA 83C572 USB controller> port 0xc400-0xc41f irq 19 at device 7.2 on pci0
uhci0: LegSup = 0x00002010
uhci_run: setting run=0
uhci_run: done cmd=0x80 sts=0x20
uhci_run: setting run=1
uhci_run: done cmd=0x81 sts=0x0
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
uhci1: <VIA 83C572 USB controller> port 0xc800-0xc81f irq 19 at device 7.3 on pci0
uhci1: LegSup = 0x00002010
uhci_run: setting run=0
uhci_run: done cmd=0x80 sts=0x20
uhci_run: setting run=1
uhci_run: done cmd=0x81 sts=0x0
usb1: <VIA 83C572 USB controller> on uhci1
usb1: USB revision 1.0
uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
pcm0: <VIA VT82C686A AC'97 Audio> port 0xd400-0xd403,0xd000-0xd003,0xcc00-0xccff irq 18 at device 7.5 on pci0
atapci1: <Promise ATA100 controller> port 0xe800-0xe83f,0xe400-0xe403,0xe000-0xe007,0xdc00-0xdc03,0xd800-0xd807 mem 0xdc000000-0xdc01ffff irq 18 at device 12.0 on pci0
ata2: at 0xd800 on atapci1
ata3: at 0xe000 on atapci1
pci0: <unknown card> (vendor=0x104c, dev=0x8020) at 13.0 irq 19
xl0: <3Com 3c900-COMBO Etherlink XL> port 0xec00-0xec3f irq 17 at device 15.0 on pci0
xl0: Ethernet address: 00:10:4b:b0:38:07
xl0: selecting 10baseT transceiver, half duplex
pcib1: <Host to PCI bridge> on motherboard
pci2: <PCI bus> on pcib1
fdc0: <NEC 72065B or clone> 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: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: model IntelliMouse, device ID 3
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 at port 0x2f8-0x2ff irq 3 on isa0
sio1: type 16550A
ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
ppc0: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode
ppi0: <Parallel I/O> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
APIC_IO: Testing 8254 interrupt delivery
APIC_IO: routing 8254 via IOAPIC #0 intpin 2
IP packet filtering initialized, divert enabled, rule-based forwarding enabled, default to accept, logging limited to 100 packets/entry by default
DUMMYNET initialized (000608)
BRIDGE 990810, have 8 interfaces
-- index 1  type 6 phy 0 addrl 6 addr 00.10.4b.b0.38.07
IP Filter: v3.4.8 initialized.  Default = pass all, Logging = enabled
SMP: AP CPU #1 Launched!
ad0: 9787MB <QUANTUM FIREBALLlct10 10> [19885/16/63] at ata0-master UDMA66
acd0: CDROM <NEC CD-ROM DRIVE:287> at ata1-master using WDMA2
Mounting root from ufs:/dev/ad0s1a




>Description:

I installed FreeBSD 4.1-release on this machine (from WC CDs) correctly, and
immediately after recompiling kernel it viewed fine my Logitech Pilot Wheel
USB Mouse. It was real plug'n'play too (using /etc/usbd.conf). All fine.
(I used it also on a precedent K6-400 machine with 4.1-S)

After cvsupping to 4.2-stable and recompiling all enabling SMP support in
kernel I noted that USB mouse stopped working.
I tried recompiling just a kernel without SMP options and the mouse resumed
normal operation.
I booted many times using SMP kernel and non-SMP kernel, every time the
behavior of USB was reproduced.

So I think there are some problems with USB code when running in SMP
kernels.

Plugging the mouse in the USB port under SMP kernel caused also interval
console messages from usbd about resetting the usb ports itself (I guess
it's something about retrying handshaking or similar).


>How-To-Repeat:

Use a SMP kernel and some USB device (to be honest I tried with
mouse only, till now)


>Fix:

use a non-SMP kernel


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->n_hibma 
Responsible-Changed-By: n_hibma 
Responsible-Changed-When: Mon Apr 9 11:12:14 PDT 2001 
Responsible-Changed-Why:  
Something I should look at. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=24059 

From: Nick Sayer <nsayer@quack.kfu.com>
To: freebsd-gnats-submit@freebsd.org, aledema@iol.it,
	n_hibma@freebsd.org
Cc:  
Subject: Re: kern/24059: USB support broken in SMP kernel
Date: Wed, 25 Jul 2001 13:34:53 -0700

 I am seeing this same behavior on two other machines -- these are UP, 
 not SMP. I believe the problem is related to the VIA 83C572 USB 
 controller, not the SMPishness (or not) of the machine.
 

From: "AceX5" <AceX5@thrillkill.de>
To: <freebsd-gnats-submit@FreeBSD.org>, <aledema@iol.it>
Cc:  
Subject: Re: kern/24059: USB support broken in SMP kernel
Date: Thu, 12 Dec 2002 10:26:09 +0100

 I want to use the Gigabyte GA-6BXD with SMP support on FreeBSD 4.7-STABLE.
 I've the same bug. All my USB devices have stopped working since I compiled
 my SMP kernel. Thats crazy, because I use USB mouse and keyboard.
 
 Greeting from Germany, Sebastian Khler
 

From: Ernst de Haan <znerd@FreeBSD.org>
To: freebsd-gnats-submit@freebsd.org, aledema@iol.it,
	n_hibma@freebsd.org
Cc:  
Subject: Re: kern/24059: USB support broken in SMP kernel
Date: Mon, 5 Jan 2004 11:52:59 +0100

 Is this still an issue? I have problems with my USB card (NEC uPD 9210) with 
 an SMP kernel (4.9-STABLE), but I haven't tried a UP kernel yet. I will, 
 that may fix my problem.
 
 Ernst
 

From: Nick Hibma <nick@cope.nl>
To: Ernst de Haan <znerd@freebsd.org>
Cc: "freebsd-gnats-submit@freebsd.org" <freebsd-gnats-submit@freebsd.org>,
	"aledema@iol.it" <aledema@iol.it>
Subject: Re: kern/24059: USB support broken in SMP kernel {-4.9}
Date: Mon, 5 Jan 2004 11:57:41 +0100 (CET)

 Dunno, the site is really out of date. I'll try to fix _that_ problem
 soonish.
 
 Nick
 
 > Is this still an issue? I have problems with my USB card (NEC uPD 9210) with
 > an SMP kernel (4.9-STABLE), but I haven't tried a UP kernel yet. I will,
 > that may fix my problem.
 >
 > Ernst
 >
 >

From: Ernst de Haan <znerd@FreeBSD.org>
To: Nick Hibma <nick@cope.nl>
Cc: "freebsd-gnats-submit@freebsd.org" <freebsd-gnats-submit@FreeBSD.org>,
	"aledema@iol.it" <aledema@iol.it>
Subject: Re: kern/24059: USB support broken in SMP kernel {-4.9}
Date: Mon, 5 Jan 2004 12:10:41 +0100

 Nick,
 
 > Dunno, the site is really out of date. I'll try to fix _that_ problem
 > soonish.
 
 By 'site' you mean 'PR database' ?
 
 I think I know what you mean by 'soonish' :-) Do you need any help?
 
 Ernst
 
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Fri Aug 27 22:25:37 GMT 2004 
State-Changed-Why:  
Is this still a problem with modern versions of FreeBSD? 


Responsible-Changed-From-To: n_hibma->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Aug 27 22:25:37 GMT 2004 
Responsible-Changed-Why:  
With permission of assignee, reset assignment. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=24059 
State-Changed-From-To: feedback->closed 
State-Changed-By: linimon 
State-Changed-When: Thu Nov 4 04:57:03 GMT 2004 
State-Changed-Why:  
Feedback timeout (2 months). 

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