Message ID | 1438577238-10153-2-git-send-email-peter.chen@freescale.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A1F329F52D for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 3 Aug 2015 06:01:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EECBE2053C for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 3 Aug 2015 06:01:23 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8FECD20504 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 3 Aug 2015 06:01:16 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZM8lB-0008Tn-W5; Mon, 03 Aug 2015 05:58:06 +0000 Received: from mail-bn1bbn0106.outbound.protection.outlook.com ([157.56.111.106] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZM8l3-0008O4-FY for linux-arm-kernel@lists.infradead.org; Mon, 03 Aug 2015 05:57:58 +0000 Received: from BN3PR0301CA0063.namprd03.prod.outlook.com (10.160.152.159) by CY1PR0301MB1225.namprd03.prod.outlook.com (10.161.212.147) with Microsoft SMTP Server (TLS) id 15.1.225.19; Mon, 3 Aug 2015 05:57:35 +0000 Received: from BN1BFFO11FD008.protection.gbl (2a01:111:f400:7c10::1:169) by BN3PR0301CA0063.outlook.office365.com (2a01:111:e400:401e::31) with Microsoft SMTP Server (TLS) id 15.1.225.19 via Frontend Transport; Mon, 3 Aug 2015 05:57:35 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BN1BFFO11FD008.mail.protection.outlook.com (10.58.144.71) with Microsoft SMTP Server (TLS) id 15.1.243.9 via Frontend Transport; Mon, 3 Aug 2015 05:57:34 +0000 Received: from shlinux2.ap.freescale.net (shlinux2.ap.freescale.net [10.192.224.44]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t735vQhZ030467; Sun, 2 Aug 2015 22:57:30 -0700 From: Peter Chen <peter.chen@freescale.com> To: <shawn.guo@linaro.org> Subject: [PATCH v2 01/10] usb: chipidea: udc: zero-length packet is only needed for TX Date: Mon, 3 Aug 2015 12:47:09 +0800 Message-ID: <1438577238-10153-2-git-send-email-peter.chen@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438577238-10153-1-git-send-email-peter.chen@freescale.com> References: <1438577238-10153-1-git-send-email-peter.chen@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD008; 1:u11QmQpEKhj5yyVEmZJWxwfiROn/h7UzYkGQNVp53v4bn+KiiJQv0hX0mSL5oNlB2doivY0HKQhs28VSBz9kc/Uz/qOmyfzcBsracv5sI7LtJyR3SCdzM1kNoPxgOcHQHvLpTv26I9m0Y7YKYgAVsN1MWvWZIiJPwkgZIy4WyE8nMscaeV4iXtT/w/E9VrvXkD7Tsqimzp8tWGmoC/Vb3EE8MJSO8AlnArMn3Zdzetrmy80SH0i1s7hk7XX+xv3PZkntAzfR4/NNWVYzPMSwA+lGIvYvpCHIfLs8wAJnuT+VA2df9Lnwju8yPWNgY4Auwzds+XCyxhuV3+gYmMaJBg== X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(339900001)(199003)(22813001)(189002)(86362001)(33646002)(2351001)(229853001)(46102003)(76176999)(62966003)(77156002)(107886002)(92566002)(5001960100002)(36756003)(50986999)(50226001)(110136002)(104016003)(189998001)(19580395003)(105606002)(19580405001)(6806004)(48376002)(77096005)(87936001)(47776003)(50466002)(106466001)(2950100001)(85426001)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY1PR0301MB1225; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:sfv; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1225; 2:5hXIz9fP4Cxj7Eb3SCwLboXYpj2nxM/PISjmXP8bOzCGeaGrx/GoKSXeHRy9zFQED2PHmPRrOjQ8I27yKzPqkdNNyV4coXfFy41bgb5otUTjEOKsGvWo3ZsqCP8L75oAhSejzwnRMITkl7xVk+VKYOHEdEopQ1qZ6JSgwq7eUH0=; 3:pU3Ub11eomVah1h1Z3Nh+qTDzZBhWsQpv+llbJ1A1Vih2D4gLAfvrOPDb7Gx+qvftdMPX7y8/Sqq0+SsOmKdyUsFDsD6p4sj5y7Gne04mY058shoP3Q6/V+qBsJCBOe8aV+LIRJqMrpqluEIu6NxoFUo3s6hQ2xMUvJwvyBHrNZ0hM1aSXlRnTOO0xcgCSUtammm6NXHcRFnHIsBokz4/Ddo9j3cHmUOTj9j8enG+iI=; 25:t7ocyicOEBTEHirg5ZCGCED6WmmlH3YxonQsTVgHaOUlg/jfDzRS2/6do+EkCaHepI+G8JEDxMsMJkPgkDdPzI+Pw0pikjD+a3a05gvrMidy25LBi0VKtYzMZZlOMT3QgQe7cFuu5cLaLzeE5Trlm0Wctn9UVMfEsUpTQ0HZeknQKmDjR2eiuzOAwHvZsk3uDWQbjrZY4dmp3Jvko6BP++HGvvOqWsNBKNkP3slFYlkeGu77PQMaIn02h+9MJm/9 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB1225; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1225; 20:70O2F4/gLEeLJHCsO8j7CCdEKcPOzKtHi9+WovxqXZqY28EqhiialyYC/Hoa3YLl3jo0FMK6uvstb3bTzmYLQiQZ4Dm5dHRhlA+txaBovAlzeGc6iRmJqHuKqkuEa26FDE8/Xd39Kj8+Ary2f4s7Q4axv0Gxeh0Vf60tKQx97mFqQHGuQmXvVfZiUxfHnL/+aXwI+ndhudfRtDIyCk/O3JRmgFCB9M+gtlF+GeOuKgXOjajNYByYFyZZ1dVklCEMVGqwYw636gtsmb4vy4nxc3KqaiOrrpsiHV+t7QmOKigp/YtMstq0q9WtmDw0wWtakK0MkSqRu37g01tUdobrm1ZPESD4F1icWe7h5NDvmU0=; 4:f44f1qy5TpM/EgZF4lC/+IVkI11B03obj8oBlqLxwkdotXGWJXjPkjZVNsfFyC9fANeqwGCRSA/bsNXzV9AW7OTsFeb7YNrBkovuBBuqHYYUGLqZs8Hxv1eJ8y1UF0vRffaI8qDF+0wzqTBGgicKJcZ1JO8H3w/1zMAJYspyUDRJgA+F8jz/r/ewz3bTQwWxfqaQbx6NB4Y6ZuqQnKoMLt3eteKI+eF51xrtKoJmRFAugn07GRgccxcB3QUOEmy+9jn4aQCNwGOsb8ydAumUDEFUwLbn2m6DYatY03LOVvs= X-Microsoft-Antispam-PRVS: <CY1PR0301MB122505C3F693C57006D4A2BF81770@CY1PR0301MB1225.namprd03.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:CY1PR0301MB1225; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0301MB1225; X-Forefront-PRVS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AOGSSimWl0JFtM4BOHttLGMukjh15y2GkwTFsTj/RptUCTryVGDsalzmuDTSIK5lTChOuUdsJrpy5fOc0hZ3cl6bmosST+s24NQm7Oq8qs8E+xIJYTA==; 24:Hpki0Fa9Pd13f9IDbtyC/rJ4aV5956pRgZAAM/bzrQq0tTxEoRBnqGtCg95+pqwpnbKWcwqxKRunrTELJrM873MxMaeLmtSmUegwbqqpT38=; 20:97bDzts4j/PAfn8nKgQ1AAkZmMOqHpgA97ApfHaKI+f/gQ5sU6sPxf+kNm1ebAhKChbMxT25BZixUQgEIfJk/g== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Aug 2015 05:57:34.7676 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB1225 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150802_225757_823886_1CF4E824 X-CRM114-Status: GOOD ( 13.12 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, linux-usb@vger.kernel.org, pawel.moll@arm.com, gregkh@linuxfoundation.org, s.hauer@pengutronix.de, jun.li@freescale.com, robh+dt@kernel.org, Peter Chen <peter.chen@freescale.com>, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 06b7224..51e66a1 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -445,7 +445,7 @@ static int _hardware_enqueue(struct ci_hw_ep *hwep, struct ci_hw_req *hwreq) rest -= count; } - if (hwreq->req.zero && hwreq->req.length + if (hwreq->req.zero && hwreq->req.length && hwep->dir == TX && (hwreq->req.length % hwep->ep.maxpacket == 0)) add_td_to_list(hwep, hwreq, 0);
The zero-length packet is the sendor tells the receiver that there is no more data, so it is only needed at the TX side. Signed-off-by: Peter Chen <peter.chen@freescale.com> --- drivers/usb/chipidea/udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)