Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4143840pxb; Mon, 27 Sep 2021 10:16:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrg0xWYqDDTyc5CzPUfeKFTiTDdoxD6bNtmqOGIpX9Jrtt3eAg30CuUERyJc4KeU3pqL58 X-Received: by 2002:a17:902:7781:b0:13d:c9fe:6184 with SMTP id o1-20020a170902778100b0013dc9fe6184mr828367pll.25.1632762974450; Mon, 27 Sep 2021 10:16:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632762974; cv=none; d=google.com; s=arc-20160816; b=rR4oCD1dRQzV6qbCIyHDbvI5Gdz22Q6Wrqzpi7WXMRv2j9ZCQ3uqHTmJ2j3hxlKaaV DoZ8TackbHyC1XdEV1oyoJzHKlKk7HINKQlmH2vw4/Xqz+gF2CRxItU8y29C6wcKPil/ G3QHGi9AipKsC1Ffw3YDWagl6EvQO4h9pzr5CyRkvIN6x4B16+q7bfz4JhfMWMRSqBMv o2oi6c8YFVHTsA8XGnKU0zI9Ny8QRGDyhm18mcy5YAN5K5lnuglyZ0VuVwclv/Ymxq0H YYjfGI9G7j8TFPUwDEeX8tgWvVw3q999n8Mhs1zwB9/yuI64HcidXLs4456idD356nLV Bpgw== 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=JUwNQDxdTdEupusHK+/mxMeZbM843uNw8HAfMcr+hdo=; b=bqRkxQGZoGbVlpwBijeqgPpsDMZM8s4H8644IXvdmdQvh1ZpTMoeVQ9uB4ki9g8wXr KQJjOGodP814eKILs7cWL2TmU82hEuDkWPvNmFNFz49lYbbBbGmOfy/qq5IpduV97jei +tl8/VSAxmHgzZrLWx/cDC7qidj3J/rb/WRQV/SEcdKC16rqndsc8Sd9TGtVxRm+amaz /h8dczQiTSchNn1OIYRPNuJTUmwKIE7BObC1nAxiHY0Vh/3wYsTcdw+YF+wlpIr865Ke Cwk6DoEJPZpzyJKnwUOp9WfKAUdYGxfsRO0DIoPE1jqqyeRWMhVgdenkK6AxwYE4b0uo HSIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aryy3jzl; 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 y67si11204706pfy.284.2021.09.27.10.16.01; Mon, 27 Sep 2021 10:16:14 -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=aryy3jzl; 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 S236451AbhI0RQr (ORCPT + 99 others); Mon, 27 Sep 2021 13:16:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:55022 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236250AbhI0RMi (ORCPT ); Mon, 27 Sep 2021 13:12:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 253436128A; Mon, 27 Sep 2021 17:08:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632762530; bh=MbkHdspzcPTIe80Wb9E9CW+bEsiWvthVlZ37+Yg7yt4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aryy3jzlaM9WzX485oAFzX2EiFugHwd25juELA1795FpMPSfSHjh/RrSWAGvF95wp jyjOCTK7vPQYY8gzEt3sF9wsa4b/0k26C6zFv6L80k3ZUxz6uPuG5qa5UsEZQ6ykn8 4wPWK4AG2g/xBvmTMOSuq/JAFHmMGu7h+eDV8LwI= 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.10 026/103] xhci: Set HCD flag to defer primary roothub registration Date: Mon, 27 Sep 2021 19:01:58 +0200 Message-Id: <20210927170226.635557357@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210927170225.702078779@linuxfoundation.org> References: <20210927170225.702078779@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 @@ -693,6 +693,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");