archive mirror
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <>
To: Greg Kroah-Hartman <>,
	Mathias Nyman <>,
	Alan Stern <>
Cc: <>, <>,
	Kishon Vijay Abraham I <>, <>
Subject: [PATCH v4 2/3] xhci: Set HCD flag to defer primary roothub registration
Date: Thu, 9 Sep 2021 12:11:59 +0530	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

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: # 5.4+
Signed-off-by: Kishon Vijay Abraham I <>
Suggested-by: Mathias Nyman <>
Tested-by: Chris Chiu <>
 drivers/usb/host/xhci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 3618070eba78..7176058c7f3e 100644
--- 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");

  parent reply	other threads:[~2021-09-09  6:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-09  6:41 [PATCH v4 0/3] Fix cold plugged USB device on certain PCIe USB cards Kishon Vijay Abraham I
2021-09-09  6:41 ` [PATCH v4 1/3] usb: core: hcd: Add support for deferring roothub registration Kishon Vijay Abraham I
2021-09-09 14:31   ` Alan Stern
2021-09-09  6:41 ` Kishon Vijay Abraham I [this message]
2021-09-09  6:42 ` [PATCH v4 3/3] usb: core: hcd: Modularize HCD stop configuration in usb_stop_hcd() Kishon Vijay Abraham I

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).