Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp540937pxb; Wed, 25 Aug 2021 09:02:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz65s304PflAu89ymHCRSgUP27hB9Olo2ORg3irXKPxfK5hup/jj8ENPn8tD+HyrhgN0w/0 X-Received: by 2002:a05:6402:2794:: with SMTP id b20mr51263169ede.126.1629907371780; Wed, 25 Aug 2021 09:02:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629907371; cv=none; d=google.com; s=arc-20160816; b=sC7eWfCEUCOWLx+8AxormWW4Ulwct/cpwc7+j7NsJhuVkwBkls0+PqqMRCs/RtLU0u A7/KDAUyDy/rNtJbTT0w1+EbwfcdPYCoJgnCgUcHSUNoHqM0Pg1oDQLt8z2HYGaL9BES NqvbOYbgOZSXZvlOIN/LSZToz3ILIFG0d5642PxNH0JueLry4PC2pEKmP+L4TlwxRIKn zSVfoEFvS3CsLVA6miCx80xJtcce++JrdvZufiRXTUCnGRsySq18cVgM21AwUQL25L0V +6L6pr2Qgfzeqdzyv53UtTLF0O3WpsHKge5gqZCGW+KIqIkaVasRwixOZG06CLwZc2Sy Ku7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=nwh02xipkI1jnIdUSjsZH9g82cOygoChw7cSdHLzyPM=; b=cZPlGo8/ZhUgyC3byjNa0Rbg/M0SI31/W490sdrJGonVlzPY9lq1T+DeS0UMTz7bJt 8PJN2y2j+F6flPoJEXHn7QvwiVh0TJsMC+0xPrYdRz+XKrOJB4ylJzLs/ew9oyEXwLtr fNtBQI9/iF7pZxsMgPL+lGUtbR5TLGDNjCZR8UBxeVG4VeOM54HoWKvIl+9m1jZ5LF2a dneogaV5DBzHs0bk1QZz+cvmtNACuufkK1LK9h1IryyyUTNQExx20+KHRmwCwKpatb18 EvmumqL7VrFMEJffqYG4SaHnFQQ14R87HMC7djl/i6fF081LM8zpE6lPK8S78soZrOeE ulaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=B3RJA1MF; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dd8si193216ejc.405.2021.08.25.09.02.24; Wed, 25 Aug 2021 09:02:51 -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=@ti.com header.s=ti-com-17Q1 header.b=B3RJA1MF; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240947AbhHYOrv (ORCPT + 99 others); Wed, 25 Aug 2021 10:47:51 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:40114 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229553AbhHYOrv (ORCPT ); Wed, 25 Aug 2021 10:47:51 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 17PEkv8l092082; Wed, 25 Aug 2021 09:46:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1629902817; bh=nwh02xipkI1jnIdUSjsZH9g82cOygoChw7cSdHLzyPM=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=B3RJA1MFn55XH7ReR6dXKojzYFg0/e6BkrUx8NNrdxYSxPMIZ8L9KG9GLJo1nQ0EK M+GGg24XtTm+1zcmJ6kVJFN2GjWcHIByyE0O+v0Kw8cJxTcfptF1qCWvuFKlMNDARH pfsuS+f57rb3cO/fyDkX8mRZ/735ydgW+ha5ue5E= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 17PEkvuD068190 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 25 Aug 2021 09:46:57 -0500 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Wed, 25 Aug 2021 09:46:57 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2 via Frontend Transport; Wed, 25 Aug 2021 09:46:57 -0500 Received: from [10.250.232.42] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 17PEkrwO010426; Wed, 25 Aug 2021 09:46:54 -0500 Subject: Re: [PATCH 3/3] xhci: Set HCD flag to defer primary roothub registration To: Greg Kroah-Hartman , Mathias Nyman , Alan Stern CC: , , , References: <20210825105132.10420-1-kishon@ti.com> <20210825105132.10420-4-kishon@ti.com> From: Kishon Vijay Abraham I Message-ID: Date: Wed, 25 Aug 2021 20:16:53 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210825105132.10420-4-kishon@ti.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 25/08/21 4:21 pm, Kishon Vijay Abraham I wrote: > Set "HCD_FLAG_DEFER_PRI_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). > > Signed-off-by: Kishon Vijay Abraham I > Suggested-by: Mathias Nyman > --- > drivers/usb/host/xhci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c > index 3618070eba78..9b7d968022c8 100644 > --- a/drivers/usb/host/xhci.c > +++ b/drivers/usb/host/xhci.c > @@ -644,7 +644,6 @@ int xhci_run(struct usb_hcd *hcd) > /* Start the xHCI host controller running only after the USB 2.0 roothub > * is setup. > */ > - I just realized I've left a spurious space here. While fixing Alan's comment, I'll fix this one. Regards, Kishon > hcd->uses_new_polling = 1; > if (!usb_hcd_is_primary_hcd(hcd)) > return xhci_run_finished(xhci); > @@ -692,6 +691,7 @@ int xhci_run(struct usb_hcd *hcd) > if (ret) > xhci_free_command(xhci, command); > } > + set_bit(HCD_FLAG_DEFER_PRI_RH_REGISTER, &hcd->flags); > xhci_dbg_trace(xhci, trace_xhci_dbg_init, > "Finished xhci_run for USB2 roothub"); > >