]> git.baikalelectronics.ru Git - kernel.git/commit
NTB: ntb_transport: Free MWs in ntb_transport_link_cleanup()
authorJoey Zhang <joey.zhang@microchip.com>
Mon, 7 Jan 2019 03:12:56 +0000 (11:12 +0800)
committerJon Mason <jdmason@kudzu.us>
Mon, 11 Feb 2019 14:26:05 +0000 (09:26 -0500)
commit79d9de36514384931f635decc52095c3c3f27b4c
tree354e705a1ba2dd9751766b1488f83a6a998df01a
parent0c7c861f37330e13bbe26bc8bcc6d4a921fe2302
NTB: ntb_transport: Free MWs in ntb_transport_link_cleanup()

If NTB peer host crashes or reboots, the NTB transport link will be
down and the MWs of NTB transport will be invalid. But the
ntb_transport_link_cleanup() does not free these invalid MWs. When
the NTB peer host is recovered later, NTB transport link will be
up and the ntb_set_mw() will not reset up MWs. Because the MWs of
NTB transport are invalid, the NTB transport will not work.

We can fix it by freeing MWs when NTB transport link is down, then
the ntb_set_mw() will reset up MWs when NTB transport link is up.

Signed-off-by: Joey Zhang <joey.zhang@microchip.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
drivers/ntb/ntb_transport.c