[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250521091249.GT365796@horms.kernel.org>
Date: Wed, 21 May 2025 10:12:49 +0100
From: Simon Horman <horms@...nel.org>
To: Jijie Shao <shaojijie@...wei.com>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, andrew+netdev@...n.ch, shenjian15@...wei.com,
wangpeiyang1@...wei.com, liuyonglong@...wei.com,
chenhao418@...wei.com, jonathan.cameron@...wei.com,
shameerali.kolothum.thodi@...wei.com, salil.mehta@...wei.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 net 2/2] net: hibmcge: fix wrong ndo.open() after
reset fail issue.
On Sat, May 17, 2025 at 05:58:28PM +0800, Jijie Shao wrote:
> If the driver reset fails, it may not work properly.
> Therefore, the ndo.open() operation should be rejected.
>
> In this patch, the driver calls netif_device_detach()
> before the reset and calls netif_device_attach()
> after the reset succeeds. If the reset fails,
> netif_device_attach() is not called. Therefore,
> netdev does not present and cannot be opened.
>
> If reset fails, only the PCI reset (via sysfs)
> can be used to attempt recovery.
>
> Fixes: 3f5a61f6d504 ("net: hibmcge: Add reset supported in this module")
> Signed-off-by: Jijie Shao <shaojijie@...wei.com>
> ---
> ChangeLog:
> v1 -> v2:
> - Use netif_device_detach() to block netdev callbacks after reset fails, suggested by Jakub.
> v1: https://lore.kernel.org/all/20250430093127.2400813-1-shaojijie@huawei.com/
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists