IB/mthca: Use an enum for HCA page size
authorIshai Rabinovitz <ishai@mellanox.co.il>
Thu, 2 Mar 2006 06:33:11 +0000 (22:33 -0800)
committerRoland Dreier <rolandd@cisco.com>
Mon, 20 Mar 2006 18:08:19 +0000 (10:08 -0800)
commit8d3ef29d6be1e750512e0a9dbea6225290b81d0a
tree9384d9275d5122574665db18b5196f9c9a96d7ac
parent67e7377661db4e341ed5e9a0358d11a55e532aa8
IB/mthca: Use an enum for HCA page size

Use a named enum for the HCA's internal page size, rather than having
magic values of 4096 and shifts by 12 all over the code.  Also, fix
one minor bug in EQ handling: only one HCA page is mapped to the HCA
during initialization, but a full kernel page is unmapped during
cleanup.  This might cause problems when PAGE_SIZE != 4096.

Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/mthca/mthca_cmd.c
drivers/infiniband/hw/mthca/mthca_eq.c
drivers/infiniband/hw/mthca/mthca_memfree.c
drivers/infiniband/hw/mthca/mthca_memfree.h