Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1846601pxv; Sat, 26 Jun 2021 02:06:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxN+K31SgMpnYwfHnxT+LgcMA1U+Qk3Ebl09clGTs7gXt6D9N+40EoGRHtmRY2GRvIKlgbw X-Received: by 2002:a05:6402:4248:: with SMTP id g8mr20461604edb.368.1624698400513; Sat, 26 Jun 2021 02:06:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624698400; cv=none; d=google.com; s=arc-20160816; b=XwLNXw09GMmkpZR35m4H0nMc5vWEYkgglSZhJtC8AqayjkJZMCtFVpArZs+caHFC9J h9w0X5UDeq31oueQyL7wkFEpod1jSxfiJrW5EHbcn2Rps5r2HIzBgMND8xj4lDMS1ken YEqFO01dP6ulI9sNys057ISWOBLSy7xHHlaGpwbxeGNRfb/Rny2de1b+Lww1JthlGNNU Oo3zlWeFL+AK4/NOllOaQQnAJ3njkOrRJekLs6NtC38/Z/TzBQFFEH6SmDBIHxHhLAY+ i6wQ7aKk05uk4ayaJzgKcjeqGii/tpakuH5w8ObQkR5DkB5RXWOFfLRfcs1rHMaQE+ET x5Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WA95MwWOFtWNjMg/zCn4uxtDOcOk4MJCS5SwBBdiyas=; b=w+fDvzf+Fucuq/TyCusKpiGpKSeOVWZTUaHZ0Q5gPWwlrI0VPsyoGTg+2ievvuRmNe X4KxRdyH8hLO30NR5B6g7ZyPU5wq1c6wiUVZ46yNaWnB3qXMRj9wsez3ncMdXC5rN7/j vkTO3TW32p3+msPeEwx79Fm8bx49qNWCMsSw7IuQ6Q/Qr14QXektwj5Kit7CF/z2xZAL bHX4f0tQ0sOV7qu0PAyaBziEp0ZrkxRIQwhyFFfcv/R2pK7bTWqL6vtCtyfeCnTUP2hH RxbwlOxmDNGkOqQ/8jYYaa8kr2YkemLq+KWmV6qTcqz3SBXC0JMdo4ZhjJhUp3/+axze gc6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZMUoH0PV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a5si8699788edr.176.2021.06.26.02.05.51; Sat, 26 Jun 2021 02:06:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZMUoH0PV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229744AbhFZI7Z (ORCPT + 99 others); Sat, 26 Jun 2021 04:59:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:40642 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229518AbhFZI7Z (ORCPT ); Sat, 26 Jun 2021 04:59:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 94AF661920; Sat, 26 Jun 2021 08:56:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624697823; bh=qmG1JfvdGzsA0YlwqYbabUV+AHbdvuyoe9DUjculXA8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZMUoH0PVIaYf1Uix6rrjUT5KrcQKsvOWAgPMXRrykwR0NU+uTmfW6bZRysxzxn8P0 OiBKET2vFg0BZ2lqa9qIW15uFYVQY7mVULDZDAG6GAjLAjjoxzVlHQHhJqPrFkrEhy npHIeNS17+gXb4XfgioqT8jv9DcrcgRaKRrJd7bVMzkqSq1a0GeiI5Fxa+QRD/dnnx +CIpI1Qj7+TtWOoVUuaSIVe6OHGrAtrCYgM+jMqMuJKflN1vx4cWH6bGQY2ZSFyyl/ GgJEb8RDnTFOPnkTGJWC+k3LIts337H4K72bdNPjNcb1nAuHeqfccqy0PD+cMV1LHZ +yQJ3gato9zCw== Date: Sat, 26 Jun 2021 16:56:55 +0800 From: Peter Chen To: Pawel Laszczak Cc: rogerq@kernel.org, a-govindraju@ti.com, gregkh@linuxfoundation.org, felipe.balbi@linux.intel.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, kishon@ti.com, kurahul@cadence.com, sparmar@cadence.com, stable@vger.kernel.org Subject: Re: [PATCH] usb: cdns3: Fixed incorrect gadget state Message-ID: <20210626085655.GA13671@Peter> References: <20210623070247.46151-1-pawell@gli-login.cadence.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210623070247.46151-1-pawell@gli-login.cadence.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21-06-23 09:02:47, Pawel Laszczak wrote: > From: Pawel Laszczak > > For delayed status phase, the usb_gadget->state was set > to USB_STATE_ADDRESS and it has never been updated to > USB_STATE_CONFIGURED. > Patch updates the gadget state to correct USB_STATE_CONFIGURED. > As a result of this bug the controller was not able to enter to > Test Mode while using MSC function. Pawel, would you please describe more about this issue? I remember the cdns3 controller at i.mx series SoC could enter test mode by using current code. Peter > > Cc: > Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver") > Signed-off-by: Pawel Laszczak > --- > drivers/usb/cdns3/cdns3-ep0.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/usb/cdns3/cdns3-ep0.c b/drivers/usb/cdns3/cdns3-ep0.c > index 9a17802275d5..ec5bfd8944c3 100644 > --- a/drivers/usb/cdns3/cdns3-ep0.c > +++ b/drivers/usb/cdns3/cdns3-ep0.c > @@ -731,6 +731,7 @@ static int cdns3_gadget_ep0_queue(struct usb_ep *ep, > request->actual = 0; > priv_dev->status_completion_no_call = true; > priv_dev->pending_status_request = request; > + usb_gadget_set_state(&priv_dev->gadget, USB_STATE_CONFIGURED); > spin_unlock_irqrestore(&priv_dev->lock, flags); > > /* > -- > 2.25.1 > -- Thanks, Peter Chen