linux/drivers/net/ethernet/amd
Brett Creeley d9e2f070d8 pds_core: Prevent possible adminq overflow/stuck condition
The pds_core's adminq is protected by the adminq_lock, which prevents
more than 1 command to be posted onto it at any one time. This makes it
so the client drivers cannot simultaneously post adminq commands.
However, the completions happen in a different context, which means
multiple adminq commands can be posted sequentially and all waiting
on completion.

On the FW side, the backing adminq request queue is only 16 entries
long and the retry mechanism and/or overflow/stuck prevention is
lacking. This can cause the adminq to get stuck, so commands are no
longer processed and completions are no longer sent by the FW.

As an initial fix, prevent more than 16 outstanding adminq commands so
there's no way to cause the adminq from getting stuck. This works
because the backing adminq request queue will never have more than 16
pending adminq commands, so it will never overflow. This is done by
reducing the adminq depth to 16.

Fixes: 45d76f4929 ("pds_core: set up device and adminq")
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Brett Creeley <brett.creeley@amd.com>
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20250421174606.3892-2-shannon.nelson@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-04-23 18:50:17 -07:00
..
pds_core pds_core: Prevent possible adminq overflow/stuck condition 2025-04-23 18:50:17 -07:00
xgbe treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
7990.c net: amd: add missing MODULE_DESCRIPTION() macros 2024-06-19 17:21:40 -07:00
7990.h net: 7990: Fix use correct return type for ndo_start_xmit() 2020-05-06 14:26:14 -07:00
a2065.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
a2065.h
amd8111e.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
amd8111e.h net: amd8111e: Remove duplicate definition of PCI_VENDOR_ID_AMD 2024-10-28 15:48:51 -07:00
ariadne.c net: amd: add missing MODULE_DESCRIPTION() macros 2024-06-19 17:21:40 -07:00
ariadne.h
atarilance.c net: amd: add missing MODULE_DESCRIPTION() macros 2024-06-19 17:21:40 -07:00
au1000_eth.c net: au1000_eth: Mark au1000_ReleaseDB() static 2025-03-25 08:27:27 -07:00
au1000_eth.h au1000_eth: stop using virt_to_bus() 2022-06-08 11:32:02 -07:00
declance.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
hplance.c net: amd: add missing MODULE_DESCRIPTION() macros 2024-06-19 17:21:40 -07:00
hplance.h
Kconfig net: handle HAS_IOPORT dependencies 2024-04-08 11:56:56 +01:00
lance.c net: amd: add missing MODULE_DESCRIPTION() macros 2024-06-19 17:21:40 -07:00
Makefile pds_core: Kconfig and pds_core.rst 2023-04-21 08:29:14 +01:00
mvme147.c net: amd: mvme147: Fix probe banner message 2024-10-09 12:45:51 +01:00
nmclan_cs.c net: annotate data-races around dev->if_port 2024-05-08 18:51:30 -07:00
pcnet32.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
sun3lance.c net: amd: add missing MODULE_DESCRIPTION() macros 2024-06-19 17:21:40 -07:00
sunlance.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00