All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Haley <brian.haley@hp.com>
To: Benjamin Li <benli@broadcom.com>
Cc: "Bruno Prémont" <bonbons@linux-vserver.org>,
	NetDEV <netdev@vger.kernel.org>,
	"Michael Chan" <mchan@broadcom.com>,
	Linux-Kernel <linux-kernel@vger.kernel.org>
Subject: Re: BNX2: Kernel crashes with 2.6.31 and 2.6.31.9
Date: Fri, 19 Feb 2010 16:03:34 -0500	[thread overview]
Message-ID: <4B7EFCA6.7050709@hp.com> (raw)
In-Reply-To: <1266609426.2610.36.camel@dhcp-10-12-137-130.broadcom.com>

Hi Ben,

Benjamin Li wrote:
> Hi Bruno,
> 
> No problems.  Thanks for following up with this problem, I really
> appreciate all your help.
> 
>>From your logs it looks like the device came up using MSI, but in the
> MSI-X poll routine was being called:
> 
> [    9.836673] bnx2: eth0: using MSI
> ...
> 
> [  134.643459]  [<ffffffffa004019e>] bnx2_poll_msix+0x3e/0xd0 [bnx2]
> [  134.643465]  [<ffffffff8135bcd1>] netpoll_poll+0xe1/0x3c0
> 
> which is incorrect.  If we are in MSI mode, the bnx2_poll() routine
> should be used.
> 
> I think what is going on here is that during the bnx2x driver
> initialization the current bnx2 driver adds all possible NAPI structures
> that map to all the hardware vectors (BNX2_MAX_MSIX_VEC=9) to the NAPI
> list in the net_device structure regardless if they are used or not
> (Seen in drivers/net/bnx2.c:bnx2_init_napi()).  This can cause
> uninitialized NAPI structures to be placed on the napi_list.  Because
> this device is in MSI mode, only 1 vector is initialized.   Now, the
> problem is triggered when net/core/netpoll.c:poll_napi() is called.
> This is because this routine will run through the entire napi_list
> calling all the poll routines.  In your particular case, it is calling
> the poll routine on an uninitialized vector causing the kernel panic.
...
> @@ -8201,7 +8204,7 @@ bnx2_init_napi(struct bnx2 *bp)
>  {
>  	int i;
>  
> -	for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) {
> +	for (i = 0; i < bp->irq_nvecs; i++) {
>  		struct bnx2_napi *bnapi = &bp->bnx2_napi[i];
>  		int (*poll)(struct napi_struct *, int);

Would this same change need to be made in other places, like bnx2_init_chip()
or bnx2_clear_ring_states() ?

-Brian

  reply	other threads:[~2010-02-19 21:04 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-29  7:49 BNX2: Kernel crashes with 2.6.31 and 2.6.31.9 Bruno Prémont
2009-12-29  9:05 ` Benjamin Li
2009-12-29  9:33   ` Bruno Prémont
2009-12-29 13:54   ` Bruno Prémont
2009-12-30  5:08     ` Benjamin Li
2010-02-19  8:10       ` Bruno Prémont
2010-02-19 19:57         ` Benjamin Li
2010-02-19 21:03           ` Brian Haley [this message]
2010-02-19 21:47             ` Benjamin Li
2010-02-23 12:15           ` Bruno Prémont
2010-03-02  1:26             ` Benjamin Li
2010-03-02  7:10               ` Bruno Prémont
2010-03-02  8:20                 ` Bruno Prémont
2010-03-02 22:12                   ` Michael Chan
2010-03-04 20:31                     ` Brian Haley
2010-03-10 23:09                       ` Brian Haley
2010-03-10 23:32                         ` Michael Chan
2010-03-11  2:09                           ` Brian Haley
2010-03-11 17:49                             ` Michael Chan
2010-03-11 18:05                               ` David Miller
2010-03-11 18:38                                 ` Michael Chan
2010-03-11 19:40                                   ` Brian Haley
2010-03-11 19:47                                     ` Michael Chan
2010-03-11 21:57                                       ` Brian Haley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B7EFCA6.7050709@hp.com \
    --to=brian.haley@hp.com \
    --cc=benli@broadcom.com \
    --cc=bonbons@linux-vserver.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.