Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 012E8C54EBC for ; Tue, 10 Jan 2023 10:37:55 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E1C08852A0; Tue, 10 Jan 2023 11:37:52 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1673347073; bh=hlR2r8kvKQOCs/Yar3Gz3Aem0Nr4yttoQ7GM8C9RyAk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Wt99AW5WcXjDhkbwKivXilmkj/q4+QSY9hCBDb38JTG6gm1B47p3Ol7e80oxBYTl4 YuVR1ERNrm/NytAH+jJg0sA/K+wBEybwfF+Wx54rSVjYG0cbbHZtD1kSgkfdH+LsBr 7yAdZw25fX8OCTUxJ4g6quKGhQXIjNaDDGK/ayCj8RNA0oXuxHVxpnmsK7rPtLQKIZ UUrhW6IFsX1GxytuyBbal/eYBM7ZFbe88aqcH7Gn32laRlyZKesnXi1RE7xWBJDpFt OeO9JfhYdqCgiRB4aBoUrrlnbuT7UJT/lkg36+rleDsIHIR9dLZq6YLas83d76YBIl XKHIngQvhg3yg== Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 5F83A82A0A; Tue, 10 Jan 2023 11:37:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1673347070; bh=hlR2r8kvKQOCs/Yar3Gz3Aem0Nr4yttoQ7GM8C9RyAk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=I87CpHpMIbaFdlOumvvHXczIQ2exynwIueCIMC/jes3lMEA1XWdMtlOf+r4TNbYKR IScYcEPHtMKsr05wOWjcmgr2mZwUVm/qP0hjEuj+RNhICc5rBjyg2YsfQ6XgD/v7q1 OTwhGVlDO2kr6Y2Xe3wpzqcoBhoyfHTQbnggS8Jd/L5w1UhC0EYXoQt9BlV65YSnoi Su1TsQ1jsIZGuUbzCIGY1EYk1xU7SS/kO7OsTzOPrAKKKyTEdORG1kxlxh2fCzrhFP bjbEUUXauzN1lrWzZWHCPsog0iRdlPEIEBSCHVn89AFZAfchxEug0oEfbDl2vG31j1 fealMNOkbFd0w== Message-ID: <1f2c5d74-faae-42f8-5d4d-dfc08cb093aa@denx.de> Date: Tue, 10 Jan 2023 11:37:49 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH v3] usb: gadget: fastboot: detach usb just before rebooting Content-Language: en-US To: Mattijs Korpershoek , Dario Binacchi , u-boot@lists.denx.de Cc: Michael Trimarchi , Lukasz Majewski , linux-amarula@amarulasolutions.com References: <20230107164807.3597020-1-dario.binacchi@amarulasolutions.com> <87v8leiya7.fsf@mkorpershoek-xps-13-9370.home> From: Marek Vasut In-Reply-To: <87v8leiya7.fsf@mkorpershoek-xps-13-9370.home> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On 1/10/23 09:33, Mattijs Korpershoek wrote: > Hi Dario, Hello everyone, > Thank you for your patch. > > On Sat, Jan 07, 2023 at 17:48, Dario Binacchi wrote: > >> The patch fixes the following error when updating a BSH SMM S2 board: >> 3:72>Start Cmd:FB[-t 8000]: ucmd nand write ${loadaddr} nanddtb ${filesize} >> 3:72>Okay (0.023s) >> 3:72>Start Cmd:FB: reboot >> 3:72>Fail Bulk(R):LIBUSB_ERROR_IO(0s) >> >> The "fastboot reboot" command detaches the USB when it still needs to be >> used. So let's detach the USB just before the reset. >> >> CC: Mattijs Korpershoek >> Fixes: 5f7e01e9d5d800 ("usb: gadget: fastboot: detach usb on reboot commands") >> Suggested-by: Michael Trimarchi >> Co-developed-by: Mattijs Korpershoek >> Signed-off-by: Mattijs Korpershoek >> Signed-off-by: Dario Binacchi > > I've re-ran this on my vim3l. This patch, alongside with an > implementation of usb_gadget_ops.pullup() in > drivers/usb/gadget/dwc2_udc_otg.c also fixes the issue described in > commit 5f7e01e9d5d800 ("usb: gadget: fastboot: detach usb on reboot commands") > > Tested-by Mattijs Korpershoek > > I will submit the pullup() implementation on my end, indepently from > this change. > > Marek, is it possible to pick this up to resolve Dario's flashing problems? Applied both to usb/master. Thanks to both of you for figuring it all out, much appreciated!