Ubuntu – Suspending the laptop breaks ethernet over firewire, are there commands which can fix it

firewirenetworkingsuspendUbuntu

As mentioned in this question I am using a firewire cable to provide a private network between my laptop and my desktop, because it makes using the screen sharing program synergy much nicer than using WIFI.

However when I leave my office for the day and I suspend my laptop, when I return the next day, the desktop and the laptop cannot communicate over firewire anymore. The firewire0 device still has an IP address. but when I try and ping the desktop I get no route to host

I'm using kernel 2.6.35-24-generic #42-Ubuntu SMP x86_64 on Ubuntu 10.10.

Is there some way I can remedy this without a reboot? Like, removing some kernel modules and re-inserting them?

EDIT: Here's what I have tried so far and the results:

root@token:~# dmesg|tail -n 1
[592525.204024] firewire_core: phy config: card 0, new root=ffc1, gap_count=5

root@token:~# modprobe -r firewire_net firewire_ohci firewire_core
root@token:~# modprobe -v firewire_ohci
insmod /lib/modules/2.6.35-24-generic/kernel/lib/crc-itu-t.ko 
insmod /lib/modules/2.6.35-24-generic/kernel/drivers/firewire/firewire-core.ko 
insmod /lib/modules/2.6.35-24-generic/kernel/drivers/firewire/firewire-ohci.ko 

root@token:~# dmesg|tail
[592525.204024] firewire_core: phy config: card 0, new root=ffc1, gap_count=5
[592563.410868] firewire_ohci: Removed fw-ohci device.
[592579.160086] firewire_ohci: Added fw-ohci device 0000:02:00.0, OHCI v1.10, 4 IR + 8 IT contexts, quirks 0x2
[592579.160137] firewire_ohci: isochronous cycle inconsistent
[592579.660294] firewire_core: created device fw0: GUID 0000000000000000, S400
[592579.663805] firewire_core: created device fw1: GUID 0017f2fffe89bce6, S400
[592579.663813] firewire_core: phy config: card 0, new root=ffc1, gap_count=5
[592579.700720] firewire_core: phy config: card 0, new root=ffc1, gap_count=5
[592579.700842] firewire_core: refreshed device fw0
[592579.702603] firewire_net: firewire0: IPv4 over FireWire on device 0000000000000000

root@token:~# ping stan.firewire
PING stan.firewire (192.168.100.1) 56(84) bytes of data.
From token.local (192.168.100.3) icmp_seq=1 Destination Host Unreachable
From token.local (192.168.100.3) icmp_seq=2 Destination Host Unreachable
From token.local (192.168.100.3) icmp_seq=3 Destination Host Unreachable

EDIT 2: I also tried removing the modules prior to suspending, and re-inserting after resuming. This did not work either 🙁

EDIT 3: If I unplug and replug the firewire cable after resuming from suspend, I see the message:

firewire_core: BM lock failed, making local node (ffc0) root

I don't see this message when I unplug/replug before suspend…

Best Answer

Have you tried using modprobe?

Running dmesg | grep firewire, I get:

[    1.192574] firewire_ohci 0000:0a:04.0: PCI INT A -> GSI 20 (level, low) -> IRQ 20
[    1.192585] firewire_ohci 0000:0a:04.0: setting latency timer to 64
...

This says that the name of the module is firewire_ohci.

So I run (as root) modprobe -vr firewire_ohci && modprobe -v firewire_ohci. There removes and inserts the modules, respectively.

Related Question