From regisr@regix.com  Mon Sep 22 11:36:56 2003
Return-Path: <regisr@regix.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id E79E416A4B3
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 22 Sep 2003 11:36:56 -0700 (PDT)
Received: from regix.com (nas-cbv-9-62-147-161-24.dial.proxad.net [62.147.161.24])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 7486B43FE3
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 22 Sep 2003 11:36:54 -0700 (PDT)
	(envelope-from regisr@regix.com)
Received: from crocoite.home.regix.com (localhost.home.regix.com [127.0.0.1])
	by  regix.com (8.12.9/8.12.9) with ESMTP id h8MIaqXu001155;
	Mon, 22 Sep 2003 20:36:52 +0200 (CEST)
	(envelope-from regisr@crocoite.home.regix.com)
Received: (from regisr@localhost)
	by crocoite.home.regix.com (8.12.9/8.12.9/Submit) id h8MIapTo001154;
	Mon, 22 Sep 2003 20:36:51 +0200 (CEST)
Message-Id: <200309221836.h8MIapTo001154@crocoite.home.regix.com>
Date: Mon, 22 Sep 2003 20:36:51 +0200 (CEST)
From: regis rampnoux <regisr@regix.com>
Reply-To: regis rampnoux <regisr@pobox.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: regis rampnoux <regisr@pobox.com>
Subject: boot/usb: boot freezes during USB devices detection 
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         57104
>Category:       misc
>Synopsis:       boot/usb: boot freezes during USB devices detection
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 22 11:40:02 PDT 2003
>Closed-Date:    Sun Sep 28 08:02:37 PDT 2003
>Last-Modified:  Sun Sep 28 08:02:37 PDT 2003
>Originator:     regisr
>Release:        FreeBSD 4.9-PRERELEASE i386
>Organization:
regix
>Environment:
	System: FreeBSD 4.9-PRERELEASE Sat Sep 20 13:52:08 CEST 2003 i386 
	src updated on September 20 08:00 GMT/TU

>Description:

	the boot stops during USB devices detection

        ohci0: <AcerLabs M5237 (Aladdin-V) USB controller> 
        mem0xdf000000-0xdf000fff irq 9 at device 2.0 on pci0
	usb0: OHCI version 1.0, legacy support
	usb0: <AcerLabs M5237 (Aladdin-V) USB controller> on ohci0
	usb0: USB revision 1.0
	uhub0: AcerLabs OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
	uhub0: 2 ports with 2 removable, self powered
        
	and nothing after!

>How-To-Repeat:

	this depends on devices connected.
	reported with other motherboards and other USB devices

>Fix:

	disconnect the USB devices, boot and replug the USB devices when
	devices detection is finished.


>Release-Note:
>Audit-Trail:

From: regis rampnoux <regisr@pobox.com>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: misc/57104: boot/usb: boot freezes during USB devices detection
Date: Mon, 22 Sep 2003 22:42:58 +0200 (CEST)

 Remarks:
 
         Was working with the source code updated on september 5.
 

From: Ian Dowse <iedowse@maths.tcd.ie>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: misc/57104: boot/usb: boot freezes during USB devices detection 
Date: Sat, 27 Sep 2003 12:55:14 +0100

 In message <20030923171546.GA365@Psyllobora>, nivit@libero.it writes:
 >> >Description:
 >>
 >>       the boot stops during USB devices detection
 >> [...]
 >
 >(Waiting for an official solution), you can solve this problem,
 >replacing the following files with their old version:
 >
 >sys/kern/subr_taskqueue.c (1.3.2.2 -> 1.3.2.1)
 >sys/sys/taskqueue.h sys.orig/sys/taskqueue.h (1.1.2.3 -> 1.1.2.2)
 
 As a followup, the submitter reports that the hang is cured by the
 following patch.
 
 Ian
 
 Index: kern_fork.c
 ===================================================================
 RCS file: /home/iedowse/CVS/src/sys/kern/kern_fork.c,v
 retrieving revision 1.72.2.14
 diff -u -r1.72.2.14 kern_fork.c
 --- kern_fork.c	26 Jun 2003 04:15:10 -0000	1.72.2.14
 +++ kern_fork.c	26 Sep 2003 08:26:31 -0000
 @@ -183,7 +183,7 @@
  	struct proc *p2, *pptr;
  	uid_t uid;
  	struct proc *newproc;
 -	int ok;
 +	int ok, s;
  	static int curfail = 0, pidchecked = 0;
  	static struct timeval lastfail;
  	struct forklist *ep;
 @@ -544,10 +544,10 @@
  	 */
  	microtime(&(p2->p_stats->p_start));
  	p2->p_acflag = AFORK;
 -	(void) splhigh();
 +	s = splhigh();
  	p2->p_stat = SRUN;
  	setrunqueue(p2);
 -	(void) spl0();
 +	splx(s);
  
  	/*
  	 * Now can be swapped.
State-Changed-From-To: open->closed 
State-Changed-By: iedowse 
State-Changed-When: Sun Sep 28 08:01:12 PDT 2003 
State-Changed-Why:  
Fixed by revision 1.72.2.15 of kern_fork.c. 

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