From owner-freebsd-firewire@FreeBSD.ORG Mon May 11 19:29:25 2009 Return-Path: Delivered-To: freebsd-firewire@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id D24FF106566B; Mon, 11 May 2009 19:29:24 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Alexander Motin Date: Mon, 11 May 2009 15:29:10 -0400 User-Agent: KMail/1.6.2 References: <4A058B5C.3010707@FreeBSD.org> In-Reply-To: <4A058B5C.3010707@FreeBSD.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <200905111529.12808.jkim@FreeBSD.org> Cc: freebsd-current@FreeBSD.org, freebsd-firewire@FreeBSD.org Subject: Re: [Fwd: Re: amd64 suspend/resume broken on current] X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2009 19:29:25 -0000 [CC added] On Saturday 09 May 2009 09:55 am, Alexander Motin wrote: > -------- Original Message -------- > Subject: Re: amd64 suspend/resume broken on current > Date: Fri, 8 May 2009 21:52:45 +0200 > From: Guy Brand > Organization: Direction Informatique, Université de Strasbourg, > France To: Alexander Motin > References: > <4A021118.2030106@mavhome.dp.ua> <20090508111024.GK4922@unistra.fr> > <4A041DC2.90106@mavhome.dp.ua> <20090508144551.GA1599@unistra.fr> > <4A047925.6060301@mavhome.dp.ua> > > Guy Brand wrote: > > Alexander Motin wrote: > > > Done. No firewire issue of course, but a kernel panic on > > > resume. Bad karma since yesterday :-) > > > > Where is this panic happens now? > > Just after resuming: > > Fatal trap 12: page fault while in kernel mode > ... > current process = 1415 (acpiconf) > > The backtrace says: > > intr_execute_handlers() at intr_execute_handlers+0x21 > lapic_handle_intr() at lapic_handle_intr+0x37 > Xapic_isr1() at Xapic_isr1+0xa4 > > acpi_sleep_machdep() at acpi_sleep_machdep+0x3b2 > acpi_EnterSleepState() at acpi_EnterSleepState+0x3fe > acpi_AckSleepState() at acpi_AckSleepState+0x163 > devfs_ioctl() at devfs_ioctl_f+0x77 > kern_ioctl() at kern_ioctl+0xb0 > ioctl() at ioctl+0xfd > syscall() at syscal+0x246 > Xfast_syscall() at Xfast_syscall+0xd0 So, that means the interrupt handler is executed *before* device is completely resumed. In fact, the interrupts are not disabled for dcons(4), it seems: #if 0 /* Let dcons(4) be accessed */ /* Stop interrupt */ OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_EN | OHCI_INT_ERR | OHCI_INT_PHY_SID | OHCI_INT_PHY_INT | OHCI_INT_DMA_ATRQ | OHCI_INT_DMA_ATRS | OHCI_INT_DMA_PRRQ | OHCI_INT_DMA_PRRS | OHCI_INT_DMA_ARRQ | OHCI_INT_DMA_ARRS | OHCI_INT_PHY_BUS_R); /* FLUSH FIFO and reset Transmitter/Reciever */ OWRITE(sc, OHCI_HCCCTL, OHCI_HCC_RESET); #endif I guess firewire(4) should differentiate suspend and shutdown properly. Jung-uk Kim