lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1901840071.600762.1739872709135.JavaMail.zimbra@couthit.local>
Date: Tue, 18 Feb 2025 15:28:29 +0530 (IST)
From: Parvathi Pudi <parvathi@...thit.com>
To: Maxime Chevallier <maxime.chevallier@...tlin.com>
Cc: parvathi <parvathi@...thit.com>, danishanwar <danishanwar@...com>, 
	rogerq <rogerq@...nel.org>, andrew+netdev@...n.ch, 
	davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org, 
	pabeni@...hat.com, robh@...nel.org, krzk+dt@...nel.org, 
	conor+dt@...nel.org, nm@...com, ssantosh@...nel.org, 
	richardcochran@...il.com, basharath <basharath@...thit.com>, 
	schnelle@...ux.ibm.com, diogo ivo <diogo.ivo@...mens.com>, 
	m-karicheri2@...com, horms@...nel.org, 
	jacob e keller <jacob.e.keller@...el.com>, m-malladi@...com, 
	javier carrasco cruz <javier.carrasco.cruz@...il.com>, afd@...com, 
	s-anna@...com, linux-arm-kernel@...ts.infradead.org, 
	netdev@...r.kernel.org, devicetree@...r.kernel.org, 
	linux-kernel@...r.kernel.org, pratheesh <pratheesh@...com>, 
	Prajith Jayarajan <prajith@...com>, 
	Vignesh Raghavendra <vigneshr@...com>, praneeth@...com, srk@...com, 
	rogerq@...com, krishna <krishna@...thit.com>, 
	pmohan <pmohan@...thit.com>, mohan <mohan@...thit.com>
Subject: Re: [PATCH net-next v3 04/10] net: ti: prueth: Adds link detection,
 RX and TX support.


Hi,

> On Fri, 14 Feb 2025 13:07:51 +0530
> parvathi <parvathi@...thit.com> wrote:
> 
>> From: Roger Quadros <rogerq@...com>
>> 
>> Changes corresponding to link configuration such as speed and duplexity.
>> IRQ and handler initializations are performed for packet reception.Firmware
>> receives the packet from the wire and stores it into OCMC queue. Next, it
>> notifies the CPU via interrupt. Upon receiving the interrupt CPU will
>> service the IRQ and packet will be processed by pushing the newly allocated
>> SKB to upper layers.
>> 
>> When the user application want to transmit a packet, it will invoke
>> sys_send() which will inturn invoke the PRUETH driver, then it will write
>> the packet into OCMC queues. PRU firmware will pick up the packet and
>> transmit it on to the wire.
>> 
>> Signed-off-by: Roger Quadros <rogerq@...com>
>> Signed-off-by: Andrew F. Davis <afd@...com>
>> Signed-off-by: Basharath Hussain Khaja <basharath@...thit.com>
>> Signed-off-by: Parvathi Pudi <parvathi@...thit.com>
> 
> 
>> +/* update phy/port status information for firmware */
>> +static void icssm_emac_update_phystatus(struct prueth_emac *emac)
>> +{
>> +	struct prueth *prueth = emac->prueth;
>> +	u32 phy_speed, port_status = 0;
>> +	enum prueth_mem region;
>> +	u32 delay;
>> +
>> +	region = emac->dram;
>> +	phy_speed = emac->speed;
>> +	icssm_prueth_write_reg(prueth, region, PHY_SPEED_OFFSET, phy_speed);
>> +
>> +	delay = TX_CLK_DELAY_100M;
>> +
>> +	delay = delay << PRUSS_MII_RT_TXCFG_TX_CLK_DELAY_SHIFT;
>> +
>> +	if (emac->port_id) {
>> +		regmap_update_bits(prueth->mii_rt,
>> +				   PRUSS_MII_RT_TXCFG1,
>> +				   PRUSS_MII_RT_TXCFG_TX_CLK_DELAY_MASK,
>> +				   delay);
>> +	} else {
>> +		regmap_update_bits(prueth->mii_rt,
>> +				   PRUSS_MII_RT_TXCFG0,
>> +				   PRUSS_MII_RT_TXCFG_TX_CLK_DELAY_MASK,
>> +				   delay);
>> +	}
>> +
>> +	if (emac->link)
>> +		port_status |= PORT_LINK_MASK;
>> +
>> +	writeb(port_status, prueth->mem[region].va + PORT_STATUS_OFFSET);
>> +}
>> +
>>  /* called back by PHY layer if there is change in link state of hw port*/
>>  static void icssm_emac_adjust_link(struct net_device *ndev)
>>  {
>> @@ -369,6 +426,8 @@ static void icssm_emac_adjust_link(struct net_device *ndev)
>>  		emac->link = 0;
>>  	}
>>  
>> +	icssm_emac_update_phystatus(emac);
>> +
> 
> It looks to me like emac->link, emac->speed and emac->duplex are only
> used in icssm_emac_update_phystatus(). If you consider either passing
> these as parameters to the above function, or simply merge
> icssm_emac_update_phystatus() into your adjust_link callback, you can get
> rid of these 3 attributes entirely. It even looks like emac->duplex is
> simply unused.
> 

Sure, we will address this in the next version.

Thanks and Regards,
Parvathi.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