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: 9146257 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 6E0C460757 for ; Wed, 1 Jun 2016 08:05:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5EACE22473 for ; Wed, 1 Jun 2016 08:05:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 52C542654B; Wed, 1 Jun 2016 08:05:48 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DC17E22473 for ; Wed, 1 Jun 2016 08:05:47 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b818D-0006LY-2Q; Wed, 01 Jun 2016 08:04:01 +0000 Received: from mailout2.w1.samsung.com ([210.118.77.12]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b817S-0005co-HD for linux-arm-kernel@lists.infradead.org; Wed, 01 Jun 2016 08:03:15 +0000 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> for linux-arm-kernel@lists.infradead.org; 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 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= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160601_010314_852357_B8E6AA95 X-CRM114-Status: GOOD ( 20.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Greg Kroah-Hartman , Bartlomiej Zolnierkiewicz MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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