From patchwork Wed Jun 1 08:02:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 9146291 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 D074C60757 for ; Wed, 1 Jun 2016 08:07:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C14E422473 for ; Wed, 1 Jun 2016 08:07:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B5EA92654B; Wed, 1 Jun 2016 08:07:37 +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 483D722473 for ; Wed, 1 Jun 2016 08:07:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757627AbcFAIDI (ORCPT ); Wed, 1 Jun 2016 04:03:08 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:26276 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754187AbcFAIC6 (ORCPT ); Wed, 1 Jun 2016 04:02:58 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O8300EL42CQW060@mailout2.w1.samsung.com>; Wed, 01 Jun 2016 09:02:51 +0100 (BST) X-AuditID: cbfec7f5-f792a6d000001302-08-574e96aad944 Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id E9.1E.04866.AA69E475; Wed, 1 Jun 2016 09:02:50 +0100 (BST) Received: from AMDC2174.DIGITAL.local ([106.120.53.17]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O830012K2CGIS90@eusync3.samsung.com>; Wed, 01 Jun 2016 09:02:50 +0100 (BST) From: Krzysztof Kozlowski To: hzpeterchen@gmail.com, Ulf Hansson , Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , Krzysztof Kozlowski , Javier Martinez Canillas , linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-pm@vger.kernel.or, Alan Stern , linux-usb@vger.kernel.org, Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Kukjin Kim , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Cc: Greg Kroah-Hartman , Bartlomiej Zolnierkiewicz Subject: [PATCH v3 08/12] usb: hub: Handle deferred probe Date: Wed, 01 Jun 2016 10:02:17 +0200 Message-id: <1464768141-25420-9-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1464768141-25420-1-git-send-email-k.kozlowski@samsung.com> References: <1464768141-25420-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplkeLIzCtJLcpLzFFi42I5/e/4Vd1V0/zCDQ7sNbXYOGM9q8WkJ++Z LeYfOcdqMXHlZGaL/jcLWS2aF69ns+i6uonN4tyrlYwWb96uYbJ4/cLQov/xa2aLTY+vsVpc 3jWHzeLI/35Gi5kXV7NYzDi/j8li0bJWZoul1y8yWUyYvpbFonXvEXaL07tLLCb8vsBmcXxt uIO4x5p5axg9Lvf1MnnsnHWX3WPl8i9sHptXaHlsWtXJ5nHn2h42j/1z17B7bF5S77GlH6hg 9t0fjB59W1Yxehz5Op3F4/MmuQC+KC6blNSczLLUIn27BK6MlWcvMxXM56zYcu4FewPjWfYu Rk4OCQETiTm7nzBD2GISF+6tZ+ti5OIQEljKKLHl9jx2CKeRSeLvtk+MIFVsAsYSm5cvAasS Eehgk9i09Q3YKGaBbIlT996zgtjCApYSn6fMZAGxWQRUJTq6JoPV8Aq4S7w63c8IsU5O4uSx yWD1nAIeEicm/AeLCwHVNE6bzDqBkXcBI8MqRtHU0uSC4qT0XCO94sTc4tK8dL3k/NxNjJBI +rqDcekxq0OMAhyMSjy8FZd9w4VYE8uKK3MPMUpwMCuJ8ApO9gsX4k1JrKxKLcqPLyrNSS0+ xCjNwaIkzjtz1/sQIYH0xJLU7NTUgtQimCwTB6dUA+OEf4sjk66aWjFvudI0xZL/oX048/vZ dxpdNwm4GT8/fPLNDf3H7znW35US3B9kVOWTU/ju/KVdPBdrt2zLDhRb1q63VO7qmri6qJtT f/+e+Nm5RVxg9vbtBWym0wyuXMlpbd5iN/3pviMTDfIqDW++WiWlfObqrNklS27rsR2d9GCm SuBVnoyLSizFGYmGWsxFxYkAHmtT0KACAAA= Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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