linux/drivers/net/usb
Jose Ignacio Tornos Martinez 5df2b49e7e net: usb: ax88179_178a: avoid failed operations when device is disconnected
commit aef05e349b upstream.

When the device is disconnected we get the following messages showing
failed operations:
Nov 28 20:22:11 localhost kernel: usb 2-3: USB disconnect, device number 2
Nov 28 20:22:11 localhost kernel: ax88179_178a 2-3:1.0 enp2s0u3: unregister 'ax88179_178a' usb-0000:02:00.0-3, ASIX AX88179 USB 3.0 Gigabit Ethernet
Nov 28 20:22:11 localhost kernel: ax88179_178a 2-3:1.0 enp2s0u3: Failed to read reg index 0x0002: -19
Nov 28 20:22:11 localhost kernel: ax88179_178a 2-3:1.0 enp2s0u3: Failed to write reg index 0x0002: -19
Nov 28 20:22:11 localhost kernel: ax88179_178a 2-3:1.0 enp2s0u3 (unregistered): Failed to write reg index 0x0002: -19
Nov 28 20:22:11 localhost kernel: ax88179_178a 2-3:1.0 enp2s0u3 (unregistered): Failed to write reg index 0x0001: -19
Nov 28 20:22:11 localhost kernel: ax88179_178a 2-3:1.0 enp2s0u3 (unregistered): Failed to write reg index 0x0002: -19

The reason is that although the device is detached, normal stop and
unbind operations are commanded from the driver. These operations are
not necessary in this situation, so avoid these logs when the device is
detached if the result of the operation is -ENODEV and if the new flag
informing about the disconnecting status is enabled.

cc:  <stable@vger.kernel.org>
Fixes: e2ca90c276 ("ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver")
Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20231207175007.263907-1-jtornosm@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-01 12:39:03 +00:00
..
aqc111.c usb: aqc111: check packet for fixup for true limit 2023-12-20 17:00:21 +01:00
aqc111.h
asix_common.c
asix_devices.c
asix.h
ax88172a.c
ax88179_178a.c net: usb: ax88179_178a: avoid failed operations when device is disconnected 2024-01-01 12:39:03 +00:00
catc.c
cdc_eem.c
cdc_ether.c USB: zaurus: Add ID for A-300/B-500/C-700 2023-08-11 12:08:19 +02:00
cdc_mbim.c
cdc_ncm.c
cdc_subset.c
cdc-phonet.c
ch9200.c
cx82310_eth.c
dm9601.c net: usb: dm9601: fix uninitialized variable use in dm9601_mdio_read 2023-10-19 23:08:54 +02:00
gl620a.c
hso.c
huawei_cdc_ncm.c
int51x1.c
ipheth.c
kalmia.c
kaweth.c
Kconfig
lan78xx.c
lan78xx.h
lg-vl600.c
Makefile
mcs7830.c
net1080.c
pegasus.c
pegasus.h
plusb.c
qmi_wwan.c net: usb: qmi_wwan: claim interface 4 for ZTE MF290 2023-12-20 17:00:24 +01:00
r8152.c r8152: fix the autosuspend doesn't work 2023-12-20 17:00:29 +01:00
r8153_ecm.c
rndis_host.c
rtl8150.c
sierra_net.c
smsc75xx.c net: usb: smsc75xx: Fix uninit-value access in __smsc75xx_read_reg 2023-10-10 22:00:42 +02:00
smsc75xx.h
smsc95xx.c net: usb: smsc95xx: Fix uninit-value access in smsc95xx_read_reg 2023-11-02 09:35:27 +01:00
smsc95xx.h
sr9700.c
sr9700.h
sr9800.c
sr9800.h
usbnet.c net: usbnet: Fix WARNING in usbnet_start_xmit/usb_submit_urb 2023-08-11 12:08:24 +02:00
zaurus.c USB: zaurus: Add ID for A-300/B-500/C-700 2023-08-11 12:08:19 +02:00