• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6.36/drivers/net/mlx4/

Lines Matching refs:index

53 static int mlx4_READ_MCG(struct mlx4_dev *dev, int index,
56 return mlx4_cmd_box(dev, 0, mailbox->dma, index, 0, MLX4_CMD_READ_MCG,
60 static int mlx4_WRITE_MCG(struct mlx4_dev *dev, int index,
63 return mlx4_cmd(dev, mailbox->dma, index, 0, MLX4_CMD_WRITE_MCG,
88 * If GID is found in MGM or MGM is empty, *index = *hash, *prev = -1
91 * if GID is found in AMGM, *index = index in AMGM, *prev = index of
94 * If no AMGM exists for given gid, *index = -1, *prev = index of last
99 u16 *hash, int *prev, int *index)
121 *index = *hash;
125 err = mlx4_READ_MCG(dev, *index, mgm_mailbox);
130 if (*index != *hash) {
140 *prev = *index;
141 *index = be32_to_cpu(mgm->next_gid_index) >> 6;
142 } while (*index);
144 *index = -1;
156 int index, prev;
168 err = find_mgm(dev, gid, mailbox, &hash, &prev, &index);
172 if (index != -1) {
178 index = mlx4_bitmap_alloc(&priv->mcg_table.bitmap);
179 if (index == -1) {
184 index += dev->caps.num_mgms;
192 mlx4_err(dev, "MGM at index %x is full.\n", index);
212 err = mlx4_WRITE_MCG(dev, index, mailbox);
223 mgm->next_gid_index = cpu_to_be32(index << 6);
230 if (err && link && index != -1) {
231 if (index < dev->caps.num_mgms)
232 mlx4_warn(dev, "Got AMGM index %d < %d",
233 index, dev->caps.num_mgms);
236 index - dev->caps.num_mgms);
252 int prev, index;
263 err = find_mgm(dev, gid, mailbox, &hash, &prev, &index);
267 if (index == -1) {
290 err = mlx4_WRITE_MCG(dev, index, mailbox);
304 err = mlx4_WRITE_MCG(dev, index, mailbox);
310 mlx4_warn(dev, "MGM entry %d had AMGM index %d < %d",
311 index, amgm_index, dev->caps.num_mgms);
329 if (index < dev->caps.num_mgms)
330 mlx4_warn(dev, "entry %d had next AMGM index %d < %d",
331 prev, index, dev->caps.num_mgms);
334 index - dev->caps.num_mgms);