From patchwork Thu May 5 12:34:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 9024291 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 64A9BBF29F for ; Thu, 5 May 2016 12:39:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6C12C200E6 for ; Thu, 5 May 2016 12:39:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 98330200DE for ; Thu, 5 May 2016 12:39:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755981AbcEEMfY (ORCPT ); Thu, 5 May 2016 08:35:24 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:55159 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755521AbcEEMfC (ORCPT ); Thu, 5 May 2016 08:35:02 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O6P005YAEY9XM60@mailout3.w1.samsung.com>; Thu, 05 May 2016 13:34:57 +0100 (BST) X-AuditID: cbfec7f4-f796c6d000001486-43-572b3df1a9a0 Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 29.B4.05254.1FD3B275; Thu, 5 May 2016 13:34:57 +0100 (BST) Received: from AMDC2174.DIGITAL.local ([106.120.53.17]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O6P00KEEEXN8E00@eusync4.samsung.com>; Thu, 05 May 2016 13:34:57 +0100 (BST) From: Krzysztof Kozlowski To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-mmc@vger.kernel.org, linux-pm@vger.kernel.org, linux-usb@vger.kernel.org, Ulf Hansson , Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , Greg Kroah-Hartman , Mark Brown Cc: tjakobi@math.uni-bielefeld.de, m.szyprowski@samsung.com, hverkuil@xs4all.nl, Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz Subject: [RFC v2 08/13] usb: hub: Handle deferred probe Date: Thu, 05 May 2016 14:34:21 +0200 Message-id: <1462451666-17945-9-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1462451666-17945-1-git-send-email-k.kozlowski@samsung.com> References: <1462451666-17945-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrPLMWRmVeSWpSXmKPExsVy+t/xa7ofbbXDDR7eV7XYOGM9q8XUh0/Y LCY9ec9sMf/IOVaLiSsnM1s0L17PZnFq8jMmi9cvDC02Pb7GanF51xw2iyP/+xktPvceYbSY cX4fk8WiZa3MFmuP3GW3OL27xKJt9QdWi+Nrwx2EPHbOusvusXmFlsemVZ1sHneu7WHz2D93 DVBoSb3Hv2PsHn1bVjF6fN4k53Hq62f2AK4oLpuU1JzMstQifbsEroxd+8QL7nFUfPz6krWB cTJ7FyMnh4SAicTt/ZuZIWwxiQv31rN1MXJxCAksZZTo2fGfBcJpZJKY+3QqE0gVm4CxxObl S8CqRARuMEu82jmZGcRhFtjBKPF32R0WkCphAXOJhbtWsILYLAKqEhufTWIEsXkF3CUu9Z9k gdgnJ3Hy2GSwGk4BD4mzv+aD2UJANYd+T2ecwMi7gJFhFaNoamlyQXFSeq6hXnFibnFpXrpe cn7uJkZIsH/Zwbj4mNUhRgEORiUe3gPztcKFWBPLiitzDzFKcDArifDKA2NFiDclsbIqtSg/ vqg0J7X4EKM0B4uSOO/cXe9DhATSE0tSs1NTC1KLYLJMHJxSDYxJq3NlCwN1Jv29dFFHq1/n 2PbGxYbPffZM7HieZNO4K+J5/caeLmOOP+vnSBZLNTSm79V4uMYs861d7wm+oLad110if8jw 6dm/eODBUOQxoe/Dk5KcQN5lMbFLj3+baDyjvuvVxFX/ZM9l/1U8929RTPD0SCHx9yGbJm7o OLHmsnTAuxx2WT8lluKMREMt5qLiRAAbrfI9cgIAAA== Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.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 38cc4bae0a82..1c82fcc448f5 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -1731,6 +1731,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); @@ -1850,11 +1851,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