aboutsummaryrefslogtreecommitdiffstats
path: root/net/switchdev/switchdev.c
diff options
context:
space:
mode:
authorArnd Bergmann <[email protected]>2016-01-28 16:54:33 +0000
committerDavid S. Miller <[email protected]>2016-01-30 03:40:02 +0000
commit59a557be385b66c1da20e9cfc6ff6c2e676c6804 (patch)
treed77ef312f7969b3f4318ee52103326df72bd63f4 /net/switchdev/switchdev.c
parentipv4: ipconfig: avoid unused ic_proto_used symbol (diff)
downloadkernel-59a557be385b66c1da20e9cfc6ff6c2e676c6804.tar.gz
kernel-59a557be385b66c1da20e9cfc6ff6c2e676c6804.zip
net: moxart: use correct accessors for DMA memory
The moxart ethernet driver confuses coherent DMA buffers with MMIO registers. moxart_ether.c: In function 'moxart_mac_setup_desc_ring': moxart_ether.c:146:428: error: passing argument 1 of '__fswab32' makes integer from pointer without a cast [-Werror=int-conversion] moxart_ether.c:74:39: warning: incorrect type in argument 3 (different address spaces) moxart_ether.c:74:39: expected void *cpu_addr moxart_ether.c:74:39: got void [noderef] <asn:2>*tx_desc_base This leaves the basic logic alone and uses normal pointers for the virtual address of the descriptor. As we cannot use readl/writel to access them, we also introduce our own moxart_desc_read moxart_desc_write helpers that perform the same endianess swap as the original code, but without the address space conversion. The barriers are made explicit here where needed: Even in the worst-case scenario, we just have to use a rmb() after checking ownership so we don't read any input data before we are sure it is value, and we use wmb() before transferring ownership back to the device. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions