From: Simon Horman <simon.horman@corigine•com>
To: Petr Machata <petrm@nvidia•com>
Cc: "David S. Miller" <davem@davemloft•net>,
Eric Dumazet <edumazet@google•com>,
Jakub Kicinski <kuba@kernel•org>, Paolo Abeni <pabeni@redhat•com>,
netdev@vger•kernel.org, Ido Schimmel <idosch@nvidia•com>,
Amit Cohen <amcohen@nvidia•com>,
mlxsw@nvidia•com
Subject: Re: [PATCH net-next 2/6] mlxsw: reg: Add Management Capabilities Mask Register
Date: Mon, 27 Mar 2023 11:53:34 +0200 [thread overview]
Message-ID: <ZCFnntC6T026tfFv@corigine.com> (raw)
In-Reply-To: <87jzz2o7hu.fsf@nvidia.com>
On Mon, Mar 27, 2023 at 11:35:24AM +0200, Petr Machata wrote:
>
> Simon Horman <simon.horman@corigine•com> writes:
>
> > On Wed, Mar 22, 2023 at 05:49:31PM +0100, Petr Machata wrote:
> >> From: Amit Cohen <amcohen@nvidia•com>
> >>
> >> MCAM register reports the device supported management features. Querying
> >> this register exposes if features are supported with the current firmware
> >> version in the current ASIC. Then, the drive can separate between different
> >> implementations dynamically.
> >>
> >> MCAM register supports querying whether a new reset flow (which includes
> >> PCI reset) is supported or not. Add support for the register as preparation
> >> for support of the new reset flow.
> >>
> >> Note that the access to the bits in the field 'mng_feature_cap_mask' is
> >> not same to other mask fields in other registers. In most of the cases
> >> bit #0 is the first one in the last dword, in MCAM register, bits #0-#31
> >> are in the first dword and so on. Declare the mask field using bits arrays
> >> per dword to simplify the access.
> >>
> >> Signed-off-by: Amit Cohen <amcohen@nvidia•com>
> >> Reviewed-by: Petr Machata <petrm@nvidia•com>
> >> Signed-off-by: Petr Machata <petrm@nvidia•com>
> >
> > I'm fine with this patch, and offered a Reviewed-by tag in another email.
> > But when sending that I forgot the minor nit below.
> > Please regard it as informational only.
> >
> >> ---
> >> drivers/net/ethernet/mellanox/mlxsw/reg.h | 74 +++++++++++++++++++++++
> >> 1 file changed, 74 insertions(+)
> >>
> >> diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h
> >> index 0d7d5e28945a..c4446085ebc5 100644
> >> --- a/drivers/net/ethernet/mellanox/mlxsw/reg.h
> >> +++ b/drivers/net/ethernet/mellanox/mlxsw/reg.h
> >
> > ...
> >
> >> +static inline void
> >> +mlxsw_reg_mcam_unpack(char *payload,
> >> + enum mlxsw_reg_mcam_mng_feature_cap_mask_bits bit,
> >> + bool *p_mng_feature_cap_val)
> >> +{
> >> + int offset = bit % (MLXSW_REG_BYTES_PER_DWORD * BITS_PER_BYTE);
> >> + int dword = bit / (MLXSW_REG_BYTES_PER_DWORD * BITS_PER_BYTE);
> >
> > nit: checkpatch seems mildly upset that there is no blank line here.
>
> Yes, thanks for pointing this out. I saw that, too. The complaint is
> that there should be a blank line after the declaration block, but the
> next line is still a part of the declaration block.
Yes, right you are.
Sorry for missing that.
>
> >> + u8 (*getters[])(const char *, u16) = {
> >> + mlxsw_reg_mcam_mng_feature_cap_mask_dw0_get,
> >> + mlxsw_reg_mcam_mng_feature_cap_mask_dw1_get,
> >> + mlxsw_reg_mcam_mng_feature_cap_mask_dw2_get,
> >> + mlxsw_reg_mcam_mng_feature_cap_mask_dw3_get,
> >> + };
>
next prev parent reply other threads:[~2023-03-27 9:53 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-22 16:49 [PATCH net-next 0/6] mlxsw: Add support for new reset flow Petr Machata
2023-03-22 16:49 ` [PATCH net-next 1/6] mlxsw: reg: Move 'mpsc' definition in 'mlxsw_reg_infos' Petr Machata
2023-03-26 13:59 ` Simon Horman
2023-03-22 16:49 ` [PATCH net-next 2/6] mlxsw: reg: Add Management Capabilities Mask Register Petr Machata
2023-03-26 14:00 ` Simon Horman
2023-03-26 14:02 ` Simon Horman
2023-03-27 9:35 ` Petr Machata
2023-03-27 9:53 ` Simon Horman [this message]
2023-03-22 16:49 ` [PATCH net-next 3/6] mlxsw: Extend MRSR pack() function to support new commands Petr Machata
2023-03-26 14:02 ` Simon Horman
2023-03-22 16:49 ` [PATCH net-next 4/6] mlxsw: pci: Rename mlxsw_pci_sw_reset() Petr Machata
2023-03-26 14:02 ` Simon Horman
2023-03-22 16:49 ` [PATCH net-next 5/6] mlxsw: pci: Move software reset code to a separate function Petr Machata
2023-03-26 14:03 ` Simon Horman
2023-03-22 16:49 ` [PATCH net-next 6/6] mlxsw: pci: Add support for new reset flow Petr Machata
2023-03-23 9:13 ` Petr Machata
2023-03-23 16:51 ` Bjorn Helgaas
2023-03-26 13:53 ` Ido Schimmel
2023-03-29 16:01 ` Bjorn Helgaas
2023-03-29 17:10 ` Alex Williamson
2023-03-30 8:26 ` Ido Schimmel
2023-03-30 18:49 ` Alex Williamson
2023-04-13 8:10 ` Ido Schimmel
2023-04-13 15:26 ` Jakub Kicinski
2023-04-13 10:26 ` Lukas Wunner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZCFnntC6T026tfFv@corigine.com \
--to=simon.horman@corigine$(echo .)com \
--cc=amcohen@nvidia$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=idosch@nvidia$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=mlxsw@nvidia$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=petrm@nvidia$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox