From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5EC92C43381 for ; Fri, 5 Mar 2021 09:17:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2F46064F76 for ; Fri, 5 Mar 2021 09:17:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229773AbhCEJQz (ORCPT ); Fri, 5 Mar 2021 04:16:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:33568 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229573AbhCEJQ3 (ORCPT ); Fri, 5 Mar 2021 04:16:29 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 16E8864F45; Fri, 5 Mar 2021 09:16:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614935788; bh=KEwMRCIZF4N4qvSPoe3DClNVeplmH4EkZWy7fg+Ty8M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=a8ksPqQVEmCqAb+LBFF6xySukXRl2l7PWsjWkgGEnQkcfvNoAAJR9DY8Y4erLja8o 8jJ08I9P195p2aHynAEx+PlPZPgbn8S2g83bYnXGxOWy5vbzteVPvVOc+81YfsrDhY H2oeI/ngitJ8V5rEpt95rIJ5rX3lqMNP0MKHXuaI= Date: Fri, 5 Mar 2021 10:16:25 +0100 From: Greg Kroah-Hartman To: Sergei Shtylyov Cc: Chunfeng Yun , Mathias Nyman , Ikjoon Jang , Matthias Brugger , linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Nicolas Boichat , Eddie Hung Subject: Re: [PATCH 03/17] usb: xhci-mtk: get the microframe boundary for ESIT Message-ID: References: <1614934975-15188-1-git-send-email-chunfeng.yun@mediatek.com> <1614934975-15188-3-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Fri, Mar 05, 2021 at 12:13:33PM +0300, Sergei Shtylyov wrote: > Hello! > > On 05.03.2021 12:02, Chunfeng Yun wrote: > > > Tune the boundary for FS/LS ESIT due to CS: > > For ISOC out-ep, the controller starts transfer data after > > the first SS; for others, the data is already transfered > > Transferred. > > > before the last CS. > > > > Signed-off-by: Chunfeng Yun > > --- > > drivers/usb/host/xhci-mtk-sch.c | 24 +++++++++++++++++++----- > > 1 file changed, 19 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/usb/host/xhci-mtk-sch.c b/drivers/usb/host/xhci-mtk-sch.c > > index 8950d1f10a7f..e3b18dfca874 100644 > > --- a/drivers/usb/host/xhci-mtk-sch.c > > +++ b/drivers/usb/host/xhci-mtk-sch.c > > @@ -513,22 +513,35 @@ static void update_sch_tt(struct usb_device *udev, > > list_del(&sch_ep->tt_endpoint); > > } > > +static u32 get_esit_boundary(struct mu3h_sch_ep_info *sch_ep) > > +{ > > + u32 boundary = sch_ep->esit; > > + > > + if (sch_ep->sch_tt) { /* LS/FS with TT */ > > + /* tune for CS */ > > + if (sch_ep->ep_type != ISOC_OUT_EP) > > + boundary += 1; > > Why not: > > boundary++; > > > + else if (boundary > 1) /* normally esit >= 8 for FS/LS */ > > + boundary -= 1; > > boundary--; Doesn't matter either way, it's the author's choice. greg k-h