Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp630682pxj; Tue, 18 May 2021 10:36:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEatwqZhp8zsMC1yxqnXg/I/HaK5PfDUy/hcgWi6OaYwZK/3SoZ6bprYjY3X3pCMNvOqeU X-Received: by 2002:aa7:d818:: with SMTP id v24mr8249323edq.290.1621359360295; Tue, 18 May 2021 10:36:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621359360; cv=none; d=google.com; s=arc-20160816; b=XaGVwaPUQVOj0oE/FvTk4C9ZyZ6UsCGrVMm+uNvLgnQ5QtdbeVLirSe+6RHJS8p7aA Bxl4fDaGmkgqakFBpU6G3Ni+Aocz5nTT4nfyYJQtwc0DQcZeYyWKWe8hvd5ycq+uKMCD 9Na5KAaM2rNH/j8GHK1Y6u+2e+DP/lscKUDOzccDkYa0kGxej3EZn9f33Vjrm0soIMV6 ABy28rAJuiQNvxXUQLuwRN7fwThsla9eK/ngHkThASujIFWN4sx6rZB1oe+cIrQE1sjQ hDSrDHw7bOE3ns0sxDKwJgtmSA4wLcDo296WxyekapUrBp8sBGlvhrYOQ1w2QNEH2X/L 9ThA== 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=p3h1AYwvuDDQPeQztkSa+dMnHxhBQR7RCYg8e0jrqlc=; b=KBshuYM1mYwLVGr8C6gktnhmAa02iaryfy010gYRLzKIDJN7WRds8kEg9zFasWoUVm PnteAAvS4YQBsMUP8sLb0PogijDypViYGwIxW8WOKha/a8GOpgE+Jl6LxUINdGs0FmvT IIQ8+VsZppCEBt96nRrSXU+4+N9nZ0Bw95kffRV0iMoARdryzqUiRih1/99OXrmxNDAZ IHvNIDIH+vbaUupGAG1pe9XiAXIT3kSSxM1PI/PIRXIZflWLCCnwsbHC6Q1TdS5kulMe dkKh9dNYlVm75KnTnOXvRX1MKF4bZayaPrLOau4ciSOXAFv31Ynp6KPjPGZU9ExUoLCE vYjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qHzZTLtm; 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 l21si9068235ejn.568.2021.05.18.10.34.59; Tue, 18 May 2021 10:36:00 -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=qHzZTLtm; 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 S1346668AbhEQQJ1 (ORCPT + 99 others); Mon, 17 May 2021 12:09:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:35168 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344985AbhEQPqL (ORCPT ); Mon, 17 May 2021 11:46:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EFCC861436; Mon, 17 May 2021 14:44:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621262650; bh=G0ZouCx4KY8m+lgR/uSo9qQJuuWGppTL+4CPKntMjnk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qHzZTLtmAguN89Afw4vU9BRQSfpajfU0kGJwYLsUzh36mH673EYB9zGkh9idZ5NYC 0Jd8y8BsXZApfxx9vz8r4gK8f7FDEqmBrBGyvnlKe7abxp+9C04ChL+ZrM7GTJXuey hyUDtQr1OtNBeETct2b7bTtQ1EQz27czekni5+n4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wesley Cheng Subject: [PATCH 5.10 246/289] usb: dwc3: gadget: Return success always for kick transfer in ep queue Date: Mon, 17 May 2021 16:02:51 +0200 Message-Id: <20210517140313.427724508@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140305.140529752@linuxfoundation.org> References: <20210517140305.140529752@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: Wesley Cheng commit 18ffa988dbae69cc6e9949cddd9606f6fe533894 upstream. If an error is received when issuing a start or update transfer command, the error handler will stop all active requests (including the current USB request), and call dwc3_gadget_giveback() to notify function drivers of the requests which have been stopped. Avoid returning an error for kick transfer during EP queue, to remove duplicate cleanup operations on the request being queued. Fixes: 8d99087c2db8 ("usb: dwc3: gadget: Properly handle failed kick_transfer") cc: stable@vger.kernel.org Signed-off-by: Wesley Cheng Link: https://lore.kernel.org/r/1620410119-24971-1-git-send-email-wcheng@codeaurora.org Signed-off-by: Greg Kroah-Hartman --- drivers/usb/dwc3/gadget.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1676,7 +1676,9 @@ static int __dwc3_gadget_ep_queue(struct } } - return __dwc3_gadget_kick_transfer(dep); + __dwc3_gadget_kick_transfer(dep); + + return 0; } static int dwc3_gadget_ep_queue(struct usb_ep *ep, struct usb_request *request,