Closed ghost closed 5 years ago
To use the force down link feature, we should add following patch on ntb_transport.c .
diff --git a/ntb_transport.c b/ntb_transport.c
index 9878c48..8a8638d 100644
--- a/ntb_transport.c
+++ b/ntb_transport.c
@@ -700,10 +700,6 @@ static int ntb_set_mw(struct ntb_transport_ctx *nt, int num_mw,
xlat_size = round_up(size, xlat_align_size);
buff_size = round_up(size, xlat_align);
`
- / No need to re-setup /
- if (mw->xlat_size == xlat_size)
- return 0;
-
if (mw->buff_size)
ntb_free_mw(nt, num_mw);`
Thanks Joey
it is better to rework the commit message https://www.kernel.org/doc/html/v4.16/process/submitting-patches.html#describe-your-changes a good commit message not only make people easily understood the patch, but also smoothing the process of upstream.
@wesleywesley I have updated the commit message. Please help to review it.
@JoeyZhang-Microsemi
reconfigring --> reconfiguring
change to microchip account
. pls run checkpatch.pl for this patch and fix the error and warnings if any, before pull request for others review
test@server1:~/switchtec-kernel$ ~/kernel/linux-4.17.6/scripts/checkpatch.pl 0001-ntb_hw_switchtec-Optimize-function-switchtec_ntb_rei.patch WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)
Function switchtec_ntb_reinit_peer() is used to reinitialize the shared NTB memory window.
WARNING: Missing a blank line after declarations
ERROR: Missing Signed-off-by: line(s)
total: 1 errors, 2 warnings, 32 lines checked
NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace.
0001-ntb_hw_switchtec-Optimize-function-switchtec_ntb_rei.patch has style problems, please review.
NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.
@wesleywesley Thanks for the review. I have fixed issues.
When a host is not a surviving host, but it receives the link force down massage, it should skip the link force down massage. To reinitialize the shared memory window, the driver just need to reinitialize the reserved LUT window.