Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1020855pxb; Wed, 6 Oct 2021 22:05:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzshNJHP5zU0Z0tcOkqRNjnnh+vAyQ8wIP5CgNzu5ANfDziraBrc1RWhq6FTBhcvmGSbHrO X-Received: by 2002:a17:902:780f:b0:13a:3a88:f4cb with SMTP id p15-20020a170902780f00b0013a3a88f4cbmr1952332pll.68.1633583100756; Wed, 06 Oct 2021 22:05:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633583100; cv=none; d=google.com; s=arc-20160816; b=gVx+Msd32NeGFjc2OP0YOR9fV9Jg6bbdL8lLfMKiMsBtuDzRz5+BfbkFfa0IBeRpa4 jOLFLVsCihlny5EC3rbcE1hpX9PPfqAqC7qiRD53KEvuoxEVycBJx0a0PoICUPk+5cVR xijXSCecDShD7575E0yLP6VrweTvanYv4uMcLyEqB1wOb7jT1h6wEmw4P4g+g1dR56Sc RK1MS0/SmLJkcclc9cIS3M7vJufmTZhvg/hQNaAWXDL1eZLhgqM7n4R9QjS79iw1d8GJ Xyt+alqu9vMiQtRvFPwPIsnC0naByUiz8/fTucjsZI7GPI6eExYFDWEtMJy7Ipn/5W9f i+yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Uv66g7wh9tw6RwcnYMZRRI7vEgEfS89uBCn8shzXiPU=; b=OUhgD48RbwTrTS3wJLjJ4J9sL5DNQe5mlgbypdekDFxZCTr6nzrRx1g7AhuPyq3GqE y8nwU7CknjoaN4d73YSD3IIhqyMmPNTXmE73uJbefAjsCetKW0m0mCz6CIDq09AgWepu rgXbu9wC6b2GgWhit0l4cwiPThugPp0n2vMAq0TgeMx+EGU6/lndNjB7sRWDYmwa4QnE 5pLe7gPqO8lxoGuW63ZhERTWnlTCs+zg/JMOu2xfdB54PeeMH765sOoGvEYRQbBdrw+R fk2ni88Zk9Rn/4CViCZ3q9IA68jZjMfqKyoZ5glIB/o0CY1Cd2EJOR/vgcYX3NLWw46v vecw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=T4yrbEo3; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y17si28042706plp.82.2021.10.06.22.04.46; Wed, 06 Oct 2021 22:05: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=@kernel.org header.s=k20201202 header.b=T4yrbEo3; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231558AbhJGFEK (ORCPT + 99 others); Thu, 7 Oct 2021 01:04:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:52536 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229497AbhJGFEJ (ORCPT ); Thu, 7 Oct 2021 01:04:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2EE6260EC0; Thu, 7 Oct 2021 05:02:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633582936; bh=fqpCYlMJ5vOffHloKMNyIwj0/O+3cqJAO8Jfuz4mH6o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=T4yrbEo3nPKmtj6tCYmyhn7YiHDUr5tcI8R8SF1TKupxcCgdlb4YteeVjsG+tiodT 40ep+7QSmDwKvJsqFW1Og8P1xXZJeIMwwm69JuZofidv2urC0XgyWvamjJLzpS8zlk bpx6lPqufaxiIYw/Bc59HDOWNfxjMF77ib1fwKK2o6xLWYvk3C2AG/kfox+NjsBp68 zn+29nI9hl998Hb7MWaqdrKZj9oHXagEWRSlC7ws+uEnW2gocHBQuL2b8wRIZAEFGe A+TngLZBCJnNGXiHvJPJPSsUYWl6cj8rF/FkVdvFFj+UUe+mCIr92PlKBMKo1twv4a K57KIfCmIwS3w== Date: Thu, 7 Oct 2021 13:02:07 +0800 From: Peter Chen To: Manish Narani Cc: gregkh@linuxfoundation.org, michal.simek@xilinx.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, git@xilinx.com, Piyush Mehta Subject: Re: [PATCH 6/6] usb: chipidea: udc: Add xilinx revision support Message-ID: <20211007050207.GE4653@Peter> References: <1629825378-8089-1-git-send-email-manish.narani@xilinx.com> <1629825378-8089-7-git-send-email-manish.narani@xilinx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1629825378-8089-7-git-send-email-manish.narani@xilinx.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21-08-24 22:46:18, Manish Narani wrote: > From: Piyush Mehta > > Issue: Adding a dTD to a Primed Endpoint May Not Get Recognized with > revision 2.20a. > > There is an issue with the add dTD tripwire semaphore (ATDTW bit in > USBCMD register) that can cause the controller to ignore a dTD that is > added to a primed endpoint. When this happens, the software can read > the tripwire bit and the status bit at '1' even though the endpoint is > unprimed. > This issue observed with the Windows host machine. > > Workaround: > The software must implement a periodic cycle, and check for each dTD > pending on execution (Active = 1), if the endpoint is primed. It can do > this by reading the corresponding bits in the ENDPTPRIME and ENDPTSTAT > registers. If these bits are read at 0, the software needs to re-prime > the endpoint by writing 1 to the corresponding bit in the ENDPTPRIME > register. > > Added conditional revision check of 2.20[CI_REVISION_22] along with 2.40. > > Signed-off-by: Piyush Mehta > Signed-off-by: Manish Narani > --- > drivers/usb/chipidea/udc.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c > index 8834ca6..b440205 100644 > --- a/drivers/usb/chipidea/udc.c > +++ b/drivers/usb/chipidea/udc.c > @@ -680,7 +680,8 @@ static int _hardware_dequeue(struct ci_hw_ep *hwep, struct ci_hw_req *hwreq) > if ((TD_STATUS_ACTIVE & tmptoken) != 0) { > int n = hw_ep_bit(hwep->num, hwep->dir); > > - if (ci->rev == CI_REVISION_24) > + if (ci->rev == CI_REVISION_24 || > + ci->rev == CI_REVISION_22) Add indent for it, otherwise: Acked-by: Peter Chen > if (!hw_read(ci, OP_ENDPTSTAT, BIT(n))) > reprime_dtd(ci, hwep, node); > hwreq->req.status = -EALREADY; > -- > 2.1.1 > -- Thanks, Peter Chen