From owner-freebsd-current@FreeBSD.ORG Sun Aug 12 17:51:29 2007 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3FB816A41B for ; Sun, 12 Aug 2007 17:51:29 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from gw.catspoiler.org (adsl-75-1-14-242.dsl.scrm01.sbcglobal.net [75.1.14.242]) by mx1.freebsd.org (Postfix) with ESMTP id C529713C45A for ; Sun, 12 Aug 2007 17:51:29 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id l7CHpHIg063518; Sun, 12 Aug 2007 10:51:21 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <200708121751.l7CHpHIg063518@gw.catspoiler.org> Date: Sun, 12 Aug 2007 10:51:17 -0700 (PDT) From: Don Lewis To: bruce@cran.org.uk In-Reply-To: <20070812124840.GA5465@muon.bluestop.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: current@FreeBSD.org Subject: Re: RE: Reboot on "shutdown -r" hangs after final "uptime ..." string X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Aug 2007 17:51:30 -0000 On 12 Aug, bruce@cran.org.uk wrote: > On Sat, Aug 11, 2007 at 09:42:55PM -0700, Don Lewis wrote: > Thanks for your help. The revised patch doesn't change the behaviour; It was a shot in the dark ... > in > ehci_pci_givecontroller, eec has the value 0x1000001 and the > pci_read_config returns 0xC0002000. Disabling the > SMI bit doesn't help either, Whoops, bit 13 is set in this register. In my test code, I told you to use the mask ~0x200, but the mask should have been ~0x2000. > but something I have noticed it that > (both with and without the SMI disabling code) I get an 'f' printed on > the console occasionally, which is probably from the printf I put in, > "finished in ehci_pci_givecontroller": > > // code to disable SMI bit... > DPRINTF(("pci_write_config in ehci_pci_givecontroller\n")); > pci_write_config(...) > // end for loop > DPRINT(("finished in ehci_pci_givecontroller\n")); > // end of ehci_pci_givecontroller function > > which suggests that something is > causing the system to hang after the pci_write_config has finished. The logical thing would be the SMI triggered by the pci_write_config(). There might be some uncertainty about the timing of the interrupt, which would account for the uncertainty in the appearance of the 'f'.