From: Breno Leitao <leitao@debian.org>
To: Zhang Yunfei <zhangyunfei1@kylinos.cn>
Cc: netdev@vger.kernel.org, jiawenwu@trustnetic.com,
mengyuanlou@net-swift.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, aleksandr.loktionov@intel.com,
weirongguang@kylinos.cn, u.kleine-koenig@baylibre.com,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH net v2 2/2] net: ngbe: clear DRV_LOAD bit when ngbe_open() fails
Date: Tue, 22 Sep 2026 03:58:34 -0700 [thread overview]
Message-ID: <arJev7h-_lEii1Z2@gmail.com> (raw)
In-Reply-To: <20260922100836.1147718-3-zhangyunfei1@kylinos.cn>
On Tue, Sep 22, 2026 at 06:08:36PM +0800, Zhang Yunfei wrote:
> ngbe_open() sets the WX_CFG_PORT_CTL_DRV_LOAD bit via
> wx_control_hw(wx, true) to tell the management firmware that the
> host driver has taken over the port (NCSI/OOB firmware stops using
> its management channel). Every error path of ngbe_open() returns
> without clearing it, leaving rings, IRQs and the PHY torn down
> while the firmware still believes the host owns the port, an
> inconsistent driver-firmware handshake state that persists until
> the next successful ifup.
>
> Roll the bit back on all open error paths, matching ngbe_close()
> and ngbe_dev_shutdown(), which already clear it.
silly question, why unwind, rather than not taking hw control until the
port is actually up, as the last thing in ngbe_open()?
Looking at txgbe, it does something like:
static int txgbe_open(struct net_device *netdev) {
.....
txgbe_up_complete(wx);
return 0;
}
Would ngbe_open() be able to follow a similar approach?
--breno
next prev parent reply other threads:[~2026-09-22 10:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 10:08 [PATCH net v2 0/2] net: ngbe: fix error handling in resume and open paths Zhang Yunfei
2026-09-22 10:08 ` [PATCH net v2 1/2] net: ngbe: propagate resume errors to the PM core Zhang Yunfei
2026-09-22 11:09 ` Loktionov, Aleksandr
2026-09-22 11:35 ` Breno Leitao
2026-09-24 17:29 ` netdev-bot+sashiko
2026-09-22 10:08 ` [PATCH net v2 2/2] net: ngbe: clear DRV_LOAD bit when ngbe_open() fails Zhang Yunfei
2026-09-22 10:58 ` Breno Leitao [this message]
2026-09-22 11:10 ` Loktionov, Aleksandr
[not found] <20260923104251.1514090-1-zhangyunfei1@kylinos.cn>
2026-09-23 10:56 ` Zhang Yunfei
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=arJev7h-_lEii1Z2@gmail.com \
--to=leitao@debian.org \
--cc=aleksandr.loktionov@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jiawenwu@trustnetic.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mengyuanlou@net-swift.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
--cc=u.kleine-koenig@baylibre.com \
--cc=weirongguang@kylinos.cn \
--cc=zhangyunfei1@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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
all inboxes | Powered by JetHome®