Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3765478pxt; Tue, 10 Aug 2021 10:48:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQbVyFgLZdnvWbq4bgZPmhywgWCuCM/lq75u7lUjEtBr/Ev95LNFRlUlW+Ja3BeNrDWP7p X-Received: by 2002:a6b:6609:: with SMTP id a9mr242302ioc.8.1628617692479; Tue, 10 Aug 2021 10:48:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628617692; cv=none; d=google.com; s=arc-20160816; b=0N9Vko1AC/guyYEpzaIDynfggU7YwZkQplODMfPAVmFMn2sHuo3Ae3m5p2b37vKS6j Od7KghrD7bqvxpekem9IMMIEy2BEmQF9SNWQegWV2j9hBOmBxfvcWxquX1g9/fz1Oo52 YvhmKciYKoPrg1iSobJMKvPkWXRgRRjGj97i8Wl+EjA4TAQCfnpNJJ/iGzl5t77vHkkp 0H3llqbg1VWNdhNReZoPhujDpLzvFUENNkTTKOT7jnyqM3yLqXERVv5WcosZacj8Z8UL jhIUKyEAiY8uw+2AdONc+pq5ToXjLJ6ogZvsz/FMRfQTEkVAJROKPihE/Gmy/TCZpsAV dWRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=D7+ahdJBSRbesqRfGtBpoHD45bpEtaiREQtLswS0/3g=; b=TwM3KbUcIQPDaa47epofes7acwd3cW5fGGbaDx2IbuVq6gpVds3pKApZ2z7uj7M8dm 2e7J0xRkPu/7EGamBu2K9gSuPgX6fm4/akHmAwu2JB8W5sUP7c9Y7gZPZiFusbBu2vsd dECTnc5yvv72A70uTnWqfCUBjDhdjRWWh0X6LRJIyafp2XrgMMk6AOedPJ1PLjJuDi3X x60JP/zKHrSZ9k+anyI3neHJW2I1qxmHdMoNO4y6NT2a1DFCcphApuA1DkJI04RLPiWn eDDmgwp/LYuiYYlOZ4aKwI8sVdsjRXWM2Cekg/DPhQpnDvlr8kiX6q7pcoZB9TD2h13i UXNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jx4DPFiu; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c1si3779880ilo.83.2021.08.10.10.47.59; Tue, 10 Aug 2021 10:48:12 -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=@linuxfoundation.org header.s=korg header.b=jx4DPFiu; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234682AbhHJRqZ (ORCPT + 99 others); Tue, 10 Aug 2021 13:46:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:40876 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235795AbhHJRnk (ORCPT ); Tue, 10 Aug 2021 13:43:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C4D7760F94; Tue, 10 Aug 2021 17:39:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628617151; bh=DoV5vHuMG6kNwCUV47p0+YaRnSi88p7jjC3YdvCAUr4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jx4DPFiumOwBboTAfgEMdH0k03J8udCs8WOQGzLBSlSnXjp3Q315CrZPDWlg+lxkO B33+bXDRyAkWIgOKxmYbPmOvF9LJOUXPu2Sw1v4wCBX0UPpcZyJdi4DBN3WMmbSREV ZRYdO8hypg7T7H0Jv/xBEPfQkpjq4KAIShddZdd0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pawel Laszczak , Peter Chen Subject: [PATCH 5.10 066/135] usb: cdns3: Fixed incorrect gadget state Date: Tue, 10 Aug 2021 19:30:00 +0200 Message-Id: <20210810172957.948251993@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172955.660225700@linuxfoundation.org> References: <20210810172955.660225700@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pawel Laszczak commit aa35772f61752d4c636d46be51a4f7ca6c029ee6 upstream. 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. Cc: Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver") Signed-off-by: Pawel Laszczak Link: https://lore.kernel.org/r/20210623070247.46151-1-pawell@gli-login.cadence.com Signed-off-by: Peter Chen Signed-off-by: Greg Kroah-Hartman --- drivers/usb/cdns3/ep0.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/usb/cdns3/ep0.c +++ b/drivers/usb/cdns3/ep0.c @@ -731,6 +731,7 @@ static int cdns3_gadget_ep0_queue(struct 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); /*