Bug 405058

Summary: forcedeth fails to work after suspend/resume, module reload helps
Product: [openSUSE] openSUSE 11.0 Reporter: Peter McPherson <mcphrsp>
Component: NetworkAssignee: Rafael Wysocki <rjw>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Minor    
Priority: P3 - Medium CC: chrubis, francesco.cosoleto, jabailo
Version: Final   
Target Milestone: openSUSE 11.1   
Hardware: x86-64   
OS: openSUSE 11.0   
Whiteboard:
Found By: Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Peter McPherson 2008-06-30 14:07:18 UTC
Resuming from suspend to disk looks fine but I am unable to reconnect to my router. I have tried "rcnetwork start" and "ifup eth0" but they do not work. The only solution is to reboot.
Comment 1 Cyril Hrubis 2008-07-10 10:52:07 UTC
Removing and inserting network card module should work too (modprobe -r module_name; modprobe module_name) and it can be added as workaround into suspend, resume scripts. This is probably bug in network driver.

Please attach output from "hwinfo --network" to see which network card you have.
Comment 2 Peter McPherson 2008-07-10 11:45:18 UTC
Cyril, output attached. My LAN is integrated on the Gigabyte GA-M57SLI-S4  motherboard, Marvell 88E1116 chipset. 
Best wishes.


28: None 00.0: 10701 Ethernet
  [Created at net.124]
  Unique ID: usDW.ndpeucax6V1
  Parent ID: rBUF.nENVDTNIEjC
  SysFS ID: /class/net/eth0
  SysFS Device Link: /devices/pci0000:00/0000:00:08.0
  Hardware Class: network interface
  Model: "Ethernet network interface"
  Driver: "forcedeth"
  Driver Modules: "forcedeth"
  Device File: eth0
  HW Address: 00:1d:7d:a6:aa:57
  Link detected: yes
  Config Status: cfg=no, avail=yes, need=no, active=unknown
  Attached to: #11 (Ethernet controller)

29: None 00.0: 10700 Loopback
  [Created at net.124]
  Unique ID: ZsBS.GQNx7L4uPNA
  SysFS ID: /class/net/lo
  Hardware Class: network interface
  Model: "Loopback network interface"
  Device File: lo
  Link detected: yes
  Config Status: cfg=no, avail=yes, need=no, active=unknown
Comment 3 Cyril Hrubis 2008-07-10 11:51:34 UTC
Please next time remove NEEDINFO status by selecting "This comment/attachment 
provides ..." checkbox after supplying needed information. Reassigning to kernel maintainers.
Comment 4 Pavel Machek 2008-07-13 11:36:19 UTC
Does rmmoding/insmoding the forcedeth module help?
Comment 5 Peter McPherson 2008-07-13 12:32:22 UTC
Pavel - thanks for the clue. I did not know the name of the module before. My knowledge of text commands is not good, but I tried "modprobe -r forcedeth", followed by "modprobe forcedeth", and am happy to report that I was reconnected to my router. All is now well, but how can I make this automatic?
Comment 6 Pavel Machek 2008-07-14 06:00:04 UTC
Ok, so problem is in the forcedeth module, good.

You should be able to add it to the blacklist in powersave, but preffered solution is to fix forcedeth module not to do that. .... I took a look and forcedeth module seems to have some suspend/resume support.

Stefan, do we have machine needing forcedeth in our test pool? Does suspend/resume work there?
Comment 7 Pavel Machek 2008-07-14 06:01:37 UTC
#5: what was exact sentence of events? suspend, modprobe -r, modprobe?
Comment 8 Peter McPherson 2008-07-14 07:59:11 UTC
It was suspend, resume (followed by a check to make sure router was not available), then modprobe -r, modprobe. Router was then immediately available.
Comment 9 Pavel Machek 2008-08-04 11:05:23 UTC
Peter: Can you verify this is still a problem on recent vanilla kernel?

