Re: [e1000_netpoll] BUG: sleeping function called from invalid context at kernel/irq/manage.c:110
From: Jeff Kirsher
Date: Wed Jul 27 2016 - 17:38:15 EST
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:
signature.asc
Description: This is a digitally signed message part