From nobody@FreeBSD.org  Tue Jul 21 00:51:02 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 10140106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 21 Jul 2009 00:51:02 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id D7B1E8FC1A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 21 Jul 2009 00:51:01 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n6L0p10o046574
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 21 Jul 2009 00:51:01 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n6L0p1vA046573;
	Tue, 21 Jul 2009 00:51:01 GMT
	(envelope-from nobody)
Message-Id: <200907210051.n6L0p1vA046573@www.freebsd.org>
Date: Tue, 21 Jul 2009 00:51:01 GMT
From: Gonzalo Nemmi <gnemmi@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [fwohci] fwohci throws an"unrecoverable error" upon resume from suspend
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         136946
>Category:       kern
>Synopsis:       [fwohci] [suspend/resume] fwohci throws an "unrecoverable error" upon resume from suspend
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-firewire
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 21 01:00:16 UTC 2009
>Closed-Date:    
>Last-Modified:  Tue Apr 22 05:25:21 UTC 2014
>Originator:     Gonzalo Nemmi
>Release:        8.0-BETA2
>Organization:
>Environment:
FreeBSD gargoyle.inferna.com.ar 8.0-BETA2 FreeBSD 8.0-BETA2 #0: Wed Jul 15 23:25:30 UTC 2009     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Running a fresh 8.0-BETA2 install (i386), everytime I resume my laptop from suspend I get the following output:

Jul 20 17:53:51 gargoyle acpi: suspend at 20090720 17:53:51
Jul 20 17:53:56 gargoyle kernel: fwohci0: fwohci_pci_suspend
Jul 20 17:54:25 gargoyle kernel: bge0: PHY write timed out (phy 1, reg 0, val 32768)
Jul 20 17:54:25 gargoyle kernel: bge0: PHY read timed out (phy 1, reg 0, val 0xffffffff)
Jul 20 17:54:25 gargoyle kernel: bge0: PHY read timed out (phy 1, reg 24, val 0xffffffff)
Jul 20 17:54:25 gargoyle kernel: bge0: PHY read timed out (phy 1, reg 16, val 0xffffffff)
Jul 20 17:54:25 gargoyle kernel: bge0: PHY write timed out (phy 1, reg 16, val 0)
Jul 20 17:54:25 gargoyle kernel: bge0: PHY read timed out (phy 1, reg 16, val 0xffffffff)
Jul 20 17:54:25 gargoyle kernel: bge0: PHY write timed out (phy 1, reg 16, val 0)
Jul 20 17:54:25 gargoyle kernel: bge0: PHY write timed out (phy 1, reg 23, val 18)
Jul 20 17:54:25 gargoyle kernel: bge0: flow-through queue init failed
Jul 20 17:54:25 gargoyle kernel: bge0: initialization failure
Jul 20 17:54:25 gargoyle kernel: fwohci0: Phy 1394a available S400, 1 ports.
Jul 20 17:54:25 gargoyle kernel: fwohci0: Link S400, max_rec 2048 bytes.
Jul 20 17:54:25 gargoyle kernel: fwohci0: Initiate bus reset
Jul 20 17:54:25 gargoyle kernel: fwohci0: fwohci_intr_core: BUS reset
Jul 20 17:54:25 gargoyle kernel: fwohci0: fwohci_intr_core: node_id=0x00000000, SelfID Count=1, CYCLEMASTER mode
Jul 20 17:54:25 gargoyle kernel: firewire0: 1 nodes, maxhop <= 0 cable IRM irm(0)  (me) 
Jul 20 17:54:25 gargoyle kernel: firewire0: bus manager 0 
Jul 20 17:54:25 gargoyle kernel: fwohci0: unrecoverable error
Jul 20 17:54:25 gargoyle kernel: wakeup from sleeping state (slept 00:00:29)
Jul 20 17:54:25 gargoyle acpi: resumed at 20090720 17:54:25

As you can see from the messages, bge never gets back (PR 136876)

Full boot-v can be foun in here: http://pastebin.com/f32612f89

This happens on a Dell 1318 laptop and it's also present on FreeBSD 7.2-RELEASE and 8.0-BETA1.

more info:
>How-To-Repeat:
I just need to issue a "acpiconf -s 3" and, upon resume, I will always get the same output on:

7.2-RELEASE
8.0-BETA1
8.0-BETA2 
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Jul 21 01:03:56 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=136946 
Responsible-Changed-From-To: freebsd-net->freebsd-firewire 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Jul 21 04:51:09 UTC 2009 
Responsible-Changed-Why:  
fix assignment. 

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

From: Sean Bruno <sean.bruno@dsl-only.net>
To: bug-followup@FreeBSD.org, gnemmi@gmail.com
Cc:  
Subject: Re: kern/136946: [fwohci] fwohci throws an"unrecoverable error"
 upon resume from suspend
Date: Wed, 22 Jul 2009 09:40:06 -0700

 Thanks.  This is perfect.
 
 I seem to remember looking at suspend/resume at BSDCan and realizing
 that it's pretty broken.  I forgot to submit a PR at the time, thanks
 for putting this in.
 
 Since the firewire stack is in multiple parts, I'll have to think about
 how each module needs to save it's respective state and what to do on
 resume.
 
 Thoughts?
 
 Sean
 

From: Gonzalo Nemmi <gnemmi@gmail.com>
To: bug-followup@freebsd.org,
 gnemmi@gmail.com
Cc:  
Subject: Re: kern/136946: [fwohci] fwohci throws an"unrecoverable error" upon resume from suspend
Date: Wed, 22 Jul 2009 16:55:52 -0300

 Thanks a lot for you interest !
 
 Not much I can do to help on the coding side of things but I'm willing 
 to try any patch you need me to, give you root acces via ssh to this 
 machine should you need it and to look for a firewire appliance in 
 order to run any possible test.
 
 Basically .. I can't code, but Im really willing to do everything I can 
 to pitch in to solve this problem :)
 
 Best regards
 Gonzalo
>Unformatted:
