]> git.baikalelectronics.ru Git - kernel.git/commit
net: systemport: reset UniMAC coming out of a suspend cycle
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 28 Oct 2014 18:12:01 +0000 (11:12 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Oct 2014 21:08:47 +0000 (17:08 -0400)
commit60e32b174f5dac5eb24fb82789539e0f66707fb5
treeaca2c9c6337b62a19dd145759c9aaab1568a26ee
parent732dee5f55aa118bb62d34006c44cd3a8b0e3649
net: systemport: reset UniMAC coming out of a suspend cycle

bcm_sysport_resume() was missing an UniMAC reset which can lead to
various receive FIFO corruptions coming out of a suspend cycle. If the
RX FIFO is stuck, it will deliver corrupted/duplicate packets towards
the host CPU interface.

This could be reproduced on crowded network and when Wake-on-LAN is
enabled for this particular interface because the switch still forwards
packets towards the host CPU interface (SYSTEMPORT), and we had to leave
the UniMAC RX enable bit on to allow matching MagicPackets.

Once we re-enter the resume function, there is a small window during
which the UniMAC receive is still enabled, and we start queueing
packets, but the RDMA and RBUF engines are not ready, which leads to
having packets stuck in the UniMAC RX FIFO, ultimately delivered towards
the host CPU as corrupted.

Fixes: 34b2a91942b1 ("net: systemport: add suspend and resume support")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bcmsysport.c