Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp465789ybh; Wed, 11 Mar 2020 04:41:47 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsjo/bsUYRLjfQS6HxYxX2Xnv9j9b3WTaypIysaSytlek15oBGWbq+zTUvDogYFv3EKyYn9 X-Received: by 2002:aca:2419:: with SMTP id n25mr1592420oic.13.1583926907491; Wed, 11 Mar 2020 04:41:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583926907; cv=none; d=google.com; s=arc-20160816; b=wb5CK2qy8EsAg6UQqHdmO1v6oZBnzmP7ht6bq7fkHSqRK3V7xC1XhBX0X1oTpyR4kv Awlc9ahyB51oEE0GIS29k7kirPWe9qxEWkVGvOtL2Z0Xj6b3Fh1EUwGVmnzLuy/XD1vV aL601YiE8ICqd/TqxAjggaSpvJfO2+hkLdCcCSCOY2mdUH4XvwZFwAOaRWq4l0BLlYLk ayTTAozLWsUfDO+bA0wAMJ4zYyGPFhbUmY1jb03DNIIRF793dA27tdEowOacLSqSwX5F 3Cj0yBr1zKRrprk3MuA68djnqeE8AbWS4ZEn7rsCiFfAZ+WJxmSFJolyMlrIBIYSKfnH sE0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=2iT+/77wGIgxe5NKzEJXkODg4mDWs/H6aQobSDKel4Q=; b=Ndro6vOZZycnMJuNjktif8MFDn9jvLb7azT/YL23mhdoAkBKvJwaC9cgiZokT40VVY jLFRUrRiYmtJvvs2zmF3yd3QVZbql6RxZbkGpHm75SCqJcbgV5RcvxPCozkbpM8zZ/YY R7iODOqeHaAPc/8gmsXJx/almh0qwx0M/c5PvKpSeZlxVlQSiakOGDP3Xf/1bdOlExT+ GyBOefp/3cn88TA5pfyNKqrCBaargZTzEAtUKzkWoe4jAFrVh3pJ7x4oGxAhZoYA0sld sCoRZ4CA2BRvQiDIzkK4ZNNSUeaMiZtz6UvQom/t7LXKD8P5phPteyk+2z3411hcWP4l YSYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UI5c3OUX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c4si966089otp.218.2020.03.11.04.41.35; Wed, 11 Mar 2020 04:41:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UI5c3OUX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729143AbgCKLlA (ORCPT + 99 others); Wed, 11 Mar 2020 07:41:00 -0400 Received: from mail-il1-f195.google.com ([209.85.166.195]:41371 "EHLO mail-il1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725834AbgCKLlA (ORCPT ); Wed, 11 Mar 2020 07:41:00 -0400 Received: by mail-il1-f195.google.com with SMTP id l14so1652329ilj.8; Wed, 11 Mar 2020 04:40:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2iT+/77wGIgxe5NKzEJXkODg4mDWs/H6aQobSDKel4Q=; b=UI5c3OUXejo8eGqcr3kFYkKLiQpv9ohYscdECuxyAidajdNPWlW857Xch4QYvtPibB cDcuDIYXzZNmBploJyZdB3DSJvHZLOyTXW1uLd6mGCqFKhLBEovwwoG7uglNXyVxaVj2 CyXNwUji/jwgnnkseq/Aj/oALBNVt+qslkTQDuqlwTtUBGeAj6LX22Cy8Ih8KJnKODQw Z6Hi+NNr6XCPvca7590K1gqMLMwzl5fWuRFWaj4kZ5M3TXE2j1Ot7MSBuAq5MqaFMuAC QsFXlAAFoKq4fU8uHbSWCH/kotAT4S/Je669eEI877IobCaCp7nBdU/CvrpRCC0eRzMB UJBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2iT+/77wGIgxe5NKzEJXkODg4mDWs/H6aQobSDKel4Q=; b=ABTz/LbB6PvE0svAQzBGVndYzaJXWa6fU8dim+cHmOOpuPAT7G2fRL2DknZSTkem5u sAIO+L/bGDqmcXE/8319jjyrjzawpFlr5bojuyS/norlMSgOsHMOC9jlv2pEyMZxriND dPGQPJVgZYAMreJYzB6Tm/sZpy8jHDAmQqip/CLur6uDtZelb2LqAPccAcXjvk1Jt2En fuHoZJDXSLq9CmjEWjuxFDzwB8o43qGbRx4t25fsCn6hWJ9032FBvddROShyWMA48+pG P6KrbDX64DJBFYwhoJRF80ohLXWXrn5Ys4D80oMhi74U2dwJzgjjOjjpUYX2/tr3xBAY tGbQ== X-Gm-Message-State: ANhLgQ0NuzQLeMJQ7wMCkTpBGLhlr2iD2oYf2ihXzm36Ceyk4OPUfbrz gTjEpgJC1Bo1/tuxiS9vM2LyXT/I6cPMuIONurZayA== X-Received: by 2002:a05:6e02:be7:: with SMTP id d7mr2771041ilu.238.1583926858135; Wed, 11 Mar 2020 04:40:58 -0700 (PDT) MIME-Version: 1.0 References: <20200306160659.16319-1-alcooperx@gmail.com> <74c294a3-8eaa-a48e-3371-a7027d5aabd2@linux.intel.com> <38c5e0e8-2fe4-d20d-22c5-3f94ea34b878@linux.intel.com> In-Reply-To: <38c5e0e8-2fe4-d20d-22c5-3f94ea34b878@linux.intel.com> From: Alan Cooper Date: Wed, 11 Mar 2020 07:40:47 -0400 Message-ID: Subject: Re: [PATCH] usb: xhci: Error enumerating USB TV Tuner To: Mathias Nyman Cc: Linux Kernel Mailing List , Greg Kroah-Hartman , USB list , Mathias Nyman Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks! Al On Wed, Mar 11, 2020 at 3:28 AM Mathias Nyman wrote: > > On 10.3.2020 20.34, Alan Cooper wrote: > > On Mon, Mar 9, 2020 at 8:19 AM Mathias Nyman > > wrote: > >> > >> On 6.3.2020 18.06, Al Cooper wrote: > >>> Unable to complete the enumeration of a USB TV Tuner device. > >>> > >>> Per XHCI spec (4.6.5), the EP state field of the input context shall > >>> be cleared for a set address command. In the special case of an FS > >>> device that has "MaxPacketSize0 = 8", the Linux XHCI driver does > >>> not do this before evaluating the context. With an XHCI controller > >>> that checks the EP state field for parameter context error this > >>> causes a problem in cases such as the device getting reset again > >>> after enumeration. > >>> > >>> When that field is cleared, the problem does not occur. > >>> > >>> This was found and fixed by Sasi Kumar. > >>> > >>> Signed-off-by: Al Cooper > >>> --- > >>> drivers/usb/host/xhci.c | 1 + > >>> 1 file changed, 1 insertion(+) > >>> > >>> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c > >>> index dbac0fa9748d..5f034e143082 100644 > >>> --- a/drivers/usb/host/xhci.c > >>> +++ b/drivers/usb/host/xhci.c > >>> @@ -1428,6 +1428,7 @@ static int xhci_check_maxpacket(struct xhci_hcd *xhci, unsigned int slot_id, > >>> xhci->devs[slot_id]->out_ctx, ep_index); > >>> > >>> ep_ctx = xhci_get_ep_ctx(xhci, command->in_ctx, ep_index); > >>> + ep_ctx->ep_info &= cpu_to_le32(~EP_STATE_MASK);/* must clear */ > >>> ep_ctx->ep_info2 &= cpu_to_le32(~MAX_PACKET_MASK); > >>> ep_ctx->ep_info2 |= cpu_to_le32(MAX_PACKET(max_packet_size)); > >>> > >>> > >> > >> Thanks, nice catch. > >> > >> If you agree I'd like to change the the subject of this patch to something like: > >> "xhci: Fix enumeration issue when setting actual max packet size for FS devices" > >> > >> While looking at this it seems that the current EP_STATE_MASK is not correct either. > >> It should be 0x7 instead of 0xf. > >> > > > > Agree on both points. > > Should I re-send a v2? > > > > No need, I can make those changes > > -Mathias