All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] fix xhci feature merge issue in current usb-next
@ 2022-05-16  9:48 Mathias Nyman
  2022-05-16  9:48 ` [PATCH 1/1] xhci: Don't defer primary roothub registration if there is only one roothub Mathias Nyman
  2022-05-19 16:10 ` [PATCH 0/1] fix xhci feature merge issue in current usb-next Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Mathias Nyman @ 2022-05-16  9:48 UTC (permalink / raw)
  To: gregkh; +Cc: linux-usb, Mathias Nyman

Hi Greg

Two different conflicting features touching xhci got into current usb-next
for 5.19

One adds support for xHC hosts with just one roothub,
second adds support to defer first roothub registration until second
roothub is added.

commit 873f323618c2 ("xhci: prepare for operation w/o shared hcd")
commit b7a4f9b5d0e4 ("xhci: Set HCD flag to defer primary roothub
registration")

We ended up trying to defer roothub registratinog for xHC with just one
roothub.

This patch fixes the issue and goes on top of current usb-next

This patch shouldn't be needed for stable as the new feature to support
one roothub xHC isn't marked for stable either, but setting Fixes flag
in case someone later picks it up for stable.

Mathias Nyman (1):
  xhci: Don't defer primary roothub registration if there is only one
    roothub

 drivers/usb/host/xhci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/1] xhci: Don't defer primary roothub registration if there is only one roothub
  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
  2022-05-19 16:10 ` [PATCH 0/1] fix xhci feature merge issue in current usb-next Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Mathias Nyman @ 2022-05-16  9:48 UTC (permalink / raw)
  To: gregkh; +Cc: linux-usb, Mathias Nyman

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 0/1] fix xhci feature merge issue in current usb-next
  2022-05-16  9:48 [PATCH 0/1] fix xhci feature merge issue in current usb-next Mathias Nyman
  2022-05-16  9:48 ` [PATCH 1/1] xhci: Don't defer primary roothub registration if there is only one roothub Mathias Nyman
@ 2022-05-19 16:10 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2022-05-19 16:10 UTC (permalink / raw)
  To: Mathias Nyman; +Cc: linux-usb

On Mon, May 16, 2022 at 12:48:49PM +0300, Mathias Nyman wrote:
> Hi Greg
> 
> Two different conflicting features touching xhci got into current usb-next
> for 5.19
> 
> One adds support for xHC hosts with just one roothub,
> second adds support to defer first roothub registration until second
> roothub is added.
> 
> commit 873f323618c2 ("xhci: prepare for operation w/o shared hcd")
> commit b7a4f9b5d0e4 ("xhci: Set HCD flag to defer primary roothub
> registration")
> 
> We ended up trying to defer roothub registratinog for xHC with just one
> roothub.
> 
> This patch fixes the issue and goes on top of current usb-next
> 
> This patch shouldn't be needed for stable as the new feature to support
> one roothub xHC isn't marked for stable either, but setting Fixes flag
> in case someone later picks it up for stable.
> 
> Mathias Nyman (1):
>   xhci: Don't defer primary roothub registration if there is only one
>     roothub
> 
>  drivers/usb/host/xhci.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Sorry about the merge issue, now queued up, thanks!

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-19 16:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-16  9:48 [PATCH 0/1] fix xhci feature merge issue in current usb-next Mathias Nyman
2022-05-16  9:48 ` [PATCH 1/1] xhci: Don't defer primary roothub registration if there is only one roothub Mathias Nyman
2022-05-19 16:10 ` [PATCH 0/1] fix xhci feature merge issue in current usb-next Greg KH

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.