]> 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)
commit098255070150128d1b197434b56fdf88913885f8
tree8ee634c23ea11707d21ca07ce8635c74934da24f
parentf789b8c5f44a69246a1db8a04c03c18fead0a989
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