Message ID | 1438931747-25209-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@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A1B85C05AC for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 7 Aug 2015 08:29:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CECB72065E for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 7 Aug 2015 08:29:52 +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 9DA2F20658 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 7 Aug 2015 08:29:51 +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 1ZNczO-0003eh-4u; Fri, 07 Aug 2015 08:26:54 +0000 Received: from mail-bl2on0134.outbound.protection.outlook.com ([65.55.169.134] helo=na01-bl2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZNczD-0003Um-OC for linux-arm-kernel@lists.infradead.org; Fri, 07 Aug 2015 08:26:45 +0000 Received: from BN3PR0301CA0031.namprd03.prod.outlook.com (10.160.180.169) by BY1PR0301MB1222.namprd03.prod.outlook.com (10.161.203.18) with Microsoft SMTP Server (TLS) id 15.1.225.19; Fri, 7 Aug 2015 08:26:20 +0000 Received: from BL2FFO11FD038.protection.gbl (2a01:111:f400:7c09::171) by BN3PR0301CA0031.outlook.office365.com (2a01:111:e400:4000::41) with Microsoft SMTP Server (TLS) id 15.1.225.19 via Frontend Transport; Fri, 7 Aug 2015 08:26:19 +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 BL2FFO11FD038.mail.protection.outlook.com (10.173.161.134) with Microsoft SMTP Server (TLS) id 15.1.243.9 via Frontend Transport; Fri, 7 Aug 2015 08:26:19 +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 t778Q8l2019852; Fri, 7 Aug 2015 01:26:15 -0700 From: Peter Chen <peter.chen@freescale.com> To: <shawn.guo@linaro.org>, <robh+dt@kernel.org> Subject: [PATCH v3 01/10] usb: chipidea: udc: zero-length packet is only needed for TX Date: Fri, 7 Aug 2015 15:15:38 +0800 Message-ID: <1438931747-25209-2-git-send-email-peter.chen@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438931747-25209-1-git-send-email-peter.chen@freescale.com> References: <1438931747-25209-1-git-send-email-peter.chen@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD038; 1:TMLOgxnQ76e5v66QKIP/hd5HK5BTt9DUwsI9r1yyzNBXUecgdgu4pRbyc/xtJlWm90MCHNZStNVFryB8B4EuDNqWBQgaDlegF4JMiUSmri5k6zzU0GD4Zc0rGuoT5xcspr0XjWMiDNSE7QEu/giZOoV8vLWZZuD/P6F6uSK1dlUhdqjfbMbjSRzQdgRhRYMmhmOMizysC9UPozUqjQP0U2zCEPvctBTlo0h4Co6/2ZIopywXZzQ+4BmNmLhqBOJczYeWZPpqCjzftRXYcfmFVZZIEo3wdDPqmAsiHYIfHKVeY0P8rM2BOZT5Ywa0+EtXQfdbuLp5gtFwUwNlrP129w== X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(339900001)(22813001)(189002)(199003)(36756003)(69596002)(92566002)(48376002)(6806004)(104016003)(85426001)(76176999)(106466001)(50466002)(50986999)(46102003)(50226001)(189998001)(62966003)(77156002)(4001540100001)(81156007)(97736004)(33646002)(5001830100001)(2950100001)(47776003)(5001960100002)(5001860100001)(5003940100001)(86362001)(68736005)(229853001)(64706001)(77096005)(19580395003)(19580405001)(105606002)(87936001)(107886002)(5001770100001)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR0301MB1222; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB1222; 2:QXnjFwAS1kMxzk2hDy3bwwx18iGZc+0agJTS8rs9SbJxneHtxkjthtgypVRmQjmteaZAiqacqcsW5RQHV+YF3rT34EcdSSsMT8e1UP2UOMx+cZgschbcYfC5PiPmDTMGVuHseeMT7pGs2gLd5AuSzmyo791YpwqZ8LO/TPqunt0=; 3:PQyFI867BIE+fEowxKPly4b8+sPAiu1yo84QkApVMmZhHr0XqOzUX4UvRtDUVNdmzFp1L1XlxNe+VJPX+mJcEjZ2u7Adnunzxja834TmRwzTNQnGme5RTzMeyYzpqKQ44dupzL0sU7P5NiOAObXU1pzGrIdlZR+wcxn4oT8EMGlnQbGr1FULJ2tjHf7PLCd5hPc758da5jyiY99KAJtdyhL2T0gTlPv4wZTBoXI5680=; 25:kGjCpn/5aVTG/f/kTLnqO84L/FOJLYbIMBhqBmiYpvmNU7L6Xv205Ahv2VDESOLb7Nak6Tb+2yGhFTYpDqveMsa15V3arUekktOj86qHEImoBAY+0TCL2WKEiOCWO6yyWKe6AqNw4K5NC8qzdz6kRtafk824+hDMxSxqw0HYAbwPpfONf0mxJWKlDIMexz2mtYeWj9Ge5M2WENJ+PlhRE+ALmY486NpgZqqYRYZ/9yAC0gza3qGBN8rQQFFaoCuy X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0301MB1222; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB1222; 20:NbW875Pmgf6flHeyVsKXYqXDsG2aJ+Ecp0jDDTIxuvsLb02KqHJ9K6lHsKDpofB5PheESTINw6XQ7YD3X5VMNZolbnUJClPVIK2u6//yN8K/QzlM/bnDs5Y4oEkXPPOWst8GEZ+REvl0mkYDyi0IHpH9yUWmHPTbjBO3K6NQ5qrYkECB+T4/GTwJZ7qbWggLpTNbvHHkdmeQmA0Fa73nf4zKoezgaw5ROSH2HDbIgr0lEjEXJQ1Mjce9eVtNMBo16EZQz5YrXiUqva8ND4sHceKpUbCScKnh91zl/PervWpyMeMhHpcYE6AHuvW3ZhB5XPs9S997W1EEE0bJ5urb7UEt2HUo5LXdlE6/V8fniZc=; 4:NlYAPUmvQBnqsaX78y39MVskRa4cr9n1P/RmetPXklDvbuKDrB7W/CV3e9y9/Rel8EkOePjmbWT0lI+joJG9BnJ32VYvia10AaxE2nIHIvOW/xA3OvdmZ5Wtj9MOy0N5ghNfLIqNF/EeVODB0TSu0144rK4zdT6u0qr1ZopYxXcq4H5sbAL+1W0rSS495LjrfbrKnoQEK4m+UE1vh5fz34wPT2ka2t55z14CPLDP8ayv2cX1/4OfhxxdeWz8zQRjfnjIl5zbsIUMaHQkhnEhrZTAay43T5+cJD8B3OZqWAw= X-Microsoft-Antispam-PRVS: <BY1PR0301MB1222063E6C3EF937195DA68981730@BY1PR0301MB1222.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:BY1PR0301MB1222; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0301MB1222; X-Forefront-PRVS: 066153096A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0301MB1222; 23:CSiOifbvbLZdQib/PrFpN5CL6xk51eT85qj+cYH?= =?us-ascii?Q?6mEgqQiYaG83rxmBlLs7f7RQwFL20uYMjHIOQbd0+nCZzsy3P4MKEur/teDL?= =?us-ascii?Q?j8ED98IX97gqkzr//CHrySkZDMlcXxq0jIynhBT3o19Tm9+/abTQj2drs4Ev?= =?us-ascii?Q?D/6IlTgePpCX7cCMIKxB4CwL61naovjKsfZC+phSXx4W4PLLdi895zZ6LD47?= =?us-ascii?Q?DdU+/5prWE44UwwVfGPxxG301gbVDkdC6lq1/XYLZLIqlcpfrw37BcPBqI2H?= =?us-ascii?Q?/3AA2kBZFX2xf2OnBWvq9+FzyA0EaVbPddz5rM9lqRUs68Q1ia7Z0yZmdD8V?= =?us-ascii?Q?5/GQAAjIyPABbqP7cyIesl+j1SprtceeaNmEmKKQtjmJLu4fbhi43YnOx/ks?= =?us-ascii?Q?OJpLBB2A/z2nI8YmeHXIhDOZVcc8bzJlR2wOj8IleAzVOydeqdVK3f4zlFJe?= =?us-ascii?Q?zRiUr8vDwh8E1czAb7hNwvRe/1hYyBNClY7dhfKwr+FRnqcMfM6+2/LuBYiN?= =?us-ascii?Q?K4tFmqcrHI2iQ4oqgc6+Uttyb2TDygLVnIcUJyLYCjtlBb19hg4Lt7AExo73?= =?us-ascii?Q?xnIWT8TAWf9r65xWYcOiGw0HHhH/YeDD+u2Rzn9WDBecgUSrd+eX/VV4nGlF?= =?us-ascii?Q?g8UGuSBoMvKjZE8kZoKwoXiUezj7Lxxizt+4/1aEJDcY9C1t34FnFOLOagBC?= =?us-ascii?Q?gfvg1FXrHA9YtOca9kRxtItRG3JXr0BxVrHMYanww5+7AaFLNY88f/Bj0POY?= =?us-ascii?Q?/93g9jXKInVk4nqp8MK498axNvMp1l9eWdb5Gxc2NLV8P9qkm4Yyj80uF5bR?= =?us-ascii?Q?16eVAaz2+k8OFuC8kJdla1kwzMc9H58FEZ/lTUMohAl4KNHW+8OFbiwCrU3v?= =?us-ascii?Q?ioIwDajzZeG70adcfco/Id2O8rrEKK2pFpXIhQTDcXffV9O57wJ/F4iIO+jn?= =?us-ascii?Q?LxjlMK+dEdX0BhJ5qCE5uZ2MUQSo++C4v8jrbus3zHFvLYvzVTGAApfLHWWy?= =?us-ascii?Q?xN3UzBPAI+DOmgnhAUZ/LtK/MEUMc90lkyxkXtAlpebzYaXiwei/GiZEWl9q?= =?us-ascii?Q?7v3QHBBdN5C3DA2BEEVRrWNf8Qx1q6Dx/FBUajGm8gTvK1trdu3Gmrf0uvQ5?= =?us-ascii?Q?y1xgs1cLIBhfKR9Jwe8WU1+chbB5+cqVrC30TIm0piptOAp+7prIK6ozM3Td?= =?us-ascii?Q?0rzgW4COZqfdu+oc=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB1222; 5:j8Hwimf4EkSjw6SZ07LgU/orBMzXgPaikAJ+J3u1H/wVjI/ys4CZPW2kQHC2sxCfFDv83nyDUi0jQNe7T2lGw9BCX3erGMViEtutzGps2sOvScwgYKt8dEJJ7sVHn7qreQ/biacbaK2JXyLzIuiA8A==; 24:D8W6fMU1nnddtqEKBMXy1m/5nlS6nolrl4Oe40roSLnlJnObGwYKtlpfcw/8U5cry7xtfcP0ZrvMV5JEyjs1c89dIKmqfDjy18rcbW0t/5Y=; 20:e1BPXYAosT8IjrCKyGOKCh6IpLF2x4hv/YJ2i9UTPQoYH+2Mc9hpzLnnCqcT08s58xweQIC59hFM1DpS26gDUQ== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Aug 2015 08:26:19.2882 (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: BY1PR0301MB1222 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150807_012644_232423_FAF96D67 X-CRM114-Status: GOOD ( 13.73 ) 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, 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.3 required=5.0 tests=BAD_ENC_HEADER,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 2a47720..15f55da 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(-)