From: Heiner Kallweit Subject: Re: [PATCH net] net: phy: replace preliminary fix for PHY driver sometimes not binding to the device Date: Fri, 28 Dec 2018 22:56:47 +0100 Message-ID: <68d87b84-338c-c948-7629-8442ab5c2998@gmail.com> References: <1bafaa75-18a2-87a2-a9cb-01b951c1d1f7@gmail.com> <20181228.130210.1182302358435035456.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: andrew@lunn.ch, f.fainelli@gmail.com, gregkh@linuxfoundation.org, rafael@kernel.org, netdev@vger.kernel.org, norbert.jurkeit@web.de, frank@crawford.emu.id.au To: David Miller Return-path: Received: from mail-wr1-f48.google.com ([209.85.221.48]:35865 "EHLO mail-wr1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726715AbeL1V45 (ORCPT ); Fri, 28 Dec 2018 16:56:57 -0500 Received: by mail-wr1-f48.google.com with SMTP id u4so21989640wrp.3 for ; Fri, 28 Dec 2018 13:56:56 -0800 (PST) In-Reply-To: <20181228.130210.1182302358435035456.davem@davemloft.net> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 28.12.2018 22:02, David Miller wrote: > From: Heiner Kallweit > Date: Mon, 24 Dec 2018 12:21:12 +0100 > >> phy_device_create() uses request_module() to load the PHY driver module >> based on the PHY ID of the device. There is some timing issue which >> sometimes prevents the PHY driver to bind to the device. In such cases >> the genphy driver is used what can cause problems if genphy isn't >> compatible with the respective PHY. >> It turned out that the first fix can fix the issue in some but not all >> cases. Moving the call to device_initialize() before the call to >> request_module() was reported to fix the issue. >> I can't explain where the root cause of the issue is and why this fix >> works. AFAICS device_initialize() just initializes the device struct >> w/o doing anything that could interfere with e.g. bus_add_driver(). >> This patch removes the first preliminary fix attempt. >> >> Reference: >> https://bugzilla.redhat.com/show_bug.cgi?id=1650984 >> >> Fixes: c85ddecae6e5 ("net: phy: add workaround for issue where PHY driver doesn't bind to the device") >> Tested-by: Norbert Jurkeit >> Tested-by: Frank Crawford >> Signed-off-by: Heiner Kallweit > > I can't see any way this can make a difference. I'm really stumped > and even if it did fix all of the issues people are seeing I wouldn't > want to apply this patch. > > We need to know why, and put the why into the commit log message. > > Thanks. > IIRC I sent a mail to you already asking not to apply the patch because again I had users complaining that the fix doesn't work for them. Root cause seems to be a tricky race in the drive base core, therefore I included Greg and Rafael. Due to this race even small code changes which doesn't make sense from a functional perspective help for few users. I can't reproduce the issue on my systems, therefore I requested more debug info from requested users. Once I have more input I'll go on with the root cause analysis.