linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "G Thomas, Rohan" <rohan.g.thomas@altera.com>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Serge Semin <fancer.lancer@gmail.com>,
	Romain Gantois <romain.gantois@bootlin.com>,
	netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Matthew Gerlach <matthew.gerlach@altera.com>
Subject: Re: [PATCH net-next 2/3] net: stmmac: xgmac: Correct supported speed modes
Date: Thu, 17 Jul 2025 17:56:43 +0530	[thread overview]
Message-ID: <9fe98cb8-f1c7-472c-a619-1ecabd636b07@altera.com> (raw)
In-Reply-To: <aHib9V1_WZfj3S8M@shell.armlinux.org.uk>

Hi Russell,

Thanks for reviewing the patch.

On 7/17/2025 12:15 PM, Russell King (Oracle) wrote:
> On Mon, Jul 14, 2025 at 03:59:18PM +0800, Rohan G Thomas via B4 Relay wrote:
>> @@ -1532,8 +1542,8 @@ int dwxgmac2_setup(struct stmmac_priv *priv)
>>   		mac->mcast_bits_log2 = ilog2(mac->multicast_filter_bins);
>>   
>>   	mac->link.caps = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
>> -			 MAC_1000FD | MAC_2500FD | MAC_5000FD |
>> -			 MAC_10000FD;
>> +			 MAC_10FD | MAC_100FD | MAC_1000FD |
>> +			 MAC_2500FD | MAC_5000FD | MAC_10000FD;
> ...
>> @@ -405,6 +405,7 @@ static int dwxgmac2_get_hw_feature(void __iomem *ioaddr,
>>   	dma_cap->sma_mdio = (hw_cap & XGMAC_HWFEAT_SMASEL) >> 5;
>>   	dma_cap->vlhash = (hw_cap & XGMAC_HWFEAT_VLHASH) >> 4;
>>   	dma_cap->half_duplex = (hw_cap & XGMAC_HWFEAT_HDSEL) >> 3;
>> +	dma_cap->mbps_10_100 = (hw_cap & XGMAC_HWFEAT_GMIISEL) >> 1;
> 
> What if dma_cap->mbps_10_100 is false? Should MAC_10FD | MAC_100FD
> still be set? What if dma_cap->half_duplex is set but
> dma_cap->mbps_10_100 is not? Should we avoid setting 10HD and 100HD?

As per the XGMAC databook, 10Mbps/100Mbps/1Gbps speeds are supported
only when the GMIISEL bit is set. As Serge pointed out, I also need to
consider the MAC version (≥ v3.00a) when enabling these modes. I’ll
update the next version of the patch to include checks for both the
GMIISEL bit and the MAC version before enabling the 
MAC_10FD/MAC_100FD/MAC_1000FD capabilities.

Also, regarding the HDSEL bit — it is set only if 10Mbps/100Mbps modes
are supported. I’ll include this condition as well when handling half
duplex support in the updated patch.

> 

Best Regards,
Rohan


  reply	other threads:[~2025-07-17 12:27 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-14  7:59 [PATCH net-next 0/3] net: stmmac: xgmac: Minor fixes Rohan G Thomas via B4 Relay
2025-07-14  7:59 ` [PATCH net-next 1/3] net: stmmac: xgmac: Disable RX FIFO Overflow interrupts Rohan G Thomas via B4 Relay
2025-07-14 13:34   ` Andrew Lunn
2025-07-15 13:16     ` G Thomas, Rohan
2025-07-15 13:24       ` Andrew Lunn
2025-07-14  7:59 ` [PATCH net-next 2/3] net: stmmac: xgmac: Correct supported speed modes Rohan G Thomas via B4 Relay
2025-07-14 13:42   ` Andrew Lunn
2025-07-15 13:33     ` G Thomas, Rohan
2025-07-15 15:10       ` Andrew Lunn
2025-07-17 11:47       ` Serge Semin
2025-07-17 12:59         ` G Thomas, Rohan
2025-07-17 17:22           ` Serge Semin
2025-07-18 11:38             ` G Thomas, Rohan
2025-07-24 16:18         ` G Thomas, Rohan
2025-07-24 17:56           ` Serge Semin
2025-07-25  9:18             ` G Thomas, Rohan
2025-07-17  6:45   ` Russell King (Oracle)
2025-07-17 12:26     ` G Thomas, Rohan [this message]
2025-07-14  7:59 ` [PATCH net-next 3/3] net: stmmac: Set CIC bit only for TX queues with COE Rohan G Thomas via B4 Relay
2025-07-14 13:40   ` Simon Horman
2025-07-15 13:44     ` G Thomas, Rohan
2025-07-16  8:22       ` Simon Horman
2025-07-17  6:20         ` G Thomas, Rohan
2025-07-18 20:06           ` Simon Horman
2025-07-24 16:03             ` G Thomas, Rohan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9fe98cb8-f1c7-472c-a619-1ecabd636b07@altera.com \
    --to=rohan.g.thomas@altera.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fancer.lancer@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux@armlinux.org.uk \
    --cc=matthew.gerlach@altera.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=romain.gantois@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).