drm/display/dp_mst: Fix down message handling after a packet reception error
authorImre Deak <imre.deak@intel.com>
Wed, 14 Dec 2022 18:42:57 +0000 (20:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 12:57:39 +0000 (13:57 +0100)
commit 1241aedb6b5c7a5a8ad73e5eb3a41cfe18a3e00e upstream.

After an error during receiving a packet for a multi-packet DP MST
sideband message, the state tracking which packets have been received
already is not reset. This prevents the reception of subsequent down
messages (due to the pending message not yet completed with an
end-of-message-transfer packet).

Fix the above by resetting the reception state after a packet error.

Cc: Lyude Paul <lyude@redhat.com>
Cc: <stable@vger.kernel.org> # v3.17+
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221214184258.2869417-2-imre.deak@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/drm_dp_mst_topology.c

index c1f7274914e3cfe4b8b09e0da8d2fe8e2920ff2f..d02e323a4ecde2875c3beb4fc9b54c6a56618b2e 100644 (file)
@@ -3997,7 +3997,7 @@ static int drm_dp_mst_handle_down_rep(struct drm_dp_mst_topology_mgr *mgr)
        struct drm_dp_sideband_msg_rx *msg = &mgr->down_rep_recv;
 
        if (!drm_dp_get_one_sb_msg(mgr, false, &mstb))
-               goto out;
+               goto out_clear_reply;
 
        /* Multi-packet message transmission, don't clear the reply */
        if (!msg->have_eomt)