From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965787AbdKQQgA (ORCPT ); Fri, 17 Nov 2017 11:36:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51452 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750862AbdKQQfv (ORCPT ); Fri, 17 Nov 2017 11:35:51 -0500 Date: Fri, 17 Nov 2017 09:35:51 -0700 From: Jerry Snitselaar To: Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: question about usb_rebind_intf Message-ID: <20171117163551.35u3jhimpow2ghw2@cantor> Reply-To: Jerry Snitselaar Mail-Followup-To: Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline User-Agent: NeoMutt/20171027 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 17 Nov 2017 16:35:51 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); } }