]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
ibmvnic: add memory barrier to protect long term buffer
authorLijun Pan <ljp@linux.ibm.com>
Sat, 13 Feb 2021 02:48:40 +0000 (20:48 -0600)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Feb 2021 23:12:01 +0000 (15:12 -0800)
commit42557dab78edc8235aba5b441f2eb35f725a0ede
tree541a4ac1dd6d1511cbedec2097441f70607c4cf8
parent7ce189faa7d990f89d36603627ab89588e4218a5
ibmvnic: add memory barrier to protect long term buffer

dma_rmb() barrier is added to load the long term buffer before copying
it to socket buffer; and dma_wmb() barrier is added to update the
long term buffer before it being accessed by VIOS (virtual i/o server).

Fixes: 032c5e82847a ("Driver for IBM System i/p VNIC protocol")
Signed-off-by: Lijun Pan <ljp@linux.ibm.com>
Acked-by: Thomas Falcon <tlfalcon@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/ibmvnic.c