]> git.baikalelectronics.ru Git - kernel.git/commit
net: bcmgenet: call bcmgenet_dma_teardown in bcmgenet_fini_dma
authorFlorian Fainelli <f.fainelli@gmail.com>
Mon, 22 Sep 2014 18:54:43 +0000 (11:54 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Sep 2014 22:38:40 +0000 (18:38 -0400)
commitaac56f64cc2fe1d7796d3d4c47c8e16d04c12c37
tree055ff5d64bf6a601eb5165c0820fcb18db998121
parent321ed423068c1171e4c15d52c16788b7a4dc354e
net: bcmgenet: call bcmgenet_dma_teardown in bcmgenet_fini_dma

We should not be manipulaging the DMA_CTRL registers directly by writing
0 to them to disable DMA. This is an operation that needs to be timed to
make sure the DMA engines have been properly stopped since their state
machine stops on a packet boundary, not immediately.

Make sure that tha bcmgenet_fini_dma() calls bcmgenet_dma_teardown() to
ensure a proper DMA engine state. As a result, we need to reorder the
function bodies to resolve the use dependency.

Fixes: 390dff99da87 ("net: bcmgenet: add main driver file")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/genet/bcmgenet.c