Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4147909pxb; Mon, 27 Sep 2021 10:21:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPptBJtWaXdc42JaRDbuKda8NqzLsc3s3etdcFtjm7F+wD/ToXaA7O+/F2oUMJAhZP5lHP X-Received: by 2002:a17:902:6b0b:b0:13a:18bf:1ece with SMTP id o11-20020a1709026b0b00b0013a18bf1ecemr590587plk.49.1632763305651; Mon, 27 Sep 2021 10:21:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632763305; cv=none; d=google.com; s=arc-20160816; b=WMt6Tr8MoaiKJq+dZPtf/6FwXt77E4uAAy7/5nQwN391Je8KRUKTU9xpG6/GphXpIb chjoDTOLgMpAY7rr1xIL722/qhln5gyYUVHCld4XCcikinSiR7anE3rtTGkvGRb8YhTs 6FSZKXEKjW/cJ1XhnPWobNrqsD14S8M0r6KKQQg9TJIRKr2oxJMjODqapZEQgeA2aWRF Bbwp9HTCRh1deq28l2lvRvyBDH7d3czDa8cQBXizfssbqiUu+pIOpk3vXKfowCaKDZRI RY2mL/DEbcio2E5Z0AD7u8M5Twh2MP7bCu6ECX/EK+ouQRkXIjrmWTLR5ksJQNqvI4bv CtTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5yaisEpSb29Zcw1YYnWl/6k9qsyYRFUewAmMI9rZbpA=; b=fvIVDb1Yhu2IAapFJaGPHAPQz6WrwLlA/OJkYhrcqM9BOdbkX6MHbJ+hp/cboFr14m IiXK5yNJHEBLiujlXnec/ow0kZf67ypSDDdyKryDrC8PQeNJWZWKV0uVwdU0JQEL2giz UyuHn2as+vB0yrbh8yX4NGdjsX3fwGHouS5MUwwald9NAG5C6KNe2/vdM7tU99p8Qa2O zX02fsTZARAOj4M/ABf9mpFj4fAHlyA5lzq8ek9JttPoU7TddyXvafz/5ky9HnHlVMjh 8thXim02muT+Rh4jRNhiHcb5QmU884VmsoMCmKNKl7UZha/Dhy8acD54GLgpUJafezlD feog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Cxf97rW0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k3si23144413pll.407.2021.09.27.10.21.32; Mon, 27 Sep 2021 10:21:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Cxf97rW0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237195AbhI0RWQ (ORCPT + 99 others); Mon, 27 Sep 2021 13:22:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:56710 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237400AbhI0RS1 (ORCPT ); Mon, 27 Sep 2021 13:18:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E377D6128C; Mon, 27 Sep 2021 17:12:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632762747; bh=by1ip3jYucQI0cqCROHvv+vTOYFCdkGMSrWXk+kcxMY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cxf97rW0hVcBraxY0QWkOYkuKjPkhmB523ARcFy8zcWOdd9qPLIowRqCDOcn4mSRq NWPoGyoLYq59F74r83nKrUCRF+MkmBeyl0XxdOkXLsejVauHSxqDIqpEGIQaXF5rWl Ke3HHvE+h5d6mBfrjnj0OfgRfDi0dtN+1fMsOJ08= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mathias Nyman , Chris Chiu , Kishon Vijay Abraham I Subject: [PATCH 5.14 037/162] xhci: Set HCD flag to defer primary roothub registration Date: Mon, 27 Sep 2021 19:01:23 +0200 Message-Id: <20210927170234.767260874@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210927170233.453060397@linuxfoundation.org> References: <20210927170233.453060397@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kishon Vijay Abraham I commit b7a0a792f864583207c593b50fd1b752ed89f4c1 upstream. Set "HCD_FLAG_DEFER_RH_REGISTER" to hcd->flags in xhci_run() to defer registering primary roothub in usb_add_hcd(). This will make sure both primary roothub and secondary roothub will be registered along with the second HCD. This is required for cold plugged USB devices to be detected in certain PCIe USB cards (like Inateck USB card connected to AM64 EVM or J7200 EVM). CC: stable@vger.kernel.org # 5.4+ Suggested-by: Mathias Nyman Tested-by: Chris Chiu Signed-off-by: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/20210909064200.16216-3-kishon@ti.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/xhci.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -692,6 +692,7 @@ int xhci_run(struct usb_hcd *hcd) if (ret) xhci_free_command(xhci, command); } + set_bit(HCD_FLAG_DEFER_RH_REGISTER, &hcd->flags); xhci_dbg_trace(xhci, trace_xhci_dbg_init, "Finished xhci_run for USB2 roothub");