]> git.baikalelectronics.ru Git - kernel.git/commit
net: macb: WoL support for GEM type of Ethernet controller
authorNicolas Ferre <nicolas.ferre@microchip.com>
Mon, 20 Jul 2020 08:56:52 +0000 (10:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jul 2020 00:01:45 +0000 (17:01 -0700)
commit424d7956241f2124c51fcd57dfc5fe82f389b514
treead57b6e3cd041f0ac2345f04f5c6fa3538844ecb
parent4f8e2f29e5416d50af13963636ff4cb3405b37f0
net: macb: WoL support for GEM type of Ethernet controller

Adapt the Wake-on-Lan feature to the Cadence GEM Ethernet controller.
This controller has different register layout and cannot be handled by
previous code.
We disable completely interrupts on all the queues but the queue 0.
Handling of WoL interrupt is done in another interrupt handler
positioned depending on the controller version used, just between
suspend() and resume() calls.
It allows to lower pressure on the generic interrupt hot path by
removing the need to handle 2 tests for each IRQ: the first figuring out
the controller revision, the second for actually knowing if the WoL bit
is set.

Queue management in suspend()/resume() functions inspired from RFC patch
by Harini Katakam <harinik@xilinx.com>, thanks!

Cc: Claudiu Beznea <claudiu.beznea@microchip.com>
Cc: Harini Katakam <harini.katakam@xilinx.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cadence/macb.h
drivers/net/ethernet/cadence/macb_main.c