]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/qed: allow old cards not supporting "num_images" to work
authorLouis Leseur <louis.leseur@gmail.com>
Thu, 28 Nov 2024 08:33:58 +0000 (09:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:51:28 +0000 (19:51 +0100)
commitd7804000d8b97cb0ab95caac71ae92a74b0eba17
tree6aa9a49aa138a9e55eab2d1bcc743f28264a4b6c
parentf502a88fdd415647a1f2dc45fac71b9c522a052b
net/qed: allow old cards not supporting "num_images" to work

[ Upstream commit 7a0ea70da56ee8c2716d0b79e9959d3c47efab62 ]

Commit 43645ce03e00 ("qed: Populate nvm image attribute shadow.")
added support for populating flash image attributes, notably
"num_images". However, some cards were not able to return this
information. In such cases, the driver would return EINVAL, causing the
driver to exit.

Add check to return EOPNOTSUPP instead of EINVAL when the card is not
able to return these information. The caller function already handles
EOPNOTSUPP without error.

Fixes: 43645ce03e00 ("qed: Populate nvm image attribute shadow.")
Co-developed-by: Florian Forestier <florian@forestier.re>
Signed-off-by: Florian Forestier <florian@forestier.re>
Signed-off-by: Louis Leseur <louis.leseur@gmail.com>
Link: https://patch.msgid.link/20241128083633.26431-1-louis.leseur@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/qlogic/qed/qed_mcp.c