Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1518705

Re: [Intel-wired-lan] [PATCH v2] e1000e: free IRQ regardless of __E1000_DOWN

From "Neftin, Sasha" <sasha.neftin@intel.com>
Newsgroups linux.kernel
Subject Re: [Intel-wired-lan] [PATCH v2] e1000e: free IRQ regardless of __E1000_DOWN
Date 2016-11-10 07:20 +0100
Message-ID <sBQSl-1Ob-13@gated-at.bofh.it> (permalink)
References <sBIUO-4sZ-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 11/9/2016 11:41 PM, Tyler Baicar wrote:
> Move IRQ free code so that it will happen regardless of the
> __E1000_DOWN bit. Currently the e1000e driver only releases its IRQ
> if the __E1000_DOWN bit is cleared. This is not sufficient because
> it is possible for __E1000_DOWN to be set without releasing the IRQ.
> In such a situation, we will hit a kernel bug later in e1000_remove
> because the IRQ still has action since it was never freed. A
> secondary bus reset can cause this case to happen.
> 
> Signed-off-by: Tyler Baicar <tbaicar@codeaurora.org>
> ---
>  drivers/net/ethernet/intel/e1000e/netdev.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
> index 7017281..36cfcb0 100644
> --- a/drivers/net/ethernet/intel/e1000e/netdev.c
> +++ b/drivers/net/ethernet/intel/e1000e/netdev.c
> @@ -4679,12 +4679,13 @@ int e1000e_close(struct net_device *netdev)
>  
>  	if (!test_bit(__E1000_DOWN, &adapter->state)) {
>  		e1000e_down(adapter, true);
> -		e1000_free_irq(adapter);
>  
>  		/* Link status message must follow this format */
>  		pr_info("%s NIC Link is Down\n", adapter->netdev->name);
>  	}				
>  
> +	e1000_free_irq(adapter);
> +
>  	napi_disable(&adapter->napi);
>  
>  	e1000e_free_tx_resources(adapter->tx_ring);
> 
I would like not recommend insert this change. This change related
driver state machine, we afraid from lot of synchronization problem and
issues.
We need keep e1000_free_irq in loop and check for 'test_bit' ready.
Another point, does before execute secondary bus reset your SW back up
pcie configuration space as properly?

Sasha

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] e1000e: free IRQ regardless of __E1000_DOWN Tyler Baicar <tbaicar@codeaurora.org> - 2016-11-09 22:50 +0100
  Re: [Intel-wired-lan] [PATCH v2] e1000e: free IRQ regardless of  __E1000_DOWN "Neftin, Sasha" <sasha.neftin@intel.com> - 2016-11-10 07:20 +0100
    Re: [Intel-wired-lan] [PATCH v2] e1000e: free IRQ regardless of  __E1000_DOWN "Baicar, Tyler" <tbaicar@codeaurora.org> - 2016-11-10 23:40 +0100

csiph-web