]> git.baikalelectronics.ru Git - kernel.git/commit
net: bcmgenet: restore HFB filters on resume
authorDoug Berger <opendmb@gmail.com>
Thu, 16 Jul 2020 23:38:17 +0000 (16:38 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Jul 2020 20:00:27 +0000 (13:00 -0700)
commita8c64542b478e61fa17661803b590ed276205914
tree865653dad474f594e36421bffdd3757cb5bfde40
parent3d653adb4b4955addad8c3accd33e22cb99a445b
net: bcmgenet: restore HFB filters on resume

The Hardware Filter Block RAM may not be preserved when the GENET
block is reset during a deep sleep, so it is not sufficient to
only backup and restore the enables.

This commit clears out the HFB block and reprograms the rxnfc
rules when the system resumes from a suspended state. To support
this the bcmgenet_hfb_create_rxnfc_filter() function is modified
to access the register space directly so that it can't fail due
to memory allocation issues.

Fixes: f50932cca632 ("net: bcmgenet: add WAKE_FILTER support")
Signed-off-by: Doug Berger <opendmb@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/genet/bcmgenet.c
drivers/net/ethernet/broadcom/genet/bcmgenet.h