From patchwork Thu Jun 9 09:44:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 9166527 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B0EB960832 for ; Thu, 9 Jun 2016 09:47:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FA282830C for ; Thu, 9 Jun 2016 09:47:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9443528336; Thu, 9 Jun 2016 09:47:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 48E6B2830C for ; Thu, 9 Jun 2016 09:47:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933580AbcFIJpQ (ORCPT ); Thu, 9 Jun 2016 05:45:16 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:58853 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422919AbcFIJpH (ORCPT ); Thu, 9 Jun 2016 05:45:07 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O8I00H7D0EW2Q70@mailout1.w1.samsung.com>; Thu, 09 Jun 2016 10:44:57 +0100 (BST) X-AuditID: cbfec7f5-f792a6d000001302-3b-57593a989212 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id D6.05.04866.89A39575; Thu, 9 Jun 2016 10:44:56 +0100 (BST) Received: from AMDC2174.DIGITAL.local ([106.120.53.17]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O8I006RA0EHZZ10@eusync1.samsung.com>; Thu, 09 Jun 2016 10:44:56 +0100 (BST) From: Krzysztof Kozlowski To: Ulf Hansson , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Krzysztof Kozlowski , Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , Liam Girdwood , Mark Brown , Greg Kroah-Hartman , Hans de Goede , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , Heiko Stuebner , linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org, linux-usb@vger.kernel.org, linux-fbdev@vger.kernel.org, hzpeterchen@gmail.com Cc: Bartlomiej Zolnierkiewicz Subject: [RFC v4 10/14] usb: hub: Handle deferred probe Date: Thu, 09 Jun 2016 11:44:27 +0200 Message-id: <1465465471-28740-11-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1465465471-28740-1-git-send-email-k.kozlowski@samsung.com> References: <1465465471-28740-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWRXUhTcRjG+5+znZ2NRodleZgksghCzDIL/4lEN9npTiRYVmAnPUzLqWzT XBdpM8lW6myJJqn5MXWmLreJ+Rmt5SxxmWtzyRT8QPxYLTQ/wMic0t3veZ8fPBcvjgoaWEI8 NV3ByNLpNBHGYw3/tTlOVEQniE81fjgLOyoMbFg2PYfBZ3M+FNZY7WxYqteisMRby4b59QYM em3lCNyeWWZDtdOIQfuSHsDlhQi4/q0QgcZZFxsOFf9iQ0fPSwxat0sAXC2yAljxZQCBdY0F KNSNf0WgpryNBdunFxBY0G/lwOFeBTTUTGDQ1ia+EES1VrcCylFchFDdlZMcSt/0G6NMzaHU 0qiHRRlbHmOUx9WHUe+qWjmUqSGX8g04MarY3AKoLlc1StncXQi1agyOO3CNF5PMpKVmM7KT 52/yUvQjDiSzhptjti9w8sAIRw1wnCTOkGvdSjXg7uBhcnTKgKkBDxcQOkB6PGZ0LzxASL31 O8tvYUQkaWpq2LUCiDEO6R7rQvwFSkCys/M1x88HiShyI38C9TOLOEauzDYi/jU+QZHauuS9 tWDy06CW7WfuznlmanZXFxCXyP56LaYB/FdgXws4xGQlZcpvSaSnw+W0VJ6VLglPypAawd7v 1t4C3WC0BRA4EO3nH0++Khaw6Wy5UmoBJI6KAvibUQliAT+ZVt5jZBmJsqw0Rm4BQThLFMh/ 0eO7IiAktIK5wzCZjOx/i+BcYR4Ic8QW1mdXzb2/65qxeJ/GH2GW7JY/Ny4fbf84eZ0IVCnr mBXaq7pvEnKaFg3njEMhPs3D4Jxx15G+wdrbufMX+3+qYjskRZvbY9Ubawuqz1vG5XVnTOTM E3ev+fmUJmyrI8Tdj8WVpj6aRzYDlEKdqvKHs6x5UfwmsTdepxCx5Cl0RCgqk9P/AEvZGm+3 AgAA Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for deferred probing to the usb hub. Currently EPROBE_DEFER does not exist in usb hub path but future patches will add it on the port level. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas --- drivers/usb/core/hub.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index bee13517676f..c421745b84aa 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -1733,6 +1733,7 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id) struct usb_endpoint_descriptor *endpoint; struct usb_device *hdev; struct usb_hub *hub; + int ret; desc = intf->cur_altsetting; hdev = interface_to_usbdev(intf); @@ -1852,11 +1853,12 @@ descriptor_error: if (id->driver_info & HUB_QUIRK_CHECK_PORT_AUTOSUSPEND) hub->quirk_check_port_auto_suspend = 1; - if (hub_configure(hub, endpoint) >= 0) + ret = hub_configure(hub, endpoint); + if (ret >= 0) return 0; hub_disconnect(intf); - return -ENODEV; + return ret; } static int