[PATCH v4 05/10] usb: f_sdp: Update SDP driver to support PQC container
    alice.guo at oss.nxp.com 
    alice.guo at oss.nxp.com
       
    Tue Oct 28 03:46:26 CET 2025
    
    
  
From: Ye Li <ye.li at nxp.com>
Since PQC container has changed version to 0x2 in container header,
update the header's check.
Signed-off-by: Ye Li <ye.li at nxp.com>
Signed-off-by: Alice Guo <alice.guo at nxp.com>
Acked-by: Peng Fan <peng.fan at nxp.com>
Reviewed-by: Jacky Bai <ping.bai at nxp.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek at kernel.org>
---
 drivers/usb/gadget/f_sdp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/f_sdp.c b/drivers/usb/gadget/f_sdp.c
index 647001d8dd0..f72e27028b7 100644
--- a/drivers/usb/gadget/f_sdp.c
+++ b/drivers/usb/gadget/f_sdp.c
@@ -765,7 +765,7 @@ static ulong search_container_header(ulong p, int size)
 
 	for (i = 0; i < size; i += 4) {
 		hdr = (u8 *)(p + i);
-		if (*(hdr + 3) == 0x87 && *hdr == 0)
+		if (*(hdr + 3) == 0x87 && (*hdr == 0 || *hdr == 2))
 			if (*(hdr + 1) != 0 || *(hdr + 2) != 0)
 				return p + i;
 	}
-- 
2.43.0
    
    
More information about the U-Boot
mailing list