]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net/ps3_gelic_net: Fix RX sk_buff length
authorGeoff Levand <geoff@infradead.org>
Sat, 18 Mar 2023 17:39:16 +0000 (17:39 +0000)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Wed, 17 May 2023 11:33:29 +0000 (13:33 +0200)
commitce4a3c5d62fbec3c62b157307afcd6d3061796cc
tree35024d0012a7c0bea489801e5d8b738b9831ce32
parentc8b2ea3c2dc8f323146357c7324bc6c8c07e4fdf
net/ps3_gelic_net: Fix RX sk_buff length

BugLink: https://bugs.launchpad.net/bugs/2016877
[ Upstream commit 19b3bb51c3bc288b3f2c6f8c4450b0f548320625 ]

The Gelic Ethernet device needs to have the RX sk_buffs aligned to
GELIC_NET_RXBUF_ALIGN, and also the length of the RX sk_buffs must
be a multiple of GELIC_NET_RXBUF_ALIGN.

The current Gelic Ethernet driver was not allocating sk_buffs large
enough to allow for this alignment.

Also, correct the maximum and minimum MTU sizes, and add a new
preprocessor macro for the maximum frame size, GELIC_NET_MAX_FRAME.

Fixes various randomly occurring runtime network errors.

Fixes: 02c1889166b4 ("ps3: gigabit ethernet driver for PS3, take3")
Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/net/ethernet/toshiba/ps3_gelic_net.c
drivers/net/ethernet/toshiba/ps3_gelic_net.h