Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp789339ybj; Thu, 7 May 2020 07:41:45 -0700 (PDT) X-Google-Smtp-Source: APiQypKlGNB4AoSCpcsbpDIvu5sWSraucmBGZ4faVpbKRhpw/jfzJ7Hv4YW6YN3jFZsJv3laQmGj X-Received: by 2002:a17:906:b28a:: with SMTP id q10mr2731588ejz.273.1588862505523; Thu, 07 May 2020 07:41:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588862505; cv=none; d=google.com; s=arc-20160816; b=JatdwEZQIa5YtWTmsSAw5bGCDAcbv3ANb5YLWcxRae8LEt+ZnIid22E7Oyh5Key1gV ts4If5iFLNGls7M7BRKLjf01ZPn7+34ERSvu8bHlCX+zU0eYVqFelEkMVU66PnIQVsrZ 9KeO+N5ZVonRH2qOa6wTMdA7Un4QfXKBQZ4IqCzRiUkctzlNZJL7RtX8Y/FtJkmfwXog LBrCFVhtdEyXtXLMmh8H24ct3F/3q2AqtKJIGu+A9otqRgjlkl277uU0b+paMVdy2cWR ukqiDlJ5iOgiS+0ggLIqOiGPGfXfwpMe2vltFj/6OpKH2qcWKbPLTlcO4EshDkXcjK5B qogg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=57UFcH+pza5WpA2JxWwbA+GFMjEfhwbwYDdAf6VucMs=; b=olRU/6rjdL8koZ93PXDo4+zdi7S3ZB8p4osmEO2sMx4dbPIGWzplTLZ2UKPShLXy9i /6BNlpT3Fpxlgt7FiET1vF47lrvUoRF3QTAnFULlT3TWAQFoDPVFii3f5J1CYZim7tMU VEisk8RlirwG4Wi0oGnEsM38zLHnl3XyVYojsOTyrb82eU664ywe1GhawQDyuCLdyOn6 LUB4MsZTMZSBsdjFLqn3W10cRW5qlr65+Vsw24tDOxHD97stvJIv7ARjPOyJlDApL9F4 MJqTRyPoMTw5oI/9PiZu3f1+m9TDNZxgaFFbjpsgDRAXTnFZN6lq80mgrHo8rU9pcEqS +ndw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qsumMQCA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m24si3212282edr.227.2020.05.07.07.41.22; Thu, 07 May 2020 07:41:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qsumMQCA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728476AbgEGOh5 (ORCPT + 99 others); Thu, 7 May 2020 10:37:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:53768 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727787AbgEGO1t (ORCPT ); Thu, 7 May 2020 10:27:49 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 93DD52083B; Thu, 7 May 2020 14:27:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588861669; bh=NkGVLDt7e/D8KdRrZgwzwNyk2H8fpV+MMg/0WLe2bMs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qsumMQCAcRAOWv/ODv7GVbmCLj1j7QTIKtVf2MWTryjEmRnv2NhraXuSgjzEw4l4/ svUgwwdz0fZehjY8VhAJkJifDnPClLb2UFu+EmtBQfnnya8XzwH2PQap/n4g7DEFqJ HPV6DuL6b9+KYWFGKkfsqMasrnKzJyA5W3KySXyg= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Lubomir Rintel , Vinod Koul , Sasha Levin , dmaengine@vger.kernel.org Subject: [PATCH AUTOSEL 5.6 18/50] dmaengine: mmp_tdma: Reset channel error on release Date: Thu, 7 May 2020 10:26:54 -0400 Message-Id: <20200507142726.25751-18-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200507142726.25751-1-sashal@kernel.org> References: <20200507142726.25751-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lubomir Rintel [ Upstream commit 0c89446379218698189a47871336cb30286a7197 ] When a channel configuration fails, the status of the channel is set to DEV_ERROR so that an attempt to submit it fails. However, this status sticks until the heat end of the universe, making it impossible to recover from the error. Let's reset it when the channel is released so that further use of the channel with correct configuration is not impacted. Signed-off-by: Lubomir Rintel Link: https://lore.kernel.org/r/20200419164912.670973-5-lkundrak@v3.sk Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/mmp_tdma.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c index 51e08c16756ae..d683232d7fea0 100644 --- a/drivers/dma/mmp_tdma.c +++ b/drivers/dma/mmp_tdma.c @@ -363,6 +363,8 @@ static void mmp_tdma_free_descriptor(struct mmp_tdma_chan *tdmac) gen_pool_free(gpool, (unsigned long)tdmac->desc_arr, size); tdmac->desc_arr = NULL; + if (tdmac->status == DMA_ERROR) + tdmac->status = DMA_COMPLETE; return; } -- 2.20.1