Re: [PATCH v2 3/3] usb: chipidea: core: convert ci_role_switch to local variable
From: Xu Yang
Date: Mon Apr 27 2026 - 03:45:28 EST
On Sun, Apr 26, 2026 at 10:29:44PM +0200, Greg KH wrote:
> On Thu, Apr 23, 2026 at 06:20:02PM +0800, Xu Yang wrote:
> > When a system contains multiple USB controllers, the global ci_role_switch
> > variable may be overwritten by subsequent driver initialization code.
> >
> > This can cause issues in the following cases:
> > - The 2nd ci_hdrc_probe() sees ci_role_switch.fwnode as non-NULL even
> > though the "usb-role-switch" property is not present for the controller.
> > - When the ci_hdrc device is unbound and bound again, ci_role_switch
> > fwnode will not be reassigned, and the old value will be used instead.
> >
> > Convert ci_role_switch to a local variable to fix these issues.
> >
> > Fixes: 05559f10ed79 ("usb: chipidea: add role switch class support")
> > Cc: stable@xxxxxxxxxxxxxxx
> > Acked-by: Peter Chen <peter.chen@xxxxxxxxxx>
> > Reviewed-by: Frank Li <Frank.Li@xxxxxxx>
> > Signed-off-by: Xu Yang <xu.yang_2@xxxxxxx>
>
> You can not have patch 3 out of 3 be only for stable kernels. Please
> break this up into 2 different patch series, one for bugfixes to go to
> 7.1-final, and the other for new stuff for 7.2-rc1.
OK. Will do.
Thanks,
Xu Yang