[PATCH net-next v10 02/11] net: ti: prueth: Adds ICSSM Ethernet driver
Parvathi Pudi
parvathi at couthit.com
Fri Jul 11 05:25:32 PDT 2025
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.
More information about the linux-arm-kernel
mailing list