From patchwork Fri Aug 27 11:37:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 137711 X-Patchwork-Delegate: me@felipebalbi.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o7RBc9O9017058 for ; Fri, 27 Aug 2010 11:38:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754957Ab0H0Lhx (ORCPT ); Fri, 27 Aug 2010 07:37:53 -0400 Received: from mail-px0-f174.google.com ([209.85.212.174]:60423 "EHLO mail-px0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754976Ab0H0Lht (ORCPT ); Fri, 27 Aug 2010 07:37:49 -0400 Received: by pxi10 with SMTP id 10so1016368pxi.19 for ; Fri, 27 Aug 2010 04:37:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=WjNGo+JOWticYLo1gm7Y8eARM+yHrSgeW7vT/Ytvbxo=; b=lWKOhLe0cFdu+q6e8SFPlYQ8g/vRuRIWNu10o90EaNj/sJTrBUgmC3qMWNktH7Us2h kkP4lUE+ue7t4Pry8+TlQXdaHLN4Wd5cKAFcpE+8wpDoohfPOGnuwCi3fB1TzFr3b7EU HTuv2vYnm4kqB5lw9rBFpA0ScyPHutfdTkz8U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=QvCPka7XzzKYGYObEXhsse1a00qr92Nq7yL8R6Atznb6seTzkhYiGXQj2df8Imi4sP Wt/VtvdpTuFQJ6r6R1kENzmWE7LWI9dyX3PdAiOv2/wJChpLtMx0mRv1Cgb8aUS1wJ6m jUcRgM1wfABCbhLYEPnuWv3LqBCPHsc3da7Lo= Received: by 10.114.39.2 with SMTP id m2mr337229wam.45.1282909068833; Fri, 27 Aug 2010 04:37:48 -0700 (PDT) Received: from localhost ([183.16.44.214]) by mx.google.com with ESMTPS id x9sm6452649waj.15.2010.08.27.04.37.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 27 Aug 2010 04:37:47 -0700 (PDT) From: tom.leiming@gmail.com To: greg@kroah.com, dbrownell@users.sourceforge.net, felipe.balbi@nokia.com Cc: linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, Ming Lei , Anand Gadiyar , Mike Frysinger , Sergei Shtylyov Subject: [PATCH 1/2] USB: musb-gadget: fix bulk IN infinite hangs in double buffer case Date: Fri, 27 Aug 2010 19:37:20 +0800 Message-Id: <1282909040-2936-1-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 1.6.2.5 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 (demeter1.kernel.org [140.211.167.41]); Fri, 27 Aug 2010 11:38:10 +0000 (UTC) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 550b397..e0bd1c1 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -506,18 +506,6 @@ void musb_g_tx(struct musb *musb, u8 epnum) /* ... or if not, then complete it. */ musb_g_giveback(musb_ep, request, 0); - /* - * Kickstart next transfer if appropriate; - * the packet that just completed might not - * be transmitted for hours or days. - * REVISIT for double buffering... - * FIXME revisit for stalls too... - */ - musb_ep_select(mbase, epnum); - csr = musb_readw(epio, MUSB_TXCSR); - if (csr & MUSB_TXCSR_FIFONOTEMPTY) - return; - request = musb_ep->desc ? next_request(musb_ep) : NULL; if (!request) { DBG(4, "%s idle now\n",