]> git.hungrycats.org Git - linux/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>
Wed, 13 Sep 2023 07:48:41 +0000 (09:48 +0200)
commit08c64e0c2f43904509a6118a99de48bdbee6010b
treec156f926abf705e3a4c78e829b5ecf3613b3596d
parentc2cd5d993f57f819d46fe62387d3cc34d8468e60
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