IB/mthca: multiple fixes for multicast group handling
authorJack Morgenstein <jackm@mellanox.co.il>
Fri, 6 Jan 2006 21:11:07 +0000 (13:11 -0800)
committerRoland Dreier <rolandd@cisco.com>
Fri, 6 Jan 2006 21:11:07 +0000 (13:11 -0800)
commit5ceb74557c71465cf8f6fda050aac00e53f9ad3d
tree8cd77012ee081d45926731306339977da61a4926
parent0d3b525fff40475e58dab9176740d2efc5f37838
IB/mthca: multiple fixes for multicast group handling

Multicast group management fixes:
. Fix leak of mailbox memory in error handling on multicast group operations.
. Free AMGM indices at detach and in attach error handling.
. Fix amount to shift for aligning next_gid_index in mailbox: it
  starts at bit 6, not bit 5.
. Allocate AMGM index after end of MGM table, in the range num_mgms to
  multicast table size - 1. Add some BUG_ON checks to catch cases
  where the index falls in the MGM hash area.
. Initialize the list of QPs in a newly-allocated group from AMGM to 0
  This is necessary since when a group is moved from AMGM to MGM (in the
  case where the MGM entry has been emptied of QPs), the AMGM entry is
  not reset to 0 (and we don't want an extra command to do that).

Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/mthca/mthca_mcg.c