Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1876219iob; Sun, 15 May 2022 01:09:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtPb0ZwqBRLUF1cto4w2tLxTVazu+JXNXdbDgArHDp/q/19058xZhxnryMBtaXwLesxRXt X-Received: by 2002:a17:907:2cc4:b0:6fe:1c72:7888 with SMTP id hg4-20020a1709072cc400b006fe1c727888mr5056242ejc.373.1652602191582; Sun, 15 May 2022 01:09:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652602191; cv=none; d=google.com; s=arc-20160816; b=k5mvss+LycX7BwDAAe0Uh3oS01FIl1cQYJLvlFfz9sPxP1P5h+zBg+CG0ofUdfcjx4 JKjd8UYRc/9dPgPyCdWfzRecBX+3bE9aydQISYBCZz80gee6Uw5vDWtfROPmTieLzE0H B3xNDL3i5M9//GMtGTHozBcy2BlYu9xVfcL8hJkKrD7RbezG5yxD98F7eT3RdWpocL8J aeBAQyxQJwOpfYhjxwPLbnRmhz7158F6a7t/1UMFrMhFwFB/6KtJa3R84cMeipgXu8VY +ZNtw5FwjXQKo4FRW3zM+/O86fSmVqzzOgC9awgeATXmypQiYhrVeV7dyjeavbw2xo1l /sng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=dxDs5yrcW45vjplOBhaNnU+S9CSWYkuBCk04Qmhp8xA=; b=YAJRoboNsD8Zmj5soY/gUQFIhdSSqJe4uBooTXcMwlDfeRK8fACQ+0U8aHygom/bEJ IWEOlNzSOULTB7HlO5xPphsF1i4o1rsTIBBDacNOLX63Wu6ptlnSqAyVdp2n83pmsRb9 Qu6zdXKJIMrpmdCsIzusKTymVEevRdrry428Higm+xLovm32f50SOUsLqFcD0i7I5U/3 xLiStGM7AfjbT+pgOlvU29DMNt2hnMEDitNuyJVsEetJWpTIGwK+qLg0A9kc+PJ+h/jd gUmbvrTslyU5188izAFVzRbvTDAULDy5E1vaVxLTbILvcQtWzjgxVC5V4qCDwjup0hVW xVQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=wufhlEK7; 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=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a22-20020a1709065f9600b006e01f1d9677si6126906eju.532.2022.05.15.01.08.38; Sun, 15 May 2022 01:09:51 -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=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=wufhlEK7; 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=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234575AbiENRSc (ORCPT + 99 others); Sat, 14 May 2022 13:18:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229901AbiENRSa (ORCPT ); Sat, 14 May 2022 13:18:30 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A69A1EAFB; Sat, 14 May 2022 10:18:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=dxDs5yrcW45vjplOBhaNnU+S9CSWYkuBCk04Qmhp8xA=; b=wufhlEK7Gr4scKS8+uJ3+7otF9 4dZvDvOeDgRPJhf8hbVaqryp7VpnwVW+wz3mrDkhrwl2erXXNwAonQmnqd8JA3kNf4ZhyLRl+OqAV fZ0fEI1GglVjcLN4bV162CUAs1u7Lh7taz9rA2E1np2P7ar6Xtl2vpWq5kurwPRUlom8I04iczXDY 5JDzQmPwiSHBSIriZaExmU2b0jRMBPOn6VEmsJzQKE0v38hE6ew7Ugp4MhPCPgYN9cWPUg1k5HMWw mqJAiFH6CQu7TTq+7B5BLASlkZtOyPNeqM+cSfhk15O7O/D5P00eaqT9Vmf8sA8U26yxMwut9USeS g7f7YuXg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:60714) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1npvPH-0003sm-OH; Sat, 14 May 2022 18:18:20 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1npvPF-0001iv-1O; Sat, 14 May 2022 18:18:17 +0100 Date: Sat, 14 May 2022 18:18:17 +0100 From: "Russell King (Oracle)" To: Maxime Chevallier Cc: davem@davemloft.net, Rob Herring , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Florian Fainelli , Heiner Kallweit , linux-arm-kernel@lists.infradead.org, Vladimir Oltean , Luka Perkov , Robert Marko Subject: Re: [PATCH net-next v2 1/5] net: ipqess: introduce the Qualcomm IPQESS driver Message-ID: References: <20220514150656.122108-1-maxime.chevallier@bootlin.com> <20220514150656.122108-2-maxime.chevallier@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220514150656.122108-2-maxime.chevallier@bootlin.com> Sender: Russell King (Oracle) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, 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 Sat, May 14, 2022 at 05:06:52PM +0200, Maxime Chevallier wrote: > +static int ipqess_do_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) > +{ > + struct ipqess *ess = netdev_priv(netdev); > + > + switch (cmd) { > + case SIOCGMIIPHY: > + case SIOCGMIIREG: > + case SIOCSMIIREG: > + return phylink_mii_ioctl(ess->phylink, ifr, cmd); > + default: > + break; > + } > + > + return -EOPNOTSUPP; > +} Is there a reason this isn't just: return phylink_mii_ioctl(ess->phylink, ifr, cmd); ? > +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), > + 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); > + 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"); > + if (!IS_ERR(ess->ess_clk)) > + clk_prepare_enable(ess->ess_clk); > + > + ess->ess_rst = devm_reset_control_get(&pdev->dev, "ess"); > + if (IS_ERR(ess->ess_rst)) > + goto err_clk; > + > + ipqess_reset(ess); > + > + ess->phylink_config.dev = &netdev->dev; > + ess->phylink_config.type = PHYLINK_NETDEV; > + > + __set_bit(PHY_INTERFACE_MODE_INTERNAL, > + ess->phylink_config.supported_interfaces); No mac capabilities? > + > + ess->phylink = phylink_create(&ess->phylink_config, > + of_fwnode_handle(np), phy_mode, > + &ipqess_phylink_mac_ops); -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!