Regression/bug in U-Boot USB ID vs mainline

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Regression/bug in U-Boot USB ID vs mainline

Jump to solution
321 Views
fd
Contributor III

Hello,

`commit a5c91319731f ("MLK-25803-2: Update VID/PID")`, in U-Boot lf-6.18.20-2.0.0 branch,  introduces a regression in any user of USB.

It forces a hard-coded USB product ID, instead of taking the value from the configuration. This is breaking any board that is using a different value from 0x0151.

The issue is happening when using this U-Boot branch with non-NXP boards (using NXP SoC).

 

This value needs to come from the configuration, and not be hard-coded.

 

The following patch fixes the problem, can you apply it to your branch?

```

diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c
index 165cc82d9c72..46e26d138cf9 100644
--- a/arch/arm/mach-imx/spl.c
+++ b/arch/arm/mach-imx/spl.c
@@ -199,7 +199,7 @@ int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name)
snprintf(serial_string, sizeof(serial_string), "%08x%08x", serialnr.high, serialnr.low);
g_dnl_set_serialnumber(serial_string);
#endif
- put_unaligned(0x0151, &dev->idProduct);
+ put_unaligned(CONFIG_USB_GADGET_PRODUCT_NUM + 0xfff, &dev->idProduct);

return 0;
}

```

 

 

0 Kudos
Reply
1 Solution
37 Views
simonatoaca
NXP Employee
NXP Employee

Hello,

A fix was pushed, so the issue should be resolved starting with our Q3 RC2 2026 release.

 

Simona

View solution in original post

0 Kudos
Reply
5 Replies
38 Views
simonatoaca
NXP Employee
NXP Employee

Hello,

A fix was pushed, so the issue should be resolved starting with our Q3 RC2 2026 release.

 

Simona

0 Kudos
Reply
261 Views
Oswalag
NXP TechSupport
NXP TechSupport

Hello, 

The change was intentional, 

VID 0x525 and PID 0xa4a5 already registered as PLX Technology, Inc.

Linux-USB File-backed Storage Gadget

But fastboot device is not mass storage devices windowns 10 latest update already cached above vid/pid

Change to use Freescale VID 0x1fc9

PID 0x151, for SPL SDP HID download

PID 0x152, for Fastboot

PID 0x153, for Kernel fastboot

 

Need update uuu above 1.4.182 

0 Kudos
Reply
249 Views
fd
Contributor III

The issue is not your specific NXP needs that you just described. The issue is that hard coding the number in the code is preventing any user to configure it from the kconfig, as it is designed to be and effectively creating a regression.

That change is disregarding any existing user that has a different need, actively breaking working use cases. Just grep for CONFIG_USB_GADGET_PRODUCT_NUM in the code and you'll see the multiple use cases this is breaking.

You need to have a different solution that is not introducing a regression.

0 Kudos
Reply
104 Views
Oswalag
NXP TechSupport
NXP TechSupport

Hello, 

I will inform the internal team of this so they will check if the patch is needed for the next release, at this moment you can implement your workaround. 

 

Regards.

0 Kudos
Reply
44 Views
fd
Contributor III

> I will inform the internal team of this so they will check if the patch is needed for the next release, at this moment you can implement your workaround. 

 

This is not working for us.

We are implementing multiple fixes on your branch, and this one is just an example.

We need a feedback from the developer if they are going to accept this patch or solve the issue in a different way. Sending patches and fixes and getting no feedback and having to wait to some future release, in which we will not even be notified on the decision, is not an effective way to collaborate.

 

Can you please advise on a different way to move this forward? Thanks,

