From: Jakub Kicinski <kuba@kernel.org>
To: Manish Chopra <manishc@marvell.com>
Cc: <netdev@vger.kernel.org>, <aelior@marvell.com>,
<palok@marvell.com>, <njavali@marvell.com>,
<skashyap@marvell.com>, <jmeneghi@redhat.com>,
<yuval.mintz@qlogic.com>, <skalluru@marvell.com>,
<pabeni@redhat.com>, <edumazet@google.com>, <horms@kernel.org>,
David Miller <davem@davemloft.net>
Subject: Re: [PATCH v2 net] qede: fix firmware halt over suspend and resume
Date: Thu, 10 Aug 2023 17:47:18 -0700 [thread overview]
Message-ID: <20230810174718.38190258@kernel.org> (raw)
In-Reply-To: <20230809134339.698074-1-manishc@marvell.com>
On Wed, 9 Aug 2023 19:13:39 +0530 Manish Chopra wrote:
> While performing certain power-off sequences, PCI drivers are
> called to suspend and resume their underlying devices through
> PCI PM (power management) interface. However this NIC hardware
> does not support PCI PM suspend/resume operations so system wide
> suspend/resume leads to bad MFW (management firmware) state which
> causes various follow-up errors in driver when communicating with
> the device/firmware afterwards.
Does the FW end up recovering? That could still be preferable
to rejecting suspend altogether. Reject is a big hammer,
I'm a bit worried it will cause a regression in stable.
> To fix this driver implements PCI PM suspend handler to indicate
> unsupported operation to the PCI subsystem explicitly, thus avoiding
> system to go into suspended/standby mode.
>
> Fixes: 2950219d87b0 ("qede: Add basic network device support")
> Cc: David Miller <davem@davemloft.net>
> Signed-off-by: Manish Chopra <manishc@marvell.com>
> Signed-off-by: Alok Prasad <palok@marvell.com>
> ---
> V1->V2:
> * Replace SIMPLE_DEV_PM_OPS with DEFINE_SIMPLE_DEV_PM_OPS
> ---
> drivers/net/ethernet/qlogic/qede/qede_main.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/ethernet/qlogic/qede/qede_main.c
> index d57e52a97f85..18ae7af1764c 100644
> --- a/drivers/net/ethernet/qlogic/qede/qede_main.c
> +++ b/drivers/net/ethernet/qlogic/qede/qede_main.c
> @@ -177,6 +177,18 @@ static int qede_sriov_configure(struct pci_dev *pdev, int num_vfs_param)
> }
> #endif
>
> +static int __maybe_unused qede_suspend(struct device *dev)
> +{
> + if (!dev)
> + return -ENODEV;
Can dev really be NULL here? That wouldn't make sense, what's the
driver supposed to do in such case?
--
pw-bot: cr
next prev parent reply other threads:[~2023-08-11 0:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 13:43 [PATCH v2 net] qede: fix firmware halt over suspend and resume Manish Chopra
2023-08-10 18:02 ` Simon Horman
2023-08-11 0:47 ` Jakub Kicinski [this message]
2023-08-11 9:31 ` [EXT] " Manish Chopra
2023-08-11 21:45 ` Jakub Kicinski
2023-08-14 10:24 ` Manish Chopra
2023-08-14 15:17 ` Jakub Kicinski
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=20230810174718.38190258@kernel.org \
--to=kuba@kernel.org \
--cc=aelior@marvell.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jmeneghi@redhat.com \
--cc=manishc@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=njavali@marvell.com \
--cc=pabeni@redhat.com \
--cc=palok@marvell.com \
--cc=skalluru@marvell.com \
--cc=skashyap@marvell.com \
--cc=yuval.mintz@qlogic.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.