Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp631230pxa; Fri, 21 Aug 2020 17:00:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyu2FNDwUalsNEDgoKT9PfD7K6eXHJg/0x1mx0d8+Q/TWfPwfrDvmkW0ZI0RjvoasWhePVJ X-Received: by 2002:a17:906:b08:: with SMTP id u8mr5258516ejg.401.1598054431014; Fri, 21 Aug 2020 17:00:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598054431; cv=none; d=google.com; s=arc-20160816; b=Gp7lxEwp9rwYnnp9Do7l+44LiidnWgjoXU7Q9UmTG7GCrnEYcdrqjsdifJERg5gbw4 Lae2/n/5eqdw3RdSwBMajAXemFxnJH72NfIyatZPu4Ep7QAgpo29uwJtHqW1MZPECSmt HR4mvrPACI59xObL7wE/NJ8iPVy4le5DN3ypC9eELvcZsf5ynlRhjat7melQC8r9Fp9f obb3tagEp/iUztcbw3wvj7KLmOaSA10yz4nLGOW8NLRYbJsCluLr96wkMM9m3S+zea0d n47b4F1i7rHXY5zGEhTGmNtguDtijFEeVHekCpDhkiEqgPnSAOfYHEXY+qhqwNLhWgLg FaDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=bWEA6Lu6BgU9+H0Qk75tWqnerPDD1gc8xq+nlo9UBEU=; b=HDw0qbmPmCci9zVFPksEig33KgmOqp5zQH/LNMgNdkauigv/YmugSJmB34q40TiDzS Ze5lFpbP4ukHichGVlrlMa6hgBYMpMO3uZLkE7vTAQ03PKV2MJCF58Zk95thsPXOq1ML /wGrOiY3dgH7XUdMVuNFXg83/uVMp/IOypfTKJreYw0m8AJfzfzEndWslJO7hH2oxkTp +0ulWme5e6C+uwtCc62vJtW6fw4CSxdVGm9Stya/QgchzAVtqEarsurKau3y31Z3HeNb tUv6MX4FesFgowTcT7H3GdFGOgzJyFR7Ao/7IgjitOQVupf+1AXsrLM950vj71Qdd4Z0 Yvpg== ARC-Authentication-Results: i=1; mx.google.com; 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=sangfor.com.cn Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y19si1392208ejr.56.2020.08.21.17.00.07; Fri, 21 Aug 2020 17:00:31 -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; 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=sangfor.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726772AbgHUX6e (ORCPT + 99 others); Fri, 21 Aug 2020 19:58:34 -0400 Received: from mail-m17613.qiye.163.com ([59.111.176.13]:36191 "EHLO mail-m17613.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726688AbgHUX6d (ORCPT ); Fri, 21 Aug 2020 19:58:33 -0400 Received: from 2CD-RMPB.local (unknown [113.89.247.200]) by mail-m17613.qiye.163.com (Hmail) with ESMTPA id 1A4884816D2; Sat, 22 Aug 2020 07:58:30 +0800 (CST) Subject: Re: [PATCH] xhci: Always restore EP_SOFT_CLEAR_TOGGLE even if ep reset failed To: Mathias Nyman , Greg KH Cc: mathias.nyman@intel.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200821070652.27782-1-dinghui@sangfor.com.cn> <20200821073147.GA1681156@kroah.com> From: Ding Hui Message-ID: <576e0013-a11e-4ffb-3964-cc9aba204245@sangfor.com.cn> Date: Sat, 22 Aug 2020 07:58:29 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgYFAkeWUFZS1VLWVdZKFlBSE83V1ktWUFJV1kPCR oVCBIfWUFZS0IfQk0fTk8dT0waVkpOQkNLTk9ISktJQklVEwETFhoSFyQUDg9ZV1kWGg8SFR0UWU FZT0tIVUpKS0hKQ1VKS0tZBg++ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6Nz46TAw6GD8uPDIJT00SEQky PzNPCg9VSlVKTkJDS05PSEpLTUxDVTMWGhIXVR8SFRwTDhI7CBoVHB0UCVUYFBZVGBVFWVdZEgtZ QVlKSkhVQ0JVSU9MVUlLS1lXWQgBWUFJQkxCNwY+ X-HM-Tid: 0a741375a16393bakuws1a4884816d2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/8/21 4:44 下午, Mathias Nyman wrote: > On 21.8.2020 10.31, Greg KH wrote: >> 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 > > Thanks, nice catch. > >>> --- >>> 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? Sorry for missing the tags, this is my first kernel patch :-) > > It should, but I like this patch and want it in, so I'll add the tags this time. Thanks for correcting my commit msg > > Thanks > -Mathias > -- Thanks, -dinghui