Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1856545pxk; Tue, 1 Sep 2020 09:20:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/DVrk4asPsIeGNO1030hjDISWTz1pgHEsAlkii1yhwWPAjRoqlpfB2bWKi/WAibgLWn+i X-Received: by 2002:a17:907:374:: with SMTP id rs20mr2261875ejb.135.1598977243576; Tue, 01 Sep 2020 09:20:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598977243; cv=none; d=google.com; s=arc-20160816; b=BhvBT3eX9z5nHLcftd6QKLL1ADW3gQEBCzrnoZL1Zf2RvVQnNZJw6LhpYlUS5WroTp +eaTU788uRwpKJVGaPPJh3zCw/U2e2IiQnWphqvO7M66nPE4hVBF9e9OJNXPGA3ndE3Z /kXkzMdx7iXIIBQp9m1gqCyNxU2LUujfd2tDimcKD2dQBu25kDsZFYgrODM9mUl9bM3t YvMtFm4JLYRo9SSp0wdLzPrYOaO1/NgVPzBkO0IkF9dk8Cm5du9GjnYQE+R3/pE5ZPau iJp+EtosbNZUU8ui7gI2bJDqjXd03M6lr/56mY3QuihsTZTN0zrT82Q/f8L2I/sDB5Gm LiZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=NR9U+ygSNzjv5BRNGGB3X/VWtZy25FrqC3JapD5DPaA=; b=c84XxEm03eky73ftaJZ2q6eQ15vRTagbf9HuS+To20moHWef1IrbSMxajBsKdkyg9u VbeFBJ+G4euW3JgKqAEbfkj8MkjbYIKxp4SN1ojAynBXBHVv8O/AoxxC1VnVJwxEzmQZ 450v+viSVbViJ8KhHWMUeo/sNTqJCQqqTiRWwUiV34anbS9pj7PzAKk8GjmDCJMUwPPk dJeC00K4gWMxIR0Vo0VpZaoTp2amxy9ID3kA4miy9l82ZBvzeupewM1NmEqhE4AeVS81 8j3yZKg1sEpj4RlbwUJh8YKYp92hHiAxPvS8BDUct35yOd75UlfYGghtv4NeEqYgWAcA Jo/g== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u15si930091ejx.239.2020.09.01.09.20.19; Tue, 01 Sep 2020 09:20:43 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731191AbgIAQTo (ORCPT + 99 others); Tue, 1 Sep 2020 12:19:44 -0400 Received: from netrider.rowland.org ([192.131.102.5]:58917 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1732019AbgIAQSu (ORCPT ); Tue, 1 Sep 2020 12:18:50 -0400 Received: (qmail 592026 invoked by uid 1000); 1 Sep 2020 12:18:48 -0400 Date: Tue, 1 Sep 2020 12:18:48 -0400 From: Alan Stern To: Khalid Aziz Cc: gregkh@linuxfoundation.org, erkka.talvitie@vincit.fi, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC RESEND PATCH 0/1] USB EHCI: repeated resets on full and low speed devices Message-ID: <20200901161848.GF587030@rowland.harvard.edu> References: <20200901023117.GD571008@rowland.harvard.edu> <0ec31395-56d9-c490-4e42-1c27bbc69df3@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0ec31395-56d9-c490-4e42-1c27bbc69df3@oracle.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 01, 2020 at 08:51:14AM -0700, Khalid Aziz wrote: > >> At the time of failure, when we reach this conditional, token is > >> either 0x80408d46 or 0x408d46 which means following bits are set: > >> > >> QTD_STS_STS, QTD_STS_MMF, QTD_STS_HALT, QTD_IOC, QTD_TOGGLE > >> > >> and > >> > >> QTD_PID = 1 > >> QTD_CERR = 3 > >> QTD_LENGTH = 0x40 (64) > >> > >> This causes the branch "(token & QTD_STS_MMF) && (QTD_PID(token) == > >> PID_CODE_IN" to be taken and qtd_copy_status() returns EPROTO. This > >> return value in qh_completions() results in ehci_clear_tt_buffer() > >> being called: I didn't mention this before, but that combination of events doesn't make sense. The MMF bit is supposed to get set only for queue heads in the periodic list, that is, only for interrupt transactions. But ehci_clear_tt_buffer() doesn't do anything for interrupt endpoints; it tests specifically for that right at the start. Maybe your EHCI controller is setting the MMF bit when it shouldn't. The usbmon output will help clear this up. Or maybe the hubs you are testing don't work right. That's the only reason I can think of for the failures you see with the USB-3 controller; the way it operates is very different from the way EHCI does. Alan Stern