From nobody@FreeBSD.org  Sat Jan 20 07:27:55 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id A0D1516A400
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 20 Jan 2007 07:27:55 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id 90EAF13C45D
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 20 Jan 2007 07:27:55 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l0K7RtBW038142
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 20 Jan 2007 07:27:55 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l0K7RtKe038141;
	Sat, 20 Jan 2007 07:27:55 GMT
	(envelope-from nobody)
Message-Id: <200701200727.l0K7RtKe038141@www.freebsd.org>
Date: Sat, 20 Jan 2007 07:27:55 GMT
From: Jrgen Dankoweit<Juergen.Dankoweit@FreeBSD-Onkel.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: System hangs after /sbin/shutdown
X-Send-Pr-Version: www-3.0
X-GNATS-Notify: blin911@eastfeet.com

>Number:         108139
>Category:       i386
>Synopsis:       [patch] System hangs after /sbin/shutdown
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    gavin
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 20 07:30:22 GMT 2007
>Closed-Date:    Tue May 13 16:45:35 UTC 2008
>Last-Modified:  Sun Jul  6 09:40:01 UTC 2008
>Originator:     Jrgen Dankoweit
>Release:        FreeBSD 6.2 RELEASE
>Organization:
>Environment:
FreeBSD primergy470.juergendankoweit.net 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan  19 10:18:40 CET 2007     juergen@primergy470.juergendankoweit.net:/usr/obj/usr/src/sys/PRIMERGY470  i386

>Description:
Hello,

everytime a "shutdown -h now", "shutdown -r now", "shutdown -p now" or
"reboot" is started, the shutdown process hangs directly after "Uptime
hh:mm:ss". The system is dead, no keyboard, no mouse nothing. Only the
reset button helps.

This is independent from ACPI or APM. Both are disabled on that machine.

The described problems or either on SMP machines or on single CPU machines
that I have tested (two single and one SMP).
>How-To-Repeat:
Starting the shutdown process with "shutdown -h now", "shutdown -r now",
"shutdown -p now" or "reboot"
>Fix:

>Release-Note:
>Audit-Trail:

From: "Even Chung" <blin911@eastfeet.com>
To: "bug-followup" <bug-followup@FreeBSD.org>,
 "Juergen.Dankoweit" <Juergen.Dankoweit@FreeBSD-Onkel.de>
Cc:  
Subject: Re: i386/108139: System hangs after /sbin/shutdown
Date: Thu, 8 Feb 2007 09:47:45 +0800

 SGksIA0KICAgSSBhbHNvIGVuY291bnRlcmVkIHRoZSBzYW1lIHByb2JsZW0geWVzdGVyZGF5LiAN
 CiANCiAgTXkgc2VydmVyIGlzIElCTSBTeXN0ZW0geDMyNTAgd2l0aCBJbnRlbCB4ZW9uIDMwNDAo
 MS44NkdIeiwgZHVhbCBjb3JlLCA2NGJpdHMpLiBJIHdhbnQgdG8gaW5zdGFsbCBGcmVlQlNEIDYu
 MihhbWQ2NCkgb24gdGhlIHNlcnZlciwgYnV0IHRoZSBwcm9ibGVtIG9jY3Vyczogc3lzdGVtIGhh
 bmdzIHdoZW4gobBzaHV0ZG93biCoQ3Igbm93obEgb3IgobBzaHV0ZG93biCoQ3Agbm93obEuIEkg
 YWxzbyB0cnkgRnJlZUJTRCA2LjEoYW1kNjQpLCBidXQgaXQgYWxzbyBoYW5ncyB3aGVuIHJlYm9v
 dC4gSSBndWVzcyBBQ1BJIGNhdXNlcyB0aGUgcHJvYmxlbSwgYnV0IHdoZW4gSSByZWJvb3QgZnJl
 ZWJzZCB3aXRoIGFjcGkgZGlzYWJsZWQsIHRoZSBwcm9ibGVtIHJlbWFpbiBleGlzdGVuY2UuIEkg
 dHJ5IHRvIGRpc2FibGUgYWxsIHNwZWNpYWwgZnVuY3Rpb25zIGluIEJJT1MsIHN1Y2ggYXMgIkR1
 YWwgQ29yZSBQcm9jZXNzb3IgTG9naWMiLCAiQzEgRW5oYW5jZWQgTW9kZSIsICJFSVNUIEZ1bmN0
 aW9uIiwgIlNlcmlhbCBQb3J0IDEiLCAiUGxhbmFyIEV0aGVybmV0IiwgIlBhcmFsbGVsIEFUQSIs
 ICJVU0IgU3VwcG9ydCIsICJVU0IgMi4wIFN1cHBvcnQiLiBUaGVuIEkgZmluZCB0aGUgc3lzdGVt
 IGNhbiByZWJvb3QNCiBhbmQgcG93ZXIgb2ZmIHdpdGhvdXQgZW5hYmxpbmcgIlVTQiAyLjAgU3Vw
 cG9ydCIuDQoNCiAgIFNvLCBJIGVzdGltYXRlIEJJT1Mgc3VwcG9ydGluZyBVU0IgMi4wIGNhdXNl
 cyB0aGUgcHJvYmxlbS4gTWF5YmUgRnJlZUJTRCA2LjIgZG9lc24ndCBkZWFsIHdpdGggVVNCIDIu
 MCB3ZWxsLg0KDQogICBJIGhvcGUgdGhpcyBpbmZvIGlzIGhlbHBmdWxsIG9mIHlvdS4gDQoNCg0K
 RXZlbiBDaHVuZw0KMjAwNy0wMi0wOA0KLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
 LS0tLS0tLS0tLS0tLS0tLS0tDQpBIEZhbiBvZiBGcmVlQlNELiBeX14NCg==
 

