From: Tao Liu <ltao@redhat.com>
To: Michael Margolin <mrgolin@amazon.com>
Cc: jgg@nvidia.com, leon@kernel.org, linux-rdma@vger.kernel.org,
sleybo@amazon.com, matua@amazon.com, gal.pressman@linux.dev,
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 17:59:49 +0800 [thread overview]
Message-ID: <CAO7dBbU7T7W=T70gPLkbFyMaG9NrfEkVnw_kb4h0FOz9=n-AmA@mail.gmail.com> (raw)
In-Reply-To: <20240425075143.24683-1-mrgolin@amazon.com>
Hi Michael,
Thanks a lot for the patch.
Thanks,
Tao Liu
On Thu, Apr 25, 2024 at 3:52 PM Michael Margolin <mrgolin@amazon.com> 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
> 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);
> --
> 2.40.1
>
next prev parent reply other threads:[~2024-04-25 10:00 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 [this message]
2024-04-25 11:12 ` Zhu Yanjun
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='CAO7dBbU7T7W=T70gPLkbFyMaG9NrfEkVnw_kb4h0FOz9=n-AmA@mail.gmail.com' \
--to=ltao@redhat.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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).