]> git.itanic.dy.fi Git - linux-stable/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>
Sat, 23 Sep 2023 08:47:00 +0000 (10:47 +0200)
commit6ec95c4faa308ccefd834fcd0f69d7ed7fe90550
treeb752ab68fa531fb19fc7a2321fa65b8318355828
parentaa6d6ed213b62cbdb09ea32abbfa085dd987a0c9
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