Re: [PATCH] usb: gadget: Move USB_GADGET_DUALSPEED to be slightly more visible
On 3/21/26 6:34 PM, Tom Rini wrote: On Sat, Mar 21, 2026 at 02:53:13AM +0100, Marek Vasut wrote: On 3/20/26 2:53 PM, Tom Rini wrote: [...] @@ -371,3 +367,11 @@ config SPL_SDP_USB_DEV so it can be used in compiled environment. endif # SPL_USB_GADGET + +if USB_GADGET || SPL_USB_GADGET + +# Selected by UDC drivers that support high-speed operation. +config USB_GADGET_DUALSPEED + bool + +endif " You don't need to guard hidden symbols. We also do not want to expose this Kconfig symbol unless it makes sense to expose it ? In fact, if the symbol is not available and someone attempts to use it in Kconfig, they would get a warning, which should provide a clue that they are doing something wrong ? It's a hidden symbol, so it's not exposed to the user. The problem is that today someone is getting it wrong as you suggest but it's hard to trigger a warning over it. That said, your patch also fixes the problem, so: Reviewed-by: Tom Rini Can you send that as a V2 please ? Thank you
Re: [PATCH] usb: gadget: Move USB_GADGET_DUALSPEED to be slightly more visible
On Sat, Mar 21, 2026 at 02:53:13AM +0100, Marek Vasut wrote: > On 3/20/26 2:53 PM, Tom Rini wrote: > > [...] > > > > @@ -371,3 +367,11 @@ config SPL_SDP_USB_DEV > > >so it can be used in compiled environment. > > > > > > endif # SPL_USB_GADGET > > > + > > > +if USB_GADGET || SPL_USB_GADGET > > > + > > > +# Selected by UDC drivers that support high-speed operation. > > > +config USB_GADGET_DUALSPEED > > > + bool > > > + > > > +endif > > > " > > > > You don't need to guard hidden symbols. > > We also do not want to expose this Kconfig symbol unless it makes sense to > expose it ? In fact, if the symbol is not available and someone attempts to > use it in Kconfig, they would get a warning, which should provide a clue > that they are doing something wrong ? It's a hidden symbol, so it's not exposed to the user. The problem is that today someone is getting it wrong as you suggest but it's hard to trigger a warning over it. That said, your patch also fixes the problem, so: Reviewed-by: Tom Rini -- Tom signature.asc Description: PGP signature
Re: [PATCH] usb: gadget: Move USB_GADGET_DUALSPEED to be slightly more visible
On 3/20/26 2:53 PM, Tom Rini wrote: [...] @@ -371,3 +367,11 @@ config SPL_SDP_USB_DEV so it can be used in compiled environment. endif # SPL_USB_GADGET + +if USB_GADGET || SPL_USB_GADGET + +# Selected by UDC drivers that support high-speed operation. +config USB_GADGET_DUALSPEED + bool + +endif " You don't need to guard hidden symbols. We also do not want to expose this Kconfig symbol unless it makes sense to expose it ? In fact, if the symbol is not available and someone attempts to use it in Kconfig, they would get a warning, which should provide a clue that they are doing something wrong ?
Re: [PATCH] usb: gadget: Move USB_GADGET_DUALSPEED to be slightly more visible
On Thu, Mar 19, 2026 at 06:57:21PM +0100, Marek Vasut wrote: > On 3/19/26 2:39 PM, Tom Rini wrote: > > On Thu, Mar 19, 2026 at 01:50:56AM +0100, Marek Vasut wrote: > > > On 3/18/26 2:26 AM, Tom Rini wrote: > > > > On Tue, Mar 17, 2026 at 08:42:06PM +0100, Marek Vasut wrote: > > > > > On 3/17/26 2:41 PM, Tom Rini wrote: > > > > > > On Tue, Mar 17, 2026 at 03:34:36AM +0100, Marek Vasut wrote: > > > > > > > On 3/17/26 2:24 AM, Tom Rini wrote: > > > > > > > > As exposed by "make randconfig", we have an issue around > > > > > > > > USB_GADGET_DUALSPEED. It is possible to select this symbol (via > > > > > > > > SPL_USB_CDNS3_GADGET for example) and so have an unmet > > > > > > > > dependency. As > > > > > > > > this is a hidden symbol, move it up within the menu. > > > > > > > What is the issue this is fixing ? > > > > > > > > > > > > Valid configs causing the kconfig part of the build system to note > > > > > > unmet dependencies. > > > > > Lemme rephrase, is this actually a fix, or is this some > > > > > readability/ordering > > > > > improvement patch ? > > > > > > > > Yes, it's a fix because randconfig finds problems that users may stumble > > > > on to while trying to make a valid config for a platform. > > > > > > Is the commit message telling me, that "config USB_GADGET_DUALSPEED" is > > > moved outside of the "if USB_GADGET" block ? > > > > > > Because if this is something else, and the symbols are simply reordered, > > > that I do not understand how this could be fixing anything. > > > > I'm unclear what else you need to know to take this bugfix. The symbol > > is not placed correctly, leading to possibly unmet dependency errors. > > Why do you think the symbol is placed incorrectly ? Because we wouldn't get a Kconfig unmet dependency error if it was correctly placed. > What this change does, is it moves "config USB_GADGET_DUALSPEED" outside of > the "if USB_GADGET" block in drivers/usb/gadget/Kconfig , which the commit > message should clearly spell out. I could reword "As this is a hidden symbol, move it up within the menu." more, sure. > However , I believe that is not the correct fix. The USB_GADGET_DUALSPEED > has to be available only if USB_GADGET or SPL_USB_GADGET is selected, the > former is already satisfied, the later is not and the SPL_USB_CDNS3_GADGET > triggers a problem here. I think this is the correct fix: > > " > diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig > index ebb306852a6..87d17780c45 100644 > --- a/drivers/usb/gadget/Kconfig > +++ b/drivers/usb/gadget/Kconfig > @@ -178,10 +178,6 @@ config SDP_LOADADDR > hex "Default load address at SDP_WRITE and SDP_JUMP" > default 0x0 > > -# Selected by UDC drivers that support high-speed operation. > -config USB_GADGET_DUALSPEED > - bool > - > config USB_GADGET_DOWNLOAD > bool "Enable USB download gadget" > help > @@ -371,3 +367,11 @@ config SPL_SDP_USB_DEV > so it can be used in compiled environment. > > endif # SPL_USB_GADGET > + > +if USB_GADGET || SPL_USB_GADGET > + > +# Selected by UDC drivers that support high-speed operation. > +config USB_GADGET_DUALSPEED > + bool > + > +endif > " You don't need to guard hidden symbols. But this also probably also works, so yes, please post that as a proper patch and I'll go Changes Requested mine. > > Yes, the error is discovered by randconfig which makes it harder to > > describe how exactly to reproduce it (but I believe it does), but that > > doesn't make it any less valid. > This part is not relevant. Well it's been unclear to me what you do and don't see as a valid problem with this and the other patch. -- Tom signature.asc Description: PGP signature
Re: [PATCH] usb: gadget: Move USB_GADGET_DUALSPEED to be slightly more visible
On 3/19/26 2:39 PM, Tom Rini wrote: On Thu, Mar 19, 2026 at 01:50:56AM +0100, Marek Vasut wrote: On 3/18/26 2:26 AM, Tom Rini wrote: On Tue, Mar 17, 2026 at 08:42:06PM +0100, Marek Vasut wrote: On 3/17/26 2:41 PM, Tom Rini wrote: On Tue, Mar 17, 2026 at 03:34:36AM +0100, Marek Vasut wrote: On 3/17/26 2:24 AM, Tom Rini wrote: As exposed by "make randconfig", we have an issue around USB_GADGET_DUALSPEED. It is possible to select this symbol (via SPL_USB_CDNS3_GADGET for example) and so have an unmet dependency. As this is a hidden symbol, move it up within the menu. What is the issue this is fixing ? Valid configs causing the kconfig part of the build system to note unmet dependencies. Lemme rephrase, is this actually a fix, or is this some readability/ordering improvement patch ? Yes, it's a fix because randconfig finds problems that users may stumble on to while trying to make a valid config for a platform. Is the commit message telling me, that "config USB_GADGET_DUALSPEED" is moved outside of the "if USB_GADGET" block ? Because if this is something else, and the symbols are simply reordered, that I do not understand how this could be fixing anything. I'm unclear what else you need to know to take this bugfix. The symbol is not placed correctly, leading to possibly unmet dependency errors. Why do you think the symbol is placed incorrectly ? What this change does, is it moves "config USB_GADGET_DUALSPEED" outside of the "if USB_GADGET" block in drivers/usb/gadget/Kconfig , which the commit message should clearly spell out. However , I believe that is not the correct fix. The USB_GADGET_DUALSPEED has to be available only if USB_GADGET or SPL_USB_GADGET is selected, the former is already satisfied, the later is not and the SPL_USB_CDNS3_GADGET triggers a problem here. I think this is the correct fix: " diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index ebb306852a6..87d17780c45 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -178,10 +178,6 @@ config SDP_LOADADDR hex "Default load address at SDP_WRITE and SDP_JUMP" default 0x0 -# Selected by UDC drivers that support high-speed operation. -config USB_GADGET_DUALSPEED - bool - config USB_GADGET_DOWNLOAD bool "Enable USB download gadget" help @@ -371,3 +367,11 @@ config SPL_SDP_USB_DEV so it can be used in compiled environment. endif # SPL_USB_GADGET + +if USB_GADGET || SPL_USB_GADGET + +# Selected by UDC drivers that support high-speed operation. +config USB_GADGET_DUALSPEED + bool + +endif " Yes, the error is discovered by randconfig which makes it harder to describe how exactly to reproduce it (but I believe it does), but that doesn't make it any less valid. This part is not relevant.
Re: [PATCH] usb: gadget: Move USB_GADGET_DUALSPEED to be slightly more visible
On Thu, Mar 19, 2026 at 01:50:56AM +0100, Marek Vasut wrote: > On 3/18/26 2:26 AM, Tom Rini wrote: > > On Tue, Mar 17, 2026 at 08:42:06PM +0100, Marek Vasut wrote: > > > On 3/17/26 2:41 PM, Tom Rini wrote: > > > > On Tue, Mar 17, 2026 at 03:34:36AM +0100, Marek Vasut wrote: > > > > > On 3/17/26 2:24 AM, Tom Rini wrote: > > > > > > As exposed by "make randconfig", we have an issue around > > > > > > USB_GADGET_DUALSPEED. It is possible to select this symbol (via > > > > > > SPL_USB_CDNS3_GADGET for example) and so have an unmet dependency. > > > > > > As > > > > > > this is a hidden symbol, move it up within the menu. > > > > > What is the issue this is fixing ? > > > > > > > > Valid configs causing the kconfig part of the build system to note > > > > unmet dependencies. > > > Lemme rephrase, is this actually a fix, or is this some > > > readability/ordering > > > improvement patch ? > > > > Yes, it's a fix because randconfig finds problems that users may stumble > > on to while trying to make a valid config for a platform. > > Is the commit message telling me, that "config USB_GADGET_DUALSPEED" is > moved outside of the "if USB_GADGET" block ? > > Because if this is something else, and the symbols are simply reordered, > that I do not understand how this could be fixing anything. I'm unclear what else you need to know to take this bugfix. The symbol is not placed correctly, leading to possibly unmet dependency errors. Yes, the error is discovered by randconfig which makes it harder to describe how exactly to reproduce it (but I believe it does), but that doesn't make it any less valid. We'll probably never hit the level of support the kernel has, which is all randconfigs compile and link (and usually even run), but we should at least be able to clear out most/all of the Kconfig issues that can be caught at parse time in a month or two, and maybe even this year have most CONFIG_SANDBOX=y results build (excluding drivers not fully configured by Kconfig). And this matters for real users because it means that downstream developers can probably configure a build rather than get stuck with odd errors. -- Tom signature.asc Description: PGP signature
Re: [PATCH] usb: gadget: Move USB_GADGET_DUALSPEED to be slightly more visible
On 3/18/26 2:26 AM, Tom Rini wrote: On Tue, Mar 17, 2026 at 08:42:06PM +0100, Marek Vasut wrote: On 3/17/26 2:41 PM, Tom Rini wrote: On Tue, Mar 17, 2026 at 03:34:36AM +0100, Marek Vasut wrote: On 3/17/26 2:24 AM, Tom Rini wrote: As exposed by "make randconfig", we have an issue around USB_GADGET_DUALSPEED. It is possible to select this symbol (via SPL_USB_CDNS3_GADGET for example) and so have an unmet dependency. As this is a hidden symbol, move it up within the menu. What is the issue this is fixing ? Valid configs causing the kconfig part of the build system to note unmet dependencies. Lemme rephrase, is this actually a fix, or is this some readability/ordering improvement patch ? Yes, it's a fix because randconfig finds problems that users may stumble on to while trying to make a valid config for a platform. Is the commit message telling me, that "config USB_GADGET_DUALSPEED" is moved outside of the "if USB_GADGET" block ? Because if this is something else, and the symbols are simply reordered, that I do not understand how this could be fixing anything.
Re: [PATCH] usb: gadget: Move USB_GADGET_DUALSPEED to be slightly more visible
On Tue, Mar 17, 2026 at 08:42:06PM +0100, Marek Vasut wrote: > On 3/17/26 2:41 PM, Tom Rini wrote: > > On Tue, Mar 17, 2026 at 03:34:36AM +0100, Marek Vasut wrote: > > > On 3/17/26 2:24 AM, Tom Rini wrote: > > > > As exposed by "make randconfig", we have an issue around > > > > USB_GADGET_DUALSPEED. It is possible to select this symbol (via > > > > SPL_USB_CDNS3_GADGET for example) and so have an unmet dependency. As > > > > this is a hidden symbol, move it up within the menu. > > > What is the issue this is fixing ? > > > > Valid configs causing the kconfig part of the build system to note > > unmet dependencies. > Lemme rephrase, is this actually a fix, or is this some readability/ordering > improvement patch ? Yes, it's a fix because randconfig finds problems that users may stumble on to while trying to make a valid config for a platform. -- Tom signature.asc Description: PGP signature
Re: [PATCH] usb: gadget: Move USB_GADGET_DUALSPEED to be slightly more visible
On 3/17/26 2:41 PM, Tom Rini wrote: On Tue, Mar 17, 2026 at 03:34:36AM +0100, Marek Vasut wrote: On 3/17/26 2:24 AM, Tom Rini wrote: As exposed by "make randconfig", we have an issue around USB_GADGET_DUALSPEED. It is possible to select this symbol (via SPL_USB_CDNS3_GADGET for example) and so have an unmet dependency. As this is a hidden symbol, move it up within the menu. What is the issue this is fixing ? Valid configs causing the kconfig part of the build system to note unmet dependencies. Lemme rephrase, is this actually a fix, or is this some readability/ordering improvement patch ?
Re: [PATCH] usb: gadget: Move USB_GADGET_DUALSPEED to be slightly more visible
On Tue, Mar 17, 2026 at 03:34:36AM +0100, Marek Vasut wrote: > On 3/17/26 2:24 AM, Tom Rini wrote: > > As exposed by "make randconfig", we have an issue around > > USB_GADGET_DUALSPEED. It is possible to select this symbol (via > > SPL_USB_CDNS3_GADGET for example) and so have an unmet dependency. As > > this is a hidden symbol, move it up within the menu. > What is the issue this is fixing ? Valid configs causing the kconfig part of the build system to note unmet dependencies. -- Tom signature.asc Description: PGP signature
Re: [PATCH] usb: gadget: Move USB_GADGET_DUALSPEED to be slightly more visible
On 3/17/26 2:24 AM, Tom Rini wrote: As exposed by "make randconfig", we have an issue around USB_GADGET_DUALSPEED. It is possible to select this symbol (via SPL_USB_CDNS3_GADGET for example) and so have an unmet dependency. As this is a hidden symbol, move it up within the menu. What is the issue this is fixing ?
[PATCH] usb: gadget: Move USB_GADGET_DUALSPEED to be slightly more visible
As exposed by "make randconfig", we have an issue around USB_GADGET_DUALSPEED. It is possible to select this symbol (via SPL_USB_CDNS3_GADGET for example) and so have an unmet dependency. As this is a hidden symbol, move it up within the menu. Signed-off-by: Tom Rini --- Cc: Mattijs Korpershoek Cc: Marek Vasut --- drivers/usb/gadget/Kconfig | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index baa2eb61ea33..a36be818a68c 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -44,6 +44,10 @@ config SPL_USB_GADGET Enable USB Gadget API which allows to enable USB device functions in SPL. +# Selected by UDC drivers that support high-speed operation. +config USB_GADGET_DUALSPEED + bool + if USB_GADGET config USB_GADGET_MANUFACTURER @@ -179,10 +183,6 @@ config SDP_LOADADDR hex "Default load address at SDP_WRITE and SDP_JUMP" default 0x0 -# Selected by UDC drivers that support high-speed operation. -config USB_GADGET_DUALSPEED - bool - config USB_GADGET_DOWNLOAD bool "Enable USB download gadget" help -- 2.43.0

