[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1364747492.3557.62.camel@deadeye.wl.decadent.org.uk>
Date: Sun, 31 Mar 2013 17:31:32 +0100
From: Ben Hutchings <bhutchings@...arflare.com>
To: Yuval Mintz <yuvalmin@...adcom.com>
CC: <davem@...emloft.net>, <netdev@...r.kernel.org>,
<ariele@...adcom.com>, Eilon Greenstein <eilong@...adcom.com>
Subject: Re: [PATCH net-next] bnx2x: handle spurious interrupts
On Sun, 2013-03-31 at 14:35 +0300, Yuval Mintz wrote:
> In scenarios in which a previous driver was removed without proper cleanup
> (e.g., kdump), it is possible for the chip to generate an interrupt without
> any apparent reason once interrupts are requested.
>
> This patch introduces 2 changes:
>
> - It changes bnx2x's interrupt request scheme so that bnx2x would only
> request interrupts from the kernel after it has finished initializing
> all the inner structs required for those interrupts' handling.
>
> - The driver ignores any interrupt which arrives in an inappropriate time,
> i.e., when the HW generates interrupts without being configured to do so.
> Acking the HW for such an interrupt will prevent HW from generating further
> interrupts, thus ignoring them is necessary.
>
> Signed-off-by: Yuval Mintz <yuvalmin@...adcom.com>
> Signed-off-by: Eilon Greenstein <eilong@...adcom.com>
[...]
The flag changes can still race with the interrupt handler, so I think
you need to add:
> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
> @@ -866,6 +866,7 @@ static void bnx2x_int_disable(struct bnx2x *bp)
> bnx2x_hc_int_disable(bp);
> else
> bnx2x_igu_int_disable(bp);
for (each interrupt vector)
synchronize_irq(irq);
> + bp->flags &= ~INTERRUPTS_ENABLED_FLAG;
> }
>
> void bnx2x_panic_dump(struct bnx2x *bp, bool disable_int)
> @@ -1605,6 +1606,8 @@ static void bnx2x_igu_int_enable(struct bnx2x *bp)
>
> void bnx2x_int_enable(struct bnx2x *bp)
> {
> + bp->flags |= INTERRUPTS_ENABLED_FLAG;
> +
wmb();
> if (bp->common.int_block == INT_BLOCK_HC)
> bnx2x_hc_int_enable(bp);
> else
[...]
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists