• Nicolas Ferre's avatar
    net: macb: WoL support for GEM type of Ethernet controller · 558e35cc
    Nicolas Ferre authored
    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: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    558e35cc
macb_main.c 122 KB