linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* question about usb_rebind_intf
@ 2017-11-17 16:35 Jerry Snitselaar
  2017-11-17 17:09 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 8+ messages in thread
From: Jerry Snitselaar @ 2017-11-17 16:35 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-usb, linux-kernel

Should this skip warning that the rebind failed if device_attach
is returning -EPROBE_DEFER? If I do something like 'rtcwake -m mem -s 30'
on a laptop I have here I will see a couple "rebind failed: -517" messages
as it comes back out of suspend. Since the device probe eventually happens
once probes are not deferred wondering if this warning this be given in that
case.


diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index 64262a9a8829..5d3408010112 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -1070,7 +1070,7 @@ static void usb_rebind_intf(struct usb_interface *intf)
        if (!intf->dev.power.is_prepared) {
                intf->needs_binding = 0;
                rc = device_attach(&intf->dev);
-               if (rc < 0)
+               if (rc < 0 && rc != -EPROBE_DEFER)
                        dev_warn(&intf->dev, "rebind failed: %d\n", rc);
        }
 }

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-12-04 18:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-17 16:35 question about usb_rebind_intf Jerry Snitselaar
2017-11-17 17:09 ` Greg Kroah-Hartman
2017-11-17 17:45   ` Mathias Nyman
2017-11-17 18:21     ` Alan Stern
2017-11-18 10:28       ` Greg Kroah-Hartman
2017-12-04 12:05         ` [PATCH] usb: Don't print a warning if interface driver rebind is deferred at resume Mathias Nyman
2017-12-04 18:45           ` Jerry Snitselaar
2017-11-20 10:39       ` question about usb_rebind_intf Oliver Neukum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).