From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Wang Subject: Re: [PATCH net] net: hyperv: initialize link status correctly Date: Mon, 27 Jan 2014 17:40:56 +0800 Message-ID: <52E629A8.5010302@redhat.com> References: <1390807854-4469-1-git-send-email-jasowang@redhat.com> <20140127.003559.2290408024387922847.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: devel@linuxdriverproject.org, haiyangz@microsoft.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org To: David Miller Return-path: In-Reply-To: <20140127.003559.2290408024387922847.davem@davemloft.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: driverdev-devel-bounces@linuxdriverproject.org List-Id: netdev.vger.kernel.org On 01/27/2014 04:35 PM, David Miller wrote: > From: Jason Wang > Date: Mon, 27 Jan 2014 15:30:54 +0800 > >> Call netif_carrier_on() after register_device(). Otherwise it won't work since >> the device was still in NETREG_UNINITIALIZED state. >> >> Fixes a68f9614614749727286f675d15f1e09d13cb54a >> (hyperv: Fix race between probe and open calls) >> >> Cc: Haiyang Zhang >> Cc: K. Y. Srinivasan >> Reported-by: Di Nie >> Tested-by: Di Nie >> Signed-off-by: Jason Wang > A device up can occur at the moment you call register_netdevice(), > therefore that up call can see the carrier as down and fail or > similar. So you really cannot resolve the carrier to be on in this > way. True, we need a workqueue to synchronize them.