diff options
author | Roland Dreier <roland@topspin.com> | 2005-04-16 18:26:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:26:18 -0400 |
commit | 85665c9816a2b38866e03c019bf5c2e47eb9fb04 (patch) | |
tree | e9a2d836259c200967e4be4185fcc7cc9a3e80ed /drivers/infiniband | |
parent | e464b2a6c2c297702205ab725fd82489550a7893 (diff) |
[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: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_memfree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_memfree.c b/drivers/infiniband/hw/mthca/mthca_memfree.c index a70a1c712b4b..e8f93478f38d 100644 --- a/drivers/infiniband/hw/mthca/mthca_memfree.c +++ b/drivers/infiniband/hw/mthca/mthca_memfree.c | |||
@@ -446,7 +446,7 @@ int mthca_init_db_tab(struct mthca_dev *dev) | |||
446 | 446 | ||
447 | init_MUTEX(&dev->db_tab->mutex); | 447 | init_MUTEX(&dev->db_tab->mutex); |
448 | 448 | ||
449 | dev->db_tab->npages = dev->uar_table.uarc_size / PAGE_SIZE; | 449 | dev->db_tab->npages = dev->uar_table.uarc_size / 4096; |
450 | dev->db_tab->max_group1 = 0; | 450 | dev->db_tab->max_group1 = 0; |
451 | dev->db_tab->min_group2 = dev->db_tab->npages - 1; | 451 | dev->db_tab->min_group2 = dev->db_tab->npages - 1; |
452 | 452 | ||