From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 20 Jan 2025 14:32:19 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tZrt5-002Frx-04 for lore@lore.pengutronix.de; Mon, 20 Jan 2025 14:32:19 +0100 Received: from bombadil.infradead.org ([2607:7c80:54:3::133]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tZrt5-0000oL-6K for lore@pengutronix.de; Mon, 20 Jan 2025 14:32:19 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=20JKkQTh6PDyB6dyz4N7l1jEkW6uCO5xrk0ogsoboMY=; b=20AsH2/JH07uwkRmsrjaW2+n/v +TSe9mEuKdGXzCvKFYyCNv6Cq6CZeVOQK1AN+uOidXj7xsn8dcLjmVEozP+EMuzxdr/uZWdQZeubw PE6RL65rFgI/E0Zfe2bcfgfL4UajjbQZKGj6A+fSwy6LiGNvDxAbD2lTRW2ysuWnY6otSbi/UON9G GQcckmLNBu0fen4wrIYE9B0+gIB9VI3VBd1B1IIG+OCpBOWVmNuYJw7dSxW3fjNKrGThu3HdizwHo WVMu6CLndF/4wWAviUhKTEpkT5zC6tg7jFl66CERghr9FtYfqzCHXkGAm3+rkoXVq4vr3OvA09hCW ZbLYP7xg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tZrsW-00000005ftV-48uK; Mon, 20 Jan 2025 13:31:44 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tZrpP-00000005fQ4-22yR for barebox@lists.infradead.org; Mon, 20 Jan 2025 13:28:32 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tZrpO-0000On-AG; Mon, 20 Jan 2025 14:28:30 +0100 Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tZrpO-000wVD-0Q; Mon, 20 Jan 2025 14:28:30 +0100 Received: from localhost ([::1] helo=dude02.red.stw.pengutronix.de) by dude02.red.stw.pengutronix.de with esmtp (Exim 4.96) (envelope-from ) id 1tZrpO-00HWTb-03; Mon, 20 Jan 2025 14:28:30 +0100 From: Sascha Hauer To: Barebox List Date: Mon, 20 Jan 2025 14:28:29 +0100 Message-Id: <20250120132829.4176408-1-s.hauer@pengutronix.de> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250120_052831_525631_2D763845 X-CRM114-Status: GOOD ( 10.42 ) X-BeenThere: barebox@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "barebox" X-SA-Exim-Connect-IP: 2607:7c80:54:3::133 X-SA-Exim-Mail-From: barebox-bounces+lore=pengutronix.de@lists.infradead.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Subject: [PATCH] usb: gadget: dfu: detect devices when necessary X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on metis.whiteo.stw.pengutronix.de) the DFU file list might refer to devices which are not yet detected. Call detect on the devices on the list to make sure they are present when DFU is started. Signed-off-by: Sascha Hauer --- drivers/usb/gadget/function/dfu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/gadget/function/dfu.c b/drivers/usb/gadget/function/dfu.c index 44a6ec1aa6..893dcc7f70 100644 --- a/drivers/usb/gadget/function/dfu.c +++ b/drivers/usb/gadget/function/dfu.c @@ -372,6 +372,8 @@ dfu_bind(struct usb_configuration *c, struct usb_function *f) dfu_files = opts->files; } + file_list_detect_all(dfu_files); + n_entries = list_count_nodes(&dfu_files->list); dfu_string_defs = xzalloc(sizeof(struct usb_string) * (n_entries + 2)); -- 2.39.5