lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190113160149.GG20268@torres.zugschlus.de>
Date:   Sun, 13 Jan 2019 17:01:49 +0100
From:   Marc Haber <mh+netdev@...schlus.de>
To:     Heiner Kallweit <hkallweit1@...il.com>
Cc:     Alex Xu <alex_y_xu@...oo.ca>,
        Anthony Wong <anthony.wong@...ntu.com>,
        Azat Khuzhin <a3at.mail@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Hans de Goede <hdegoede@...hat.com>,
        Jian-Hong Pan <jian-hong@...lessm.com>,
        Kai-Heng Feng <kai.heng.feng@...onical.com>,
        "Maciej S. Szmigiero" <mail@...iej.szmigiero.name>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: WoL broken in r8169.c since kernel 4.19

On Sat, Jan 12, 2019 at 09:28:48PM +0100, Heiner Kallweit wrote:
> On 12.01.2019 21:08, Marc Haber wrote:
> > I am writing to all people who have commits in r8169.c between the v4.18
> > and v4.19 tags in the Linux kernel. Please ignore as appropriate. If
> > you'd prefer that to be on a mailing list, please indicate on which list
> > you want to have that, and I'll resend.
> > 
> It should be cc'ed to the netdev mailing list, as listed in MAINTAINERS.

I have bounced the original message there. Sorry for missing that, I was
not aware that the MAINTAINERS file goes down on a single driver level.

> > My desktop copmuter has the following network interface:
> > 
> > 06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
> >         Subsystem: ASUSTeK Computer Inc. P8P67 and other motherboards
> >         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
> >         Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
> >         Latency: 0, Cache Line Size: 64 bytes
> >         Interrupt: pin A routed to IRQ 17
> >         NUMA node: 0
> >         Region 0: I/O ports at e800 [size=256]
> >         Region 2: Memory at fdfff000 (64-bit, prefetchable) [size=4K]
> >         Region 4: Memory at fdff8000 (64-bit, prefetchable) [size=16K]
> >         Capabilities: <access denied>
> >         Kernel driver in use: r8169
> >         Kernel modules: r8169
> > 
> Unfortunately there's different chip versions with the same description.
> Please provide the result of "dmesg | grep XID".

[1/5004]mh@fan:~ $ dmesg | grep XID
[    2.671004] r8169 0000:06:00.0 eth0: RTL8168evl/8111evl, 54:04:a6:82:21:00, XID 2c900800, IRQ 29

> > I regularly buĂ­ld a VPN tunnel to my local network from 'on the road'
> > and use WoL to wake up the desktop box when I need it.
> > 
> > Since kernel 4.19, that does not work any more, the desktop remains
> > suspended when I send it a magic packet. This still applies to 4.20.1,
> > and it still works with any 4.18 kernel.
> > 
> WoL works perfectly fine here with r8169 from runtime-suspend and
> from S3. How do you enable WoL? And which WoL method do you use
> (magic packet or ..) ?

I do enable WOL via systemd-networkd:
[7/5009]mh@fan:~ $ cat /etc/systemd/network/10-lanc0.link
[Match]
MACAddress=54:04:a6:82:21:00

[Link]
Name=lanc0
WakeOnLan=magic

and I wake up the box by calling

sudo etherwake -i int182 54:04:a6:82:21:00

on the router. int182 is the interface name of the correct interface,
this is proven correct by the fact that the box wakes up just fine with
older version of the driver.

> Please provide a register dump (ethtool -d <if>).

The register dump is here (obtained with 4.20.1 with the r8169.c from
4.18):
[5/5008]mh@fan:~ $ sudo ethtool -d lanc0
RealTek RTL8168evl/8111evl registers:
--------------------------------------------------------
0x00: MAC Address                      54:04:a6:82:21:00
0x08: Multicast Address Filter     0xffffffff 0xffffffff
0x10: Dump Tally Counter Command   0x20f36000 0x00000004
0x20: Tx Normal Priority Ring Addr 0x14994000 0x00000004
0x28: Tx High Priority Ring Addr   0x00000000 0x00000000
0x30: Flash memory read/write                 0x00000000
0x34: Early Rx Byte Count                              0
0x36: Early Rx Status                               0x00
0x37: Command                                       0x0c
      Rx on, Tx on
0x3C: Interrupt Mask                              0x803f
      SERR LinkChg RxNoBuf TxErr TxOK RxErr RxOK 
0x3E: Interrupt Status                            0x0000
      
0x40: Tx Configuration                        0x2f900f80
0x44: Rx Configuration                        0x0002c70f
0x48: Timer count                             0x00000000
0x4C: Missed packet counter                     0x000000
0x50: EEPROM Command                                0x10
0x51: Config 0                                      0x00
0x52: Config 1                                      0xcf
0x53: Config 2                                      0xbd
0x54: Config 3                                      0x60
0x55: Config 4                                      0x51
0x56: Config 5                                      0x02
0x58: Timer interrupt                         0x00000000
0x5C: Multiple Interrupt Select                   0x0000
0x60: PHY access                              0x8005c1e1
0x64: TBI control and status                  0x84321043
0x68: TBI Autonegotiation advertisement (ANAR)    0xf02c
0x6A: TBI Link partner ability (LPAR)             0x0000
0x6C: PHY status                                    0x93
0x84: PM wakeup frame 0            0x00000000 0x00000000
0x8C: PM wakeup frame 1            0x00000000 0x02fcb1e5
0x94: PM wakeup frame 2 (low)      0x6603216b 0xaab879be
0x9C: PM wakeup frame 2 (high)     0x41bee65e 0x800a2260
0xA4: PM wakeup frame 3 (low)      0x05280748 0x187ea050
0xAC: PM wakeup frame 3 (high)     0x8463e510 0x84630000
0xB4: PM wakeup frame 4 (low)      0xffffffff 0xffffffff
0xBC: PM wakeup frame 4 (high)     0x00000000 0x00000000
0xC4: Wakeup frame 0 CRC                          0x0000
0xC6: Wakeup frame 1 CRC                          0x0000
0xC8: Wakeup frame 2 CRC                          0x0000
0xCA: Wakeup frame 3 CRC                          0x0000
0xCC: Wakeup frame 4 CRC                          0x0000
0xDA: RX packet maximum size                      0x4000
0xE0: C+ Command                                  0x20e1
      VLAN de-tagging
      RX checksumming
0xE2: Interrupt Mitigation                        0x5151
      TxTimer:       5
      TxPackets:     1
      RxTimer:       5
      RxPackets:     1
0xE4: Rx Ring Addr                 0x14995000 0x00000004
0xEC: Early Tx threshold                            0x27
0xF0: Func Event                              0x00400030
0xF4: Func Event Mask                         0x00000000
0xF8: Func Preset State                       0x000303ff
0xFC: Func Force Event                        0x00000000

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