linux/drivers/net
Ammar Faizi 8466d39370 net: usbnet: Fix the wrong netif_carrier_on() call
The commit referenced in the Fixes tag causes usbnet to malfunction
(identified via git bisect). Post-commit, my external RJ45 LAN cable
fails to connect. Linus also reported the same issue after pulling that
commit.

The code has a logic error: netif_carrier_on() is only called when the
link is already on. Fix this by moving the netif_carrier_on() call
outside the if-statement entirely. This ensures it is always called
when EVENT_LINK_CARRIER_ON is set and properly clears it regardless
of the link state.

Cc: stable@vger.kernel.org
Cc: Armando Budianto <sprite@gnuweeb.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/all/CAHk-=wjqL4uF0MG_c8+xHX1Vv8==sPYQrtzbdA3kzi96284nuQ@mail.gmail.com
Closes: https://lore.kernel.org/netdev/CAHk-=wjKh8X4PT_mU1kD4GQrbjivMfPn-_hXa6han_BTDcXddw@mail.gmail.com
Closes: https://lore.kernel.org/netdev/0752dee6-43d6-4e1f-81d2-4248142cccd2@gnuweeb.org
Fixes: 0d9cfc9b8c ("net: usbnet: Avoid potential RCU stall on LINK_CHANGE event")
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2025-08-06 04:39:42 +03:00
..
arcnet
bonding net: s/__dev_set_mtu/__netif_set_mtu/ 2025-07-18 17:27:47 -07:00
caif
can Networking changes for 6.17. 2025-07-30 08:58:55 -07:00
dsa Networking changes for 6.17. 2025-07-30 08:58:55 -07:00
ethernet Significant patch series in this pull request: 2025-08-03 16:23:09 -07:00
fddi
fjes
hamradio
hippi
hyperv Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-07-17 11:00:33 -07:00
ieee802154
ipa net: Use of_reserved_mem_region_to_resource{_byname}() for "memory-region" 2025-07-08 08:29:46 -07:00
ipvlan net: s/dev_pre_changeaddr_notify/netif_pre_changeaddr_notify/ 2025-07-18 17:27:47 -07:00
mctp
mdio net: mdio: Add MDIO bus controller for Airoha AN7583 2025-06-27 10:09:36 +01:00
netdevsim netdevsim: access ->pp through netmem_desc instead of page 2025-07-23 17:46:54 -07:00
ovpn Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-07-17 11:00:33 -07:00
pcs net: pcs: xpcs: mask readl() return value to 16 bits 2025-07-17 18:45:27 -07:00
phy Networking changes for 6.17. 2025-07-30 08:58:55 -07:00
plip
ppp ppp: Replace per-CPU recursion counter with lock-owner field 2025-07-17 15:36:18 +02:00
pse-pd net: pse-pd: pd692x0: reduce stack usage in pd692x0_setup_pi_matrix 2025-07-10 18:05:36 -07:00
slip
team team: replace team lock with rtnl lock 2025-06-25 15:23:06 -07:00
thunderbolt net: thunderbolt: Enable end-to-end flow control also in transmit 2025-07-02 14:17:43 -07:00
usb net: usbnet: Fix the wrong netif_carrier_on() call 2025-08-06 04:39:42 +03:00
vmxnet3
vxlan vxlan: remove redundant conversion of vni in vxlan_nl2conf 2025-07-23 17:09:29 -07:00
wan
wireguard wireguard: peer: Replace sockaddr with sockaddr_inet 2025-07-25 15:29:58 -07:00
wireless Networking changes for 6.17. 2025-07-30 08:58:55 -07:00
wwan relayfs: abolish prev_padding 2025-07-09 22:57:51 -07:00
xen-netback
Kconfig
LICENSE.SRC
Makefile
Space.c
amt.c
bareudp.c
dummy.c
eql.c
geneve.c
gtp.c
ifb.c net: ifb: support BIG TCP packets 2025-07-02 14:46:19 -07:00
loopback.c
macsec.c macsec: set IFF_UNICAST_FLT priv flag 2025-07-25 11:03:46 -07:00
macvlan.c
macvtap.c
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
netkit.c netkit: Remove location field in netkit_link 2025-07-11 11:01:09 -07:00
nlmon.c
ntb_netdev.c
pfcp.c
rionet.c
sungem_phy.c
tap.c net: s/dev_get_mac_address/netif_get_mac_address/ 2025-07-18 17:27:46 -07:00
tun.c net: s/dev_get_mac_address/netif_get_mac_address/ 2025-07-18 17:27:46 -07:00
tun_vnet.h tun: enable gso over UDP tunnel support. 2025-07-08 18:07:26 +02:00
veth.c
virtio_net.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-07-17 11:00:33 -07:00
vrf.c vrf: Drop existing dst reference in vrf_ip6_input_dst 2025-07-26 11:28:45 -07:00
vsockmon.c
xen-netfront.c xen/netfront: Fix TX response spurious interrupts 2025-07-23 13:11:03 +02:00