From patchwork Wed Mar 5 07:55:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Kagstrom X-Patchwork-Id: 3771161 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 B3F549F376 for ; Wed, 5 Mar 2014 07:57:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 00AD820240 for ; Wed, 5 Mar 2014 07:57:46 +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 12B3220237 for ; Wed, 5 Mar 2014 07:57:45 +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 1WL6hB-0004Fg-Sd; Wed, 05 Mar 2014 07:56:54 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WL6gu-0006ZO-MM; Wed, 05 Mar 2014 07:56:36 +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 1WL6gr-0006XD-PM for linux-arm-kernel@lists.infradead.org; Wed, 05 Mar 2014 07:56:34 +0000 Received: from marrow.netinsight.se (unverified [10.100.3.78]) by ernst.netinsight.se (EMWAC SMTPRS 0.83) with SMTP id ; Wed, 05 Mar 2014 08:55:49 +0100 Date: Wed, 5 Mar 2014 08:55:49 +0100 From: Simon =?UTF-8?B?S8OlZ3N0csO2bQ==?= To: "linux-arm-kernel@lists.infradead.org" , , , Russell King - ARM Linux , , , Subject: [PATCH 2/2] ixp4xx_eth: Setup coherent_dma_mask Message-ID: <20140305085549.3eb22236@marrow.netinsight.se> In-Reply-To: <20140305085311.07b3922a@marrow.netinsight.se> References: <20140305085311.07b3922a@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-20140305_025634_068623_D26083C4 X-CRM114-Status: GOOD ( 11.37 ) 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, 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;