mirror_ubuntu-kernels/drivers/net/ethernet
Ronald Wahl 7a99afef17 net: ks8851: Fix potential TX stall after interface reopen
The amount of TX space in the hardware buffer is tracked in the tx_space
variable. The initial value is currently only set during driver probing.

After closing the interface and reopening it the tx_space variable has
the last value it had before close. If it is smaller than the size of
the first send packet after reopeing the interface the queue will be
stopped. The queue is woken up after receiving a TX interrupt but this
will never happen since we did not send anything.

This commit moves the initialization of the tx_space variable to the
ks8851_net_open function right before starting the TX queue. Also query
the value from the hardware instead of using a hard coded value.

Only the SPI chip variant is affected by this issue because only this
driver variant actually depends on the tx_space variable in the xmit
function.

Fixes: 3dc5d44545 ("net: ks8851: Fix TX stall caused by TX buffer overrun")
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Simon Horman <horms@kernel.org>
Cc: netdev@vger.kernel.org
Cc: stable@vger.kernel.org # 5.10+
Signed-off-by: Ronald Wahl <ronald.wahl@raritan.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20240709195845.9089-1-rwahl@gmx.de
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2024-07-11 11:52:29 +02:00
..
3com net: annotate data-races around dev->if_port 2024-05-08 18:51:30 -07:00
8390 net: annotate data-races around dev->if_port 2024-05-08 18:51:30 -07:00
actions
adaptec
adi net: ethernet: adi: adin1110: Replace linux/gpio.h by proper one 2024-05-10 18:51:34 -07:00
aeroflex
agere net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
alacritech
allwinner
alteon net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
altera net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
amazon net: ena: Fix redundant device NUMA node override 2024-05-29 19:01:34 -07:00
amd pci-v6.10-changes 2024-05-21 10:09:28 -07:00
apm net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
apple
aquantia pci-v6.10-changes 2024-05-21 10:09:28 -07:00
arc
asix
atheros pci-v6.10-changes 2024-05-21 10:09:28 -07:00
broadcom bnxt: fix crashes when reducing ring count with active RSS contexts 2024-07-09 11:35:49 +02:00
brocade net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
cadence net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
calxeda net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
cavium liquidio: Adjust a NULL pointer handling path in lio_vf_rep_copy_packet 2024-06-07 14:22:19 +01:00
chelsio Kbuild updates for v6.10 2024-05-18 12:39:20 -07:00
cirrus
cisco enic: Validate length of nl attributes in enic_set_vf_port 2024-05-27 11:18:01 +02:00
cortina Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-05-14 10:53:19 -07:00
davicom
dec
dlink net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
emulex netlink: introduce type-checking attribute iteration 2024-03-29 15:06:02 -07:00
engleder xsk: use generic DMA sync shortcut instead of a custom one 2024-05-08 08:51:20 +02:00
ezchip
faraday net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
freescale net:fec: Add fec_enet_deinit() 2024-05-27 16:55:32 -07:00
fujitsu net: handle HAS_IOPORT dependencies 2024-04-08 11:56:56 +01:00
fungible tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
google gve: Clear napi->skb before dev_kfree_skb_any() 2024-06-13 07:37:35 -07:00
hisilicon net: hns3: add cond_resched() to hns3 ring buffer init process 2024-06-07 12:20:28 +01:00
huawei net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
i825xx
ibm ibmvnic: Add tx check to prevent skb leak 2024-06-25 10:43:42 +02:00
intel e1000e: fix force smbus during suspend flow 2024-07-10 19:06:17 -07:00
litex
marvell octeontx2-af: Fix incorrect value output on error path in rvu_check_rsrc_availability() 2024-07-09 12:48:32 +02:00
mediatek net: ethernet: mtk-star-emac: set mac_managed_pm when probing 2024-07-11 10:13:28 +02:00
mellanox mlxsw: core_linecards: Fix double memory deallocation in case of invalid INI file 2024-07-04 07:34:42 -07:00
micrel net: ks8851: Fix potential TX stall after interface reopen 2024-07-11 11:52:29 +02:00
microchip net: lan743x: Support WOL at both the PHY and MAC appropriately 2024-06-18 12:04:23 +02:00
microsoft net: mana: Fix possible double free in error handling path 2024-06-27 12:35:58 +02:00
moxa
mscc net: mscc: ocelot: flower: validate control flags 2024-04-18 17:05:38 -07:00
myricom net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
natsemi net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
neterion net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
netronome dma-mapping updates for Linux 6.10 2024-05-20 10:23:39 -07:00
ni net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
nvidia net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
nxp
oki-semi net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
packetengines
pasemi net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
pensando ionic: use dev_consume_skb_any outside of napi 2024-06-25 16:44:08 -07:00
qlogic Networking changes for 6.10. 2024-05-14 19:42:24 -07:00
qualcomm qca_spi: Make interrupt remembering atomic 2024-06-18 11:38:51 +02:00
rdc
realtek Quite smaller than usual. Notably it includes the fix for the unix 2024-05-23 12:49:37 -07:00
renesas net: rswitch: Avoid use-after-free in rswitch_poll() 2024-07-03 19:15:22 -07:00
rocker net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
samsung net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
seeq
sfc net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
sgi
silan
sis net: annotate data-races around dev->if_port 2024-05-08 18:51:30 -07:00
smsc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-05-14 10:53:19 -07:00
socionext
stmicro net: stmmac: enable HW-accelerated VLAN stripping for gmac4 only 2024-07-03 09:11:06 +01:00
sun Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-05-14 10:53:19 -07:00
sunplus
synopsys net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
tehuti net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
ti net: ti: icssg-prueth: Fix start counter for ft1 filter 2024-05-28 15:29:52 +02:00
toshiba
tundra
vertexcom
via net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
wangxun net: txgbe: free isb resources at the right time 2024-07-02 16:07:04 +02:00
wiznet
xilinx net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
xircom net: annotate data-races around dev->if_port 2024-05-08 18:51:30 -07:00
xscale net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
jme.h
Kconfig
korina.c
lantiq_etop.c net: ethernet: lantiq_etop: fix double free in detach 2024-07-09 19:02:07 -07:00
lantiq_xrx200.c net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
Makefile