Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp242272pxj; Wed, 26 May 2021 21:57:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4m22mo6TAWweqvDCza+iZd9sKpMxZD2tp7N2VgAOYADOnMdHBm1IDcQtnnbt2mTJ6bbH4 X-Received: by 2002:a5e:9e4a:: with SMTP id j10mr1449821ioq.52.1622091460649; Wed, 26 May 2021 21:57:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622091460; cv=none; d=google.com; s=arc-20160816; b=k/WBmHyglO324UNjpHmlM+dnRlRbtyvTHyYqQpx6OY1wShhkjOR155ifEJ9czJVGPS /O06e6DxDbkTjnIqDt9taN/ubMZ+oTCVeLDzq8BExkFVn7tv0e3S8SRaSIa3f4UGgESQ C20Stjz5as9Ig0WSj5hAGIzMWfj3sEw1fLrt9WhcGG/rxn0LjP2ODxn5pWdnwbRHbU7R Jpz4vcy5mz52VJy8vlDzQGYwl1jXlggmMiGRM8k0HdGTIqjR9X86+sJ2Rc4QmRe3hBXD eMoH6WgIkQoyWd8NtaRSYxBGdVD0pMLDAUfP28jvvIw8xQUcFj00QyM/VGCKKq8PRiYt Twvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ZoezXVZg+N0qEl4TQJRDvQwip5hpliVFiwgQKgxg9hw=; b=Sx0iDrIAwiwfovM+OJWNECtYJ4UXsNfF31/+qGUUCmnNsj5tVH0ahlwzcuBBA2gRX/ aIudi4mGZ56wnXfceUiq5BKc09RSNCHL93d/wrhKYrdtQcWsjrKHllAB+xvvoCiPMjbi fSWy20rZ7GwZwYg253ywG2SoCfouG5LNtJZ5Aaj3zj8+wsvKWcsasnqa+vn2qgPw5v/V osfdReALu4y3k5/TN+XOMHygqF8jeO1QBKoEOhPxuwbzodT47MrOImDsCR0MFjNLUAZ/ eKqAuorUwt6nl/HGXN90XYtgOprOsjNT1gvFMY6fBy37RrKugY8UzN/jfCxkW8kmeL7x IgDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="KgxqJY8/"; 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 b4si1122880ioz.1.2021.05.26.21.57.27; Wed, 26 May 2021 21:57:40 -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="KgxqJY8/"; 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 S234492AbhE0BYv (ORCPT + 99 others); Wed, 26 May 2021 21:24:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:59152 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232187AbhE0BYu (ORCPT ); Wed, 26 May 2021 21:24:50 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5A2A161360; Thu, 27 May 2021 01:23:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622078598; bh=bmskH63qX10L9v1hjB1V+AdpwXXXrtuHRvniDeUQKAI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KgxqJY8/kYMROrZBkujR5cpLP3HL0L+Pzz+fyfG3WsNXMetBze8ss02msQIquENmO +cdghd/hNvFJJoy3IfAwDG9WM2GJN2U48CvE30Sc4Qh/aZhRcCc+Sk5rTabvsPal7v Wishn3ZZEPsOhohgAOtyIOysteWDPOVPnttdWejQ9D5Z0rfNMOZZ4Klft2ckM2/MQ7 cF0dLjDfye5CP/zjwQOfRf/4FW9kCd21hhQtLamGIL2U7t2r9Chb7Y63NxF0AJ4gXl Qxq451D2JZtU8PHCE70uCKmAhbkpSAUTP0oJhxTfs75yaL9EbJAmh4/CW5thv+1/KS 9aQ7T+pksGUJA== Date: Thu, 27 May 2021 09:23:13 +0800 From: Peter Chen To: Aswath Govindraju Cc: Sanket Parmar , pawell@cadence.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, kurahul@cadence.com, gregkh@linuxfoundation.org, kishon@ti.com Subject: Re: [PATCH] usb: cdns3: Enable TDL_CHK only for OUT ep Message-ID: <20210527012313.GA20398@nchen> References: <1621263912-13175-1-git-send-email-sparmar@cadence.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21-05-26 20:30:37, Aswath Govindraju wrote: > Hi Peter, > > On 17/05/21 8:35 pm, Sanket Parmar wrote: > > ZLP gets stuck if TDL_CHK bit is set and TDL_FROM_TRB is used > > as TDL source for IN endpoints. To fix it, TDL_CHK is only > > enabled for OUT endpoints. > > > > Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver") > > Reported-by: Aswath Govindraju > > Signed-off-by: Sanket Parmar > > --- > > May I know if this patch will be picked up as a bug fix for -rc. Yes, it has already at my fixes tree, to make sure no one report issues, I will send to Greg after several days later. Peter > > Thanks, > Aswath > > > drivers/usb/cdns3/cdns3-gadget.c | 8 +++----- > > 1 files changed, 3 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/usb/cdns3/cdns3-gadget.c b/drivers/usb/cdns3/cdns3-gadget.c > > index 105855a..f3c0276 100644 > > --- a/drivers/usb/cdns3/cdns3-gadget.c > > +++ b/drivers/usb/cdns3/cdns3-gadget.c > > @@ -2007,7 +2007,7 @@ static void cdns3_configure_dmult(struct cdns3_device *priv_dev, > > else > > mask = BIT(priv_ep->num); > > > > - if (priv_ep->type != USB_ENDPOINT_XFER_ISOC) { > > + if (priv_ep->type != USB_ENDPOINT_XFER_ISOC && !priv_ep->dir) { > > cdns3_set_register_bit(®s->tdl_from_trb, mask); > > cdns3_set_register_bit(®s->tdl_beh, mask); > > cdns3_set_register_bit(®s->tdl_beh2, mask); > > @@ -2046,15 +2046,13 @@ int cdns3_ep_config(struct cdns3_endpoint *priv_ep, bool enable) > > case USB_ENDPOINT_XFER_INT: > > ep_cfg = EP_CFG_EPTYPE(USB_ENDPOINT_XFER_INT); > > > > - if ((priv_dev->dev_ver == DEV_VER_V2 && !priv_ep->dir) || > > - priv_dev->dev_ver > DEV_VER_V2) > > + if (priv_dev->dev_ver >= DEV_VER_V2 && !priv_ep->dir) > > ep_cfg |= EP_CFG_TDL_CHK; > > break; > > case USB_ENDPOINT_XFER_BULK: > > ep_cfg = EP_CFG_EPTYPE(USB_ENDPOINT_XFER_BULK); > > > > - if ((priv_dev->dev_ver == DEV_VER_V2 && !priv_ep->dir) || > > - priv_dev->dev_ver > DEV_VER_V2) > > + if (priv_dev->dev_ver >= DEV_VER_V2 && !priv_ep->dir) > > ep_cfg |= EP_CFG_TDL_CHK; > > break; > > default: > > > -- Thanks, Peter Chen