Bug 114646 - [firewire] [patch] firewire fails after suspend/resume
Summary: [firewire] [patch] firewire fails after suspend/resume
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 7.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: Sean Bruno
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-17 02:20 UTC by Cristian KLEIN
Modified: 2013-04-04 16:26 UTC (History)
0 users

See Also:


Attachments
file.diff (507 bytes, patch)
2007-07-17 02:20 UTC, Cristian KLEIN
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cristian KLEIN 2007-07-17 02:20:01 UTC
When suspending / resuming my laptop (IBM Thinkpad R51) several times, it repeatedly prints the following message (written by hand):

fwohci0: device physically ejected?

The output of this message is so fast that the system is unusable.

Fix: Using a printf, I found out that fwohci_check_stat is called from fwohci_poll. Presumably, fwohci is not suspended or resumed correctly and the polling code repeatedly calls device_printf. I can't say for sure, but I assume the problem occurs during suspend, because the message flood starts few seconds before the laptop is actually suspended, and continues after resuming.

Why fwohci is not suspended/resumed correctly is unknown to me, but the following patch will rate-limit that message, so the system becomes usable after resuming. I don't think that fwohci is reinitialized correctly, but as I don't have any firewire device, I can't say for sure.

Anyway, after applying the patch below (and some other ACPI related patch), I was able to suspend / resume my laptop 20+ times.


Patch attached with submission follows:
How-To-Repeat: Compile a recent 7.0-CURRENT on a Laptop with firewire. Resume / suspend repeatedly.
Comment 1 Cristian KLEIN 2007-07-17 02:56:19 UTC
Sorry for the somewhat incorrect title of the PR. After applying the 
patch I was able to get a copy-paste of the message ("###" are my comments):

### starting suspend
usb0: interrupt while not operating ignored
usb1: interrupt while not operating ignored
usb2: interrupt while not operating ignored
usb0: interrupt while not operating ignored
usb1: interrupt while not operating ignored
usb2: interrupt while not operating ignored
fwohci0: fwohci_pci_suspend
usb0: interrupt while not operating ignored
usb1: interrupt while not operating ignored
usb2: interrupt while not operating ignored
fwohci0: device physically ejected?
fwohci0: device physically ejected?
fwohci0: device physically ejected?
fwohci0: device physically ejected?
fwohci0: device physically ejected?
fwohci0: device physically ejected?
fwohci0: device physically ejected?
fwohci0: device physically ejected?
fwohci0: device physically ejected?
fwohci0: device physically ejected?
### system suspended
### starting resume
fwohci0: Phy 1394a available S400, 2 ports.
fwohci0: Link S400, max_rec 2048 bytes.
fwohci0: resume iso receive ch: 0
fwohci0: Initiate bus reset
wakeup from sleeping state (slept 00:00:09)
fwohci0: BUS reset
fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode
firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
firewire0: bus manager 0 (me)
em0: link state changed to DOWN
em0: link state changed to UP
ums0: at uhub1 port 1 (addr 2) disconnected
ums0: detached
ums0: <A4Tech USB Optical Mouse, class 0/0, rev 1.10/0.01, addr 2> on uhub1
ums0: 8 buttons and Z dir.
### resume done
Comment 2 Gavin Atkinson freebsd_committer freebsd_triage 2009-02-02 20:56:42 UTC
State Changed
From-To: open->feedback

To submitter: I'm sorry that this PR has laid dormant for so 
long.  Do you know if this is still a problem with newer 
versions of FreeBSD? 


Comment 3 Gavin Atkinson freebsd_committer freebsd_triage 2009-02-02 20:56:42 UTC
Responsible Changed
From-To: freebsd-bugs->gavin

Track
Comment 4 Gavin Atkinson freebsd_committer freebsd_triage 2009-02-02 21:35:00 UTC
State Changed
From-To: feedback->patched

Mark this as patched, it looks like it was fixed with the commit 
http://docs.FreeBSD.org/cgi/mid.cgi?200805100922.m4A9M6fg014158 
although that has not been merged to the STABLE branches yet. 
To submitter: would you be able to apply the changes manually and 
verify they fix your issues? 


Comment 5 Gavin Atkinson freebsd_committer freebsd_triage 2009-02-02 21:35:00 UTC
Responsible Changed
From-To: gavin->freebsd-firewire

Over to maintainer(s)
Comment 6 sean.bruno 2009-04-07 16:11:11 UTC
I don't see that this patch was applied to HEAD at all.

I'll have to run this check on my laptop and see what happens.  I'll
report back tomorrow.

Sean
Comment 7 Eitan Adler freebsd_committer freebsd_triage 2011-10-23 23:52:29 UTC
State Changed
From-To: patched->feedback

per gavin
Comment 8 Sean Bruno freebsd_committer freebsd_triage 2012-07-02 18:08:04 UTC
Responsible Changed
From-To: freebsd-firewire->sbruno-firewire

Taking PR for closure and documentation.
Comment 9 Sean Bruno freebsd_committer freebsd_triage 2012-07-02 18:30:51 UTC
Responsible Changed
From-To: sbruno-firewire->sbruno

I'm sbruno not sbruno-firewire
Comment 10 Sean Bruno freebsd_committer freebsd_triage 2013-04-04 16:25:04 UTC
State Changed
From-To: feedback->closed

Closing ticket as patch has been applied