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-next>] [day] [month] [year] [list]
Message-ID: <e43bacfc-0143-4291-97a6-34c02b92d059@lunn.ch>
Date: Mon, 3 Jun 2024 17:31:21 +0200
From: Andrew Lunn <andrew@...n.ch>
To: yangfeng59949 <yangfeng59949@....com>
Cc: netdev <netdev@...r.kernel.org>
Subject: Re: Re: [PATCH] net: phy: rtl8211f add ethtool set wol function

On Sun, Jun 02, 2024 at 04:43:19PM +0800, yangfeng59949 wrote:
> The RTL8211F series can monitor the network for a link change event, a Wake-Up
> Frame, or a Magic  Packet, and notify the system via the INTB/PMEB (Power
> Management Event; ‘B’ means low active) pin  when such a packet or event
> occurs. The system can then be restored to a normal state to process incoming 
> jobs. The INTB/PMEB pin needs to be connected with a 4.7k ohm resistor and
> pulled up to 3.3V. When  the Wake-Up Frame or a Magic Packet is sent to the
> PHY, the INTB/PMEB pin will be set low to notify  the system to wake up. 
> 
> 
>  1.Set MAC Address Page 0x0d8c, Reg16~Reg18 
> 
>  2.Set Max packet length Page 0xd8a, Reg17 = 0x9fff
> 
>  3.WOL event select and enable Page 0x0d8a Reg16 =  0x1000 //enable Magic
> Packet Event

Some of this needs to be in the commit message.

[Goes and reads the datasheet]

So you are using it in its PMEB mode. This only indicates WoL. It
would be good to document this somewhere, since i would not be too
surprised if somebody added interrupt support for link changes etc,
rather than having phylib parse once per second. Such code will want
the pin in INTB mode. There is a danger that will break your code.

Do you actually need it in PMEB mode? Bit 7 of the interrupt enable
register allows WoL to be indicated with INTB mode. Using that will
make it easier to add full interrupt support, and is simpler, not
having to switch between INTB and PMEB during suspend and resume.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