]> git.baikalelectronics.ru Git - kernel.git/commit
net: axienet: Fix casting of pointers to u32
authorRobert Hancock <hancock@sedsystems.ca>
Thu, 6 Jun 2019 22:28:05 +0000 (16:28 -0600)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Jun 2019 23:24:29 +0000 (16:24 -0700)
commitc34b7597e611b76d5aafc807b3cba5e764764fed
tree8ee634c23ea11707d21ca07ce8635c74934da24f
parentd52978c799b5d702080ce3450bd321924d7f3d79
net: axienet: Fix casting of pointers to u32

This driver was casting skb pointers to u32 and storing them as such in
the DMA buffer descriptor, which is obviously broken on 64-bit. The area
of the buffer descriptor being used is not accessed by the hardware and
has sufficient room for a 32 or 64-bit pointer, so just store the skb
pointer as such.

Signed-off-by: Robert Hancock <hancock@sedsystems.ca>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/xilinx/xilinx_axienet.h
drivers/net/ethernet/xilinx/xilinx_axienet_main.c