[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1614106230.1712453.1752236732227.JavaMail.zimbra@couthit.local>
Date: Fri, 11 Jul 2025 17:55:32 +0530 (IST)
From: Parvathi Pudi <parvathi@...thit.com>
To: kuba <kuba@...nel.org>
Cc: parvathi <parvathi@...thit.com>, danishanwar <danishanwar@...com>,
rogerq <rogerq@...nel.org>, andrew+netdev <andrew+netdev@...n.ch>,
davem <davem@...emloft.net>, edumazet <edumazet@...gle.com>,
pabeni <pabeni@...hat.com>, robh <robh@...nel.org>,
krzk+dt <krzk+dt@...nel.org>, conor+dt <conor+dt@...nel.org>,
ssantosh <ssantosh@...nel.org>,
richardcochran <richardcochran@...il.com>,
s hauer <s.hauer@...gutronix.de>, m-karicheri2 <m-karicheri2@...com>,
glaroque <glaroque@...libre.com>, afd <afd@...com>,
saikrishnag <saikrishnag@...vell.com>, m-malladi <m-malladi@...com>,
jacob e keller <jacob.e.keller@...el.com>,
diogo ivo <diogo.ivo@...mens.com>,
javier carrasco cruz <javier.carrasco.cruz@...il.com>,
horms <horms@...nel.org>, s-anna <s-anna@...com>,
basharath <basharath@...thit.com>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
netdev <netdev@...r.kernel.org>,
devicetree <devicetree@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Vadim Fedorenko <vadim.fedorenko@...ux.dev>,
pratheesh <pratheesh@...com>, Prajith Jayarajan <prajith@...com>,
Vignesh Raghavendra <vigneshr@...com>, praneeth <praneeth@...com>,
srk <srk@...com>, rogerq <rogerq@...com>,
krishna <krishna@...thit.com>, pmohan <pmohan@...thit.com>,
mohan <mohan@...thit.com>
Subject: Re: [PATCH net-next v10 02/11] net: ti: prueth: Adds ICSSM Ethernet
driver
Hi,
> On Wed, 2 Jul 2025 19:36:24 +0530 Parvathi Pudi wrote:
>> + if (ret < 0) {
>> + dev_err(dev, "%pOF error reading port_id %d\n",
>> + eth_node, ret);
>> + }
>
> unnecessary parenthesis, but also did you mean to error out here?
>
Yes, we will address this in the next version.
>> + dev_err(dev, "port reg should be 0 or 1\n");
>> + of_node_put(eth_node);
>
> this error will also trigger if same port is specified multiple times
>
We will check and add appropriate code changes in the next version.
> + ret = PTR_ERR(prueth->pru1);
> + if (ret != -EPROBE_DEFER)
> + dev_err(dev, "unable to get PRU1: %d\n", ret);
> + goto put_pru;
>
> dev_err_probe() ?
>
Sure, we will replace “dev_err()” with “dev_err_probe()” to make it
simple.
>> +/**
>> + * struct prueth_private_data - PRU Ethernet private data
>> + * @fw_pru: firmware names to be used for PRUSS ethernet usecases
>> + * @support_lre: boolean to indicate if lre is enabled
>> + * @support_switch: boolean to indicate if switch is enabled
>
> Please improve or remove this, adding kdoc which doesn't explain
> anything is discouraged per kernel coding style.
>
> This one is actually more confusing than helpful the fields are
> called "support" but kdoc says "enabled". Maybe name the fields
> 'enabled' ?
>
Sure, we will address this in the next version.
>> + */
>> +struct prueth_private_data {
>> + const struct prueth_firmware fw_pru[PRUSS_NUM_PRUS];
>> + bool support_lre;
>> + bool support_switch;
>> +};
>> +
>> +/* data for each emac port */
>> +struct prueth_emac {
>> + struct prueth *prueth;
>> + struct net_device *ndev;
>> +
>> + struct rproc *pru;
>> + struct phy_device *phydev;
>> +
>> + int link;
>> + int speed;
>> + int duplex;
>> +
>> + enum prueth_port port_id;
>> + const char *phy_id;
>> + u8 mac_addr[6];
>> + phy_interface_t phy_if;
>> + spinlock_t lock; /* serialize access */
>
> 'serialize access' to what? Which fields does it protect?
We will update with more detailed explanation.
Thanks and Regards,
Parvathi.
Powered by blists - more mailing lists