From: Ye Li Date: Tue, 28 Oct 2025 02:46:26 +0000 (+0800) Subject: usb: f_sdp: Update SDP driver to support PQC container X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=30c482fe6e63920b7620e32b933664359a0f1b54;p=thirdparty%2Fu-boot.git usb: f_sdp: Update SDP driver to support PQC container Since PQC container has changed version to 0x2 in container header, update the header's check. Signed-off-by: Ye Li Signed-off-by: Alice Guo Acked-by: Peng Fan Reviewed-by: Jacky Bai Reviewed-by: Mattijs Korpershoek --- 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; }