Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2515009imm; Mon, 24 Sep 2018 05:46:07 -0700 (PDT) X-Google-Smtp-Source: ACcGV62cZMNmCa/WD7YkiGVl0gq6VRYSwOaaHDIPoyxKU64Ojy2R4i/KJ+9ciJm28Chc28SEwWGz X-Received: by 2002:a17:902:1101:: with SMTP id d1-v6mr10737610pla.131.1537793167705; Mon, 24 Sep 2018 05:46:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537793167; cv=none; d=google.com; s=arc-20160816; b=mIMPpITzY7Ctm1vSg32FwWDy+fNP85hlp+sYxOc0V3OMesZ+37g3ua0efItFTzXyfj CH766lzW2k4qdRP76+n1ZSEIXHYfyRhMYFD1GPOjstv/sQORrq3I0ksq21sJac4Vx/CT F7ZUF4K56xcBuEHJC3XgbG02dCJDaIbu3RhJejOGLIIGk+IFEc1f2kU3swkYyIGtV7Ly 3gkdBWRn6bJmt9Iz1F555hWX6uIE+KeWoJI5g1fyD5op81SKhu2UMVz3LzJAZ0Gls66j jevh5UQodsEEOU27sAaHUXZXFgWpueywna6XhzhJ5VGm+tVP5u1u4c2CXwGXOBZvotIF 8bjQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=Zq68NK7DesiD/RIbWcfF0i2kUrPu/JJ07u6U5EHjncQ=; b=u08joDO8jUUonUrJ0yahFDg05lZ1fo/lypZwbpPh8JeHrYcdn4eQVqbLIg/W0TasYQ HumcwU2m9ekM4cBZb8OHexBbrMkgX5BYTF8aUntUSbaoDcuQTs/HO7DjTkvfVFzjmXFq MzSV6CzVn/5W6rKcK9kTotAHR382+YB4kCqMw71jJVZXdeOPfJbnxs5GwjWZu89HlSNl 95ofcQy62VF/12m5GwbqFEoLtesNF8VJFjZqmD/V5N+LgsHYMbkLLw/4lUcDclB63Usv 93OZvKd5C0IIDcDuUOX8hx+2e9TpdaDqLNLF7aPiJ99MdQGLSQDuxmbz3gz/cTupM4iZ 2bWA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 98-v6si6976752pla.59.2018.09.24.05.45.52; Mon, 24 Sep 2018 05:46:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389247AbeIXSqw (ORCPT + 99 others); Mon, 24 Sep 2018 14:46:52 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:59680 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389239AbeIXSqw (ORCPT ); Mon, 24 Sep 2018 14:46:52 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id C81B11099; Mon, 24 Sep 2018 12:44:52 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ioana Radulescu , Sasha Levin Subject: [PATCH 4.18 224/235] staging: fsl-dpaa2/eth: Fix DMA mapping direction Date: Mon, 24 Sep 2018 13:53:30 +0200 Message-Id: <20180924113125.577011821@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180924113103.999624566@linuxfoundation.org> References: <20180924113103.999624566@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ioana Radulescu [ Upstream commit 466bcdc1fa303be175c45d054bb00effc575033a ] We are using DMA_FROM_DEVICE when mapping RX frame buffers, but DMA_BIDIRECTIONAL for unmap. Fix the direction for DMA unmapping operation. Fixes: 87eb55e418b7 ("staging: fsl-dpaa2/eth: Fix potential endless loop") Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c @@ -767,7 +767,7 @@ static void free_bufs(struct dpaa2_eth_p for (i = 0; i < count; i++) { vaddr = dpaa2_iova_to_virt(priv->iommu_domain, buf_array[i]); dma_unmap_single(dev, buf_array[i], DPAA2_ETH_RX_BUF_SIZE, - DMA_BIDIRECTIONAL); + DMA_FROM_DEVICE); skb_free_frag(vaddr); } }