]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/sonic: Use MMIO accessors
authorFinn Thain <fthain@telegraphics.com.au>
Wed, 22 Jan 2020 22:07:26 +0000 (09:07 +1100)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 28 Apr 2020 18:03:34 +0000 (19:03 +0100)
commit89b53997625383a73d0bc64f49c574e2577801fc
tree82f18697fde4bcef8de48d3260355f9b3ea29cc3
parent6b04c8723625fe96240f451b425bb1e84172debe
net/sonic: Use MMIO accessors

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: Ben Hutchings <ben@decadent.org.uk>
drivers/net/ethernet/natsemi/sonic.h