Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2303294imm; Mon, 28 May 2018 05:43:54 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp3X8CRt8Jugwuy6+LtTwREiRbKMS5NivuOK4BodMlquRtu8+NpfECYn+zwiyQvlK12HM9Z X-Received: by 2002:a17:902:b28c:: with SMTP id u12-v6mr13595624plr.68.1527511434925; Mon, 28 May 2018 05:43:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527511434; cv=none; d=google.com; s=arc-20160816; b=xKqwLNp86Z9BNniUgttIkBev6YVP521ml5Ip0Ab7SIjpgWB5RdhRTLAKJvR1YNnE41 MvBP0Ha9dPrFGvX614G2dZ8D5JILyeqQDIRfwJRy5CkbuuJSGDdA/LAUv9nbFtn5dqN1 VPsOX88HR4hxBZUof/CIoVZNSVAlDf/Ap+hvI1He5DL0QuNO/a8JFzA7WXdUVKgAdpQ2 aGIk5RyqrIH24B9y6Dp4j/wJu+4GO3TZHVO0atNB0s//1U7RWJ432sGM+UmAr7tlDb7t 6GYuVjlDcr5paPCSkhRHbxjYlN652k9+aX05YiOEH895iWnTUqPpLUUZ1FmmYnPKPnPM p0iA== 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=CGUc+dFKRzQSaoOfHcvWOUz/KGwSfAljsmP9BarQdeE=; b=ltVL0/6h9TqGfHcx4ETV8Y335gP+0DtrJNMWyYqwxgK6Pkmu1+WjoA1w60MpsnxKir Sf4QWpo3pgan3N3Du3boSLQON9PefijUrzNCGt7qwIACgm/X0Ze70lu1oGAU88QqkJSM lcPTTTylDpud5cngC1H3NAHthh7NWOsUqIMc0OMFY61hso3ncyKAjUS/EHNaDxzJVYjM 3RzYqWfklRCoWIM0EpgbF1CBrtfxcVeaVtJLTmJVbGWVrfjHrfGb0HA6Zcm2aDFvjmoV Eca5zAxZiX7LpBtRPm8arhhH/B/YAaF27HC/WzOQK/KxM7PKt6CHss6mYgCiEYkaIDoi eJug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BDi+nlZy; 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 f26-v6si8695849pgn.247.2018.05.28.05.43.40; Mon, 28 May 2018 05:43:54 -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=BDi+nlZy; 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 S937932AbeE1K6A (ORCPT + 99 others); Mon, 28 May 2018 06:58:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:46102 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937912AbeE1K5z (ORCPT ); Mon, 28 May 2018 06:57:55 -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 9E570208A1; Mon, 28 May 2018 10:57:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527505075; bh=SBdu/2KCiWyabK/sS1NIgWoE348+KCi6ogbpd7E19nU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BDi+nlZyku1TY1wS5Mxfz8eHVOARttXoWLH+JngGscOtPZcqwij0c8DMWqGXbjTBR S9cpZYpSp3mfxbCdZtrIg/lnYvYj5tpva2wAQXFpW4a9Z7PEwEvB2vOq84qWw+GTOr 4FGd1BTY9u3FB03QlVCglFuIwHJErNl6wh7jwOEQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sasha Levin Subject: [PATCH 4.14 367/496] m68k: set dma and coherent masks for platform FEC ethernets Date: Mon, 28 May 2018 12:02:32 +0200 Message-Id: <20180528100335.255469468@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100319.498712256@linuxfoundation.org> References: <20180528100319.498712256@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.14-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 */