]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ntb: Clean up tx tail index on link down
authorDave Jiang <dave.jiang@intel.com>
Tue, 22 Aug 2023 16:04:45 +0000 (09:04 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Sep 2023 10:22:51 +0000 (12:22 +0200)
commitda0c7293f4dba7efd8fbbc8da0642cd475b6806d
treef5961f13e2de15363d895182c4f06e15e84b612b
parentbfa051f650a7708183bd86901ca4645dcf88c486
ntb: Clean up tx tail index on link down

commit cc79bd2738c2d40aba58b2be6ce47dc0e471df0e upstream.

The tx tail index is not reset when the link goes down. This causes the
tail index to go out of sync when the link goes down and comes back up.
Refactor the ntb_qp_link_down_reset() and reset the tail index as well.

Fixes: 2849b5d70641 ("NTB: Reset transport QP link stats on down")
Reported-by: Yuan Y Lu <yuan.y.lu@intel.com>
Tested-by: Yuan Y Lu <yuan.y.lu@intel.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/ntb/ntb_transport.c