From mboxrd@z Thu Jan 1 00:00:00 1970 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 2F4AFC433EF for ; Fri, 7 Jan 2022 15:25:31 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8882B836C5; Fri, 7 Jan 2022 16:25:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20210112.gappssmtp.com header.i=@baylibre-com.20210112.gappssmtp.com header.b="4CMYgmRC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 94DF683510; Fri, 7 Jan 2022 16:25:26 +0100 (CET) Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 41BDF836CB for ; Fri, 7 Jan 2022 16:25:21 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mkorpershoek@baylibre.com Received: by mail-wr1-x433.google.com with SMTP id e9so10197020wra.2 for ; Fri, 07 Jan 2022 07:25:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=7uXIW5mqIKb7ljXWlA9RDLIGMKgmP26bwTvxo2O0wWk=; b=4CMYgmRCe5mmTFRrwHFTGPRlsCa1oiGwno4g2QOwyefOR0BcQpH/hKxeASOs+e7K2d MogyROwxgR23IMcxhrbvLqIpaInj4c3YahsYfkBS85Ff+tnF9WknvwJ3HZvv8iBjRqEx bY8keFkkYU6VXZyEaS8YPCYnqdnyEOeFPSsuucrMkF79R9iDEKFK3X4HiJgBw7F5fhmT mAjLfVTXApxTNOOsfYyx01Le8Mld6ndIB8KirFM3vpHAQNiU9YGROsmTHhqawkj6yBJ8 mJF1++7GIv4Vqk7bVG0S+ynOpfaRMz4DqXyksMsDjjgSHPaXPckHP+nexSK5XP2PZO+x EDaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=7uXIW5mqIKb7ljXWlA9RDLIGMKgmP26bwTvxo2O0wWk=; b=wxoFzv8Bw7k+2xatsXqBmlRzLwJkxUOF49V4cUfdhxNeW2BKuOJ/G5bSQiB+/ZVffe O8WbKJkHRHiO1XKPkrIXHAe9RyJg/JkJMmXAU4GT0tKwv9wHUZSfvvXbvRsQuPUPt55b hwd6vqhPp/dp8Fgnutd9/FtRVPH/hB0G0LgJc846D9JSYFhHtGUTK4LQ3ypUk8EW3she lG0fJphr9i3Qx5EUUEa92ZUlJpiFv4x4eEfZ4eBweunGSlZ7jmJeN+h7UDNum9P5gBmz 2xQjsKrGVLLhSQqYt51Edh5JwpbMOerpC78WX+bx/zNHTLkwEZj1NmnG54i6oSQcZvR4 CT+w== X-Gm-Message-State: AOAM530FQm6JgiLrR9BAhXMzjpX3KL7OFu2pIBioGVUchhV1kwDR+1pY LUZD7hdwjz+cI+cD181UWR4zyg== X-Google-Smtp-Source: ABdhPJwOtndm3GJ6PNAp2MkPGH47OHpB+1onXTwPO2WrqcGxZ+zGL0OTVD/CCdWEK0TWxnOAp+vGRQ== X-Received: by 2002:a5d:6d06:: with SMTP id e6mr54266850wrq.242.1641569120642; Fri, 07 Jan 2022 07:25:20 -0800 (PST) Received: from localhost ([2a01:cb19:826e:8e00:8582:a578:28e4:7ef8]) by smtp.gmail.com with ESMTPSA id f10sm5280351wmg.43.2022.01.07.07.25.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jan 2022 07:25:20 -0800 (PST) From: Mattijs Korpershoek To: Marek Vasut , Neil Armstrong , Gary Bisson , u-boot@lists.denx.de, Tom Rini Cc: lukma@denx.de, peter.chen@nxp.com, jun.li@nxp.com, peng.fan@nxp.com, u-boot-amlogic@groups.io Subject: Re: [PATCH] usb: gadget: dwc2_udc_otg: set ep's desc during enable/disable In-Reply-To: References: <20220106150208.1316946-1-gary.bisson@boundarydevices.com> <8a9ab2a9-a4fe-0b06-de58-4e225fbe13e8@baylibre.com> Date: Fri, 07 Jan 2022 16:25:18 +0100 Message-ID: <87pmp34lgh.fsf@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 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.2 at phobos.denx.de X-Virus-Status: Clean Hi Gary, Thank you for your patch. Marek Vasut writes: > On 1/6/22 16:21, Neil Armstrong wrote: >> Hi, >> >> On 06/01/2022 16:02, Gary Bisson wrote: >>> Fastboot support has been broken on platforms using dwc2 controller >>> since the gadget gets its max packet size from it. >>> This patch is the equivalent of 723fd5668ff which fixed the same issue >>> but for the chipidea controller. >>> >>> Fixes: 27c9141b111 ("usb: gadget: fastboot: use correct max packet size") >>> >>> Signed-off-by: Gary Bisson >>> --- >>> drivers/usb/gadget/dwc2_udc_otg.c | 2 ++ >>> 1 file changed, 2 insertions(+) >>> >>> diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c >>> index 2f318144421..fb10884755b 100644 >>> --- a/drivers/usb/gadget/dwc2_udc_otg.c >>> +++ b/drivers/usb/gadget/dwc2_udc_otg.c >>> @@ -655,6 +655,7 @@ static int dwc2_ep_enable(struct usb_ep *_ep, >>> return -ESHUTDOWN; >>> } >>> >>> + _ep->desc = desc; >>> ep->stopped = 0; >>> ep->desc = desc; >> >> Indeed the _ep and ep was confusing when looking code >> >>> ep->pio_irqs = 0; >>> @@ -695,6 +696,7 @@ static int dwc2_ep_disable(struct usb_ep *_ep) >>> /* Nuke all pending requests */ >>> nuke(ep, -ESHUTDOWN); >>> >>> + _ep->desc = NULL; >>> ep->desc = 0; >>> ep->stopped = 1; >>> >>> >> >> An off-tree patch removed from our Yukawa backlog, thanks ! >> >> Reviewed-by: Neil Armstrong I can confirm this fixes flashing issues on VIM3/VIM3L boards when flashing AOSP(yukawa) with fastboot. Tested-by: Mattijs Korpershoek > > +CC Tom, can you pick this one for CURRENT 2022.01 release? > > Thank you