This reverts commit e3345db85068ddb937fc0ba40dfc39c293dad977, which broke system resume for a large class of devices. Devices that after having been reset during resume need to be rebound due to a missing reset_resume callback, are now left in a suspended state. This specifically broke resume of common USB-serial devices, which are now unusable after system suspend (until disconnected and reconnected) when USB persist is enabled. During resume, usb_resume_interface will set the needs_binding flag for such interfaces, but unlike system resume, run-time resume does not honour it.
Unified · Split
| @@ -249,18 +249,12 @@ static int usb_port_runtime_suspend(struct device *dev) · 248 unmodified lines | ||
| 249 | 249 | |
| 250 | 250 | return retval; |
| 251 | 251 | } |
| 252 | − | |
| 253 | −static int usb_port_prepare(struct device *dev) | |
| 254 | −{ | |
| 255 | − return 1; | |
| 256 | −} | |
| 257 | 252 | #endif |
| 258 | 253 | |
| 259 | 254 | static const struct dev_pm_ops usb_port_pm_ops = { |
| 260 | 255 | #ifdef CONFIG_PM |
| 261 | 256 | .runtime_suspend = usb_port_runtime_suspend, |
| 262 | 257 | .runtime_resume = usb_port_runtime_resume, |
| 263 | − .prepare = usb_port_prepare, | |
| 264 | 258 | #endif |
| 265 | 259 | }; |
| 266 | 260 | |
| @@ -312,13 +312,7 @@ static int usb_dev_uevent(struct device *dev, struct kobj_uevent_env *env) · 311 unmodified lines | ||
| 312 | 312 | |
| 313 | 313 | static int usb_dev_prepare(struct device *dev) |
| 314 | 314 | { |
| 315 | − struct usb_device *udev = to_usb_device(dev); | |
| 316 | − | |
| 317 | − /* Return 0 if the current wakeup setting is wrong, otherwise 1 */ | |
| 318 | − if (udev->do_remote_wakeup != device_may_wakeup(dev)) | |
| 319 | − return 0; | |
| 320 | − | |
| 321 | − return 1; | |
| 315 | + return 0; /* Implement eventually? */ | |
| 322 | 316 | } |
| 323 | 317 | |
| 324 | 318 | static void usb_dev_complete(struct device *dev) |