Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2557444imu; Thu, 29 Nov 2018 06:52:35 -0800 (PST) X-Google-Smtp-Source: AFSGD/XTImpflCwE45s8yPdXH0vsguwmcoGnnJyanDf+NnGA4CR526bPitilmciIX8sLojSgDFpa X-Received: by 2002:a63:8149:: with SMTP id t70mr1545277pgd.172.1543503155358; Thu, 29 Nov 2018 06:52:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543503155; cv=none; d=google.com; s=arc-20160816; b=dVr5PDybKg6LGN1zwMC9ZousDUG9L9miuy9++BYAXEhyqh4Sex5s2FsPdPAD9c3LtO AYi7+ddsA/NlcKerGqLtLlKRFFQItpRj4UGY5ci0uGuIfLijKjbh/kik2tJX7n2+aLJC wG3ce7hpNwGgdOjinEY9A8cd8ysCq5FM63BUu5NYBwYLGvb7GwQj+xQbApYBzTlyedPu 0t9h/+CjE84AWAvPuM5ygB+yep0FQBOc+VGtUAJTDtLzxxgvE8Mv2Laapi0/iq1eObbF yg9uv9U447z4xTSIfxBX2pJEGSkkvJ2l/BJz4Nt/7Ymz/E/fhlQB/NSCKu0iXVr4FEpq i2EA== 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=+PPJDvglLHT7KODImTWWolBZL6MpCz2iBv1nToqZyPI=; b=kU9QJIf/zxf4gLHUPYvI9+zg/7FIsSKtCPGg6E1t3o6/pA/jaBfCgXpP7kFEaYIT5d igLedltuFAFBB6aTkRHEQ6OqDHuVZE0wPvguDjEzYL+rMtQSzXKv8/syzzztIZnyurpt wzkQlxAVf3kAwZRGK4FnyDCdUYntBC/Q2Z5Lf1MfwdWfMLe82BLS4ec/98fbCfnenXZc uitPK6AJQnX9hj1HmsApt+ub4QZIfgiF30RR+LmhnZwZDk/EA5OJPHQwR5wF2RxWEMED rLus7wETQLhkcIjVdTvoaiHzg8rjfFXTlZIwoc6UdCBNMzwFSfBIocQ9M+C/1j6znxr7 fgXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2n9PcPrj; 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 n5si1963863pgl.485.2018.11.29.06.52.13; Thu, 29 Nov 2018 06:52:35 -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=2n9PcPrj; 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 S1731597AbeK3BaN (ORCPT + 99 others); Thu, 29 Nov 2018 20:30:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:57092 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731500AbeK3BaL (ORCPT ); Thu, 29 Nov 2018 20:30:11 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.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 695D0205C9; Thu, 29 Nov 2018 14:24:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543501479; bh=iSI1EbAOYP2fpKX+9SJpOPkHJsKKruFJPALgRBifXqw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2n9PcPrjVsn8CKleH7pCIyyDGgotSruA7IiuvagdVnallC7m8Q/RiiZuFwU7/sgqj pcV/nRhPyhMrPCzfZPHL20lpvEfn/dGXzxMZ05fGyHOJ11FH/w/EnKhvckb+HPLFAQ O1iKgzAP3rEsdM1jjTjiHy5JpV3ivZgslq34+3wA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Felipe Balbi Subject: [PATCH 4.14 007/100] usb: dwc3: gadget: fix ISOC TRB type on unaligned transfers Date: Thu, 29 Nov 2018 15:11:37 +0100 Message-Id: <20181129140059.521079455@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129140058.768942700@linuxfoundation.org> References: <20181129140058.768942700@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Felipe Balbi commit 2fc6d4be35fb1e262f209758e25bfe2b7a113a7f upstream. When chaining ISOC TRBs together, only the first ISOC TRB should be of type ISOC_FIRST, all others should be of type ISOC. This patch fixes that. Fixes: c6267a51639b ("usb: dwc3: gadget: align transfers to wMaxPacketSize") Cc: # v4.11+ Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- drivers/usb/dwc3/gadget.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1088,7 +1088,7 @@ static void dwc3_prepare_one_trb_sg(stru /* Now prepare one extra TRB to align transfer size */ trb = &dep->trb_pool[dep->trb_enqueue]; __dwc3_prepare_one_trb(dep, trb, dwc->bounce_addr, - maxp - rem, false, 0, + maxp - rem, false, 1, req->request.stream_id, req->request.short_not_ok, req->request.no_interrupt); @@ -1120,7 +1120,7 @@ static void dwc3_prepare_one_trb_linear( /* Now prepare one extra TRB to align transfer size */ trb = &dep->trb_pool[dep->trb_enqueue]; __dwc3_prepare_one_trb(dep, trb, dwc->bounce_addr, maxp - rem, - false, 0, req->request.stream_id, + false, 1, req->request.stream_id, req->request.short_not_ok, req->request.no_interrupt); } else if (req->request.zero && req->request.length && @@ -1136,7 +1136,7 @@ static void dwc3_prepare_one_trb_linear( /* Now prepare one extra TRB to handle ZLP */ trb = &dep->trb_pool[dep->trb_enqueue]; __dwc3_prepare_one_trb(dep, trb, dwc->bounce_addr, 0, - false, 0, req->request.stream_id, + false, 1, req->request.stream_id, req->request.short_not_ok, req->request.no_interrupt); } else {