Comment 78 for bug 160413

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

I'm seeing same issue on LE-365 board (VIA CX700M chipset) and:
02:08.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet [10ec:8169] (rev 10)

I'm trying to trigger WoL when the board is powered-off or in S3 state but no success. (trying ether-wake with and without '-b' option)

While testing/debugging S3 I noticed that r8169 does not seem to tell PCI that it can wakeup the system.
...
[ 375.126182] pci 0000:80:01.0: suspend
[ 375.126236] r8169 0000:02:08.0: suspend
[ 375.126300] ACPI handle has no context!
[ 375.126330] ACPI handle has no context!
[ 375.143695] pci 0000:02:04.0: suspend
[ 375.143753] pci 0000:01:00.0: suspend
[ 375.143813] pci 0000:00:13.1: suspend
[ 375.143856] pci 0000:00:13.0: suspend
[ 375.143899] pci 0000:00:11.7: suspend
[ 375.143952] pci 0000:00:11.0: suspend
...
[ 375.434269] pci 0000:80:01.0: LATE suspend
[ 375.434286] r8169 0000:02:08.0: LATE suspend
[ 375.434302] pci 0000:02:04.0: LATE suspend
...
[ 3.425473] pci 0000:02:04.0: EARLY resume
[ 3.425489] r8169 0000:02:08.0: EARLY resume
[ 3.425505] pci 0000:80:01.0: EARLY resume
...
[ 3.524319] pci 0000:02:04.0: resuming
[ 3.524376] r8169 0000:02:08.0: resuming
[ 3.543953] pci 0000:80:01.0: resuming

I would have expected to see suspend lines like
[ 375.126236] r8169 0000:02:08.0: suspend, may wakeup
and
[ 375.434286] r8169 0000:02:08.0: LATE suspend, may wakeup

Looking at the driver code the wakeup ability is only setup in suspend() hook and removed in resume() hook.
Wouldn't it make sense to move this to NIC initialization and when changing WoL settings? (this way wakeup ability should show up in sysfs under power/wakup)

Note that the switch my board is connected to sees the link as up (with a glitch to down when the board switches to S3).