diff options
author | Robert Hancock <hancock@sedsystems.ca> | 2019-06-06 16:28:05 -0600 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-06 16:24:29 -0700 |
commit | 23e6b2dc93630b60a6c33bd2a1289686bc33e272 (patch) | |
tree | 8ee634c23ea11707d21ca07ce8635c74934da24f /drivers/net/ethernet/xilinx/xilinx_axienet.h | |
parent | net: stmmac: socfpga: fix phy and ptp_ref setup for Arria10/Stratix10 (diff) | |
download | wireguard-linux-23e6b2dc93630b60a6c33bd2a1289686bc33e272.tar.xz wireguard-linux-23e6b2dc93630b60a6c33bd2a1289686bc33e272.zip |
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>
Diffstat (limited to 'drivers/net/ethernet/xilinx/xilinx_axienet.h')
-rw-r--r-- | drivers/net/ethernet/xilinx/xilinx_axienet.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet.h b/drivers/net/ethernet/xilinx/xilinx_axienet.h index 011adae32b89..e09dc1433187 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet.h +++ b/drivers/net/ethernet/xilinx/xilinx_axienet.h @@ -356,9 +356,6 @@ * @app2: MM2S/S2MM User Application Field 2. * @app3: MM2S/S2MM User Application Field 3. * @app4: MM2S/S2MM User Application Field 4. - * @sw_id_offset: MM2S/S2MM Sw ID - * @reserved5: Reserved and not used - * @reserved6: Reserved and not used */ struct axidma_bd { u32 next; /* Physical address of next buffer descriptor */ @@ -373,11 +370,9 @@ struct axidma_bd { u32 app1; /* TX start << 16 | insert */ u32 app2; /* TX csum seed */ u32 app3; - u32 app4; - u32 sw_id_offset; - u32 reserved5; - u32 reserved6; -}; + u32 app4; /* Last field used by HW */ + struct sk_buff *skb; +} __aligned(XAXIDMA_BD_MINIMUM_ALIGNMENT); /** * struct axienet_local - axienet private per device data |