From patchwork Mon Mar 17 09:57:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Kagstrom X-Patchwork-Id: 3842921 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CFCB39F369 for ; Mon, 17 Mar 2014 10:58:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DA13E201F7 for ; Mon, 17 Mar 2014 10:58:28 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3BA1D201F5 for ; Mon, 17 Mar 2014 10:58:24 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WPUJk-00087S-AZ; Mon, 17 Mar 2014 09:58:49 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WPUIn-0004tZ-A0; Mon, 17 Mar 2014 09:57:49 +0000 Received: from ernst.netinsight.se ([194.16.221.21]) by merlin.infradead.org with smtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WPUIl-0004rX-CU for linux-arm-kernel@lists.infradead.org; Mon, 17 Mar 2014 09:57:47 +0000 Received: from marrow.netinsight.se (unverified [10.100.3.78]) by ernst.netinsight.se (EMWAC SMTPRS 0.83) with SMTP id ; Mon, 17 Mar 2014 10:57:03 +0100 Date: Mon, 17 Mar 2014 10:57:03 +0100 From: Simon =?UTF-8?B?S8OlZ3N0csO2bQ==?= To: "linux-arm-kernel@lists.infradead.org" , , Russell King - ARM Linux , , Subject: [PATCH RESEND 2/2] ixp4xx_eth: Setup coherent_dma_mask Message-ID: <20140317105703.090c258d@marrow.netinsight.se> In-Reply-To: <20140317105448.14bcb617@marrow.netinsight.se> References: <20140317105448.14bcb617@marrow.netinsight.se> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.10; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140317_055747_561715_735EBAA3 X-CRM114-Status: GOOD ( 10.98 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This driver has been broken since commit 1a4901177574083c35fafc24c4d151c2a7c7647c ixp4xx_eth: avoid calling dma_pool_create() with NULL dev in 3.7 and would fail with [ 33.055473] net eth1: coherent DMA mask is unset [ 33.055523] net eth1: coherent allocation too big (requested 0x1000 mask 0x0) Fix by setting up the DMA mask to the entire 32-bit range. Signed-off-by: Simon Kagstrom --- drivers/net/ethernet/xscale/ixp4xx_eth.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_eth.c index 25283f1..e540e51 100644 --- a/drivers/net/ethernet/xscale/ixp4xx_eth.c +++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c @@ -1426,6 +1426,10 @@ static int eth_init_one(struct platform_device *pdev) port->netdev = dev; port->id = pdev->id; + err = dma_set_coherent_mask(&dev->dev, DMA_BIT_MASK(32)); + if (err < 0) + goto err_free; + switch (port->id) { case IXP4XX_ETH_NPEA: port->regs = (struct eth_regs __iomem *)IXP4XX_EthA_BASE_VIRT;