Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2445293imm; Mon, 28 May 2018 08:12:59 -0700 (PDT) X-Google-Smtp-Source: AB8JxZomwIrojbIOT1xWU9b5u0N9tQqyZ8VoXb0K+ecfRpmdV2u/hj+P2efDP45pWuQlKFfvbHRc X-Received: by 2002:a62:8ac1:: with SMTP id o62-v6mr13975335pfk.141.1527520379244; Mon, 28 May 2018 08:12:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527520379; cv=none; d=google.com; s=arc-20160816; b=O+xpw6bbq4IzHxQRNfk1f9iRtzyai+HYF1s1Y9VeUjMSP0MOJMZywP/ZtEIqkEJoUI 6011oTbW2PFLhY01fE11ZlndN3brsjITEnqm15w80KFhxyVjJmMOxs+udK75vg4tlwvL zx4DZgVsJBaajrRggre8fG9gXtBYY37UDvolRv2VrXMYxWAaC4mkFh0LVaNbKAVDnuTB fmR4d4xFXRuXwo2bbjvrEYpGv99Y16k2dN1vIsUDsZQmTDiy+m5LKeSyy5Tur602AreY CDdmFhz+160FjGtcUkBrVz/TjE8cXuiECD2BHdyEHMlHOqs0D8Ryf9NnLqsOJcaB70a2 UNZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=JEQvLbj9XSfF/RRv1GtXaZ8u4o9eOEDi+f9HptYNky8=; b=QOIPPAxNin7c4hN3Yp4yIYr3UsQUWyOYj+R30iieXdgOfSJSd5c1g5h/oqt+5uVHNX JvuMFKbBi4aPU5306+FyYYaKvvA5u2hdi2vdAbYZCt0XMHyzhOBVmaDv1reCp0wI9ksG meW6fpIMJxPzDmYsTCo8gDNoPAQ6/J02poeYIPk7YFd3oFrFCLKW6dKkNailQYNU+hcz 1J3s0btwaMw1ifHgIm/RCVu+jkU9SH+5BmwTJm5+FTkHlaYGzcLukkhjW9WTuzOTzF3u i4y3QSBjvUhY0vTtZSkPxid1jGJwktH/g05K/cdex/6IPtU5ruwp+uE97pfPynmueC4F nyvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=opJSYavJ; 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 n10-v6si23596369pgp.457.2018.05.28.08.12.44; Mon, 28 May 2018 08:12:59 -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; dkim=pass header.i=@kernel.org header.s=default header.b=opJSYavJ; 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 S1033906AbeE1PME (ORCPT + 99 others); Mon, 28 May 2018 11:12:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:43164 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1033718AbeE1KXs (ORCPT ); Mon, 28 May 2018 06:23:48 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BE45A20844; Mon, 28 May 2018 10:23:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527503028; bh=hF7AFOW90zuc1y6h0emon9QsVdhIi7FGumJ9Z1sQisc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=opJSYavJPezibVMbPa2FnUzVuo7y1SWHOG3qhQgdUMHxRAOLTxwyv2Fn17+sAa5gC NWdyQ+zPyKt9reYsTZ0T3dAF1ysu4tYy0AXJgXppgJqzOOCacViAaNo6Nz4ASpytAa GXejvXE5Qg+2CkvHYirUGkwfUXDjrdJMM8RRUtlk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sasha Levin Subject: [PATCH 4.4 186/268] m68k: set dma and coherent masks for platform FEC ethernets Date: Mon, 28 May 2018 12:02:40 +0200 Message-Id: <20180528100223.428219253@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100202.045206534@linuxfoundation.org> References: <20180528100202.045206534@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Greg Ungerer [ Upstream commit f61e64310b75733d782e930d1fb404b84699eed6 ] As of commit 205e1b7f51e4 ("dma-mapping: warn when there is no coherent_dma_mask") the Freescale FEC driver is issuing the following warning on driver initialization on ColdFire systems: WARNING: CPU: 0 PID: 1 at ./include/linux/dma-mapping.h:516 0x40159e20 Modules linked in: CPU: 0 PID: 1 Comm: swapper Not tainted 4.16.0-rc7-dirty #4 Stack from 41833dd8: 41833dd8 40259c53 40025534 40279e26 00000003 00000000 4004e514 41827000 400255de 40244e42 00000204 40159e20 00000009 00000000 00000000 4024531d 40159e20 40244e42 00000204 00000000 00000000 00000000 00000007 00000000 00000000 40279e26 4028d040 40226576 4003ae88 40279e26 418273f6 41833ef8 7fffffff 418273f2 41867028 4003c9a2 4180ac6c 00000004 41833f8c 4013e71c 40279e1c 40279e26 40226c16 4013ced2 40279e26 40279e58 4028d040 00000000 Call Trace: [<40025534>] 0x40025534 [<4004e514>] 0x4004e514 [<400255de>] 0x400255de [<40159e20>] 0x40159e20 [<40159e20>] 0x40159e20 It is not fatal, the driver and the system continue to function normally. As per the warning the coherent_dma_mask is not set on this device. There is nothing special about the DMA memory coherency on this hardware so we can just set the mask to 32bits in the platform data for the FEC ethernet devices. Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- arch/m68k/coldfire/device.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) --- a/arch/m68k/coldfire/device.c +++ b/arch/m68k/coldfire/device.c @@ -135,7 +135,11 @@ static struct platform_device mcf_fec0 = .id = 0, .num_resources = ARRAY_SIZE(mcf_fec0_resources), .resource = mcf_fec0_resources, - .dev.platform_data = FEC_PDATA, + .dev = { + .dma_mask = &mcf_fec0.dev.coherent_dma_mask, + .coherent_dma_mask = DMA_BIT_MASK(32), + .platform_data = FEC_PDATA, + } }; #ifdef MCFFEC_BASE1 @@ -167,7 +171,11 @@ static struct platform_device mcf_fec1 = .id = 1, .num_resources = ARRAY_SIZE(mcf_fec1_resources), .resource = mcf_fec1_resources, - .dev.platform_data = FEC_PDATA, + .dev = { + .dma_mask = &mcf_fec1.dev.coherent_dma_mask, + .coherent_dma_mask = DMA_BIT_MASK(32), + .platform_data = FEC_PDATA, + } }; #endif /* MCFFEC_BASE1 */ #endif /* CONFIG_FEC */