From patchwork Mon Oct 21 00:08:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 177005 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp2665537ill; Sun, 20 Oct 2019 17:10:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqw82zgP2wdSdEbIxL2hELkq3q4ZJScnqjQSy7s3CjPhKuORl908U2j/ZSvNf0/mlVREEIqc X-Received: by 2002:a17:906:f181:: with SMTP id gs1mr19269256ejb.13.1571616648158; Sun, 20 Oct 2019 17:10:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571616648; cv=none; d=google.com; s=arc-20160816; b=lVtK86Sn5nQTAFU7/h//WfnFMG2I0Ig8FdUi8LPgvUUM7JEP3wNRrn1LbSaasGhGPv gYSLaTHV3zaPjzAhf5XkLXAcvQpCqGf85KnPdZmAjp85C8lyAtlWWv7C/2JNqV5Ry3Dv VGlL69GMMZC+X7Q8O00cqEuYsdUOTog7akybAWU/wVSFT9C5qlAvxoof5GyLz+Hs7tFl vLytQtaGhHzcEtVVcYdtiIT8r3kxZq/yJLdSBHWC1MJWyA7zkpENGlpkVniK5Nzl7fZM t35dL8oW1XvXIsNIhfrUxTDYERTegVw0Ecj4YeYzBtJCVU792IR/561sQCpTDjoLj/OS lSiA== 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=w29PBjLwWeAIRWp3fgOMUnbQQY3WjjWLD5FB+tSHMf0=; b=UNdEAxivpNt0AT50LKjUhWTBvfen8A0/zqUK9opHmJhxcNkqY+bwz99AB7bw6XQRfT GwcPfXg6HRktjdAlkc+tcS9DtZUCaP0acBJGOC1blK+c5MLd3sw2iaj88jbeCLT/qqzj E1xvBi2AKgJpBPT28QZJSU1nK5uZ75FZkSCVmuebrpMhpqawwYKyIiqgZZq6s6bXJK7B ZMHpn9DXpYS4olZrcBGBtkFaod3pjodkE1WCCE5JBhAdR/5N/BwM0dRmqXiEFpGfgfBf Bq2CXMMMGzHl92ein/1xAmLfsxmWLVFnDNozYuGlg7AonBy6PuOmKMoRDddqbeQPyPoJ HoSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GvcMVtUc; 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 h49si574683edh.2.2019.10.20.17.10.48; Sun, 20 Oct 2019 17:10:48 -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=GvcMVtUc; 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 S1726882AbfJUAKr (ORCPT + 8 others); Sun, 20 Oct 2019 20:10:47 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:44920 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726576AbfJUAKq (ORCPT ); Sun, 20 Oct 2019 20:10:46 -0400 Received: by mail-lj1-f195.google.com with SMTP id m13so11318480ljj.11 for ; Sun, 20 Oct 2019 17:10:45 -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=w29PBjLwWeAIRWp3fgOMUnbQQY3WjjWLD5FB+tSHMf0=; b=GvcMVtUcZdvDkFibuxGMO+5YFlu5kmAb7d85Q15wzNDdhVu020W5tdZnndUsBeC7MV 4bF7C3ndevxvEOFzZ1K/SwB8Vr+XBtoibBlNK3aj10dDZG27XRz1BF+WUqdVIAJNxioq 7LeQeDpVcyqGWxggLxkVSEarsLduUPsXX2ENWdiq//5GLc4D4BIHACyPK0OorjRIIUjj XmBMq7ez9230Q2jWieWcv0eF4j8EDE9TIKM5CE0MmtQyTJJA1CxtxYoEJEoXprKQLkLd rYxgSZ9RF48D3iS5PA7H8pQeDiUiIGlShikQtJAYO5MNUM7lJ01T5HXy2khyIChy0fsL EuCg== 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=w29PBjLwWeAIRWp3fgOMUnbQQY3WjjWLD5FB+tSHMf0=; b=JLY883T0Jd4jro993zjxXjyjK1EWhlyh+Eav5SE1RFksVb2rH9Yt33pHH9FX/xP/jC dx0hMuKmfo9L4jJvjx89nfHc8xWeIhCLk83n8mpnTy25HWTzYsWw7SG26gZX8Vb9+x+t /UrUXfGtIvwq0uw3D41aaMGC6kv/JFj0/9p00vgDR0Hy8b5O91A8E4gD3832Flwn/ZzS zrAw1LBsR71TXnkOvlVXRcpDdrox8Hr9H7MqWLizUGIswaiEYHQ5fFpr4ahpCiPQlZGe tJAF/w5NqlKcmUP5HAhfS13t90Jt6cNsaDeQDzKVfoB1NMyYHvcLg2Aq6+KRpzYA0rny GFsQ== X-Gm-Message-State: APjAAAUBvPczGy6FPQIBdSBWVhol2FoB+eX6twiujItvG+fdr8mooFAt PZTjK2NNhUD3JBr/YjqEzx3xypdtX3A= X-Received: by 2002:a2e:8694:: with SMTP id l20mr12693736lji.64.1571616643771; Sun, 20 Oct 2019 17:10:43 -0700 (PDT) Received: from localhost.bredbandsbolaget (c-79c8225c.014-348-6c756e10.bbcust.telenor.se. [92.34.200.121]) by smtp.gmail.com with ESMTPSA id a18sm2723081lfi.15.2019.10.20.17.10.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Oct 2019 17:10:42 -0700 (PDT) From: Linus Walleij To: netdev@vger.kernel.org, "David S . Miller" Cc: Arnd Bergmann , Linus Walleij Subject: [PATCH 10/10] net: ethernet: ixp4xx: Use parent dev for DMA pool Date: Mon, 21 Oct 2019 02:08:24 +0200 Message-Id: <20191021000824.531-11-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191021000824.531-1-linus.walleij@linaro.org> References: <20191021000824.531-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.21.0 diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_eth.c index 0996046bd046..3ee6d7232eb9 100644 --- a/drivers/net/ethernet/xscale/ixp4xx_eth.c +++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c @@ -1090,7 +1090,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;