OSDN Git Service

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)
commit23e6b2dc93630b60a6c33bd2a1289686bc33e272
tree8ee634c23ea11707d21ca07ce8635c74934da24f
parent40ae25505fe834648ce4aa70b073ee934942bfdb
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