Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp54316pxa; Fri, 21 Aug 2020 00:34:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+VfQ6PVSq3DpMRt2zIlc4I2lCWoc1dkWOy9bYL47DU2op9pnTzsZMvTy9YpAa3OcAGlis X-Received: by 2002:a17:906:ecf9:: with SMTP id qt25mr1689140ejb.478.1597995276265; Fri, 21 Aug 2020 00:34:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597995276; cv=none; d=google.com; s=arc-20160816; b=bwbP2iQFJX9yXls2P+/HFdgbjGSn8noj/aHuCX790G9hDyf3cDqIbCzG8xWKz/tfkY j82BnjE33UyiimjVbtl5QoO3HUvN2vxQ+mnpFyf+xiBme0wJLwM93FXREBOhoyVaHIKB NHCD27W1lTmF7aAdKwDmLqHZ2uT8ol/pShmuHo0N8p4oi+o92TZDkjuZakP1G520HkY9 lEgYN/ADYiHJ1btOB41y+vKYaFas1j7evP/F44VvvMT5l0bBhOIj7gvzMz9E7tsN6Gz+ hFSIo4ob0fN9XthZMEAYoyju0sg0UMaWirq5bAQF60ft5gQuIfZ6y7zGfeMz2FclF88D Z8fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=iMYNUGquX4VNzo8b3dsL7KP01kHdHWSQr8qLxqhfquE=; b=ZeD08JzoQIXXpvXSTgaZ6fejAZ0ZRv9MBL9lvO6GY7yP1EyeJ/R607sMxc0ylTH9YH xR8jA4Hbap8FUZbfQ2ntuHuwSbnXEZwfPWtVWHn63CBYio+W3ZEvHPn3LAhpsnaIHL57 uSutWC3B+Kfo9jeczRlyCuAMuby5jofFOZ/quJT1vCp0WqXOTGrL7VNt4SoQchS6AYuP h08+4EwU0lSBNIKsATs0LhzUk5nZuMvNYVGUlCmJJwmI/0Ot+mcRWsM7XFfCwKKVKK5l P2+2RpxhXG3+zQblKDl1xIdUlsa3vuZ5AS7xqzl8scfqSzJ15jteruMepwnOOLxKTyqL LG9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=D8zK7oPi; 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=fail (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 e11si638883ejk.250.2020.08.21.00.34.12; Fri, 21 Aug 2020 00:34:36 -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=default header.b=D8zK7oPi; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728008AbgHUHb2 (ORCPT + 99 others); Fri, 21 Aug 2020 03:31:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:49970 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726864AbgHUHb2 (ORCPT ); Fri, 21 Aug 2020 03:31:28 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A0F2C2078D; Fri, 21 Aug 2020 07:31:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597995088; bh=zj/aZnBQm8kFqhOGpWxH3Mew6BLTWbXLfyCo9iwAJ+w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=D8zK7oPiLwnJ2LDjAH6lJs+EBUX7wQNEGSv7oaRqbbVM0LsaiaY8xTKt6yNFOd3BB P86zbtb+QJOEd5V+q3ruju/o2LR9pAYTR2oltQtUufXIAsYUk92ER4OPJj+84cTrwC F3IJFtSUzdhUVw77iVJvJAv+LttybNfXFs0W5KbE= Date: Fri, 21 Aug 2020 09:31:47 +0200 From: Greg KH To: Ding Hui Cc: mathias.nyman@intel.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] xhci: Always restore EP_SOFT_CLEAR_TOGGLE even if ep reset failed Message-ID: <20200821073147.GA1681156@kroah.com> References: <20200821070652.27782-1-dinghui@sangfor.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200821070652.27782-1-dinghui@sangfor.com.cn> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 21, 2020 at 03:06:52PM +0800, Ding Hui wrote: > Some devices driver call libusb_clear_halt when target ep queue > is not empty. (eg. spice client connected to qemu for usb redir) > > Before commit f5249461b504 ("xhci: Clear the host side toggle > manually when endpoint is soft reset"), that works well. > But now, we got the error log: > > EP not empty, refuse reset > > xhch_endpoint_reset failed and left ep_state's EP_SOFT_CLEAR_TOGGLE > bit is still on > > So all the subsequent urb sumbit to the ep will fail with the > warn log: > > Can't enqueue URB while manually clearing toggle > > We need restore ep_state EP_SOFT_CLEAR_TOGGLE bit after > xhci_endpoint_reset, even if it is failed. > > Signed-off-by: Ding Hui > --- > drivers/usb/host/xhci.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Shouldn't this have a Fixes: tag on it and be backported to the affected stable trees? thanks, greg k-h