From patchwork Thu Aug 19 09:50:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Chalain X-Patchwork-Id: 120326 X-Patchwork-Delegate: me@felipebalbi.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o7J9oiok005898 for ; Thu, 19 Aug 2010 09:50:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752164Ab0HSJuo (ORCPT ); Thu, 19 Aug 2010 05:50:44 -0400 Received: from mx1.a4mail.co.uk ([135.196.253.57]:42594 "EHLO edge01.a4mail.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750902Ab0HSJun convert rfc822-to-8bit (ORCPT ); Thu, 19 Aug 2010 05:50:43 -0400 Received: from fe01.a4mail.net (172.20.0.2) by mx1.a4mail.co.uk (172.20.0.5) with Microsoft SMTP Server (TLS) id 8.1.393.1; Thu, 19 Aug 2010 10:50:41 +0100 Received: from [10.1.2.99] (86.64.221.138) by fe01.a4mail.net (172.20.0.2) with Microsoft SMTP Server (TLS) id 8.1.436.0; Thu, 19 Aug 2010 10:50:41 +0100 Message-ID: <4C6CFE6A.2050704@myriadgroup.com> Date: Thu, 19 Aug 2010 11:50:34 +0200 From: Marc Chalain User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.2.8) Gecko/20100802 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: "linux-omap@vger.kernel.org" , Tony Lindgren Subject: [PATCH] : omap-udc stressed full duplex usb communication. References: <4C6CF9BB.1010804@myriadgroup.com> In-Reply-To: <4C6CF9BB.1010804@myriadgroup.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 19 Aug 2010 09:50:45 +0000 (UTC) diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c index f81e4f0..9da4d98 100644 --- a/drivers/usb/gadget/omap_udc.c +++ b/drivers/usb/gadget/omap_udc.c @@ -1919,6 +1919,7 @@ static void pio_out_timer(unsigned long _ep) struct omap_ep *ep = (void *) _ep; unsigned long flags; u16 stat_flg; + int stat = -1; spin_lock_irqsave(&ep->udc->lock, flags); if (!list_empty(&ep->queue) && ep->ackwait) { @@ -1932,14 +1933,14 @@ static void pio_out_timer(unsigned long _ep) VDBG("%s: lose, %04x\n", ep->ep.name, stat_flg); req = container_of(ep->queue.next, struct omap_req, queue); - (void) read_fifo(ep, req); + stat = read_fifo(ep, req); omap_writew(ep->bEndpointAddress, UDC_EP_NUM); omap_writew(UDC_SET_FIFO_EN, UDC_CTRL); ep->ackwait = 1 + ep->double_buf; } else deselect_ep(); } - mod_timer(&ep->timer, PIO_OUT_TIMEOUT); + if (stat == -1) mod_timer(&ep->timer, PIO_OUT_TIMEOUT); spin_unlock_irqrestore(&ep->udc->lock, flags); } @@ -1948,7 +1949,7 @@ static irqreturn_t omap_udc_pio_irq(int irq, void *_dev) u16 epn_stat, irq_src; irqreturn_t status = IRQ_NONE; struct omap_ep *ep; - int epnum; + int epnum, epnumrx, epnumtx; struct omap_udc *udc = _dev; struct omap_req *req;