summaryrefslogtreecommitdiffstats
path: root/crypto/ecc.c
diff options
context:
space:
mode:
authorDean Nelson <dnelson@redhat.com>2018-02-08 20:21:05 +0100
committerDavid S. Miller <davem@davemloft.net>2018-02-08 21:34:23 +0100
commit88c991a91729b402bbfbf247fdba16ac21c369ab (patch)
treedc9d25a3d8290f40c5cf5669b69a7584a53c066d /crypto/ecc.c
parentMerge tag 'wireless-drivers-next-for-davem-2018-02-08' of git://git.kernel.or... (diff)
downloadlinux-88c991a91729b402bbfbf247fdba16ac21c369ab.tar.xz
linux-88c991a91729b402bbfbf247fdba16ac21c369ab.zip
net: thunder: change q_len's type to handle max ring size
The Cavium thunder nicvf driver supports rx/tx rings of up to 65536 entries per. The number of entires are stored in the q_len member of struct q_desc_mem. The problem is that q_len being a u16, results in 65536 becoming 0. In getting pointers to descriptors in the rings, the driver uses q_len minus 1 as a mask after incrementing the pointer, in order to go back to the beginning and not go past the end of the ring. With the q_len set to 0 the mask is no longer correct and the driver does go beyond the end of the ring, causing various ills. Usually the first thing that shows up is a "NETDEV WATCHDOG: enP2p1s0f1 (nicvf): transmit queue 7 timed out" warning. This patch remedies the problem by changing q_len to a u32. Signed-off-by: Dean Nelson <dnelson@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'crypto/ecc.c')
0 files changed, 0 insertions, 0 deletions