From patchwork Sat May 5 02:21:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 10381949 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 524FE60467 for ; Sat, 5 May 2018 02:28:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C0FD29435 for ; Sat, 5 May 2018 02:28:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B1AC2945B; Sat, 5 May 2018 02:28:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 829C829435 for ; Sat, 5 May 2018 02:28:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=kh0DCAANvZDggvRvzKVrlK3/Nb3lNh+5i88DyJR9f2s=; b=Mu1kgubSA2N9Sv eID+XwCkE4CMVxG1hOseKSPaDn5EVrlydqtC1MtypLv5ecwAJNclq9cg0dpuaZi6ccq5YokXrQS6J xQO4KnD2vE77zjP9G4kCnT9xvHOLhQ876hXcrnUeIwBC+tMk7DOK+dKXyYLkFH+/WQ4j2x5/DK7Lr D5nTKrcgKcnEwjPyd2J00SV6GMw7/rwOkIlCVV9nallerOpmZDG1zdy6G1GBiHfZZvotWRMJll9fw yazxga6uOZiQdX+wk/3MmPCei9Fpnjc1pCN+4lkH2l1W53bFwSl9EQsR6DNaKXAklri1CHqLpYyxn lCBCwCoOBYawQyEska3A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fEmvV-0002Cm-BP; Sat, 05 May 2018 02:27:57 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fEmuw-0001xU-Aa; Sat, 05 May 2018 02:27:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Type:MIME-Version:Message-ID: Date:Subject:CC:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=SNT7EBHTp+gFb97LQk2RA3XRWNt6evmFGvQ2A9tShLE=; b=hFE3GvdsjdRHxUoONolcWvQj7H 41Yh9pNvZH5NJiWGu+WAJ+3oOTmBAjYnu8ZfLPQNd/5qITaJjemAUSQVoBhellIcXnFf7b8P6aCrX JkqxHsX0NiQ0rK64Hocp5TbYBCDh+HuqOKsxseoUfnKT7OdWwxabjUof6lxSedn4rnB4kQdl31gjv r7u9gxk0R40m+Szx8qJtvUhgVxnq7fGuCV/lFHjZNn70ONMNWZf+QrR1Ugxvi8SPk5q8hty09m4Sn 1pH3iLI/qTx7tiuCc5acCnig1xtDMQ7Ez0PUPTuKgqgNlyyBayJP2Z7/6gHQZzsI+lFKnPdysELkg kEX/WZgg==; Received: from [1.203.163.78] (helo=mailgw01.mediatek.com) by merlin.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fEmut-0007ST-Ae; Sat, 05 May 2018 02:27:20 +0000 X-UUID: e73e903969d04fcf8f1b67e79565c6d9-20180505 Received: from mtkcas36.mediatek.inc [(172.27.4.250)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1147205388; Sat, 05 May 2018 10:21:26 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS31N1.mediatek.inc (172.27.4.69) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Sat, 5 May 2018 10:21:24 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Sat, 5 May 2018 10:21:23 +0800 From: Chunfeng Yun To: Greg Kroah-Hartman , Felipe Balbi Subject: [RESEND PATCH 1/5] usb: mtu3: avoid TX data length truncated in SS/SSP mode Date: Sat, 5 May 2018 10:21:16 +0800 Message-ID: <3b0c7ca576fee8220d63c9914483b70b0fbc8783.1525486663.git.chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180504_222719_644096_C13352A9 X-CRM114-Status: GOOD ( 10.99 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Chunfeng Yun , linux-mediatek@lists.infradead.org, Matthias Brugger , linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The variable of 'count' is declared as u8, this will cause an issue due to value truncated when works in SS or SSP mode and data length is greater than 255, so change it as u32. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_gadget_ep0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/mtu3/mtu3_gadget_ep0.c b/drivers/usb/mtu3/mtu3_gadget_ep0.c index ebdcf7a..d67b540 100644 --- a/drivers/usb/mtu3/mtu3_gadget_ep0.c +++ b/drivers/usb/mtu3/mtu3_gadget_ep0.c @@ -546,7 +546,7 @@ static void ep0_tx_state(struct mtu3 *mtu) struct usb_request *req; u32 csr; u8 *src; - u8 count; + u32 count; u32 maxp; dev_dbg(mtu->dev, "%s\n", __func__);