Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8096632imu; Tue, 4 Dec 2018 02:57:24 -0800 (PST) X-Google-Smtp-Source: AFSGD/Wn6jm1xaDrUyFJNpKEoGuDEmH9Nr6jjP0rS0XR15qKghAdyG8s6fabzeqAoMVfkVk+MJPT X-Received: by 2002:a62:546:: with SMTP id 67mr19114964pff.99.1543921044533; Tue, 04 Dec 2018 02:57:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543921044; cv=none; d=google.com; s=arc-20160816; b=vVt5Z18IvNnbTKq44wzrJxb8KONG3YQRKPqoDOMyx4QtXCFinFSCtouqSWD+72aVEK NkraCrKzq4eyP8hC3fiYF2YpHP3QbaiE/WGT+AYZAqDFeEBuI7tax+r7TjSuQjmgxCSr JPC1ZilsKn5wNd11sV3UVYODs+sePB4BEtU5ZNLC8W4ewvE8dsfAS1zDtQ0KLeevQP4r Yi3TRQQ7xkmZzGvE+r0GLoxZq/JoednG0W+VDoXF0pTCJf3dIkUf7n89O4D6EZLzAFt5 51acVES3SrJSWrgZcOyza1na3nVkoZwF102udVhHuboKlruBhvfkfkVwGwCzsJgdNAGT mD7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QNpBz0T+5mibdo/4bXjSO4/uJDnggKqvf8vDPIYKctc=; b=gMdUnn03ZiHIA/1KPCx3suyWkgjdjQmoh//v/wda8Zy9EO25JjAmJOhEIVl+7+B5+5 dRwt4nq/PQFlkCaTtffaMrRF7N8fv1oQZSBahAmaDsounSpOhKc3rnpKj02eXdyiqlCt bLeIyrlGpsYsyR6zpRkRhoSwO2c8zwHjHY9i6whHu88aS18+7rn4mAihRizm+NeG/Hre GSfmKowLpK+w0g4CAwIW1f73wHchrK2rFQitutBS71M1nRBrRJOvyV9m9PQapvNrj+1J WgFIx+Euy/7zk5zjqyg2g2w26hHqNvx28vjMzNFrJFnK9xnQapvXwxGCcW1XLjHwn8uC t95g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nNiu2XRg; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n5si16924919plp.294.2018.12.04.02.57.09; Tue, 04 Dec 2018 02:57:24 -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=@kernel.org header.s=default header.b=nNiu2XRg; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726386AbeLDK4B (ORCPT + 99 others); Tue, 4 Dec 2018 05:56:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:38956 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726375AbeLDKz6 (ORCPT ); Tue, 4 Dec 2018 05:55:58 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3DF6E2087F; Tue, 4 Dec 2018 10:55:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543920957; bh=GnPGxlq0bohOk/uBWtueFswHlXVlH7+9W0aX9+xLWY4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nNiu2XRgIwljCWHsE6xQyHEvkUof3/6UR8M0MsQUmIWJryYOk5vlSyKLZA85bfu1E bl9ITnEd7+XQ0gpHbD8iVFexPAu/rkm+irzwcajrytBLLLVln9SB3A1yR9hwRjjrBf 6bzuH10hER9y72Ff5jkaRQs5+VxKVRUMJziHeT5w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Heiner Kallweit , Andrew Lunn , "David S. Miller" Subject: [PATCH 4.19 025/139] net: phy: add workaround for issue where PHY driver doesnt bind to the device Date: Tue, 4 Dec 2018 11:48:26 +0100 Message-Id: <20181204103651.010514817@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181204103649.950154335@linuxfoundation.org> References: <20181204103649.950154335@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Heiner Kallweit [ Upstream commit c85ddecae6e5e82ca3ae6f20c63f1d865e2ff5ea ] After switching the r8169 driver to use phylib some user reported that their network is broken. This was caused by the genphy PHY driver being used instead of the dedicated PHY driver for the RTL8211B. Users reported that loading the Realtek PHY driver module upfront fixes the issue. See also this mail thread: https://marc.info/?t=154279781800003&r=1&w=2 The issue is quite weird and the root cause seems to be somewhere in the base driver core. The patch works around the issue and may be removed once the actual issue is fixed. The Fixes tag refers to the first reported occurrence of the issue. The issue itself may have been existing much longer and it may affect users of other network chips as well. Users typically will recognize this issue only if their PHY stops working when being used with the genphy driver. Fixes: f1e911d5d0df ("r8169: add basic phylib support") Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/phy/phy_device.c | 8 ++++++++ 1 file changed, 8 insertions(+) --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -1930,6 +1930,14 @@ int phy_driver_register(struct phy_drive new_driver->mdiodrv.driver.remove = phy_remove; new_driver->mdiodrv.driver.owner = owner; + /* The following works around an issue where the PHY driver doesn't bind + * to the device, resulting in the genphy driver being used instead of + * the dedicated driver. The root cause of the issue isn't known yet + * and seems to be in the base driver core. Once this is fixed we may + * remove this workaround. + */ + new_driver->mdiodrv.driver.probe_type = PROBE_FORCE_SYNCHRONOUS; + retval = driver_register(&new_driver->mdiodrv.driver); if (retval) { pr_err("%s: Error %d in registering driver\n",