]> 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)
commit7052e2c7377fbd76c501304407de3844bf630d3b
tree865653dad474f594e36421bffdd3757cb5bfde40
parentbbfa9e9a5c98baac656d4c5282a06c939185a053
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: 76034c31e05d ("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