net: mvneta: improve suspend/resume
authorJisheng Zhang <Jisheng.Zhang@synaptics.com>
Mon, 2 Apr 2018 03:24:59 +0000 (11:24 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Apr 2018 15:14:03 +0000 (11:14 -0400)
commit1799cdd287ff09c6d34347409b0d4f464e197aea
tree444f30d07de54c17548d100a745e969aae8e1953
parent4a188a63afdffb5f62cccc508589c19e5297ed05
net: mvneta: improve suspend/resume

Current suspend/resume implementation reuses the mvneta_open() and
mvneta_close(), but it could be optimized to take only necessary
actions during suspend/resume.

One obvious problem of current implementation is: after hundreds of
system suspend/resume cycles, the resume of mvneta could fail due to
fragmented dma coherent memory. After this patch, the non-necessary
memory alloc/free is optimized out.

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvneta.c