From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751949AbcL1SoI (ORCPT ); Wed, 28 Dec 2016 13:44:08 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:36599 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751676AbcL1SoF (ORCPT ); Wed, 28 Dec 2016 13:44:05 -0500 Subject: Re: [PATCH v2] net: stmmac: bug fix to synchronize stmmac_open and stmmac_dvr_probe To: "Kweh, Hock Leong" , David Miller References: <1482849756-21817-1-git-send-email-hock.leong.kweh@intel.com> <20161227.113405.362102687632949941.davem@davemloft.net> Cc: "Joao.Pinto@synopsys.com" , "peppe.cavallaro@st.com" , "seraphin.bonnaffe@st.com" , "alexandre.torgue@gmail.com" , "manabian@gmail.com" , "niklas.cassel@axis.com" , "johan@kernel.org" , "pavel@ucw.cz" , "Ong, Boon Leong" , "Voon, Weifeng" , "lars.persson@axis.com" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" From: Florian Fainelli Message-ID: Date: Wed, 28 Dec 2016 10:42:40 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/27/2016 09:49 PM, Kweh, Hock Leong wrote: >> -----Original Message----- >> From: David Miller [mailto:davem@davemloft.net] >> Sent: Wednesday, December 28, 2016 12:34 AM >> To: Kweh, Hock Leong >> Cc: Joao.Pinto@synopsys.com; peppe.cavallaro@st.com; >> seraphin.bonnaffe@st.com; f.fainelli@gmail.com; >> alexandre.torgue@gmail.com; manabian@gmail.com; niklas.cassel@axis.com; >> johan@kernel.org; pavel@ucw.cz; Ong, Boon Leong >> ; Voon, Weifeng ; >> lars.persson@axis.com; netdev@vger.kernel.org; linux-kernel@vger.kernel.org >> Subject: Re: [PATCH v2] net: stmmac: bug fix to synchronize stmmac_open and >> stmmac_dvr_probe >> >> From: "Kweh, Hock Leong" >> Date: Tue, 27 Dec 2016 22:42:36 +0800 >> >>> From: "Kweh, Hock Leong" >> >> You are not the author of this change, do not take credit for it. >> >> You have copied Florian's patch character by character, therefore >> he is the author. >> >> You also didn't CC: the netdev mailing list properly. > > Hi David & Florian, > > Just to clarify that I do not copy exactly from Florian. > I have changed it to have proper handling on mdio unregister > while netdev_register() failed as showed below: > > return 0; > > -error_mdio_register: > - unregister_netdev(ndev); > error_netdev_register: > + stmmac_mdio_unregister(ndev); Although this is required, we can't be doing it in all circumstances, we need to mimic what stmmac_drv_remove() does. Let me submit an incremental fix which takes care of mdio bus unregistration. -- Florian