]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: bcm_sf2: Restore CFP rules during system resume
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 6 Nov 2018 20:58:39 +0000 (12:58 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Nov 2018 23:05:22 +0000 (15:05 -0800)
commitdf8ea5cebc316c56e26e8c7238764fa8542495bf
tree475de58920d23b6ff3c1fbaeed4dc85aea134b4f
parent80d2d8eb20928366958f66327ee48ca753e47437
net: dsa: bcm_sf2: Restore CFP rules during system resume

The hardware can lose its context during system suspend, and depending
on the switch generation (7445 vs. 7278), while the rules are still
there, they will have their valid bit cleared (because that's the
fastest way for the HW to reset things). Just make sure we re-apply them
coming back from resume. The 7445 switch is an older version of the core
that has some quirky RAM technology requiring a delete then re-inser to
guarantee the RAM entries are properly latched.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/bcm_sf2.c
drivers/net/dsa/bcm_sf2.h
drivers/net/dsa/bcm_sf2_cfp.c