mlx4_core: Fix modify CQ
Subsystems (2)
PATCH 1/1 mlx4_core: Fix modify CQ
The modify CQ command disables the effect of both the count and period paramters if any of them is zero. This is undesirable since we may still want to have one of them in effect while the other is neutralized. To do so we put the max value to a parameter if its value is zero while the other's is not zero. This is also consistent with the interfaces of ethtool but is still generally good.
--- drivers/net/mlx4/cq.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
drivers/net/mlx4/cq.c +7 -0
@@ -149,6 +149,13 @@ int mlx4_cq_modify(struct mlx4_dev *dev, struct mlx4_cq *cq, cq_context = mailbox->buf;memset (cq_context,0 ,sizeof *cq_context); + +if (count | period) { +if (!count) + count =0xffff ; +else if (!period) + period =0xffff ; + } cq_context->cq_max_count =cpu_to_be16 (count); cq_context->cq_period =cpu_to_be16 (period);
Signature · 6 lines
1.7.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Roland,
this patch has bad affect on mlx4_en. I sent another patch which does the same at the IPoIB layer. Please consider removing it.
- thanks.
Quoted 33 lines · Eli Cohen
The modify CQ command disables the effect of both the count and period paramters if any of them is zero. This is undesirable since we may still want to have one of them in effect while the other is neutralized. To do so we put the max value to a parameter if its value is zero while the other's is not zero. This is also consistent with the interfaces of ethtool but is still generally good.
Signed-off-by Eli Cohen <eli-VPRAkNaXOzVS1MOuV/[email protected]>--- drivers/net/mlx4/cq.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)drivers/net/mlx4/cq.c +7
-0@@ -149,6 +149,13 @@ int mlx4_cq_modify(struct mlx4_dev *dev, struct mlx4_cq *cq, cq_context = mailbox->buf;memset (cq_context,0 ,sizeof *cq_context); + +if (count | period) { +if (!count) + count =0xffff ; +else if (!period) + period =0xffff ; + } cq_context->cq_max_count =cpu_to_be16 (count); cq_context->cq_period =cpu_to_be16 (period);Signature · 1 line
1.7.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 2 lines
this patch has bad affect on
mlx4_en. I sent another patch which does the same at the IPoIB layer. Please consider removing it.
I didn't merge this yet, did I?
- R.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 3 lines · Roland Dreier
I didn't merge this yet, did I?
No, you did not. I was just asking that you won't.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html