Re: [PATCH] net: usbnet: skip info->stop() callback if suspend_count is not 0
From: Oliver Neukum <oneukum@suse.com>
Date: 2025-08-18 09:04:58
Also in:
linux-usb
From: Oliver Neukum <oneukum@suse.com>
Date: 2025-08-18 09:04:58
Also in:
linux-usb
On 8/18/25 09:57, Xu Yang wrote:
--- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c@@ -839,7 +839,7 @@ int usbnet_stop (struct net_device *net) pm = usb_autopm_get_interface(dev->intf);
This needs to fail ...
/* allow minidriver to stop correctly (wireless devices to turn off
* radio etc) */
- if (info->stop) {
+ if (info->stop && !dev->suspend_count) {... for !dev->suspend_count to be false
retval = info->stop(dev); if (retval < 0) netif_info(dev, ifdown, dev->net,
In other words, this means that the driver has insufficient error handling in this method. This needs to be fixed and it needs to be fixed explicitly. We do not hide error handling. Please use a literal "if (pm < 0)" to skip the parts we need to skip if the resumption fails. Regards Oliver NACKED-BY: Oliver Neukum [off-list ref]