Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp185749imm; Tue, 28 Aug 2018 19:57:57 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZZII2OarYlaBzER7GsJQ1V1txgCNUQEthqQes2gY58g2TsglqHfJ9ig2Ne26T+64tPgFJq X-Received: by 2002:a62:da0b:: with SMTP id c11-v6mr3994670pfh.68.1535511477395; Tue, 28 Aug 2018 19:57:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535511477; cv=none; d=google.com; s=arc-20160816; b=FmSJPYrQ4bSJfe8n+aBhWBgrPWl8aS87/mbcv9/E4oiN7itic8VdmFZazIlEdB76B4 zSsV/rmcOg/jbsbqbELylfPWcZkmHYbZfom8vLFvXdYczkMHFFNC5NuSsqzERVL9WaOr og6+yLxoKDZHFawLMpEoodfoBNCUWP4i70LvDfusmZpcfR/vDMt5ef4QbN0l3ys5Mj3r u2U8cADj0bDN77pfWohrHu76KPEcD2jmJj8RiBn87OCTT4oZMTVbc37fHeCVFtxBbjOg OZ/ftX1rKGmtwoCqy7bUvoa0GUwoxnuAQ2uipuvIp0/hWzb1W2zp7ndLd66L92U8oiJe 6g9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=zZj+sYfWimjbb21sS/y7u18uN6dlEDxnPOt72ahotMQ=; b=ttBAizakFSocLRp54ymQbtQbKYJqRgwintCmgjfu+yUO+BwPUBnj0gZrDVEJ2DMNaT WJe+Pn06Hi/01zu1jXSkRD/ddnVLwipisQAwwSYIq6O7DhuxEWM983rc9Y7S8WlBRUPA b2zrzAElGx0vCzWdNxdCGvWK16xkC1UHovIwewD9WZ+KhU3jb3e9iTRBCGG9ryRUtxOO McZeuRnpIf7O02gvYNqFvYj8sAHmwczMDOcXwusW6JeBP9A5fALteRRVza/m+twJoCwi q+Hrob82mKzAqCU06BGwwMfCgOrgcKcSX0rJQnbBe7tcE061B3McjnGawicamiyJZhoC 5aJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o7-v6si2551368pgi.53.2018.08.28.19.57.30; Tue, 28 Aug 2018 19:57:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727475AbeH2GuI (ORCPT + 99 others); Wed, 29 Aug 2018 02:50:08 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:64535 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725922AbeH2GuG (ORCPT ); Wed, 29 Aug 2018 02:50:06 -0400 X-UUID: bd56749c7c364d1591dbcd5c21284252-20180829 Received: from mtkcas34.mediatek.inc [(172.27.4.250)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1178768694; Wed, 29 Aug 2018 10:55:24 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by MTKMBS31DR.mediatek.inc (172.27.6.102) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Wed, 29 Aug 2018 10:55:23 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Wed, 29 Aug 2018 10:55:22 +0800 From: Chunfeng Yun To: Mathias Nyman CC: Greg Kroah-Hartman , Felipe Balbi , Matthias Brugger , Alan Stern , Chunfeng Yun , , , , , Subject: [PATCH 3/6] usb: xhci-mtk: fix ISOC error when interval is zero Date: Wed, 29 Aug 2018 10:55:15 +0800 Message-ID: <0c4244695d4dd8bf9cb1d2d0291783974c56ff7a.1535510898.git.chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <3bcc220aa54bfebc39cea54cd736388ad37ee0c5.1535510898.git.chunfeng.yun@mediatek.com> References: <3bcc220aa54bfebc39cea54cd736388ad37ee0c5.1535510898.git.chunfeng.yun@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If the interval equal zero, needn't round up to power of two for the number of packets in each ESIT, so fix it. Signed-off-by: Chunfeng Yun --- drivers/usb/host/xhci-mtk-sch.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-mtk-sch.c b/drivers/usb/host/xhci-mtk-sch.c index 46fe0a2..057f453 100644 --- a/drivers/usb/host/xhci-mtk-sch.c +++ b/drivers/usb/host/xhci-mtk-sch.c @@ -126,7 +126,9 @@ static void setup_sch_info(struct usb_device *udev, } if (ep_type == ISOC_IN_EP || ep_type == ISOC_OUT_EP) { - if (esit_pkts <= sch_ep->esit) + if (sch_ep->esit == 1) + sch_ep->pkts = esit_pkts; + else if (esit_pkts <= sch_ep->esit) sch_ep->pkts = 1; else sch_ep->pkts = roundup_pow_of_two(esit_pkts) -- 1.9.1