Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2048713imm; Thu, 24 May 2018 05:05:04 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqeMt1kBEzFxVRv6NnOmXlKg95gBaLgKoxPGDr9KWa9Cxb0KwOaYfjja4xlBo5yIcWmhbI/ X-Received: by 2002:a62:399c:: with SMTP id u28-v6mr7010314pfj.95.1527163504464; Thu, 24 May 2018 05:05:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527163504; cv=none; d=google.com; s=arc-20160816; b=l9m5WWnIjx1uMMsZWPbUzkSHwXNovHstR2KPJ5YBkD+NrHq5dgs1ag8F0vWbTtC08Q w8khHCC1v8E7RBUeTrIx+hVxiR6TffAwc5HtijrpXH3Sy94ryhGmb+7pAhvLmV+0kvGB Zv06vufsJyMj//GLeeQFF6nAdkwYspqPLkVtmz8Q2nlxHWsP6rVjY3i9J/bv8OdhsHsV O3CjIm06Z2iOS1da8KaeOzwXjuLoj37lNPKrZWEg3v02EjsIvlAhOSKw0zKHwwSKkezs 9RGSSiItIjcbfnrD7oHY5RPXNkm44asEzfFBMU5j3Wt/qQCN9hiI3PSwF2dN5l3LR3Mm YGrg== 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=RYGipbmIkgrkCTdh4Ugbau9ehNt4/yhUSi3pkQ1tmX0=; b=YcO9dddWj70WL8WBkgZ4hahHSFniY8DpaNBR92LmoR6sn33Dk6egO1M5xat7yPhiRT dKAGoWD7r7kwRQ3xcQQD5V6wnA9L1zsSm1Z00HfAvhyKuyA3orFZ2/kW8a9RzQuyiNQL +mZJFYKRm8l0qjgH0/h/kHOZNfO8TQjJElbmfxNEUNmLT2LiUOGMMJ2VN5+WYVO1Pbur ueuTnPqeVOx0RJcXaoM6jajnCwFLQ6dlC9bPRbuXGzWxfrJizpJjupm2feGKLdyHrC3N 0ebuVf/OPhSEiVRa/DXIrxPYuDq5CJ9qJbFtjmDgoYrIQd0BfqZbkx6dsjRmHABsQaC/ RS3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xthYBsjn; 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 e11-v6si15773360pgf.469.2018.05.24.05.04.49; Thu, 24 May 2018 05:05:04 -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=xthYBsjn; 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 S969649AbeEXMDF (ORCPT + 99 others); Thu, 24 May 2018 08:03:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:55888 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966230AbeEXJoi (ORCPT ); Thu, 24 May 2018 05:44:38 -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 32DCF208B6; Thu, 24 May 2018 09:44:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527155077; bh=qhJNtjYjmXgg58OFBB9wY5rIa2g3UyqNCFID0F3JBxY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xthYBsjnewaODsJUNkstIWZ679sAaurJAQLcPex8ckQ5NuLLwPfgDBe3pZ3MQl1kV XKFdv2LXsfvCaJsNA82smMh9ogHLY30L7FQEHvm9zTx/t5Ihn2l2mWhDTJ/m4LW4R/ yBQ7LHKR2souFwQ1l23OdzmOeovkIXD8gLbkwJBY= 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 4.4 12/92] r8169: fix powering up RTL8168h Date: Thu, 24 May 2018 11:37:49 +0200 Message-Id: <20180524093200.379368994@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093159.286472249@linuxfoundation.org> References: <20180524093159.286472249@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 4.4-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 @@ -4832,6 +4832,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)