Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp850611pxm; Thu, 3 Mar 2022 05:53:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJw2O3AJz0+4v8qBKbesaGYkQJnOitBHIG3Ghbhl0rZfksDpY3C8Blt0F8G9p4o3/yEjKBQ0 X-Received: by 2002:a05:6a00:228d:b0:4f6:4ea6:851f with SMTP id f13-20020a056a00228d00b004f64ea6851fmr9102094pfe.37.1646315599624; Thu, 03 Mar 2022 05:53:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646315599; cv=none; d=google.com; s=arc-20160816; b=QbssL2qorLT9UIZl/EBy2L48Gxfw1kli5H25JNB2cRJ5tCB/77TQH1LbeiU9cJ6Wcm MYUAgJfH3F559I21Rr55W3s8iUkiWvHZk0rzLGjMWAPoDUr9DeXROCPaaBXkedghNCoT EEJmxseTuI3bHhIRxf0wx+9kvhaMZ3WXH1aDUrT+mlCqwvFxq3+pR58/PtwqWpLh76VU 9+8bIafRCq5TsF8mNMQV4j+Foyr52HhtzGhTQvrGOhfnhsoO8wMlKadFf34MoandeSEe 04/M9IQjUJJxZG4GWRsYrlY0vdrrdbKYv7hRf6/SIXEwJzRBhWM9Me+qy+DoJjzbwFDB wbrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=+tYHWw0FTWfz8/PBniSyom8mOy+cPnrGC1pszf92OSo=; b=Zi7di66ukAL4F/arR+avhnQ2MLrH84PnIVMRLw6s7GgsFv4JWg3bmZnwE8+a2b6ydH N5P/QRCxoNhwA5aMDlE2+m4RbT39E31IeAj+cHe2ZDvlVDVBb0SgWdnQtgeHvnX6VmuL QyYgTIt7am4qJ92k0Tk0gCTVEFzS1UIva2Af1X081KtBGfM8cA1bV9QjRaBJmAO6uJdj cIcl0xD6fUDC9w8Me5S9mcHBn+vQBMkwY7nWkor4YzUTfsVpxWowhcrfVeHXVWG/NmOR +OWy8LFk7kiB0c80uGjQSXFVQi+o5O7vrW4KQIGQg1MG4wgKFFUGLzN5eZjHl48hEtGE f0SQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 1-20020a17090a198100b001b9431e84aasi2106225pji.88.2022.03.03.05.53.02; Thu, 03 Mar 2022 05:53:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229833AbiCCKJ0 (ORCPT + 99 others); Thu, 3 Mar 2022 05:09:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229947AbiCCKJX (ORCPT ); Thu, 3 Mar 2022 05:09:23 -0500 Received: from smtpproxy21.qq.com (smtpbg701.qq.com [203.205.195.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96D2A16EAB3 for ; Thu, 3 Mar 2022 02:08:37 -0800 (PST) X-QQ-mid: bizesmtp77t1646302102tifg48as Received: from localhost.localdomain (unknown [58.240.82.166]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 03 Mar 2022 18:08:16 +0800 (CST) X-QQ-SSF: 01400000002000C0G000000A0000000 X-QQ-FEAT: 9ftZnmyzxdiuYvImBqaq6XcFBwVql4EFTku9zVY40XIjBWyily0jygL3wvtJF laxJIHN2bciK5YnuT7+S/RWLy8aEC3vhbgVPyCqwwTAviBukykHM3mFfXbKYAaxlghwO7jc jiFhC5HCHtL7/LON5Qv+CzYQjpWEtrP05wpaw85EAgwcqk1W+13sH8b2yJfVtNIL30qMyCi GBsF6Axyf9lbXfAuX+9Fc9QdOKIBO5lIv1PRckIvSd8ailwQgec5U0qBY+reivgRaYC/BkA ahgzlEDOow464eLZysBlnreZOG0e0QQdZWPOvbXiOR04T74F4wQGUPswHao0ErF9gsk0Uyf aI0GgrP3tbZnpmu01r45wENdOz46Xky0lK8t0F0qcHsBLCz3OTbuloUwjAx9A== X-QQ-GoodBg: 1 From: Meng Tang To: davem@davemloft.net, kuba@kernel.org, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Meng Tang Subject: [PATCH] bcm63xx_enet: Use platform_get_irq() to get the interrupt Date: Thu, 3 Mar 2022 18:08:15 +0800 Message-Id: <20220303100815.25605-1-tangmeng@uniontech.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:uniontech.com:qybgforeign:qybgforeign1 X-QQ-Bgrelay: 1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static allocation of IRQ resources in DT core code, this causes an issue when using hierarchical interrupt domains using "interrupts" property in the node as this bypassed the hierarchical setup and messed up the irq chaining. In preparation for removal of static setup of IRQ resource from DT core code use platform_get_irq(). Signed-off-by: Meng Tang --- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c index b04e423c446a..c1b97e8c55ef 100644 --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c @@ -1716,17 +1716,17 @@ static int bcm_enet_probe(struct platform_device *pdev) struct bcm_enet_priv *priv; struct net_device *dev; struct bcm63xx_enet_platform_data *pd; - struct resource *res_irq, *res_irq_rx, *res_irq_tx; + int irq, irq_rx, irq_tx; struct mii_bus *bus; int i, ret; if (!bcm_enet_shared_base[0]) return -EPROBE_DEFER; - res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - res_irq_rx = platform_get_resource(pdev, IORESOURCE_IRQ, 1); - res_irq_tx = platform_get_resource(pdev, IORESOURCE_IRQ, 2); - if (!res_irq || !res_irq_rx || !res_irq_tx) + irq = platform_get_irq(pdev, 0); + irq_rx = platform_get_irq(pdev, 1); + irq_tx = platform_get_irq(pdev, 2); + if (irq < 0 || irq_rx < 0 || irq_tx < 0) return -ENODEV; dev = alloc_etherdev(sizeof(*priv)); @@ -1748,9 +1748,9 @@ static int bcm_enet_probe(struct platform_device *pdev) goto out; } - dev->irq = priv->irq = res_irq->start; - priv->irq_rx = res_irq_rx->start; - priv->irq_tx = res_irq_tx->start; + dev->irq = priv->irq = irq; + priv->irq_rx = irq_rx; + priv->irq_tx = irq_tx; priv->mac_clk = devm_clk_get(&pdev->dev, "enet"); if (IS_ERR(priv->mac_clk)) { -- 2.20.1