Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85665c98 authored by Roland Dreier's avatar Roland Dreier Committed by Linus Torvalds
Browse files

[PATCH] IB/mthca: allocate correct number of doorbell pages



Doorbell record pages are allocated in HCA page size chunks (always 4096
bytes), so we need to divide by 4096 and not PAGE_SIZE when figuring out how
many pages we'll need space for.

Signed-off-by: default avatarRoland Dreier <roland@topspin.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e464b2a6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -446,7 +446,7 @@ int mthca_init_db_tab(struct mthca_dev *dev)

	init_MUTEX(&dev->db_tab->mutex);

	dev->db_tab->npages     = dev->uar_table.uarc_size / PAGE_SIZE;
	dev->db_tab->npages     = dev->uar_table.uarc_size / 4096;
	dev->db_tab->max_group1 = 0;
	dev->db_tab->min_group2 = dev->db_tab->npages - 1;