From patchwork Tue Nov 10 18:04:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Daniel_Gl=C3=B6ckner?= X-Patchwork-Id: 59119 Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAAI5o9e005000 for ; Tue, 10 Nov 2009 18:05:51 GMT Received: from dlep33.itg.ti.com ([157.170.170.112]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id nAAI5mdk014852 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 10 Nov 2009 12:05:48 -0600 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id nAAI5lnY026441 for ; Tue, 10 Nov 2009 12:05:47 -0600 (CST) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id BE2D6806EE for ; Tue, 10 Nov 2009 12:05:28 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp53.itg.ti.com (dflp53.itg.ti.com [128.247.5.6]) by linux.omap.com (Postfix) with ESMTP id DA5DB80626 for ; Tue, 10 Nov 2009 12:05:09 -0600 (CST) Received: from red.ext.ti.com (localhost [127.0.0.1]) by dflp53.itg.ti.com (8.13.8/8.13.8) with ESMTP id nAAI58B0024391 for ; Tue, 10 Nov 2009 12:05:09 -0600 (CST) Received: from mail74-tx2-R.bigfish.com (mail-tx2.bigfish.com [65.55.88.112]) by red.ext.ti.com (8.13.7/8.13.7) with ESMTP id nAAI58gm006987 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 10 Nov 2009 12:05:08 -0600 Received: from mail74-tx2 (localhost.localdomain [127.0.0.1]) by mail74-tx2-R.bigfish.com (Postfix) with ESMTP id BEA7A10B837D for ; Tue, 10 Nov 2009 18:05:07 +0000 (UTC) X-SpamScore: 4 X-BigFish: vps4(zz1878kzz1202hzzz32i6bh61h) X-Spam-TCS-SCL: 0:0 X-MS-Exchange-Organization-Antispam-Report: OrigIP: 193.175.82.87; Service: EHS Received: from mail74-tx2 (localhost.localdomain [127.0.0.1]) by mail74-tx2 (MessageSwitch) id 1257876299755100_14115; Tue, 10 Nov 2009 18:04:59 +0000 (UTC) Received: from TX2EHSMHS042.bigfish.com (unknown [10.9.14.241]) by mail74-tx2.bigfish.com (Postfix) with ESMTP id 6BB27478075 for ; Tue, 10 Nov 2009 18:04:58 +0000 (UTC) Received: from mx1.emlix.com (193.175.82.87) by TX2EHSMHS042.bigfish.com (10.9.99.142) with Microsoft SMTP Server (TLS) id 14.0.482.32; Tue, 10 Nov 2009 18:04:56 +0000 Received: from gate.emlix.com ([193.175.27.217]:35276 helo=mailer.emlix.com) by mx1.emlix.com with esmtp (Exim 4.63) (envelope-from ) id 1N7v5L-00041Q-9F; Tue, 10 Nov 2009 19:04:55 +0100 Received: by mailer.emlix.com id 1N7v5L-0003jx-4p; Tue, 10 Nov 2009 19:04:55 +0100 Received: by avocado.emlix.com (Postfix, from userid 2059) id 09F11140A8; Tue, 10 Nov 2009 19:04:54 +0100 (CET) From: =?utf-8?q?Daniel=20Gl=C3=B6ckner?= To: Felipe Balbi Date: Tue, 10 Nov 2009 19:04:54 +0100 Message-ID: <1257876294-25296-1-git-send-email-dg@emlix.com> MIME-Version: 1.0 Organization: emlix gmbh, Goettingen, Germany X-Reverse-DNS: mx1.emlix.com Cc: davinci-linux-open-source@linux.davincidsp.com, linux-usb@vger.kernel.org Subject: [PATCH] USB: musb: respect usb_request->zero in control requests X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.4 Precedence: list List-Id: davinci-linux-open-source.linux.davincidsp.com List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: davinci-linux-open-source-bounces+patchwork-davinci=patchwork.kernel.org@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces+patchwork-davinci=patchwork.kernel.org@linux.davincidsp.com diff --git a/drivers/usb/musb/musb_gadget_ep0.c b/drivers/usb/musb/musb_gadget_ep0.c index 7a67786..522efb3 100644 --- a/drivers/usb/musb/musb_gadget_ep0.c +++ b/drivers/usb/musb/musb_gadget_ep0.c @@ -511,7 +511,8 @@ static void ep0_txstate(struct musb *musb) /* update the flags */ if (fifo_count < MUSB_MAX_END0_PACKET - || request->actual == request->length) { + || (request->actual == request->length + && !request->zero)) { musb->ep0_state = MUSB_EP0_STAGE_STATUSOUT; csr |= MUSB_CSR0_P_DATAEND; } else