From patchwork Thu Feb 27 05:14:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Cherian X-Patchwork-Id: 3730261 X-Patchwork-Delegate: vinod.koul@intel.com Return-Path: X-Original-To: patchwork-dmaengine@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 72F7E9F2ED for ; Thu, 27 Feb 2014 05:15:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A1FA82020A for ; Thu, 27 Feb 2014 05:15:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B2E39201D3 for ; Thu, 27 Feb 2014 05:15:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754578AbaB0FPF (ORCPT ); Thu, 27 Feb 2014 00:15:05 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:50891 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754803AbaB0FPA (ORCPT ); Thu, 27 Feb 2014 00:15:00 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s1R5EwMw027655; Wed, 26 Feb 2014 23:14:58 -0600 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s1R5EwcI030862; Wed, 26 Feb 2014 23:14:58 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Wed, 26 Feb 2014 23:14:57 -0600 Received: from psplinux064.india.ti.com (dbdp20.itg.ti.com [172.24.170.38]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s1R5Emoe008856; Wed, 26 Feb 2014 23:14:55 -0600 From: George Cherian To: , , CC: , , , , , George Cherian Subject: [PATCH 2/2] usb: musb: musb_cppi41: Dont reprogram DMA if tear down is initiated Date: Thu, 27 Feb 2014 10:44:41 +0530 Message-ID: <1393478081-14226-3-git-send-email-george.cherian@ti.com> X-Mailer: git-send-email 1.8.1 In-Reply-To: <1393478081-14226-1-git-send-email-george.cherian@ti.com> References: <1393478081-14226-1-git-send-email-george.cherian@ti.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Reprogramming the DMA after tear down is initiated leads to warning. This is mainly seen with ISOCH since we do a delayed completion for ISOCH transfers. In ISOCH transfers dma_completion should not reprogram if the channel tear down is initiated. Signed-off-by: George Cherian --- drivers/usb/musb/musb_cppi41.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_cppi41.c b/drivers/usb/musb/musb_cppi41.c index f3ec7d2..e201b1e 100644 --- a/drivers/usb/musb/musb_cppi41.c +++ b/drivers/usb/musb/musb_cppi41.c @@ -132,7 +132,8 @@ static void cppi41_trans_done(struct cppi41_dma_channel *cppi41_channel) struct musb_hw_ep *hw_ep = cppi41_channel->hw_ep; struct musb *musb = hw_ep->musb; - if (!cppi41_channel->prog_len) { + if (!cppi41_channel->prog_len || + (cppi41_channel->channel.status == MUSB_DMA_STATUS_FREE)) { /* done, complete */ cppi41_channel->channel.actual_len =