Re: kitten - mlx4: Unhandled interrupt - owner bit

Fredrik Unger
2010-03-10T19:39:51Z

Eli Cohen wrote:
> On Wed, Mar 10, 2010 at 04:03:26PM +0100, Fredrik Unger wrote:
>> When investigating the error it seems to stem from next_eqe_sw in drivers/net/mlx4/eq.c
>> called by the interrupt handler.
>> What happens is that (eqe->owner & 0x80) is true causing the routine to return
>> NULL resulting in an unhandled interrupt (eg the interrupt routine returns 0)
>
> Please note that the condition is a bit more complicated. I quote the
> whole function:
>
> static struct mlx4_eqe *next_eqe_sw(struct mlx4_eq *eq)
> {
> struct mlx4_eqe *eqe = get_eqe(eq, eq->cons_index);
> return !!(eqe->owner & 0x80) ^ !!(eq->cons_index & eq->nent) ? NULL : eqe;
> }

Yes you are correct,
To clarify I checked each of the statements separatly and from what I
could gather
(eqe->owner & 0x80) was true and
(eq->cons_index & eq->nent) false.
But true! As I am not sure what each statement hides,
I do not know if both should be false or true for the eqe to be
returned. Will try to check the cons_index closer.

Where could I find out more about owner and cons_index / nent ?

Thank you,

Fredrik Unger