History

NTB: correct the spread of queues over mw's

The detection of an uneven number of queues on the given memory windows was not correct. The mw_num is zero based and the mod should be division to spread them evenly over the mw's.

Jon Mason committed 12 years ago

Commit a1413cf1 parent 2ce75981 file · +2 −2Browse files

Unified · Split

drivers/ntb/ntb_transport.c+2−2
@@ -510,7 +510,7 @@ static void ntb_transport_setup_qp_mw(struct ntb_transport *nt, · 509 unmodified lines
510 510
511 WARN_ON(nt->mw[mw_num].virt_addr == NULL);511 WARN_ON(nt->mw[mw_num].virt_addr == NULL);
512 512
513 if (nt->max_qps % mw_max && mw_num < nt->max_qps % mw_max)513 if (nt->max_qps % mw_max && mw_num + 1 < nt->max_qps / mw_max)
514 num_qps_mw = nt->max_qps / mw_max + 1;514 num_qps_mw = nt->max_qps / mw_max + 1;
515 else515 else
516 num_qps_mw = nt->max_qps / mw_max;516 num_qps_mw = nt->max_qps / mw_max;
@@ -856,7 +856,7 @@ static int ntb_transport_init_queue(struct ntb_transport *nt, · 339 unmodified lines
856 qp->client_ready = NTB_LINK_DOWN;856 qp->client_ready = NTB_LINK_DOWN;
857 qp->event_handler = NULL;857 qp->event_handler = NULL;
858 858
859 if (nt->max_qps % mw_max && mw_num < nt->max_qps % mw_max)859 if (nt->max_qps % mw_max && mw_num + 1 < nt->max_qps / mw_max)
860 num_qps_mw = nt->max_qps / mw_max + 1;860 num_qps_mw = nt->max_qps / mw_max + 1;
861 else861 else
862 num_qps_mw = nt->max_qps / mw_max;862 num_qps_mw = nt->max_qps / mw_max;

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