From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: <gregkh@linuxfoundation.org>
Cc: <linux-usb@vger.kernel.org>,
Mathias Nyman <mathias.nyman@linux.intel.com>
Subject: [PATCH 1/1] xhci: Don't defer primary roothub registration if there is only one roothub
Date: Mon, 16 May 2022 12:48:50 +0300 [thread overview]
Message-ID: <20220516094850.19788-2-mathias.nyman@linux.intel.com> (raw)
In-Reply-To: <20220516094850.19788-1-mathias.nyman@linux.intel.com>
The support for xHCI controllers with only one roothub, and the code
to defer primary roothub registation until second roothub got merged
to usb-next for 5.19 at the same time.
commit 873f323618c2 ("xhci: prepare for operation w/o shared hcd")
commit b7a4f9b5d0e4 ("xhci: Set HCD flag to defer primary roothub
registration")
These got merged in such a way that the flag to defer primary roothub
registration is set even for xHC controllers with just one roothub.
Fix this by setting the defer flag in a codepath taken only if we have
two roothubs
Fixes: 873f323618c2 ("xhci: prepare for operation w/o shared hcd")
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
---
drivers/usb/host/xhci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index d957eac59ab3..f0ab63138016 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -696,8 +696,6 @@ int xhci_run(struct usb_hcd *hcd)
xhci_dbg_trace(xhci, trace_xhci_dbg_init,
"Finished %s for main hcd", __func__);
- set_bit(HCD_FLAG_DEFER_RH_REGISTER, &hcd->flags);
-
xhci_create_dbc_dev(xhci);
xhci_debugfs_init(xhci);
@@ -705,6 +703,8 @@ int xhci_run(struct usb_hcd *hcd)
if (xhci_has_one_roothub(xhci))
return xhci_run_finished(xhci);
+ set_bit(HCD_FLAG_DEFER_RH_REGISTER, &hcd->flags);
+
return 0;
}
EXPORT_SYMBOL_GPL(xhci_run);
--
2.25.1
next prev parent reply other threads:[~2022-05-16 9:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-16 9:48 [PATCH 0/1] fix xhci feature merge issue in current usb-next Mathias Nyman
2022-05-16 9:48 ` Mathias Nyman [this message]
2022-05-19 16:10 ` Greg KH
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220516094850.19788-2-mathias.nyman@linux.intel.com \
--to=mathias.nyman@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.