linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: Eric Dumazet <eric.dumazet@gmail.com>,
	Fengguang Wu <fengguang.wu@intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	netdev@vger.kernel.org, Satyam Sharma <satyam@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	intel-wired-lan@lists.osuosl.org,
	Ye Xiaolong <xiaolong.ye@intel.com>
Subject: Re: [e1000_netpoll] BUG: sleeping function called from invalid context at kernel/irq/manage.c:110
Date: Wed, 27 Jul 2016 14:38:07 -0700	[thread overview]
Message-ID: <1469655487.2232.49.camel@intel.com> (raw)
In-Reply-To: <1469524492.17736.3.camel@edumazet-glaptop3.roam.corp.google.com>

[-- Attachment #1: Type: text/plain, Size: 1319 bytes --]

On Tue, 2016-07-26 at 11:14 +0200, Eric Dumazet wrote:
> Could you try this ?
> 
> diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c
> b/drivers/net/ethernet/intel/e1000/e1000_main.c
> index
> f42129d09e2c23ba9fdb5cde890d50ecb7166a42..a53c41c4c4f7d1fe52f95a2cab8784a
> 938b3820b 100644
> --- a/drivers/net/ethernet/intel/e1000/e1000_main.c
> +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
> @@ -5257,9 +5257,13 @@ static void e1000_netpoll(struct net_device
> *netdev)
>  {
>         struct e1000_adapter *adapter = netdev_priv(netdev);
>  
> -       disable_irq(adapter->pdev->irq);
> -       e1000_intr(adapter->pdev->irq, netdev);
> -       enable_irq(adapter->pdev->irq);
> +       if (napi_schedule_prep(&adapter->napi)) {
> +               adapter->total_tx_bytes = 0;
> +               adapter->total_tx_packets = 0;
> +               adapter->total_rx_bytes = 0;
> +               adapter->total_rx_packets = 0;
> +               __napi_schedule(&adapter->napi);
> +       }
>  }
>  #endif
>  

Since this fixes the issue Fengguang saw, will you be submitting a formal
patch Eric? (please) I can get this queued up for Dave's net tree as soon
as I receive the formal patch.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2016-07-27 21:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-26  3:50 [e1000_netpoll] BUG: sleeping function called from invalid context at kernel/irq/manage.c:110 Fengguang Wu
2016-07-26  9:14 ` Eric Dumazet
     [not found]   ` <20160726093224.GA10339@wfg-t540p.sh.intel.com>
2016-07-26  9:45     ` [PATCH] schedule function called for e1000 driver interrupt kbuild test robot
2016-07-26  9:50     ` [e1000_netpoll] BUG: sleeping function called from invalid context at kernel/irq/manage.c:110 Thomas Gleixner
     [not found]       ` <8578bb16-cd04-e8a5-c7f4-be061ede95b4@gmail.com>
2016-07-28  7:45         ` Thomas Gleixner
2016-07-28  9:46           ` Valdis.Kletnieks
2016-07-26  9:50     ` [PATCH] schedule function called for e1000 driver interrupt kbuild test robot
2016-07-26 15:32   ` [e1000_netpoll] BUG: sleeping function called from invalid context at kernel/irq/manage.c:110 Fengguang Wu
2016-07-26 16:28     ` Eric Dumazet
2016-07-27 15:01       ` Fengguang Wu
2016-07-27 18:50         ` Eric Dumazet
2016-07-27 21:38   ` Jeff Kirsher [this message]
2016-07-28  5:43     ` Eric Dumazet
2016-07-28 10:19       ` Sabrina Dubroca
2016-07-28 12:21         ` Thomas Gleixner
2016-07-28 13:30         ` Fengguang Wu
2016-07-28 23:28       ` [Intel-wired-lan] " Francois Romieu

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=1469655487.2232.49.camel@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=eric.dumazet@gmail.com \
    --cc=fengguang.wu@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=satyam@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=xiaolong.ye@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).