From: Zhu Yanjun <zyjzyj2000@gmail.com>
To: Michael Margolin <mrgolin@amazon.com>,
jgg@nvidia.com, leon@kernel.org, linux-rdma@vger.kernel.org
Cc: sleybo@amazon.com, matua@amazon.com, gal.pressman@linux.dev,
ltao@redhat.com, Firas Jahjah <firasj@amazon.com>,
Yonatan Nachum <ynachum@amazon.com>
Subject: Re: [PATCH for-rc] RDMA/efa: Add shutdown notifier
Date: Thu, 25 Apr 2024 13:12:19 +0200 [thread overview]
Message-ID: <6bafebb9-0b2c-42c2-ae9c-851e8499d5d9@linux.dev> (raw)
In-Reply-To: <20240425075143.24683-1-mrgolin@amazon.com>
On 25.04.24 09:51, Michael Margolin wrote:
> Add driver function to stop the device and release any active IRQs as
> preparation for shutdown. This should fix issues cased by unexpected AQ
s/cased/caused ?
Zhu Yanjun
> interrupts when booting kernel using kexec and possible data integrity
> issues when the system is being shutdown during traffic.
>
> Reviewed-by: Firas Jahjah <firasj@amazon.com>
> Reviewed-by: Yonatan Nachum <ynachum@amazon.com>
> Signed-off-by: Michael Margolin <mrgolin@amazon.com>
> ---
> drivers/infiniband/hw/efa/efa_main.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/infiniband/hw/efa/efa_main.c b/drivers/infiniband/hw/efa/efa_main.c
> index 5fa3603c80d8..d1a48f988f6c 100644
> --- a/drivers/infiniband/hw/efa/efa_main.c
> +++ b/drivers/infiniband/hw/efa/efa_main.c
> @@ -671,11 +671,22 @@ static void efa_remove(struct pci_dev *pdev)
> efa_remove_device(pdev);
> }
>
> +static void efa_shutdown(struct pci_dev *pdev)
> +{
> + struct efa_dev *dev = pci_get_drvdata(pdev);
> +
> + efa_destroy_eqs(dev);
> + efa_com_dev_reset(&dev->edev, EFA_REGS_RESET_SHUTDOWN);
> + efa_free_irq(dev, &dev->admin_irq);
> + efa_disable_msix(dev);
> +}
> +
> static struct pci_driver efa_pci_driver = {
> .name = DRV_MODULE_NAME,
> .id_table = efa_pci_tbl,
> .probe = efa_probe,
> .remove = efa_remove,
> + .shutdown = efa_shutdown,
> };
>
> module_pci_driver(efa_pci_driver);
next prev parent reply other threads:[~2024-04-25 11:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-25 7:51 [PATCH for-rc] RDMA/efa: Add shutdown notifier Michael Margolin
2024-04-25 9:59 ` Tao Liu
2024-04-25 11:12 ` Zhu Yanjun [this message]
2024-04-25 17:15 ` Margolin, Michael
2024-04-25 17:18 ` [PATCH for-rc v2] " Michael Margolin
2024-04-29 12:06 ` Jason Gunthorpe
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=6bafebb9-0b2c-42c2-ae9c-851e8499d5d9@linux.dev \
--to=zyjzyj2000@gmail.com \
--cc=firasj@amazon.com \
--cc=gal.pressman@linux.dev \
--cc=jgg@nvidia.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=ltao@redhat.com \
--cc=matua@amazon.com \
--cc=mrgolin@amazon.com \
--cc=sleybo@amazon.com \
--cc=ynachum@amazon.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.