Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp2186314rwn; Fri, 9 Sep 2022 09:40:28 -0700 (PDT) X-Google-Smtp-Source: AA6agR4JF5bKnMMOfkYjafrt4ViTMPz22lpU0tyCQC4ik/6D5/NWYpXHHu/5X2imDlq2fH7uzQtK X-Received: by 2002:a17:907:3d9f:b0:77a:21d4:7310 with SMTP id he31-20020a1709073d9f00b0077a21d47310mr2026844ejc.279.1662741627836; Fri, 09 Sep 2022 09:40:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662741627; cv=none; d=google.com; s=arc-20160816; b=FmSnT7ydPJHlICbwyJWgVWSC7ndM8oJ9x9nNPRiZ7s0ZS3o1VT5IPMFZlwySIUprGm IgnRJZuJ3hn/Gzti7Nh1hMJjsM7Ss/cJUdPKrbCpS+PGk4fOCIlEbcjBi34qcgmUDxBB /iGwD4Rgadt0qdO6aj0lwWhhrDxOD0hYltKqkUe6RBK7erQY9M6vYXUGgaBoOix9aU9M OvWmouQqbvGb5tOVDn7l+DAzLipYLf37Scl+3c6eg9PWPz1JoE2Ax/oElW+8egkshpNV HGHPprmyYNrk1p9PVP6IkJszJemT3PZMhTBfhJwOgri0B7xyMuQcDZ7xq9HXWzjON51X wxYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=qFZsms0Dv3NVUxeThUQNo8sDEg3tK+2lEhh1M4gisys=; b=LqClr9YSkTK+16N/NpbNC4RAtzCAcGetzV0VNESvR7UWos/ELo/Wodb/L6ZeYBp7Dy YMZqjjTvxh1R8d3L5ZYt9Wqqjlf0V7ULZfOEBwY52YTOWeYjcH1Xx5ZRxiKbjRVj+hWO wN5Nl2Mb9sMZxqCCKtUYGPlYbTLhf7qQEEA9tDcUFHEeWP6wCzi9IhePPzqy63iWl8iU i0dQb8ZxfWfsmya8SRmm/CacrrW2OygVzJrsPCe0MLyDOS1gikg5X1bJ8NxRpNASJoYV iOlYYkI6bWG/NDNsdl8BXKJF0ReQG+4LnnI7lBMZr52lZw6kqrVwBLvFCKCpc4tPtzeb IklQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Rhr1KEKR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nd10-20020a170907628a00b0073cd3a15f42si858568ejc.394.2022.09.09.09.40.01; Fri, 09 Sep 2022 09:40:27 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=Rhr1KEKR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232075AbiIIPkP (ORCPT + 99 others); Fri, 9 Sep 2022 11:40:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232557AbiIIPjw (ORCPT ); Fri, 9 Sep 2022 11:39:52 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63103F02 for ; Fri, 9 Sep 2022 08:39:25 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id bn9so2300002ljb.6 for ; Fri, 09 Sep 2022 08:39:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=qFZsms0Dv3NVUxeThUQNo8sDEg3tK+2lEhh1M4gisys=; b=Rhr1KEKR4olPmjGIeJmMGyYsDXJcxp3jNLIhCSM7xHdBhNXB4mIXvShHqa33o/4qR8 1Rn4/Geet2RBhVvQJnSHsfXXeWyEoTuzuCXI8Yd6x7QUCLLWTHGONsuPnpWjqOHYJejV cBTDsQGSTnTQaPx0pzA6XUJ8pwu7esj23I9qtAWeytzbmypDzbiEKAY0zG934AbnanB9 j0S7fdpvWOgB8dgsciiSJT7/l4AB8dL66GRBNNqGxEiXU0ZogdSvrsuEYJ8BgslBRP/f q075CvrYoAdCx62Ougj89O4GIwz0xIHZJ98gBg4f+M989kD2EaKVyY3TdhpOkRTOueIR GglA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=qFZsms0Dv3NVUxeThUQNo8sDEg3tK+2lEhh1M4gisys=; b=lKA5/rwj2f5gcfQK+6MeRLim7K8u6Y/7XLDQQevvhZ06SJExYjjgAEiLQsxTFh2k41 giAo6zF2DTwr12dZg2BjPe+VwhuHZ6OKkuG1kp8SK2ho+8nzCz+2m9rSNY9nFo42CHcU sB1HRwcduK8k30YHwQYi4mYa88xyf89J76kXrl5mfqSX48+8g/pk464hw6ozRwxU5Dbf Qdor3GVzd6NDWyOZb07NN4QCei3gJr1mroEE31u+6GxcITVt9in8cTyastnCzuIOtOGz gB9YRjqw9+hmGPdcVc+YIoho43kuTGEkkBo06ke2ymBQMFnB8ndIjXbj4/0udZQzzDoK CR1A== X-Gm-Message-State: ACgBeo0aPMvnIF8o4Cu/HS1+JUqRLU5fIGmz8Rn6UeVgx6/MDVFKIuhP 0o0OI54SzLDwfSQ3bqqiWA2RnHDbdU8m3w== X-Received: by 2002:a2e:96cc:0:b0:26b:d950:1f70 with SMTP id d12-20020a2e96cc000000b0026bd9501f70mr2881788ljj.232.1662737963861; Fri, 09 Sep 2022 08:39:23 -0700 (PDT) Received: from [192.168.0.21] (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id s7-20020a056512214700b00497a6fe85b8sm116555lfr.250.2022.09.09.08.39.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Sep 2022 08:39:23 -0700 (PDT) Message-ID: Date: Fri, 9 Sep 2022 17:39:22 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH net-next v4 1/5] net: ipqess: introduce the Qualcomm IPQESS driver Content-Language: en-US To: Maxime Chevallier , davem@davemloft.net, Rob Herring Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Florian Fainelli , Heiner Kallweit , Russell King , linux-arm-kernel@lists.infradead.org, Vladimir Oltean , Luka Perkov , Robert Marko References: <20220909152454.7462-1-maxime.chevallier@bootlin.com> <20220909152454.7462-2-maxime.chevallier@bootlin.com> From: Krzysztof Kozlowski In-Reply-To: <20220909152454.7462-2-maxime.chevallier@bootlin.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On 09/09/2022 17:24, Maxime Chevallier wrote: > The Qualcomm IPQESS controller is a simple 1G Ethernet controller found > on the IPQ4019 chip. This controller has some specificities, in that the > IPQ4019 platform that includes that controller also has an internal > switch, based on the QCA8K IP. > > It is connected to that switch through an internal link, and doesn't > expose directly any external interface, hence it only supports the > PHY_INTERFACE_MODE_INTERNAL for now. > > It has 16 RX and TX queues, with a very basic RSS fanout configured at Thank you for your patch. There is something to discuss/improve. > +} > + > +static int ipqess_axi_probe(struct platform_device *pdev) > +{ > + struct device_node *np = pdev->dev.of_node; > + struct net_device *netdev; > + phy_interface_t phy_mode; > + struct resource *res; > + struct ipqess *ess; > + int i, err = 0; > + > + netdev = devm_alloc_etherdev_mqs(&pdev->dev, sizeof(struct ipqess), sizeof(*) > + IPQESS_NETDEV_QUEUES, > + IPQESS_NETDEV_QUEUES); > + if (!netdev) > + return -ENOMEM; > + > + ess = netdev_priv(netdev); > + ess->netdev = netdev; > + ess->pdev = pdev; > + spin_lock_init(&ess->stats_lock); > + SET_NETDEV_DEV(netdev, &pdev->dev); > + platform_set_drvdata(pdev, netdev); > + > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > + ess->hw_addr = devm_ioremap_resource(&pdev->dev, res); Use a helper for this. > + if (IS_ERR(ess->hw_addr)) > + return PTR_ERR(ess->hw_addr); > + > + err = of_get_phy_mode(np, &phy_mode); > + if (err) { > + dev_err(&pdev->dev, "incorrect phy-mode\n"); > + return err; > + } > + > + ess->ess_clk = devm_clk_get(&pdev->dev, "ess"); There is no such clock "ess"... > + if (!IS_ERR(ess->ess_clk)) > + clk_prepare_enable(ess->ess_clk); > + > + ess->ess_rst = devm_reset_control_get(&pdev->dev, "ess"); Same problem. > + if (IS_ERR(ess->ess_rst)) > + goto err_clk; > + > + ipqess_reset(ess); > + > + ess->phylink_config.dev = &netdev->dev; > + ess->phylink_config.type = PHYLINK_NETDEV; > + ess->phylink_config.mac_capabilities = MAC_SYM_PAUSE | MAC_10 | > + MAC_100 | MAC_1000FD; > + > + __set_bit(PHY_INTERFACE_MODE_INTERNAL, > + ess->phylink_config.supported_interfaces); > + > + ess->phylink = phylink_create(&ess->phylink_config, > + of_fwnode_handle(np), phy_mode, > + &ipqess_phylink_mac_ops); > + if (IS_ERR(ess->phylink)) { > + err = PTR_ERR(ess->phylink); > + goto err_clk; > + } > + Best regards, Krzysztof