Re: [PATCH net-next v7 2/2] net: ti: icssg-prueth: Add support for PA Stats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 9/2/2024 1:04 PM, Jan Kiszka wrote:
> On 02.09.24 09:28, Anwar, Md Danish wrote:
>>
>>
>> On 9/2/2024 12:52 PM, Jan Kiszka wrote:
>>> On 22.08.24 14:26, MD Danish Anwar wrote:
>>>> Add support for dumping PA stats registers via ethtool.
>>>> Firmware maintained stats are stored at PA Stats registers.
>>>> Also modify emac_get_strings() API to use ethtool_puts().
>>>>
>>>> This commit also maintains consistency between miig_stats and pa_stats by
>>>> - renaming the array icssg_all_stats to icssg_all_miig_stats
>>>> - renaming the structure icssg_stats to icssg_miig_stats
>>>> - renaming ICSSG_STATS() to ICSSG_MIIG_STATS()
>>>> - changing order of stats related data structures and arrays so that data
>>>>   structures of a certain stats type is clubbed together.
>>>>
>>>> Signed-off-by: MD Danish Anwar <danishanwar@xxxxxx>
>>>> ---
>>>>  drivers/net/ethernet/ti/icssg/icssg_ethtool.c |  19 ++-
>>>>  drivers/net/ethernet/ti/icssg/icssg_prueth.c  |   6 +
>>>>  drivers/net/ethernet/ti/icssg/icssg_prueth.h  |   9 +-
>>>>  drivers/net/ethernet/ti/icssg/icssg_stats.c   |  31 +++-
>>>>  drivers/net/ethernet/ti/icssg/icssg_stats.h   | 158 +++++++++++-------
>>>>  5 files changed, 140 insertions(+), 83 deletions(-)
>>>>
>>>
>>> ...
>>>
>>>> diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth.c b/drivers/net/ethernet/ti/icssg/icssg_prueth.c
>>>> index 53a3e44b99a2..f623a0f603fc 100644
>>>> --- a/drivers/net/ethernet/ti/icssg/icssg_prueth.c
>>>> +++ b/drivers/net/ethernet/ti/icssg/icssg_prueth.c
>>>> @@ -1182,6 +1182,12 @@ static int prueth_probe(struct platform_device *pdev)
>>>>  		return -ENODEV;
>>>>  	}
>>>>  
>>>> +	prueth->pa_stats = syscon_regmap_lookup_by_phandle(np, "ti,pa-stats");
>>>> +	if (IS_ERR(prueth->pa_stats)) {
>>>> +		dev_err(dev, "couldn't get ti,pa-stats syscon regmap\n");
>>>> +		return -ENODEV;
>>>
>>> I was just beaten for potentially not being backward compatible, but
>>> this is definitely not working with existing DTs, just ran into it.
>>>
>>
>> Jan, I had posted the DT patch needed for this [1]. But the DT patch
>> goes to different tree and it was dependent on binding patch of this
>> series. My intention was once the binding is in, I will post the DT
>> patch in the next window. Till then ICSSG driver will break here but
>> once DT gets merged it will be alright. If that's not the best solution,
>> I can post DT here, but it will need to get merged via net-next.
>>
>> [1] https://lore.kernel.org/all/20240729113226.2905928-4-danishanwar@xxxxxx/
>>
> 
> Why not respect in the driver that the dtbinding says this property is
> only optional?
> 


Sure Jan, In that case, I will send out a fix making this optional in
driver.

-- 
Thanks and Regards,
Md Danish Anwar




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux