From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B2BC9C02182 for ; Wed, 22 Jan 2025 15:36:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:References: In-Reply-To:Message-ID:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tX83hHT4aZ7+gZo2IS7Yjnxf8cn0wc/eSWvE6GZiFho=; b=SFiBhp2u0cGXr8 81zffgvi2XYGtSxNFqakED60coPoT/msVbmVNUCka5IqcNdmHkrd535wtcGeNDjQ83jnp5x+6it21 j0oGB7BIu5ONQRgrj7kQsxprG0V+RR0laz60eZ1EK95PGDZMHGWArLMSRVJboLe1Nw0XhbxJZxQhv OtYkiVIQ4jQhg7hFkv9HmSRdj+7+hzmsb0/bCrC60fwsJACr/c9XsCMQ8gk/+pYOiZ5m6WQilwyh1 8BgRv6hPFdULPcq0zJINcFsyPd84fU4lhhTeMQ0sNe8hE3m68jfTfTRYxYjiqpk//0ojshrDsv9hp ukuD0batAmmekBw6aQQg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tacle-0000000Aa2w-42hV; Wed, 22 Jan 2025 15:35:46 +0000 Received: from server.wki.vra.mybluehostin.me ([162.240.238.73]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tacje-0000000AZqR-3zkI for linux-arm-kernel@lists.infradead.org; Wed, 22 Jan 2025 15:33:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=couthit.com ; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Subject: References:In-Reply-To:Message-ID:Cc:To:From:Date:Sender:Reply-To: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=tX83hHT4aZ7+gZo2IS7Yjnxf8cn0wc/eSWvE6GZiFho=; b=o4+FE6/m1K7CzW34Ld9Pe+upII 14KCJI+i2yY2KIvO5Pt+a91b2lZif2kTIUYyFQ0iDusVsSEt8VYSd7ilkwlpkMCUdiN/zzMJczAOy tcT+ocR563+WvKhHujTi/C8HTBgVrDezKTCYHRA7TIFv0qi7c+Z5TnmBY9In7ROCv4I4Anp63lDv6 vJehhQcY+U8VHT0qx3QsPZQ2S5wyg7447Ns/njpFiOg9CHTNQViEGiRiJ1WyBEVeih+zKnpf0ZnxY EncZ5eKP5FW4HrvJPnYBh5PB6eSpT/dL98V/A6dWIfbok8XS+pVknGPD4LLGWBxEoQ2U5zm8rBHtu El5fMB9g==; Received: from [122.175.9.182] (port=42840 helo=zimbra.couthit.local) by server.wki.vra.mybluehostin.me with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1tacjb-0007OL-17; Wed, 22 Jan 2025 21:03:39 +0530 Received: from zimbra.couthit.local (localhost [127.0.0.1]) by zimbra.couthit.local (Postfix) with ESMTPS id E84911781F6A; Wed, 22 Jan 2025 21:03:28 +0530 (IST) Received: from localhost (localhost [127.0.0.1]) by zimbra.couthit.local (Postfix) with ESMTP id B66E01783FED; Wed, 22 Jan 2025 21:03:28 +0530 (IST) Received: from zimbra.couthit.local ([127.0.0.1]) by localhost (zimbra.couthit.local [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id BnQLNzz2-_tk; Wed, 22 Jan 2025 21:03:28 +0530 (IST) Received: from zimbra.couthit.local (zimbra.couthit.local [10.10.10.103]) by zimbra.couthit.local (Postfix) with ESMTP id 28DF11781F6A; Wed, 22 Jan 2025 21:03:28 +0530 (IST) Date: Wed, 22 Jan 2025 21:03:26 +0530 (IST) From: Basharath Hussain Khaja To: Andrew Lunn Message-ID: <984041835.384768.1737560006836.JavaMail.zimbra@couthit.local> In-Reply-To: <5ba6bbf2-52e4-49d0-b6e2-134fb25ebe4c@lunn.ch> References: <20250109105600.41297-1-basharath@couthit.com> <20250109105600.41297-3-basharath@couthit.com> <5ba6bbf2-52e4-49d0-b6e2-134fb25ebe4c@lunn.ch> Subject: Re: [RFC PATCH 02/10] net: ti: prueth: Adds ICSSM Ethernet driver MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.10.10.103] X-Mailer: Zimbra 8.8.15_GA_3968 (ZimbraWebClient - FF113 (Linux)/8.8.15_GA_3968) Thread-Topic: prueth: Adds ICSSM Ethernet driver Thread-Index: QkPWDvzL1WYog89bH3HrmHjQ8Nti1A== X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server.wki.vra.mybluehostin.me X-AntiAbuse: Original Domain - lists.infradead.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - couthit.com X-Get-Message-Sender-Via: server.wki.vra.mybluehostin.me: authenticated_id: smtp@couthit.com X-Authenticated-Sender: server.wki.vra.mybluehostin.me: smtp@couthit.com X-Source: X-Source-Args: X-Source-Dir: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250122_073343_014327_94A6DFBD X-CRM114-Status: GOOD ( 11.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nm , vigneshr , tony , edumazet , krishna , pmohan , diogo ivo , Rob Herring , javier carrasco cruz , praneeth , m-karicheri2 , basharath , kuba , pabeni , devicetree , conor+dt , schnelle , mohan , richardcochran , prajith , rogerq , jacob e keller , ssantosh , linux-omap , linux-arm-kernel , rogerq , srk , pratheesh , m-malladi , netdev , rdunlap , linux-kernel , danishanwar , afd , andrew+netdev , parvathi , horms , krzk+dt , davem Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org >> + emac->phy_node = of_parse_phandle(eth_node, "phy-handle", 0); >> + if (!emac->phy_node) { >> + dev_err(prueth->dev, "couldn't find phy-handle\n"); >> + ret = -ENODEV; >> + goto free; >> + } >> + >> + ret = of_get_phy_mode(eth_node, &emac->phy_if); >> + if (ret) { >> + dev_err(prueth->dev, "could not get phy-mode property err %d\n", >> + ret); >> + goto free; >> + } >> + >> + /* connect PHY */ >> + emac->phydev = of_phy_connect(ndev, emac->phy_node, >> + &icssm_emac_adjust_link, 0, emac->phy_if); >> + if (!emac->phydev) { >> + dev_dbg(prueth->dev, "couldn't connect to phy %s\n", >> + emac->phy_node->full_name); >> + ret = -EPROBE_DEFER; >> + goto free; >> + } > > of_phy_get_and_connect() will simplify this. > Yes. This API does same functionality, we will replace three APIs with single API in the next version. >> + /* remove unsupported modes */ >> + phy_remove_link_mode(emac->phydev, ETHTOOL_LINK_MODE_10baseT_Half_BIT); >> + phy_remove_link_mode(emac->phydev, ETHTOOL_LINK_MODE_10baseT_Full_BIT); > > It only does 100Mbps? > It is capable of both 100M/10M full/half-duplex modes. In this patch series we are adding support for 100M full duplex operation. Support for other modes will be added subsequently. >> + if (of_property_read_bool(eth_node, "ti,no-half-duplex")) { > > Is this becasue 100baseT_Half is broken in some versions of the > hardware? > No.This property will be removed as we have added support only for 100M full duplex. >> + phy_remove_link_mode(emac->phydev, >> + ETHTOOL_LINK_MODE_100baseT_Half_BIT); >> + } >> + >> + phy_remove_link_mode(emac->phydev, ETHTOOL_LINK_MODE_Pause_BIT); >> + phy_remove_link_mode(emac->phydev, ETHTOOL_LINK_MODE_Asym_Pause_BIT); > > Is this really needed? I've not checked, but if you don't call > phy_support_sym_pause() or phy_support_asym_pause(), i would of > expected phylib to default to no pause? > Though TI PHY default state is clear(ASM_DIR - 0 & PAUSE - 0 as Default state in ANAR register), this bits are cleared again to handle if in case of change in PHY. >> +static const struct of_device_id prueth_dt_match[]; > > Please avoid forward references. If you need the match table, define > it here. > Sure. This got escaped while cleanup. We will address this in the next version. Thanks & Best Regards, Basharath