mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-07-05 05:15:23 +02:00
staging: octeon: Add a workaround for the issue of GCC8
In function cvm_oct_xmit(), the packet length is set with code like this: pko_command.s.total_bytes = skb->len; But when building with gcc8, the pko_command.s.total_bytes doesn't emit the right value when it is used in the following codes: /* Send the packet to the output queue */ if (unlikely(cvmx_pko_send_packet_finish(priv->port, priv->queue + qos, pko_command, hw_buffer, CVMX_PKO_LOCK_NONE))) { Adding a barrier after the assignment would generate the right codes. Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
This commit is contained in:
parent
e25dbfe953
commit
3373c0cf71
|
@ -264,6 +264,9 @@ int cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
pko_command.s.n2 = 1; /* Don't pollute L2 with the outgoing packet */
|
||||
pko_command.s.segs = 1;
|
||||
pko_command.s.total_bytes = skb->len;
|
||||
#if GCC_VERSION >= 80000
|
||||
barrier();
|
||||
#endif
|
||||
pko_command.s.size0 = CVMX_FAU_OP_SIZE_32;
|
||||
pko_command.s.subone0 = 1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user