* [PATCH] mlx4_core: Fix modify CQ
@ 2010-10-25 14:38 Eli Cohen
2010-11-08 16:17 ` Eli Cohen
0 siblings, 1 reply; 4+ messages in thread
From: Eli Cohen @ 2010-10-25 14:38 UTC (permalink / raw)
To: Roland Dreier; +Cc: RDMA list
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/RT9w@public.gmane.org>
---
drivers/net/mlx4/cq.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/net/mlx4/cq.c b/drivers/net/mlx4/cq.c
index 7cd34e9..24bf440 100644
--- a/drivers/net/mlx4/cq.c
+++ b/drivers/net/mlx4/cq.c
@@ -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);
--
1.7.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mlx4_core: Fix modify CQ
2010-10-25 14:38 [PATCH] mlx4_core: Fix modify CQ Eli Cohen
@ 2010-11-08 16:17 ` Eli Cohen
2010-11-08 23:04 ` Roland Dreier
0 siblings, 1 reply; 4+ messages in thread
From: Eli Cohen @ 2010-11-08 16:17 UTC (permalink / raw)
To: Eli Cohen; +Cc: Roland Dreier, RDMA list
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.
On Mon, Oct 25, 2010 at 04:38:59PM +0200, Eli Cohen wrote:
> 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/RT9w@public.gmane.org>
> ---
> drivers/net/mlx4/cq.c | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/mlx4/cq.c b/drivers/net/mlx4/cq.c
> index 7cd34e9..24bf440 100644
> --- a/drivers/net/mlx4/cq.c
> +++ b/drivers/net/mlx4/cq.c
> @@ -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);
>
> --
> 1.7.3.1
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mlx4_core: Fix modify CQ
2010-11-08 16:17 ` Eli Cohen
@ 2010-11-08 23:04 ` Roland Dreier
[not found] ` <adaaaljs9h1.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Roland Dreier @ 2010-11-08 23:04 UTC (permalink / raw)
To: Eli Cohen; +Cc: Eli Cohen, RDMA list
> 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mlx4_core: Fix modify CQ
[not found] ` <adaaaljs9h1.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
@ 2010-11-09 5:23 ` Eli Cohen
0 siblings, 0 replies; 4+ messages in thread
From: Eli Cohen @ 2010-11-09 5:23 UTC (permalink / raw)
To: Roland Dreier; +Cc: Eli Cohen, RDMA list
On Tue, Nov 9, 2010 at 1:04 AM, Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> wrote:
>
> 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-11-09 5:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-25 14:38 [PATCH] mlx4_core: Fix modify CQ Eli Cohen
2010-11-08 16:17 ` Eli Cohen
2010-11-08 23:04 ` Roland Dreier
[not found] ` <adaaaljs9h1.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-11-09 5:23 ` Eli Cohen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox