From patchwork Fri Jul 15 09:13:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 72075 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp509921qga; Fri, 15 Jul 2016 02:14:47 -0700 (PDT) X-Received: by 10.66.9.42 with SMTP id w10mr29944414paa.34.1468574087800; Fri, 15 Jul 2016 02:14:47 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t63si3175385pfa.44.2016.07.15.02.14.47; Fri, 15 Jul 2016 02:14:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932419AbcGOJOe (ORCPT + 29 others); Fri, 15 Jul 2016 05:14:34 -0400 Received: from mail-pf0-f178.google.com ([209.85.192.178]:32875 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932312AbcGOJOa (ORCPT ); Fri, 15 Jul 2016 05:14:30 -0400 Received: by mail-pf0-f178.google.com with SMTP id y134so13596980pfg.0 for ; Fri, 15 Jul 2016 02:14:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=JKybLMCbd4hjexvVhxFdw7YHC23YasZq5aPmDwWNlvM=; b=N2IwFRlrg7AqOdnrouws+JpYBx+Iy+AdNVYovaz7jmgggLQbwgKW7Ar/PPxl0d2CW4 3/REUcHtPHK0U+E2r5imUE8NOUcbNtH5gdW8hivwnfiP7e3t7H4/ZS62bZCbb/4i3OiJ pZmWckMlOYIYbvRTK3d13KYwtfQF+/Z72LJX4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=JKybLMCbd4hjexvVhxFdw7YHC23YasZq5aPmDwWNlvM=; b=Z+FYuZ9h+iSfEa5+Y5xQTEcRPsz2ZfcUFlxczPO9DKYh+N6rJsyD5n4AXyiVCCC6BL 8gBRd39beOsUCXiuaZHjaeTZwPvUSiKGry0xDdDfD3KxP70vxFb9zryJ3M6pnRq2x0Ld n9M5yWcOo/bd+5I7rrQY8SXwoOZX5SmUqyltPhH9njvyXPKhW3MZYSOFRKVEJruQ/81P 3vzojt7wIht9T4wFPCJpNen3uTblZQB8B13r6iTK9JGPDNkYapytVj4ZbrtnyReRr7Dx qs98EnCpxJo2UFpNJlUYZBdovD2tPktpKOFlV6eOqP5h5BtQmHufjqCfZkreaBjcS1cx 5MEA== X-Gm-Message-State: ALyK8tLE3VKChZH7Q3PaamoRTht4hoYVjszUPlwRk+8e0CYLiTxIpHMAHbBdDklNFlBd3AFL X-Received: by 10.98.155.17 with SMTP id r17mr19874823pfd.24.1468574069613; Fri, 15 Jul 2016 02:14:29 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([175.111.195.49]) by smtp.gmail.com with ESMTPSA id da2sm1820199pad.3.2016.07.15.02.14.26 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 15 Jul 2016 02:14:29 -0700 (PDT) From: Baolin Wang To: balbi@kernel.org, gregkh@linuxfoundation.org Cc: mathias.nyman@intel.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, broonie@kernel.org, baolin.wang@linaro.org Subject: [PATCH 1/4] usb: host: xhci: Move the xhci quirks checking to the right place Date: Fri, 15 Jul 2016 17:13:25 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It will reset the xhci quirks in xhci_gen_setup() function when xhci try to add one hcd, thus we need to move the XHCI_LPM_SUPPORT quirk checking after adding hcd. Signed-off-by: Baolin Wang --- drivers/usb/host/xhci-plat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 1.7.9.5 diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 1f3f981..e2e2487 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -223,10 +223,6 @@ static int xhci_plat_probe(struct platform_device *pdev) goto disable_clk; } - if ((node && of_property_read_bool(node, "usb3-lpm-capable")) || - (pdata && pdata->usb3_lpm_capable)) - xhci->quirks |= XHCI_LPM_SUPPORT; - if (HCC_MAX_PSA(xhci->hcc_params) >= 4) xhci->shared_hcd->can_do_streams = 1; @@ -250,6 +246,10 @@ static int xhci_plat_probe(struct platform_device *pdev) if (ret) goto dealloc_usb2_hcd; + if ((node && of_property_read_bool(node, "usb3-lpm-capable")) || + (pdata && pdata->usb3_lpm_capable)) + xhci->quirks |= XHCI_LPM_SUPPORT; + return 0;