Comment 125 for bug 160413

Revision history for this message
In , rscheidegger (rscheidegger-linux-kernel-bugs) wrote :

(In reply to comment #72)
> Success! I managed to get it working for both S5 and S3 some hours ago. :)
>
> My "fix" was to comment out the following four lines in rtl8169_suspend():
>
> spin_lock_irq(&tp->lock);
>
> rtl8169_asic_down(ioaddr);
>
> rtl8169_rx_missed(dev, ioaddr);
>
> spin_unlock_irq(&tp->lock);
>
> Also, I commented out setting a shutdown handler.
FWIW, I was seeing the exact same issues as you did (that is, WOL working with S5 but not S3/S4). This was on a M2A-VM, the realtek chip is (lspci -n) 02:00.0 0200: 10ec:8168 (rev 01), tinkering with /proc/acpi/wakeup or that /sys/bus/pci/devices/ entry did not help. Though for S5 I also needed to make sure NetworkManager isn't used for this connection as that would always result in the connection being terminated prior to shutdown, no matter the halt or reboot parameters...
I modified this patch and simply replaced the rtl8169_asic_down function call with a call to rtl8169_irq_mask_and_ack in rtl8169_suspend - looks to me like the 0x0 ChipCmd is the culprit (I was using the ubuntu 8.10 kernel sources for this, which is some 2.6.27 version).