From patchwork Tue Sep 7 15:23:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 161341 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 o87FOauj003975 for ; Tue, 7 Sep 2010 15:24:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756939Ab0IGPYa (ORCPT ); Tue, 7 Sep 2010 11:24:30 -0400 Received: from mail-px0-f174.google.com ([209.85.212.174]:61953 "EHLO mail-px0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757432Ab0IGPY2 (ORCPT ); Tue, 7 Sep 2010 11:24:28 -0400 Received: by mail-px0-f174.google.com with SMTP id 10so1361938pxi.19 for ; Tue, 07 Sep 2010 08:24:28 -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:in-reply-to:references; bh=a+xfM9Jsn3tyaUTVq0rvVzwRqdoqPzan4X/ogQa6jX4=; b=xfV7MdqQfCq3WQCVbxOO6t2UZEtIFLvIpnqabsCasZxexj2U42A5ltIJMrjaczG0jk YGdyv+xYnvNAYiyKUOhLNTNOd8qkRpO/RWO3O3LvKtZl+t5IMWlFvIF+1fmaPcpk+6V5 aWu26EPuGQBauRfaNq1J8BL9aiGeFcLjKemqg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=yHHvY6TbuwDsSxu7jYG4HbyOnb2Z/IjEEfkJKcPd7mx1HFrC8X0a3E+ndEYKCMIRUg /08JqTYie1xt6QsGG3s23QVDCaM3G6FAy1ZcLxtSjVXgvQ3lRxYY2dqA34z4DA7TI6NX +Rg6vk0SmR1R8mO+drmnVMdC3cAe5MnkVOves= Received: by 10.114.124.1 with SMTP id w1mr73752wac.58.1283873064000; Tue, 07 Sep 2010 08:24:24 -0700 (PDT) Received: from localhost ([183.16.32.111]) by mx.google.com with ESMTPS id o17sm13705740wal.21.2010.09.07.08.24.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 07 Sep 2010 08:24:22 -0700 (PDT) From: tom.leiming@gmail.com To: greg@kroah.com Cc: linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Ming Lei , David Brownell , Felipe Balbi , Anand Gadiyar , Mike Frysinger , Sergei Shtylyov Subject: [RESEND/PATCH 2/6] USB: musb-gadget: fix bulk IN infinite hangs in double buffer case Date: Tue, 7 Sep 2010 23:23:30 +0800 Message-Id: <1283873014-32511-3-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 1.6.2.5 In-Reply-To: <1283873014-32511-1-git-send-email-tom.leiming@gmail.com> References: <1283873014-32511-1-git-send-email-tom.leiming@gmail.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 (demeter1.kernel.org [140.211.167.41]); Tue, 07 Sep 2010 15:24:37 +0000 (UTC) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index de0ca90..f206c94 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -504,18 +504,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",