Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp14655pja; Fri, 22 Nov 2019 02:49:49 -0800 (PST) X-Google-Smtp-Source: APXvYqyH+535q4Zw+XjwgceuYthmSlygBvIC1yyZ0nzzJ+8ybb/fg8DQq91B/q5+0YmkdQf3tW5U X-Received: by 2002:aa7:d697:: with SMTP id d23mr246919edr.31.1574419789222; Fri, 22 Nov 2019 02:49:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574419789; cv=none; d=google.com; s=arc-20160816; b=ffof3BWY3M5wKDoRuJONVH35AO315ennIuThCv+1kj6E49YuID3jzXl9gE/09i38Py RK8t8Egm2XaqwA1cZB2FXSMhWliXeveujkPrcqoOQAJvggUIezVda4zFHdWH7O1sV9ZW BwhgiGBkFDcQifabpFCFUUszovF1dDzEK3wrePedRg76WmydGYnjT8pI7/bWkCJWoFb6 5df4SzsoK4ER+l4gS4q+YSvWJDMHXVXImWG2HNCf6y+wDScKDB92F9BROHIa3WZktnnv XVAx1sRQqxEa3myPfdUZPaGGX/3ZkhiKTigzIN/rSIVW+qOlsXY5Ju+jKxwBCuCTcq7t SnhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qKQbeYFUkBV9qGDGz/19alWB7kS3UqGuyCEXizPr1ys=; b=0qQ7RVxzYKETVI9DKbJiMMADNZ9Twu7TFzBI6qhM81wpZ9mfTU7d4ZYjss22ZITmVR t4nJzQOOeY1IJQALo890KKqsChxXtDw2Ddzak/nygBVNIcKOtQy6UiD12SExtz4UZ2qT UKFNoL3pCdo8WIvL2WrXaHoF3SNJuxohQieECXrf1yCGvHx2yAHt9saMl5ORPUvyHMON hktAzhqkFSIGnsKGXHAkrvni1MMMiGFqP7x4uJRJxHVGNqkdJraea31xnMTE2zCv63ZF U2sDjOdGXIz/NcmSPJ+gFNbNbbQdU2RgbItcug9U/sUcNAwYmkLbP28v92dCt7pNpFC5 pTbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TUz+XMjx; 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 h5si1254626edd.401.2019.11.22.02.49.24; Fri, 22 Nov 2019 02:49:49 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=TUz+XMjx; 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 S1729484AbfKVKpc (ORCPT + 99 others); Fri, 22 Nov 2019 05:45:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:51912 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729477AbfKVKpa (ORCPT ); Fri, 22 Nov 2019 05:45:30 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8B6E120637; Fri, 22 Nov 2019 10:45:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574419530; bh=ZLr0cVcvibSBi1yenOkAeu/U1OwPHIF//FCDqSsn3ng=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TUz+XMjxW/ZouSzohc9+34TPM10l3sPtcnhQmapR1ZIaBl4NDcV5bdNnEv/MqofOY WKzvOiZblUHpLmyfwRpE8qbe7WwVHORh6WRn6vcV7XoyJrSYHbOWtY/qHGQtZctpc/ iBK2Utu799wI2gdRhy5VJqxdU14SleCtJ9bsi0vw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chunfeng Yun , Mathias Nyman , Sasha Levin Subject: [PATCH 4.9 143/222] usb: xhci-mtk: fix ISOC error when interval is zero Date: Fri, 22 Nov 2019 11:28:03 +0100 Message-Id: <20191122100913.155133973@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122100830.874290814@linuxfoundation.org> References: <20191122100830.874290814@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chunfeng Yun [ Upstream commit 87173acc0d8f0987bda8827da35fff67f52ad15d ] 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 Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- 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 73f763c4f5f59..144674913c788 100644 --- a/drivers/usb/host/xhci-mtk-sch.c +++ b/drivers/usb/host/xhci-mtk-sch.c @@ -122,7 +122,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) -- 2.20.1