[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231117155401.GN164483@vergenet.net>
Date: Fri, 17 Nov 2023 15:54:01 +0000
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>,
Amit Cohen <amcohen@...dia.com>, mlxsw@...dia.com
Subject: Re: [PATCH net-next 13/14] mlxsw: pci: Implement PCI reset handlers
On Wed, Nov 15, 2023 at 01:17:22PM +0100, Petr Machata wrote:
> From: Ido Schimmel <idosch@...dia.com>
>
> Implement reset_prepare() and reset_done() handlers that are invoked by
> the PCI core before and after issuing a PCI reset, respectively.
>
> Specifically, implement reset_prepare() by calling
> mlxsw_core_bus_device_unregister() and reset_done() by calling
> mlxsw_core_bus_device_register(). This is the same implementation as the
> reload_{down,up}() devlink operations with the following differences:
>
> 1. The devlink instance is unregistered and then registered again after
> the reset.
>
> 2. A reset via the device's command interface (using MRSR register) is
> not issued during reset_done() as PCI core already issued a PCI
> reset.
>
> Tested:
>
> # for i in $(seq 1 10); do echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/reset; done
>
> Reviewed-by: Petr Machata <petrm@...dia.com>
> Signed-off-by: Ido Schimmel <idosch@...dia.com>
> Signed-off-by: Petr Machata <petrm@...dia.com>
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists