Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Aug 2007 18:33:21 -0700 (PDT)
From:      Don Lewis <truckman@FreeBSD.org>
To:        bruce@cran.org.uk
Cc:        current@FreeBSD.org
Subject:   Re: RE: Reboot on "shutdown -r" hangs after final "uptime ..." string
Message-ID:  <200708120133.l7C1XL54060302@gw.catspoiler.org>
In-Reply-To: <20070812004103.GA20935@muon.bluestop.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 12 Aug, bruce@cran.org.uk wrote:
> On Sun, Aug 12, 2007 at 01:22:51AM +0100, bruce@cran.org.uk wrote:
>> By putting more printfs I see that it gets to the line "eec =
>> pci_read_config" in ehci_pci_givecontroller and then appears to stop -
>> I've got a printf at the end of ehci_pci_givecontroller that never gets
>> displayed, and the printf at the top of the for loop only gets displayed
>> once.
>> 
> 
> After adding one more printf I see that it actually stops at the
> pci_write_config line, not the pci_read_config.

I wonder if the register write is triggering an SMI, which is sending
the CPU off into the weeds.  Take a look at sections 2.1.7 and 2.1.8 of
the EHCI spec
<http://developer.intel.com/technology/usb/download/ehci-r10.pdf>.

You might want to print the values of eec and
pci_read_config(self, eecp+4, 4) immediately before the call to
pci_write_config().  Bit 13 of the latter will be the most interesting.

Something that you might want to also print is the value of
	EOREAD4(sc, EHCI_USBSTS)
immediately before the
	EOWRITE4(sc, EHCI_USBCMD, EHCI_CMD_HCRESET);
call in ehci_hcreset().  Bit 12 of this register (EHCI_STS_HCH) should
be a zero before the write to do the reset is performed.  Maybe
ehci_hcreset() needs to wait for that to happen (as is done in
ehci_init()), rather than just waiting a fixed amount of time.

I don't know much about SMI, but if the CPU is getting stuck in
the SMI handler, then that might indicate that the problem is a BIOS
bug.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708120133.l7C1XL54060302>