From: "Remko Lodder" <remko@FreeBSD.org>
To: "Even Chung" <blin911@eastfeet.com>
Cc: freebsd-i386@freebsd.org,
 bug-followup@freebsd.org
Subject: Re: i386/108139: System hangs after /sbin/shutdown
Date: Thu, 8 Feb 2007 07:53:49 +0100 (CET)

 Hello,
 
 Can you specify what you ment with this?
 -- 
 Kind regards,
 
    Remko Lodder  ** remko@elvandar.org
         FreeBSD  ** remko@FreeBSD.org
 
    /* Quis Custodiet ipsos custodes */
 
 
 
 

From: blin911@eastfeet.com
To: bug-followup@FreeBSD.org,
 Juergen.Dankoweit@FreeBSD-Onkel.de
Cc:  
Subject: Re: i386/108139: System hangs after /sbin/shutdown
Date: Thu, 8 Feb 2007 16:02:13 +0800 (CST)

 Hi,
    I also encountered the same problem yesterday.
 
   My server is IBM System x3250 with Intel xeon 3040(1.86GHz, dual core,
 64bits). I want to install FreeBSD 6.2(amd64) on the server, but the
 problem occurs: system hangs when "shutdown r now" or "shutdown p
 now". I also try FreeBSD 6.1(amd64), but it also hangs when reboot. I
 guess ACPI causes the problem, but when I reboot freebsd with acpi
 disabled, the problem remain existence. I try to disable all special
 functions in BIOS, such as "Dual Core Processor Logic", "C1 Enhanced
 Mode", "EIST Function", "Serial Port 1", "Planar Ethernet", "Parallel
 ATA", "USB Support", "USB 2.0 Support". Then I find the system can
 reboot
  and power off without enabling "USB 2.0 Support".
 
    So, I estimate BIOS supporting USB 2.0 causes the problem. Maybe
 FreeBSD 6.2 doesn't deal with USB 2.0 well.
 
    I hope this info is helpfull of you.
 
 
 Even Chung
 2007-02-08
 ---------------------------------------------------
 A Fan of FreeBSD. ^_^
 

From: "Even Chung" <blin911@eastfeet.com>
To: remko@FreeBSD.org
Cc: freebsd-i386@freebsd.org,
 bug-followup@freebsd.org
