From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751419AbeECH0B (ORCPT ); Thu, 3 May 2018 03:26:01 -0400 Received: from mail-ua0-f195.google.com ([209.85.217.195]:41267 "EHLO mail-ua0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750939AbeECHZ5 (ORCPT ); Thu, 3 May 2018 03:25:57 -0400 X-Google-Smtp-Source: AB8JxZqjl8OxLqcsXlJ0U1XRfSS+F9P+Sp2CPRy9oh+xfoR/Xz3/wd3U4iKZOj7P7PmAqVH6pMFyoXomQTZl44HGr7w= MIME-Version: 1.0 In-Reply-To: References: From: Geert Uytterhoeven Date: Thu, 3 May 2018 09:25:56 +0200 X-Google-Sender-Auth: wYVP_4XNH2wNi7K_IEGoU-ln_AQ Message-ID: Subject: Re: [PATCH net] macmace: Set platform device coherent_dma_mask To: Finn Thain Cc: "David S. Miller" , linux-m68k , netdev , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Finn, On Thu, May 3, 2018 at 6:23 AM, Finn Thain wrote: > Set the device's coherent_dma_mask to avoid a WARNING splat. > Please see commit 205e1b7f51e4 ("dma-mapping: warn when there is > no coherent_dma_mask"). > > Cc: linux-m68k@lists.linux-m68k.org > Tested-by: Stan Johnson > Signed-off-by: Finn Thain Thanks for your patch! > --- a/drivers/net/ethernet/apple/macmace.c > +++ b/drivers/net/ethernet/apple/macmace.c > @@ -203,6 +203,10 @@ static int mace_probe(struct platform_device *pdev) > unsigned char checksum = 0; > int err; > > + err = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); > + if (err) > + return err; > + > dev = alloc_etherdev(PRIV_BYTES); > if (!dev) > return -ENOMEM; Shouldn't this be handled in the platform code that instantiates the device, i.e. in arch/m68k/mac/config.c:mac_platform_init()? Cfr. commit f61e64310b75733d ("m68k: set dma and coherent masks for platform FEC ethernets"). Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds From mboxrd@z Thu Jan 1 00:00:00 1970 From: Geert Uytterhoeven Subject: Re: [PATCH net] macmace: Set platform device coherent_dma_mask Date: Thu, 3 May 2018 09:25:56 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: "David S. Miller" , linux-m68k , netdev , Linux Kernel Mailing List To: Finn Thain Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Hi Finn, On Thu, May 3, 2018 at 6:23 AM, Finn Thain wrote: > Set the device's coherent_dma_mask to avoid a WARNING splat. > Please see commit 205e1b7f51e4 ("dma-mapping: warn when there is > no coherent_dma_mask"). > > Cc: linux-m68k@lists.linux-m68k.org > Tested-by: Stan Johnson > Signed-off-by: Finn Thain Thanks for your patch! > --- a/drivers/net/ethernet/apple/macmace.c > +++ b/drivers/net/ethernet/apple/macmace.c > @@ -203,6 +203,10 @@ static int mace_probe(struct platform_device *pdev) > unsigned char checksum = 0; > int err; > > + err = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); > + if (err) > + return err; > + > dev = alloc_etherdev(PRIV_BYTES); > if (!dev) > return -ENOMEM; Shouldn't this be handled in the platform code that instantiates the device, i.e. in arch/m68k/mac/config.c:mac_platform_init()? Cfr. commit f61e64310b75733d ("m68k: set dma and coherent masks for platform FEC ethernets"). Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds