Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp508544imu; Thu, 22 Nov 2018 00:48:09 -0800 (PST) X-Google-Smtp-Source: AJdET5cRnTnVM8cThC++JPsV8m41uLzHGHOVOHRlBjsKZGfJygzRcqKT5RZLqChkaC/9DE5DK93e X-Received: by 2002:a62:7a8b:: with SMTP id v133mr10737477pfc.159.1542876488978; Thu, 22 Nov 2018 00:48:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542876488; cv=none; d=google.com; s=arc-20160816; b=dVcLMBUWwQqWAQCMJ48NHCxcJct7RctW7TRVLC8vx3Eotv132I/yRCs+9Y4bk0mNIt ZfUMHJSq3CIiEHSOAtMlUs7TX0OGE7UsF8pSSbkWyiqcZR6jVI3Gc0wTn8L4fvzQbWiy H4mlBbqajsijCKZUaFMOAaLx7aV8lEg/F+30GadHrSqvNB5zvDdTIaZdiYJVKMVl16pU rz7flS1OtonptlnJ1eZ6tklKeNazVWMZM7AGSRelSwI8OUpsdomL3VmcK9V/VdUu14Xe Mzhz17OwjYX5zoCiWVb/FRJfRNw8uozmv1EA3ABAnCcgGnbziLoh60jkpnb4iGfhCSxQ SsvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=XbLZhKaFrImgSQZp0hI5VXqY5OtZj7kXKOoHxFXUKiI=; b=DEt2ktObwlfLtcYq6sdvUM96zLE6YCNPpycnVaZ3B23ufG9W8wEAurQqTR5E8S6HGD jvzbHMX4b4AzH7alzEkMveEWz0ssCOfN0w1+nQ83Oag3h7e1115eJ9PoMhKaXiPt4aLM Pn2WfdCaLYjW+VKkLYXju+G5Z0fXCbFuD6YDegr4ujumRSYHEfyIoaU8/dersaOfUOM1 VjS33OH/85GHnb5gqobfO8AW5SEQ1Md7ZEfufcOi/lAC0lx4Zi9gvqyc3AEuSCfx34tz iuSf8o52BmUspxQYm8ZT3snteP5X5eAzBaNbv5NoBeqi85WQDcHzAsC5a+RZo6l+QxsC WvoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=o4K0JgNw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 102si24546736plc.277.2018.11.22.00.47.53; Thu, 22 Nov 2018 00:48:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=o4K0JgNw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389911AbeKVIaL (ORCPT + 99 others); Thu, 22 Nov 2018 03:30:11 -0500 Received: from mail-ed1-f43.google.com ([209.85.208.43]:34165 "EHLO mail-ed1-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729727AbeKVIaL (ORCPT ); Thu, 22 Nov 2018 03:30:11 -0500 Received: by mail-ed1-f43.google.com with SMTP id b3so6116930ede.1; Wed, 21 Nov 2018 13:54:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XbLZhKaFrImgSQZp0hI5VXqY5OtZj7kXKOoHxFXUKiI=; b=o4K0JgNwt/H1ZeC6OCaEH1FsOdJglCAhV23BM72OCf4i87CjyyrAxNV0yXmNO8cFVN i2tBjXb3RMdd5ey+KzepVL/2ujye4A2N0hN/AQSee2C3cx1vcQdHLvjD6uNlepskyGDB H9liAHKsUxfD5E7dMKrcvifV3k0FPmQr6uUNvhI1bmptVZG74nNSsjiqdxdC1LOf0Owb m2V0CRmin5En4bOjMlkqlfS8muHyMRHaWjHH0FlO81B31G9ZFrfHOhljcZcZ7mqZPI3p fvwBkGIPAXRDV+cAp6thJkPESwpIkNnbfk73xadAqdImmX6AAmOl2CKtkU5YQPQjx3bL IyDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XbLZhKaFrImgSQZp0hI5VXqY5OtZj7kXKOoHxFXUKiI=; b=eJ8vRqkV2d8LtHMyLdiCaXbu8mcqb6rIKZU3yiB/6ZlK3J98xuq9ohqKCA7CdDUXKC ZHjywcGw5OTQXP/osuJCpb7NhZ1lYxeu1aTzgaT/ScsIXXswPvBH3WnNtlNbVqZn62Fm RGx7fZf+3UKM3Kl9QeJf5LVlkM5DJvHMz9ip55aTI9qFu0/v+PWoIfm+j1AXpZTknXsU 66WZojOfX/oOmIiIURXoNclNc4rBmZ8YMEQG/oqqMN+2ah+jHZYmc9lUNgw5ZVAJPATE e3749bt0ZEzcoxJ3cXHW9nggBPxlaJGgWnSAjU7rLLOCOAQDdevpkZ+pWj8+732+I7AN lSuA== X-Gm-Message-State: AGRZ1gL6T2PNrQ01/6Qpnl2Qh1JDgJW83HNQI9DPCp5aROGseDOwzV4z VlhtNeo8jhaw744wm5ZmWN+QPmpw31Yd5vuFnBQ= X-Received: by 2002:a17:906:2555:: with SMTP id j21-v6mr6255759ejb.103.1542837239680; Wed, 21 Nov 2018 13:53:59 -0800 (PST) MIME-Version: 1.0 References: <38dad61b-bc7f-7038-6d1b-f5c4afe3841c@gmail.com> <20181121202034.GA10697@lunn.ch> <6aeba3d6-2292-1221-9be7-1c0bb7cbc203@gmail.com> <7d6362e1-e197-d338-d6b0-9036c3802e2c@gmail.com> In-Reply-To: <7d6362e1-e197-d338-d6b0-9036c3802e2c@gmail.com> From: Marc Dionne Date: Wed, 21 Nov 2018 17:53:46 -0400 Message-ID: Subject: Re: Issue with RTL8111 NIC after upgrade to kernel 4.19 To: hkallweit1@gmail.com Cc: andrew@lunn.ch, norbert.jurkeit@web.de, nic_swsd@realtek.com, Florian Fainelli , David Miller , netdev , Linux Kernel Mailing List , michael.wiktowy@gmail.com, jcline@redhat.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 21, 2018 at 4:52 PM Heiner Kallweit wrote: > > On 21.11.2018 21:49, Heiner Kallweit wrote: > > On 21.11.2018 21:32, Heiner Kallweit wrote: > >> On 21.11.2018 21:20, Andrew Lunn wrote: > >>>> request_module() is supposed to be synchronous, however after some > >>>> reading this may not be 100% guaranteed. Maybe the module init > >>>> function on some systems isn't finished yet when request_module() > >>>> returns. As a result the genphy driver may be used instead of > >>>> the PHY version-specific driver. > >>> > >>> Hi Heiner > >>> > >>> That would be true for all PHYs i think. We would of noticed this > >>> problem with other systems using other PHY drivers. > >>> > >>> Andrew > >>> > >> It could be a timing issue affecting certain systems only. At least > >> for now I don't have a good explanation why loading the module via > >> request_module() and loading it upfront manually makes a difference. > >> > >> One affected user just reported the PHY to be a RTL8211B. This is > >> what I expected, because this PHY crashes when writing to the MMD > >> registers (the MMD registers are used otherwise by this PHY). > >> See also commit 0231b1a074c6 ("net: phy: realtek: Use the dummy > >> stubs for MMD register access for rtl8211b"). > >> > >> Let's see whether the other affected systems use the same PHY > >> version. > >> > > Next report is also about a RTL8211B and as I assumed: > > - W/o manually loading the realtek module the genphy driver is used > > and network fails. > > - W/ manually loading the realtek module the proper RTL8211B PHY > > driver is used and network works. > > > > So it seems that even after request_module() the PHY driver isn't > > yet available when device and driver are matched. > > > > If further reports support this (pre-)analysis, then indeed it > > seems to be a timing issue and a proper fix most likely is > > difficult. As a workaround I could imagine to add a delay loop > > after request_module() checking for a Realtek PHY driver via > > driver_find(). When adding one small delay after this we should > > be sufficiently sure that all Realtek PHY drivers are registered. > > > Uups, no. We talk about phylib here, not about the r8169 driver. > So we need a different solution. > > >> Heiner Thanks for the explanation, better than my crude attempt at understanding what was going on. If you have any proposed fixes or diagnostic patches based on current mainline I can quickly compile and test them here on an affected system. It doesn't fail consistently for me (as others have reported), but that could be because it depends on the timing. Marc