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
510510
511511 WARN_ON(nt->mw[mw_num].virt_addr == NULL);
512512
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)
514514 num_qps_mw = nt->max_qps / mw_max + 1;
515515 else
516516 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
856856 qp->client_ready = NTB_LINK_DOWN;
857857 qp->event_handler = NULL;
858858
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)
860860 num_qps_mw = nt->max_qps / mw_max + 1;
861861 else
862862 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