From patchwork Tue Mar 15 15:24:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mian Yousaf Kaukab X-Patchwork-Id: 583 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:43:59 -0000 Delivered-To: patches@linaro.org Received: by 10.151.46.5 with SMTP id y5cs73609ybj; Tue, 15 Mar 2011 08:26:30 -0700 (PDT) Received: by 10.213.96.79 with SMTP id g15mr82625ebn.72.1300202789718; Tue, 15 Mar 2011 08:26:29 -0700 (PDT) Received: from eu1sys200aog105.obsmtp.com (eu1sys200aog105.obsmtp.com [207.126.144.119]) by mx.google.com with SMTP id p50si20284262eei.17.2011.03.15.08.26.25 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Mar 2011 08:26:29 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.119 is neither permitted nor denied by best guess record for domain of mian.yousaf.kaukab@stericsson.com) client-ip=207.126.144.119; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.119 is neither permitted nor denied by best guess record for domain of mian.yousaf.kaukab@stericsson.com) smtp.mail=mian.yousaf.kaukab@stericsson.com Received: from source ([164.129.1.35]) (using TLSv1) by eu1sys200aob105.postini.com ([207.126.147.11]) with SMTP ID DSNKTX+FIaO2LoREpnIZ12zsQ71BSnKM84Gc@postini.com; Tue, 15 Mar 2011 15:26:29 UTC Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 28333136; Tue, 15 Mar 2011 15:26:23 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id B18372632; Tue, 15 Mar 2011 15:26:23 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 80C16A8093; Tue, 15 Mar 2011 16:25:47 +0100 (CET) Received: from localhost.localdomain (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.2.254.0; Tue, 15 Mar 2011 16:25:52 +0100 From: Mian Yousaf Kaukab To: Felipe Balbi , Cc: Lee Jones , Mian Yousaf Kaukab Subject: [PATCH 1/8] usb: musb: clear AUTOSET while clearing DMAENAB Date: Tue, 15 Mar 2011 16:24:24 +0100 Message-ID: <1300202671-12818-2-git-send-email-mian.yousaf.kaukab@stericsson.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1300202671-12818-1-git-send-email-mian.yousaf.kaukab@stericsson.com> References: <1300202671-12818-1-git-send-email-mian.yousaf.kaukab@stericsson.com> MIME-Version: 1.0 On the completion of tx dma, dma is disabled by clearing MUSB_TXCSR_DMAENAB in TXCSR. If MUSB_TXCSR_AUTOSET was set in txstate() it will remain set although it is not needed in PIO mode. Clear it as soon as it is not needed. Signed-off-by: Mian Yousaf Kaukab --- drivers/usb/musb/musb_gadget.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 5c7b321..419ca3e 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -535,7 +535,7 @@ void musb_g_tx(struct musb *musb, u8 epnum) is_dma = 1; csr |= MUSB_TXCSR_P_WZC_BITS; csr &= ~(MUSB_TXCSR_DMAENAB | MUSB_TXCSR_P_UNDERRUN | - MUSB_TXCSR_TXPKTRDY); + MUSB_TXCSR_TXPKTRDY | MUSB_TXCSR_AUTOSET); musb_writew(epio, MUSB_TXCSR, csr); /* Ensure writebuffer is empty. */ csr = musb_readw(epio, MUSB_TXCSR);