linux/drivers/net/usb
Oleksij Rempel ea4e938d2c net: lan78xx: fix runtime PM count underflow on link stop
[ Upstream commit 1eecc7ab82 ]

Current driver has some asymmetry in the runtime PM calls. On lan78xx_open()
it will call usb_autopm_get() and unconditionally usb_autopm_put(). And
on lan78xx_stop() it will call only usb_autopm_put(). So far, it was
working only because this driver do not activate autosuspend by default,
so it was visible only by warning "Runtime PM usage count underflow!".

Since, with current driver, we can't use runtime PM with active link,
execute lan78xx_open()->usb_autopm_put() only in error case. Otherwise,
keep ref counting high as long as interface is open.

Fixes: 55d7de9de6 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2024-03-15 10:48:13 -04:00
..
aqc111.c ethernet: constify references to netdev->dev_addr in drivers 2024-01-05 15:13:37 +01:00
aqc111.h net: usb: aqc111: Use the correct style for SPDX License Identifier 2019-11-27 11:27:01 -08:00
asix.h net: usb: asix: do not force pause frames support 2022-07-07 17:53:26 +02:00
asix_common.c net: asix: fix "can't send until first packet is send" issue 2022-07-07 17:53:27 +02:00
asix_devices.c usbnet: Run unregister_netdev() before unbind() again 2022-06-09 10:22:38 +02:00
ax88172a.c asix: Add check for usbnet_get_endpoints 2024-01-15 18:51:20 +01:00
ax88179_178a.c net: usb: ax88179_178a: move priv to driver_priv 2024-01-15 18:51:27 +01:00
catc.c ethernet: constify references to netdev->dev_addr in drivers 2024-01-05 15:13:37 +01:00
cdc-phonet.c phonet: use siocdevprivate 2021-07-27 20:11:43 +01:00
cdc_eem.c net: cdc_eem: fix tx fixup skb leak 2021-06-17 11:30:25 -07:00
cdc_ether.c USB: zaurus: Add ID for A-300/B-500/C-700 2023-08-11 15:13:55 +02:00
cdc_mbim.c net: usb: cdc_mbim: avoid altsetting toggling for Telit FE990 2023-03-30 12:47:54 +02:00
cdc_ncm.c net: cdc_ncm: Deal with too low values of dwNtbOutMaxSize 2023-05-30 13:55:30 +01:00
cdc_subset.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
ch9200.c net: ch9200: remove unnecessary return 2020-01-07 13:30:36 -08:00
cx82310_eth.c cx82310_eth: fix error return code in cx82310_bind() 2020-11-16 15:23:44 -08:00
dm9601.c net: usb: dm9601: fix wrong return value in dm9601_mdio_read 2024-03-06 14:38:45 +00:00
gl620a.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
hso.c net: hso: fix muxed tty registration 2021-09-17 11:19:58 +01:00
huawei_cdc_ncm.c usb: class: cdc-wdm: WWAN framework integration 2021-05-11 16:17:56 -07:00
int51x1.c net: usb: Fix spelling mistakes 2021-06-01 17:05:05 -07:00
ipheth.c ipheth: fix EOVERFLOW in ipheth_rcvbulk_callback 2022-02-05 12:38:58 +01:00
kalmia.c net/usb: kalmia: Don't pass act_len in usb_bulk_msg error path 2023-02-22 12:57:09 +01:00
kaweth.c net: usb: kaweth: Remove last user of kaweth_control() 2020-09-29 14:02:54 -07:00
Kconfig net: usb: make USB_RTL8153_ECM non user configurable 2022-08-17 14:23:37 +02:00
lan78xx.c net: lan78xx: fix runtime PM count underflow on link stop 2024-03-15 10:48:13 -04:00
lan78xx.h net: lan78xx: Switch to SPDX identifier 2018-09-05 22:20:45 -07:00
lg-vl600.c net: usb: Fix spelling mistakes 2021-06-01 17:05:05 -07:00
Makefile r8153_ecm: avoid to be prior to r8152 driver 2020-11-19 08:23:46 -08:00
mcs7830.c ethernet: constify references to netdev->dev_addr in drivers 2024-01-05 15:13:37 +01:00
net1080.c net: usb: net1080: Remove in_interrupt() comment 2020-09-29 14:02:54 -07:00
pegasus.c net: usb: pegasus: Do not drop long Ethernet frames 2022-01-05 12:42:35 +01:00
pegasus.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
plusb.c net: USB: Fix wrong-direction WARNING in plusb.c 2023-02-14 19:18:02 +01:00
qmi_wwan.c net: usb: qmi_wwan: claim interface 4 for ZTE MF290 2023-12-20 15:17:40 +01:00
r8152.c r8152: fix the autosuspend doesn't work 2023-12-20 15:17:43 +01:00
r8153_ecm.c r8153_ecm: Add Lenovo Powered USB-C Hub as a fallback of r8152 2021-01-12 20:00:51 -08:00
rndis_host.c usb: rndis_host: Secure rndis_query check against int overflow 2023-01-12 11:59:16 +01:00
rtl8150.c net: usb: use ndo_siocdevprivate 2021-07-27 20:11:43 +01:00
sierra_net.c usbnet: add _mii suffix to usbnet_set/get_link_ksettings 2021-04-06 16:22:36 -07:00
smsc75xx.c net: usb: smsc75xx: Fix uninit-value access in __smsc75xx_read_reg 2023-10-10 21:59:07 +02:00
smsc75xx.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
smsc95xx.c net: usb: smsc95xx: Fix uninit-value access in smsc95xx_read_reg 2023-11-08 17:26:38 +01:00
smsc95xx.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
sr9700.c ethernet: constify references to netdev->dev_addr in drivers 2024-01-05 15:13:37 +01:00
sr9700.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
sr9800.c dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
sr9800.h USB2NET : SR9800 : One chip USB2.0 USB2NET SR9800 Device Driver Support 2014-02-10 16:53:06 -08:00
usbnet.c net: usbnet: Fix WARNING in usbnet_start_xmit/usb_submit_urb 2023-08-11 15:13:58 +02:00
zaurus.c USB: zaurus: Add ID for A-300/B-500/C-700 2023-08-11 15:13:55 +02:00