Stefan: can we add forcedeth to list of modules for unloading / can I get machine with forcedeth network card?
Comment 10 Peter McPherson 2008-08-04 12:42:13 UTC
Pavel - yes the problem is still there.
Comment 11 Francesco Cosoleto 2008-08-05 10:32:57 UTC
I suspect 2.6.22.12 kernel doesn't affect by this bug, due to bug #342049, comment #14.

This bug is reported in Kernel Bug Tracker too:
http://bugzilla.kernel.org/show_bug.cgi?id=10487
Comment 12 Pavel Machek 2008-08-19 09:37:06 UTC
I don't have forcedeth nearby and Rafael is already solving similar problem in upstream => reassign...
Comment 13 Pavel Machek 2008-08-19 10:54:25 UTC
I commited patches for SLES10SP1/2, but I have no way to test them. It seems like redhat has a testcase...

Anyway, patch is pretty straightforward, so...
Comment 14 Pavel Machek 2008-08-19 10:55:39 UTC
Oops, sorry, wrong bug. Ignore comment #13.
Comment 16 Rafael Wysocki 2008-08-21 20:36:45 UTC
I can confirm that forcedeth is fine vs suspend/hibernation on my test box with 2.6.27-rc4 .

Cyril, would it be possible to test 2.6.27-rc4 from kernel.org?
Comment 17 Francesco Cosoleto 2008-08-21 23:33:51 UTC
2.6.27-rc4 works for me too.
Comment 18 Forgotten User ZhJd0F0L3x 2008-08-25 13:43:41 UTC
So for the next product, with a new kernel, this is fixed.

For 11.0, just create a pm-utils hook /etc/pm/sleep.d/05forcedeth_reload containing:
-----8<-----
#!/bin/bash

case $1 in
    thaw|resume)
        echo "*** reloading forcedeth ***"
        modprobe -r forcedeth
        modprobe forcedeth
        ;;
    *)  ;;
esac
-----8<-----
and do a "chmod +x /etc/pm/sleep.d/05forcedeth_reload"

This will unload and reload forcedeth after resume.
Comment 19 Lars Müller 2008-09-15 16:32:37 UTC
I run into the same issue with a MSI MS-7226 main board.  This as has two MCP55 Ethernet (rev a2) on board.

Using a newer kernel like kernel-default-2.6.27-rc6.17.1 as available from Kernel:/HEAD/openSUSE_Factory of the Build Service solved this issue in my case.

Unfortunately I have to use the workaround as provided with comment #18 as in the case of the kernel update I can't longer use X.org.

http://linux.derkeiler.com/Mailing-Lists/Kernel/2008-05/msg08220.html might be the same issue.
Comment 20 John Bailo 2008-10-11 19:25:41 UTC
(In reply to comment #18 from Stefan Seyfried)
> So for the next product, with a new kernel, this is fixed.
> 
> For 11.0, just create a pm-utils hook /etc/pm/sleep.d/05forcedeth_reload
> containing:
> -----8<-----
> #!/bin/bash
> 
> case $1 in
>     thaw|resume)
>         echo "*** reloading forcedeth ***"
>         modprobe -r forcedeth
>         modprobe forcedeth
>         ;;
>     *)  ;;
> esac
> -----8<-----
> and do a "chmod +x /etc/pm/sleep.d/05forcedeth_reload"
> 
> This will unload and reload forcedeth after resume.
> 

I tried this fix, but my PC locked up completely after returning from suspend.

Had to reboot.

Linux 75-92-212-161.sea.clearwire-dns.net 2.6.25.16-0.1-default #1 SMP 2008-08-21 00:34:25 +0200 x86_64 x86_64 x86_64 GNU/Linux

Comment 21 Forgotten User ZhJd0F0L3x 2008-10-13 07:27:30 UTC
(In reply to comment #20 from John Bailo)
> (In reply to comment #18 from Stefan Seyfried)

> > This will unload and reload forcedeth after resume.
> > 
> 
> I tried this fix, but my PC locked up completely after returning from suspend.

But it works if you unload and reload the module manually after resume?