mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: Jijie Shao <shaojijie@huawei.com>, <davem@davemloft.net>,
	<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
	<andrew+netdev@lunn.ch>, <horms@kernel.org>
Cc: <shenjian15@huawei.com>, <liuyonglong@huawei.com>,
	<chenhao418@huawei.com>, <lantao5@huawei.com>,
	<huangdonghua3@h-partners.com>, <yangshuaisong@h-partners.com>,
	<jonathan.cameron@huawei.com>, <salil.mehta@huawei.com>,
	<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net 3/3] net: hibmcge: fix the inappropriate netif_device_detach()
Date: Fri, 24 Oct 2025 13:24:43 -0700	[thread overview]
Message-ID: <6bc62c85-00f7-422e-8c9d-e7dcd1ab7311@intel.com> (raw)
In-Reply-To: <1a685858-833a-4ccf-93b2-d878eee25722@huawei.com>


[-- Attachment #1.1: Type: text/plain, Size: 1534 bytes --]



On 10/24/2025 12:21 AM, Jijie Shao wrote:
> 
> on 2025/10/24 9:05, Jacob Keller wrote:
>>
>> On 10/21/2025 7:00 AM, Jijie Shao wrote:
>>> current, driver will call netif_device_detach() in
>>> pci_error_handlers.error_detected() and do reset in
>>> pci_error_handlers.slot_reset().
>>> However, if pci_error_handlers.slot_reset() is not called
>>> after pci_error_handlers.error_detected(),
>>> driver will be detached and unable to recover.
>>>
>>> drivers/pci/pcie/err.c/report_error_detected() says:
>>>    If any device in the subtree does not have an error_detected
>>>    callback, PCI_ERS_RESULT_NO_AER_DRIVER prevents subsequent
>>>    error callbacks of any device in the subtree, and will
>>>    exit in the disconnected error state.
>>>
>>> Therefore, when the hibmcge device and other devices that do not
>>> support the error_detected callback are under the same subtree,
>>> hibmcge will be unable to do slot_reset.
>>>
>> Hmm.
>>
>> In the example case, the slot_reset never happens, but the PCI device is
>> still in an error state, which means that the device is not functional..
>>
>> In that case detaching the netdev and remaining detached seems like an
>> expected outcome?
>>
>> I guess I don't fully understand the setup in this scenario.
> 
> We have encountered some non-fatal errors, such as the SMMU event 0x10,
> which triggered the PCIe RAS and caused the network port to become unusable.
> 

Right. I forgot the same function is called even for non-fatal errors.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

  reply	other threads:[~2025-10-24 20:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-21 14:00 [PATCH net 0/3] There are some bugfix for hibmcge ethernet driver Jijie Shao
2025-10-21 14:00 ` [PATCH net 1/3] net: hibmcge: fix rx buf avl irq is not re-enabled in irq_handle issue Jijie Shao
2025-10-24  1:15   ` Jacob Keller
2025-10-24  6:39     ` Jijie Shao
2025-10-24 20:23       ` Jacob Keller
2025-10-21 14:00 ` [PATCH net 2/3] net: hibmcge: remove unnecessary check for np_link_fail in scenarios without phy Jijie Shao
2025-10-24  1:10   ` Jacob Keller
2025-10-24  6:44     ` Jijie Shao
2025-10-21 14:00 ` [PATCH net 3/3] net: hibmcge: fix the inappropriate netif_device_detach() Jijie Shao
2025-10-24  1:05   ` Jacob Keller
2025-10-24  7:21     ` Jijie Shao
2025-10-24 20:24       ` Jacob Keller [this message]
2025-10-24  1:08 ` [PATCH net 0/3] There are some bugfix for hibmcge ethernet driver Jacob Keller
2025-10-24  7:24   ` Jijie Shao

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=6bc62c85-00f7-422e-8c9d-e7dcd1ab7311@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=chenhao418@huawei.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=huangdonghua3@h-partners.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=kuba@kernel.org \
    --cc=lantao5@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuyonglong@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=salil.mehta@huawei.com \
    --cc=shaojijie@huawei.com \
    --cc=shenjian15@huawei.com \
    --cc=yangshuaisong@h-partners.com \
    /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®