[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3AC45E26-91E5-408E-A3DB-C96244A9F0E4@amazon.com>
Date: Tue, 2 Jan 2018 20:38:26 +0000
From: "Belgazal, Netanel" <netanel@...zon.com>
To: David Miller <davem@...emloft.net>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"Woodhouse, David" <dwmw@...zon.co.uk>,
"Machulsky, Zorik" <zorik@...zon.com>,
"Matushevsky, Alexander" <matua@...zon.com>,
"Bshara, Saeed" <saeedb@...zon.com>,
"Wilson, Matt" <msw@...zon.com>,
"Liguori, Anthony" <aliguori@...zon.com>,
"Bshara, Nafea" <nafea@...zon.com>,
"Schmeilin, Evgeny" <evgenys@...zon.com>,
"Tzalik, Guy" <gtzalik@...zon.com>
Subject: Re: [PATCH net 3/3] eet: ena: invoke netif_carrier_off() only after
netdev registered
Right.
I’ll remove this patch.
On 1/2/18, 9:08 PM, "David Miller" <davem@...emloft.net> wrote:
From: <netanel@...zon.com>
Date: Thu, 28 Dec 2017 21:30:20 +0000
> From: Netanel Belgazal <netanel@...zon.com>
>
> netif_carrier_off() should be called only after register netdev.
> Move the function's call after the registration.
>
> Signed-off-by: Netanel Belgazal <netanel@...zon.com>
> ---
> drivers/net/ethernet/amazon/ena/ena_netdev.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c
> index fbe21a817bd8..ee50c56765a4 100644
> --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
> +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
> @@ -3276,14 +3276,14 @@ static int ena_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>
> memcpy(adapter->netdev->perm_addr, adapter->mac_addr, netdev->addr_len);
>
> - netif_carrier_off(netdev);
> -
> rc = register_netdev(netdev);
> if (rc) {
> dev_err(&pdev->dev, "Cannot register net device\n");
> goto err_rss;
> }
>
> + netif_carrier_off(netdev);
> +
You cannot invoke this after register_netdev(), asynchronous activity can cause this
call to lose information and lose a link up event.
Powered by blists - more mailing lists