]> 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)
commit28a027d45028aab01b00485f4bddec3d705b11e5
tree865653dad474f594e36421bffdd3757cb5bfde40
parenta618376e0ec6036895f78eef3c44bafc0f0b6ddd
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: 18ed47db08f4 ("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