[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6f25d183-67e8-4704-b5a7-775fbf8d3d58@gmail.com>
Date: Tue, 12 Nov 2024 10:09:25 -0800
From: Mohsin Bashir <mohsin.bashr@...il.com>
To: Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org
Cc: alexanderduyck@...com, kuba@...nel.org, andrew@...n.ch,
andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
kernel-team@...a.com, sanmanpradhan@...a.com, vadim.fedorenko@...ux.dev,
horms@...nel.org
Subject: Re: [PATCH net-next] eth: fbnic: Add support to dump registers
On 11/12/24 4:17 AM, Paolo Abeni wrote:
> On 11/8/24 02:32, Mohsin Bashir wrote:
>> Add support for the 'ethtool -d <dev>' command to retrieve and print
>> a register dump for fbnic. The dump defaults to version 1 and consists
>> of two parts: all the register sections that can be dumped linearly, and
>> an RPC RAM section that is structured in an interleaved fashion and
>> requires special handling. For each register section, the dump also
>> contains the start and end boundary information which can simplify parsing.
>>
>> Signed-off-by: Mohsin Bashir <mohsin.bashr@...il.com>
>> ---
>> drivers/net/ethernet/meta/fbnic/Makefile | 3 +-
>> drivers/net/ethernet/meta/fbnic/fbnic.h | 3 +
>> drivers/net/ethernet/meta/fbnic/fbnic_csr.c | 145 ++++++++++++++++++
>> drivers/net/ethernet/meta/fbnic/fbnic_csr.h | 16 ++
>> .../net/ethernet/meta/fbnic/fbnic_ethtool.c | 17 ++
>> 5 files changed, 183 insertions(+), 1 deletion(-)
>> create mode 100644 drivers/net/ethernet/meta/fbnic/fbnic_csr.c
>>
>> diff --git a/drivers/net/ethernet/meta/fbnic/Makefile b/drivers/net/ethernet/meta/fbnic/Makefile
>> index cadd4dac6620..425e8b801265 100644
>> --- a/drivers/net/ethernet/meta/fbnic/Makefile
>> +++ b/drivers/net/ethernet/meta/fbnic/Makefile
>> @@ -7,7 +7,8 @@
>>
>> obj-$(CONFIG_FBNIC) += fbnic.o
>>
>> -fbnic-y := fbnic_devlink.o \
>> +fbnic-y := fbnic_csr.o \
>> + fbnic_devlink.o \
>> fbnic_ethtool.o \
>> fbnic_fw.o \
>> fbnic_hw_stats.o \
>> diff --git a/drivers/net/ethernet/meta/fbnic/fbnic.h b/drivers/net/ethernet/meta/fbnic/fbnic.h
>> index 9f9cb9b3e74e..98870cb2b689 100644
>> --- a/drivers/net/ethernet/meta/fbnic/fbnic.h
>> +++ b/drivers/net/ethernet/meta/fbnic/fbnic.h
>> @@ -156,6 +156,9 @@ int fbnic_alloc_irqs(struct fbnic_dev *fbd);
>> void fbnic_get_fw_ver_commit_str(struct fbnic_dev *fbd, char *fw_version,
>> const size_t str_sz);
>>
>> +void fbnic_csr_get_regs(struct fbnic_dev *fbd, u32 *data, u32 *regs_version);
>> +int fbnic_csr_regs_len(struct fbnic_dev *fbd);
>> +
>> enum fbnic_boards {
>> fbnic_board_asic
>> };
>> diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_csr.c b/drivers/net/ethernet/meta/fbnic/fbnic_csr.c
>> new file mode 100644
>> index 000000000000..e6018e54bc68
>> --- /dev/null
>> +++ b/drivers/net/ethernet/meta/fbnic/fbnic_csr.c
>
> The code LGTM, but this newly created file lacks the SPDX licence
> identifier.
>
> Please add it.
>
> /P
>
> Side note: a few other files are missing such info, it would be good if
> you could send patches to fix them, too.
>
Hi Paolo,
Thank you for your response. I'll update this patch with SPDX license
information in the newly added file. I will also send a separate patch
to add the same in files which are currently missing this.
Powered by blists - more mailing lists