Subject: Re: i386/108139: System hangs after /sbin/shutdown
Date: Thu, 8 Feb 2007 16:18:35 +0800 (CST)

 Oh, I am sorry, previous mail is encoded with base64, and it doesn't
 display correctly. I have sent the mail again just now.
 
 Best regards.
 
 
From: Guy Helmer <ghelmer@palisadesys.com>
To: bug-followup@freebsd.org, Juergen.Dankoweit@FreeBSD-Onkel.de
Cc:  
Subject: Re: i386/108139: System hangs after /sbin/shutdown
Date: Tue, 20 Mar 2007 09:50:08 -0500

 We have encountered a similar problem on Supermicro X7DBR-8+ and 
 X7DBR-i+ motherboards where, when rebooting, the kernel hangs after the 
 "Uptime:" message.  The following change to bus_generic_shutdown() in 
 subr_bus.c seems to have helped:
 
 Index: sys/kern/subr_bus.c
 ===================================================================
 RCS file: /home/ncvs/src/sys/kern/subr_bus.c,v
 retrieving revision 1.184.2.4
 diff -u -r1.184.2.4 subr_bus.c
 --- sys/kern/subr_bus.c	22 Sep 2006 18:49:14 -0000	1.184.2.4
 +++ sys/kern/subr_bus.c	16 Mar 2007 17:59:04 -0000
 @@ -2913,7 +2913,11 @@
  	device_t child;
  
  	TAILQ_FOREACH(child, &dev->children, link) {
 +		//printf(" Calling device_shutdown on child '%s':\n", child->nameunit);
 +		DELAY(1000);
  		device_shutdown(child);
 +		//printf(" Returned from device_shutdown on child '%s'.\n", child->nameunit);
 +		DELAY(1000);
  	}
  
  	return (0);
 
 Guy Helmer
 ghelmer@freebsd.org
 
State-Changed-From-To: open->feedback 
State-Changed-By: gavin 
State-Changed-When: Mon Apr 7 17:22:48 UTC 2008 
State-Changed-Why:  
Do you still see this problem with newer versions of FreeBSD? 
If so, could you please try removing the line 
ehci_pci_givecontroller(self); 
from around line 200 of /usr/src/sys/dev/usb/ehci_pci.c 
and seeing if that fixes your problem? 


Responsible-Changed-From-To: freebsd-i386->gavin 
Responsible-Changed-By: gavin 
Responsible-Changed-When: Mon Apr 7 17:22:48 UTC 2008 
Responsible-Changed-Why:  
Track 

http://www.freebsd.org/cgi/query-pr.cgi?pr=108139 
State-Changed-From-To: feedback->closed 
State-Changed-By: gavin 
State-Changed-When: Tue May 13 16:43:27 UTC 2008 
State-Changed-Why:  
Submitter reports (in private email) that he is no longer in a  
position to test this.  Close the PR, as I'm pretty sure we've 
fixed the issue in more recent versions of FreeBSD. 

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

From: Jonathan McKeown <jonathan@hst.org.za>
To: bug-followup@freebsd.org, Juergen.Dankoweit@freebsd-onkel.de
Cc:  
Subject: Re: i386/108139: [patch] System hangs after /sbin/shutdown
Date: Thu, 15 May 2008 11:11:34 +0200

 I see this has been closed as Gavin is
 
 > pretty sure we've fixed the issue in more recent versions of FreeBSD.
 
 I am seeing this problem on a Supermicro (quad-core Xeon) box with both 
 6.3-RELEASE and 7.0-RELEASE.
 
 Jonathan

From: Jonathan McKeown <jonathan@hst.org.za>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: i386/108139: [patch] System hangs after /sbin/shutdown
Date: Sun, 6 Jul 2008 11:04:28 +0200

 Following private email exchange, tried Gavin's suggestion above (2008-04-07):
 
   please try removing the line 
   ehci_pci_givecontroller(self); 
   from around line 200 of /usr/src/sys/dev/usb/ehci_pci.c
 
 and also removed the definition of ehci_pci_givecontroller (otherwise make 
 buildkernel fails, treating the defined-but-not-used warning as an error).
 
 This solves the problem.
>Unformatted:
