History

Merge tag 'ntb-4.13-bugfixes' of git://github.com/jonmason/ntb

Pull NTB fixes from Jon Mason: "NTB bug fixes to address an incorrect ntb_mw_count reference in the NTB transport, improperly bringing down the link if SPADs are corrupted, and an out-of-order issue regarding link negotiation and data passing" * tag 'ntb-4.13-bugfixes' of git://github.com/jonmason/ntb: ntb: ntb_test: ensure the link is up before trying to configure the mws ntb: transport shouldn't disable link due to bogus values in SPADs ntb: use correct mw_count function in ntb_tool and ntb_transport

Linus Torvalds committed 9 years ago

Commit fff4e7a2 parents a8b169a 0eb46343 files · +7 −5Browse files

Unified · Split

3 files
  1. drivers/ntb/ntb_transport.c +2 −4
  2. drivers/ntb/test/ntb_tool.c +1 −1
  3. tools/testing/selftests/ntb/ntb_test.sh +4 −0
drivers/ntb/ntb_transport.c+2−4
@@ -924,10 +924,8 @@ out1: · 923 unmodified lines
924924 ntb_free_mw(nt, i);
925925
926926 /* if there's an actual failure, we should just bail */
927− if (rc < 0) {
928− ntb_link_disable(ndev);
927+ if (rc < 0)
929928 return;
930− }
931929
932930 out:
933931 if (ntb_link_is_up(ndev, NULL, NULL) == 1)
@@ -1059,7 +1057,7 @@ static int ntb_transport_probe(struct ntb_client *self, struct ntb_dev *ndev) · 125 unmodified lines
10591057 int node;
10601058 int rc, i;
10611059
1062− mw_count = ntb_mw_count(ndev, PIDX);
1060+ mw_count = ntb_peer_mw_count(ndev);
10631061
10641062 if (!ndev->ops->mw_set_trans) {
10651063 dev_err(&ndev->dev, "Inbound MW based NTB API is required\n");
drivers/ntb/test/ntb_tool.c+1−1
@@ -959,7 +959,7 @@ static int tool_probe(struct ntb_client *self, struct ntb_dev *ntb) · 958 unmodified lines
959959 tc->ntb = ntb;
960960 init_waitqueue_head(&tc->link_wq);
961961
962− tc->mw_count = min(ntb_mw_count(tc->ntb, PIDX), MAX_MWS);
962+ tc->mw_count = min(ntb_peer_mw_count(tc->ntb), MAX_MWS);
963963 for (i = 0; i < tc->mw_count; i++) {
964964 rc = tool_init_mw(tc, i);
965965 if (rc)
tools/testing/selftests/ntb/ntb_test.sh+4−0
@@ -333,6 +333,10 @@ function ntb_tool_tests() · 332 unmodified lines
333333 link_test $LOCAL_TOOL $REMOTE_TOOL
334334 link_test $REMOTE_TOOL $LOCAL_TOOL
335335
336+ #Ensure the link is up on both sides before continuing
337+ write_file Y $LOCAL_TOOL/link_event
338+ write_file Y $REMOTE_TOOL/link_event
339+
336340 for PEER_TRANS in $(ls $LOCAL_TOOL/peer_trans*); do
337341 PT=$(basename $PEER_TRANS)
338342 write_file $MW_SIZE $LOCAL_TOOL/$PT

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t