Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2071960imm; Thu, 24 May 2018 05:24:14 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp4EWcPt/s0deXwVFFYzua4bHkhrffctqP4xtXS9it21XSyGXvlt5yG9wiMe9JHFMG2Ir66 X-Received: by 2002:a63:a042:: with SMTP id u2-v6mr1172085pgn.413.1527164654844; Thu, 24 May 2018 05:24:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527164654; cv=none; d=google.com; s=arc-20160816; b=SW6Q07M+6jsNRhO1KiQt/gU6ThzHyaOVlhMvCIfMTCZYgtb+FGbNVwMHtHA/Yjz0jE lqJJwleM61VoYn1r+mmQgTHykLJi1IOMLzTJBuM8y0xix0WCwLGSbh/4JU3UHJfnFBkz oBJYwsI2+s3UT49PyXPL813gdOisq/LMYmSk3tHClioYwVSYGtdERWF4YfBC7G3xKRL2 J46FxOwZTSSTHJ9TOOPLUc9IwObG2EywCIDjpvZn/38Eypcr/Zl8wRv4qCOdW74HMoc/ cbauec42ieLH4o/lw/J0ONSLob0tuGAe7KUlPRFT5frdVuMj/6/uw2MB4kvK25ocZftd 5cNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=4I1uMbaGpvblguNvHsOe0TzDMuI7cNAFRzoSqaHAGbs=; b=OtLwwNGx0qS/MKDsOSayBt5sTfJBa/XlbJYTqhRbE2fd9iqlKODHmWErkuq3nhDZSy mZj7PdITsaPZNFSv0PLVWJU7NitT/U2X8HBECzgqHZhDUcOJ+IVgh4QQpbG+o3P3+vII mC5jMUradiM2WOR05E6yetf+CHYS+KIagsAnXivKTfa8rKpGGYQCVcIlz3UAvUyxPjNe tHDFM4RxhP5DP3wyUcWaYCtpxWowob+MO7SR6qgnQr/jzq/3i/b3LiQKv2XzW3m8drsm T6twCBg8HNXUl03ZqrYC6Hywh89cEd/ZU8kQqWCnaF55hlBl3s3TEsNZwhctlGYsgMCx g6hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=onRMZgUO; 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 w5-v6si21431615pfi.88.2018.05.24.05.24.00; Thu, 24 May 2018 05:24:14 -0700 (PDT) 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=onRMZgUO; 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 S966109AbeEXJk6 (ORCPT + 99 others); Thu, 24 May 2018 05:40:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:52874 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966058AbeEXJku (ORCPT ); Thu, 24 May 2018 05:40:50 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (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 C5ED120893; Thu, 24 May 2018 09:40:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527154849; bh=sed6kEPuvg6vzT99VSDNny8HVIvTp+nv1Vau3eLELhs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=onRMZgUOhPwMOnPX8dHHtcGAGj4bNXNrwmVHBuFf7BjkPntnL64kQMb8STxX63gBh viWSpEk0jdqxSNMGnvTyA0KeWXp7tF7730Kt2yq+Al7BJvN/oxowV9SFV9JJHTh2O0 Bf8xLzEJeK0LGkBGkCIgLj2UnzyhrRpVE4E7xhTc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Slava Kardakov , Heiner Kallweit , "David S. Miller" Subject: [PATCH 3.18 10/45] r8169: fix powering up RTL8168h Date: Thu, 24 May 2018 11:38:18 +0200 Message-Id: <20180524093121.774651295@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093120.599252450@linuxfoundation.org> References: <20180524093120.599252450@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 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 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Heiner Kallweit [ Upstream commit 3148dedfe79e422f448a10250d3e2cdf8b7ee617 ] Since commit a92a08499b1f "r8169: improve runtime pm in general and suspend unused ports" interfaces w/o link are runtime-suspended after 10s. On systems where drivers take longer to load this can lead to the situation that the interface is runtime-suspended already when it's initially brought up. This shouldn't be a problem because rtl_open() resumes MAC/PHY. However with at least one chip version the interface doesn't properly come up, as reported here: https://bugzilla.kernel.org/show_bug.cgi?id=199549 The vendor driver uses a delay to give certain chip versions some time to resume before starting the PHY configuration. So let's do the same. I don't know which chip versions may be affected, therefore apply this delay always. This patch was reported to fix the issue for RTL8168h. I was able to reproduce the issue on an Asus H310I-Plus which also uses a RTL8168h. Also in my case the patch fixed the issue. Reported-by: Slava Kardakov Tested-by: Slava Kardakov Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/realtek/r8169.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c @@ -4764,6 +4764,9 @@ static void rtl_pll_power_down(struct rt static void rtl_pll_power_up(struct rtl8169_private *tp) { rtl_generic_op(tp, tp->pll_power_ops.up); + + /* give MAC/PHY some time to resume */ + msleep(20); } static void rtl_init_pll_power_ops(struct rtl8169_private *tp)