linux/drivers/net
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
..
arcnet
bonding bonding: Fix out-of-bounds read in bond_option_arp_ip_targets_set() 2024-07-03 19:36:02 -07:00
caif net: caif: virtio: drop owner assignment 2024-05-22 08:31:17 -04:00
can can: kvaser_usb: Explicitly initialize family in leafimx driver_info struct 2024-07-01 08:55:16 +02:00
dsa dsa: lan9303: Fix mapping between DSA port number and PHY address 2024-07-04 19:19:21 -07:00
ethernet net: ks8851: Fix potential TX stall after interface reopen 2024-07-11 11:52:29 +02:00
fddi
fjes tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
hamradio
hippi
hyperv tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
ieee802154
ipa
ipvlan ipvlan: Dont Use skb->sk in ipvlan_process_v{4,6}_outbound 2024-05-30 12:05:52 +02:00
mctp
mdio
netdevsim netdevsim: fix backwards compatibility in nsim_get_iflink() 2024-06-10 11:51:04 +01:00
pcs net: pcs: lynx: no need to read LPA in lynx_pcs_get_state_2500basex() 2024-05-13 16:37:18 -07:00
phy net: phy: microchip: lan87xx: reinit PHY after cable test 2024-07-08 20:22:13 -07:00
plip
ppp ppp: reject claimed-as-LCP but actually malformed packets 2024-07-11 11:00:08 +02:00
pse-pd net: pse-pd: Kconfig: Fix missing firmware loader config select 2024-06-21 11:29:52 +01:00
slip net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
team net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
thunderbolt
usb net: usb: qmi_wwan: add Telit FN912 compositions 2024-06-26 07:27:27 -07:00
vmxnet3 vmxnet3: disable rx data ring on dma allocation failure 2024-06-03 18:49:33 -07:00
vxlan vxlan: Pull inner IP header in vxlan_xmit_one(). 2024-06-21 17:34:15 -07:00
wan
wireguard wireguard: send: annotate intentional data race in checking empty queue 2024-07-05 17:21:10 -07:00
wireless wifi: iwlwifi: mvm: check vif for NULL/ERR_PTR before dereference 2024-07-03 16:06:54 +02:00
wwan net: wwan: iosm: Fix tainted pointer delete is case of region creation fail 2024-06-06 10:15:14 +02:00
xen-netback net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
amt.c
bareudp.c
dummy.c
eql.c
geneve.c geneve: Fix incorrect inner network header offset when innerprotoinherit is set 2024-06-10 13:18:08 +01:00
gtp.c gtp: identify tunnel via GTP device + GTP version + TEID + family 2024-05-07 01:36:02 +02:00
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
macvlan.c net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
macvtap.c
Makefile net: Always descend into dsa/ folder with CONFIG_NET_DSA enabled 2024-05-20 11:04:29 +01:00
mdio.c
mhi_net.c
mii.c
net_failover.c net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
netconsole.c
netkit.c netkit: Fix pkt_type override upon netkit pass verdict 2024-05-25 10:48:57 -07:00
nlmon.c
ntb_netdev.c net: ntb_netdev: Move ntb_netdev_rx_handler() to call netif_rx() from __netif_rx() 2024-07-02 18:56:46 -07:00
pfcp.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
tun.c for-6.10/io_uring-20240511 2024-05-13 12:48:06 -07:00
veth.c
virtio_net.c virtio_net: fixing XDP for fully checksummed packets handling 2024-06-19 10:52:44 +01:00
vrf.c
vsockmon.c net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
xen-netfront.c net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00