Francesco

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2404609%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERegression%2Fbug%20in%20U-Boot%20USB%20ID%20vs%20mainline%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2404609%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%60commit%20a5c91319731f%20(%22MLK-25803-2%3A%20Update%20VID%2FPID%22)%60%2C%20in%20U-Boot%26nbsp%3Blf-6.18.20-2.0.0%20branch%2C%26nbsp%3B%20introduces%20a%20regression%20in%20any%20user%20of%20USB.%3C%2FP%3E%3CP%3EIt%20forces%20a%20hard-coded%20USB%20product%20ID%2C%20instead%20of%20taking%20the%20value%20from%20the%20configuration.%20This%20is%20breaking%20any%20board%20that%20is%20using%20a%20different%20value%20from%200x0151.%3C%2FP%3E%3CP%3EThe%20issue%20is%20happening%20when%20using%20this%20U-Boot%20branch%20with%20non-NXP%20boards%20(using%20NXP%20SoC).%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThis%20value%20needs%20to%20come%20from%20the%20configuration%2C%20and%20not%20be%20hard-coded.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThe%20following%20patch%20fixes%20the%20problem%2C%20can%20you%20apply%20it%20to%20your%20branch%3F%3C%2FP%3E%3CP%3E%60%60%60%3C%2FP%3E%3CP%3Ediff%20--git%20a%2Farch%2Farm%2Fmach-imx%2Fspl.c%20b%2Farch%2Farm%2Fmach-imx%2Fspl.c%3CBR%20%2F%3Eindex%20165cc82d9c72..46e26d138cf9%20100644%3CBR%20%2F%3E---%20a%2Farch%2Farm%2Fmach-imx%2Fspl.c%3CBR%20%2F%3E%2B%2B%2B%20b%2Farch%2Farm%2Fmach-imx%2Fspl.c%3CBR%20%2F%3E%40%40%20-199%2C7%20%2B199%2C7%20%40%40%20int%20g_dnl_bind_fixup(struct%20usb_device_descriptor%20*dev%2C%20const%20char%20*name)%3CBR%20%2F%3Esnprintf(serial_string%2C%20sizeof(serial_string)%2C%20%22%2508x%2508x%22%2C%20serialnr.high%2C%20serialnr.low)%3B%3CBR%20%2F%3Eg_dnl_set_serialnumber(serial_string)%3B%3CBR%20%2F%3E%23endif%3CBR%20%2F%3E-%20put_unaligned(0x0151%2C%20%26amp%3Bdev-%26gt%3BidProduct)%3B%3CBR%20%2F%3E%2B%20put_unaligned(CONFIG_USB_GADGET_PRODUCT_NUM%20%2B%200xfff%2C%20%26amp%3Bdev-%26gt%3BidProduct)%3B%3CBR%20%2F%3E%3CBR%20%2F%3Ereturn%200%3B%3CBR%20%2F%3E%7D%3C%2FP%3E%3CP%3E%60%60%60%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2405152%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Regression%2Fbug%20in%20U-Boot%20USB%20ID%20vs%20mainline%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2405152%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThe%20issue%20is%20not%20your%20specific%20NXP%20needs%20that%20you%20just%20described.%20The%20issue%20is%20that%20hard%20coding%20the%20number%20in%20the%20code%20is%20preventing%20any%20user%20to%20configure%20it%20from%20the%20kconfig%2C%20as%20it%20is%20designed%20to%20be%20and%20effectively%20creating%20a%20regression.%3CBR%20%2F%3E%3CBR%20%2F%3EThat%20change%20is%20disregarding%20any%20existing%20user%20that%20has%20a%20different%20need%2C%20actively%20breaking%20working%20use%20cases.%20Just%20grep%20for%20CONFIG_USB_GADGET_PRODUCT_NUM%20in%20the%20code%20and%20you'll%20see%20the%20multiple%20use%20cases%20this%20is%20breaking.%3C%2FP%3E%3CP%3EYou%20need%20to%20have%20a%20different%20solution%20that%20is%20not%20introducing%20a%20regression.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2405035%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Regression%2Fbug%20in%20U-Boot%20USB%20ID%20vs%20mainline%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2405035%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20change%20was%20intentional%2C%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EVID%200x525%20and%20PID%200xa4a5%20already%20registered%20as%20PLX%20Technology%2C%20Inc.%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ELinux-USB%20File-backed%20Storage%20Gadget%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EBut%20fastboot%20device%20is%20not%20mass%20storage%20devices%20windowns%2010%20latest%20update%20already%20cached%20above%20vid%2Fpid%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EChange%20to%20use%20Freescale%20VID%200x1fc9%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EPID%200x151%2C%20for%20SPL%20SDP%20HID%20download%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EPID%200x152%2C%20for%20Fastboot%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EPID%200x153%2C%20for%20Kernel%20fastboot%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%3ENeed%20update%20uuu%20above%201.4.182%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2407878%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Regression%2Fbug%20in%20U-Boot%20USB%20ID%20vs%20mainline%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2407878%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20will%20inform%20the%20internal%20team%20of%20this%20so%20they%20will%20check%20if%20the%20patch%20is%20needed%20for%20the%20next%20release%2C%20at%20this%20moment%20you%20can%20implement%20your%20workaround.%26nbsp%3B%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ERegards.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2409544%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Regression%2Fbug%20in%20U-Boot%20USB%20ID%20vs%20mainline%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2409544%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%26gt%3B%26nbsp%3BI%20will%20inform%20the%20internal%20team%20of%20this%20so%20they%20will%20check%20if%20the%20patch%20is%20needed%20for%20the%20next%20release%2C%20at%20this%20moment%20you%20can%20implement%20your%20workaround.%26nbsp%3B%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThis%20is%20not%20working%20for%20us.%3C%2FP%3E%3CP%3EWe%20are%20implementing%20multiple%20fixes%20on%20your%20branch%2C%20and%20this%20one%20is%20just%20an%20example.%3C%2FP%3E%3CP%3EWe%20need%20a%20feedback%20from%20the%20developer%20if%20they%20are%20going%20to%20accept%20this%20patch%20or%20solve%20the%20issue%20in%20a%20different%20way.%20Sending%20patches%20and%20fixes%20and%20getting%20no%20feedback%20and%20having%20to%20wait%20to%20some%20future%20release%2C%20in%20which%20we%20will%20not%20even%20be%20notified%20on%20the%20decision%2C%20is%20not%20an%20effective%20way%20to%20collaborate.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3ECan%20you%20please%20advise%20on%20a%20different%20way%20to%20move%20this%20forward%3F%20Thanks%2C%3C%2FP%3E%3CP%3EFrancesco%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2409648%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Regression%2Fbug%20in%20U-Boot%20USB%20ID%20vs%20mainline%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2409648%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CP%3EA%20fix%20was%20pushed%2C%20so%20the%20issue%20should%20be%20resolved%20starting%20with%20our%20Q3%20RC2%202026%20release.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ESimona%3C%2FP%3E%3C%2FLINGO-BODY%3E