]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
net/sonic: Use MMIO accessors
authorFinn Thain <fthain@telegraphics.com.au>
Wed, 22 Jan 2020 22:07:26 +0000 (09:07 +1100)
committerPaolo Pisati <paolo.pisati@canonical.com>
Thu, 30 Jan 2020 15:28:30 +0000 (16:28 +0100)
commit9d621e68bb048c03026e5a021cfdb6bcc9c44fb2
tree12f0fee772fb2540ff9417ddbb0533ce91140d55
parent557951ac48267af1e74591516e56913364ce3532
net/sonic: Use MMIO accessors

BugLink: https://bugs.launchpad.net/bugs/1861385
commit e3885f576196ddfc670b3d53e745de96ffcb49ab upstream.

The driver accesses descriptor memory which is simultaneously accessed by
the chip, so the compiler must not be allowed to re-order CPU accesses.
sonic_buf_get() used 'volatile' to prevent that. sonic_buf_put() should
have done so too but was overlooked.

Fixes: efcce839360f ("[PATCH] macsonic/jazzsonic network drivers update")
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/net/ethernet/natsemi/sonic.h