]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/ncsi: wait for the last response to Deselect Package before configuring channel
authorPaul Fertser <fercerpav@gmail.com>
Thu, 16 Jan 2025 15:29:00 +0000 (18:29 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 12:49:52 +0000 (13:49 +0100)
commit9dc1a3404cd0229bdd161b9f2cdac6fbc43b4eab
tree9e37192ea5f6382080bd03e01e0f2806c20a07bf
parentc56ba3ea8e3c9a69a992aad18f7a65e43e51d623
net/ncsi: wait for the last response to Deselect Package before configuring channel

commit 6bb194d036c6e1b329dcdff459338cdd9a54802a upstream.

The NCSI state machine as it's currently implemented assumes that
transition to the next logical state is performed either explicitly by
calling `schedule_work(&ndp->work)` to re-queue itself or implicitly
after processing the predefined (ndp->pending_req_num) number of
replies. Thus to avoid the configuration FSM from advancing prematurely
and getting out of sync with the process it's essential to not skip
waiting for a reply.

This patch makes the code wait for reception of the Deselect Package
response for the last package probed before proceeding to channel
configuration.

Thanks go to Potin Lai and Cosmo Chou for the initial investigation and
testing.

Fixes: 8e13f70be05e ("net/ncsi: Probe single packages to avoid conflict")
Cc: stable@vger.kernel.org
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Link: https://patch.msgid.link/20250116152900.8656-1-fercerpav@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ncsi/ncsi-manage.c