cq.c (e4da3fbfbd1de56d2367653e3823e6445e49f8a9) | cq.c (f9baff509f8a05a79626defdbdf4f4aa4efd373b) |
---|---|
1/* 2 * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved. 3 * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. 4 * Copyright (c) 2005, 2006, 2007 Cisco Systems, Inc. All rights reserved. 5 * Copyright (c) 2005, 2006, 2007, 2008 Mellanox Technologies. All rights reserved. 6 * Copyright (c) 2004 Voltaire, Inc. All rights reserved. 7 * 8 * This software is available to you under a choice of one of two --- 104 unchanged lines hidden (view full) --- 113 if (atomic_dec_and_test(&cq->refcount)) 114 complete(&cq->free); 115} 116 117static int mlx4_SW2HW_CQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, 118 int cq_num) 119{ 120 return mlx4_cmd(dev, mailbox->dma, cq_num, 0, MLX4_CMD_SW2HW_CQ, | 1/* 2 * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved. 3 * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. 4 * Copyright (c) 2005, 2006, 2007 Cisco Systems, Inc. All rights reserved. 5 * Copyright (c) 2005, 2006, 2007, 2008 Mellanox Technologies. All rights reserved. 6 * Copyright (c) 2004 Voltaire, Inc. All rights reserved. 7 * 8 * This software is available to you under a choice of one of two --- 104 unchanged lines hidden (view full) --- 113 if (atomic_dec_and_test(&cq->refcount)) 114 complete(&cq->free); 115} 116 117static int mlx4_SW2HW_CQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, 118 int cq_num) 119{ 120 return mlx4_cmd(dev, mailbox->dma, cq_num, 0, MLX4_CMD_SW2HW_CQ, |
121 MLX4_CMD_TIME_CLASS_A); | 121 MLX4_CMD_TIME_CLASS_A, MLX4_CMD_WRAPPED); |
122} 123 124static int mlx4_MODIFY_CQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, 125 int cq_num, u32 opmod) 126{ 127 return mlx4_cmd(dev, mailbox->dma, cq_num, opmod, MLX4_CMD_MODIFY_CQ, | 122} 123 124static int mlx4_MODIFY_CQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, 125 int cq_num, u32 opmod) 126{ 127 return mlx4_cmd(dev, mailbox->dma, cq_num, opmod, MLX4_CMD_MODIFY_CQ, |
128 MLX4_CMD_TIME_CLASS_A); | 128 MLX4_CMD_TIME_CLASS_A, MLX4_CMD_WRAPPED); |
129} 130 131static int mlx4_HW2SW_CQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, 132 int cq_num) 133{ 134 return mlx4_cmd_box(dev, 0, mailbox ? mailbox->dma : 0, cq_num, 135 mailbox ? 0 : 1, MLX4_CMD_HW2SW_CQ, | 129} 130 131static int mlx4_HW2SW_CQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, 132 int cq_num) 133{ 134 return mlx4_cmd_box(dev, 0, mailbox ? mailbox->dma : 0, cq_num, 135 mailbox ? 0 : 1, MLX4_CMD_HW2SW_CQ, |
136 MLX4_CMD_TIME_CLASS_A); | 136 MLX4_CMD_TIME_CLASS_A, MLX4_CMD_WRAPPED); |
137} 138 139int mlx4_cq_modify(struct mlx4_dev *dev, struct mlx4_cq *cq, 140 u16 count, u16 period) 141{ 142 struct mlx4_cmd_mailbox *mailbox; 143 struct mlx4_cq_context *cq_context; 144 int err; --- 176 unchanged lines hidden --- | 137} 138 139int mlx4_cq_modify(struct mlx4_dev *dev, struct mlx4_cq *cq, 140 u16 count, u16 period) 141{ 142 struct mlx4_cmd_mailbox *mailbox; 143 struct mlx4_cq_context *cq_context; 144 int err; --- 176 unchanged lines hidden --- |