Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1865641pxb; Fri, 5 Mar 2021 01:19:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJzuiPlSB1Sd2+dhjpx8sP0Fvq72983bAjSXEfaouTL4PnEp9bfGxSomZzAKWT2QPjvZECgO X-Received: by 2002:a92:da91:: with SMTP id u17mr7641831iln.27.1614935953050; Fri, 05 Mar 2021 01:19:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614935953; cv=none; d=google.com; s=arc-20160816; b=zAXFKwu8Ly2ovfXhjtGCqoDGk0h0XzkJ6L6E/+kfdBYyJjqEn9bdeCByyoeRyWsvL0 n35RKcU/7qAv6VGzGGQk5w5BgRl/QJo5IoGIKA90m/cC3+T6LohtYrDFe61O4Zr3nYaz 4X43VFLULkARNyJXJYKDRXQdMEk8tvy5ccw6yED8PuwPKS6VvdNE/k1phB6/gG0cZhZ1 hhJ4giHis7fstH94mQvK6xqD8DxoHfVAa8Vgtzt1tB6V6MmjV92gkQeSzG9o4caRqzE4 F5G5dtMFeWWZhZOGCHp4QkmNfitc9lfrQqB4K0B3M5LjXQILnSfu5/eEVDBQ554/a+Gq KbDw== 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=u/QUBaFSLve5l1ZEgYmJqd7giqf2XHdNh91ypHtobU4=; b=DDJYcPewKc6/xz+8NWAERwaLycy/4G5Gz0ji87whUoHmQlEIJLfoO8gLjgO0RDfiLU +IGRe3dXozbpSRGlvhOfuxz5PAJd56u5hBirl40U1eW/A0UXzyz592rr6igJedi3Qqb7 o/jarR/c03zU/Z31tl0tb8K7Q7gz+PmONCrO9q2zzaV6XFAP120cZa2ksEi9axXikShu 9l2bdVBchhznrVF+BOPYoM5xJgreW+DtGaxq9g3ss2K6YDdiCLgacudO/h81RuASm9aF jOrlPszvfigzZDHmi6w59neKcT+rkqsXplkXJ1DzzAyGTwdOLEDxZM3sqrstfmI2vY3i Mb2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=a8ksPqQV; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l11si1815504iop.53.2021.03.05.01.18.59; Fri, 05 Mar 2021 01:19:13 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=a8ksPqQV; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229615AbhCEJQ5 (ORCPT + 99 others); Fri, 5 Mar 2021 04:16:57 -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-kernel@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