From patchwork Fri May 24 16:20:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 165133 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp3806862ili; Fri, 24 May 2019 09:21:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqy5famcaM0pdGSRuDVez2vCRWobmRJexMcRpzc7xmCvRpJj04IsU2R8ZwdB5/XHlfAUF63D X-Received: by 2002:a62:5581:: with SMTP id j123mr114835928pfb.102.1558714862775; Fri, 24 May 2019 09:21:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558714862; cv=none; d=google.com; s=arc-20160816; b=TAjXsq1kAMnL5M1Og0pOCsf99yGBG8n3V2jReEIvYBRXaPm/E4uAhQlgN6NFedXnmR a2L/gbU1L/ApaJnJ13K6f2KNxPqEmNC2a7sULxMxfjp7evQHGC0muO1rGFZxJagrOIa6 8nn4BKGRIpJQ8qm3+c69jFO0alV+hRbUs5h4GyKJcDl886C954vGxoePIn9HrBL34v/g PE20sHEcL9kcsdk8ZlNySkNbAEiEvVSlZLK/OdcPgjNnQEkxJy6rRDnz2iqAFMmB15s4 OY4y7LqXl5B1FyfXYrSjsQCC7nJkjaH808rtx5rGrpM4/b8bYYKmvO91TDJ0Q6KHRATo DkyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OUow8Idp71iR0dh6G9x5edE4axHg7RMQg95y9XAt+Qw=; b=QTTMW5dZ/mZuiE8ZCzt+atFJOw/9Mq7XaIWGjsH4xwlr0wXMaS+hr6oal2MgySVxKV gFdQW6Dxux/y5DFQppS2zyDzAd4CJkgynd/tnOC6AaLY+ibSqVsch7LTBc9IQOK6gK34 /sn1CT687KJGq+UY23PI4/n9M8UfCA4XMAs3uv+gp3XZqHRWSizoCB6uwhGx84L03NKG S90CgIhzGHRmAXV1b9qVGHq10QYovY9EzxNob8YgU0PAykchM1807ejeibvQsLZMus/h 2CVzRKKe/S7MRSbSkr39o1UOosyy+t7bFgaz42DBC175z+0dwiwciFskQZ0LL31/8x/G Yd3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uzUrotqJ; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m14si5204608pgj.377.2019.05.24.09.21.02; Fri, 24 May 2019 09:21:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-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=@linaro.org header.s=google header.b=uzUrotqJ; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390955AbfEXQVB (ORCPT + 9 others); Fri, 24 May 2019 12:21:01 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:40708 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390308AbfEXQVB (ORCPT ); Fri, 24 May 2019 12:21:01 -0400 Received: by mail-lj1-f195.google.com with SMTP id q62so9168361ljq.7 for ; Fri, 24 May 2019 09:20:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OUow8Idp71iR0dh6G9x5edE4axHg7RMQg95y9XAt+Qw=; b=uzUrotqJON7yaFM+63pGhO8BnKVC8rA4dQ1V6qpQcg/RxHN5VuTFGSNNknKMBm+y3N TO+f8PuACdU1PfzFIivAbYmEL5ec06Ko+Yf1HLj0GTXdrn+JTML7DTWqKG8cAN8BzKhQ PI8Jb9DLj0bmyHTLs48CvjYFeRrqGlGiidGvU8vBdM+qLslXTvqAsypukY/uFR/HX4O0 6TQXJsO6CbWF8rYtDV71mZYF7UncFr43bDt944mF2qmLPYl23sjBWr2vtWYgt2/IkMoG FsdoHKAtURbsf/sz2WqyP+riP+1RMZUUyBUUARRnMQqxMRay6jEF0u4iZwwjoPm/+8Ac FHAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OUow8Idp71iR0dh6G9x5edE4axHg7RMQg95y9XAt+Qw=; b=bNOd0DoGH6pB2zt2YDAcb29n6Ja9E2xdlpQ0YdaMFQ8YTMOPv95e0t217wANSF1+aw HEfqhYFlvrVhdsipBTWFuccsKooas1Fv6HQUsSe3av/YcSwpIN2OyInFtLkW2TJLpDlQ LdDjtvQat9DJjLUHJF/IuSxL3Y/HiwxsQ2XAujXGjtTMtKI5Oyh7UyE3bnF+JBZabpJU 0MxXvWHRHV4anICg2u+J3+1mq0kw/a1DR2HixgUhZHPIwKbHF/2Y09qaig2tTRqL5DOW Cr0uoU55kuDIvO7C3EapCeBnveRr+xy22tCc3SV+YhISts23lSt8WXeuCxyQ9R/maT/K ceDw== X-Gm-Message-State: APjAAAV/2ZUaQxoTh/B05VPJYy3s9q4yWpeTjP6QnvpPQmR9Rj9wzrwV +py3hGgoGM+1J0Z8CJvSnvNPIyR+Ju4= X-Received: by 2002:a2e:95d2:: with SMTP id y18mr30639520ljh.167.1558714858626; Fri, 24 May 2019 09:20:58 -0700 (PDT) Received: from localhost.bredbandsbolaget (c-d2cd225c.014-348-6c756e10.bbcust.telenor.se. [92.34.205.210]) by smtp.gmail.com with ESMTPSA id y4sm618075lje.24.2019.05.24.09.20.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 24 May 2019 09:20:57 -0700 (PDT) From: Linus Walleij To: netdev@vger.kernel.org, "David S . Miller" Cc: Krzysztof Halasa , Linus Walleij Subject: [PATCH 6/8] net: ethernet: ixp4xx: Use parent dev for DMA pool Date: Fri, 24 May 2019 18:20:21 +0200 Message-Id: <20190524162023.9115-7-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190524162023.9115-1-linus.walleij@linaro.org> References: <20190524162023.9115-1-linus.walleij@linaro.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Use the netdevice struct device .parent field when calling dma_pool_create(): the .dma_coherent_mask and .dma_mask pertains to the bus device on the hardware (platform) bus in this case, not the struct device inside the network device. This makes the pool allocation work. Signed-off-by: Linus Walleij --- drivers/net/ethernet/xscale/ixp4xx_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_eth.c index 600f62e95fb0..8b883563a3d3 100644 --- a/drivers/net/ethernet/xscale/ixp4xx_eth.c +++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c @@ -1092,7 +1092,7 @@ static int init_queues(struct port *port) int i; if (!ports_open) { - dma_pool = dma_pool_create(DRV_NAME, &port->netdev->dev, + dma_pool = dma_pool_create(DRV_NAME, port->netdev->dev.parent, POOL_ALLOC_SIZE, 32, 0); if (!dma_pool) return -ENOMEM;