[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240416143338.GQ2320920@kernel.org>
Date: Tue, 16 Apr 2024 15:33:38 +0100
From: Simon Horman <horms@...nel.org>
To: Petr Machata <petrm@...dia.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
netdev@...r.kernel.org, Ido Schimmel <idosch@...dia.com>,
mlxsw@...dia.com, Jiri Pirko <jiri@...nulli.us>,
Amit Cohen <amcohen@...dia.com>
Subject: Re: [PATCH net 1/3] mlxsw: core: Unregister EMAD trap using FORWARD
action
On Tue, Apr 16, 2024 at 12:24:14PM +0200, Petr Machata wrote:
> From: Ido Schimmel <idosch@...dia.com>
>
> The device's manual (PRM - Programmer's Reference Manual) classifies the
> trap that is used to deliver EMAD responses as an "event trap". Among
> other things, it means that the only actions that can be associated with
> the trap are TRAP and FORWARD (NOP).
>
> Currently, during driver de-initialization the driver unregisters the
> trap by setting its action to DISCARD, which violates the above
> guideline. Future firmware versions will prevent such misuses by
> returning an error. This does not prevent the driver from working, but
> an error will be printed to the kernel log during module removal /
> devlink reload:
>
> mlxsw_spectrum 0000:03:00.0: Reg cmd access status failed (status=7(bad parameter))
> mlxsw_spectrum 0000:03:00.0: Reg cmd access failed (reg_id=7003(hpkt),type=write)
>
> Suppress the error message by aligning the driver to the manual and use
> a FORWARD (NOP) action when unregistering the trap.
>
> Fixes: 4ec14b7634b2 ("mlxsw: Add interface to access registers and process events")
> Cc: Jiri Pirko <jiri@...nulli.us>
> Cc: Amit Cohen <amcohen@...dia.com>
> Signed-off-by: Ido Schimmel <idosch@...dia.com>
> Reviewed-by: Petr Machata <petrm@...dia.com>
> Signed-off-by: Petr Machata <petrm@...dia.com>
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists