Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2262147imm; Sun, 9 Sep 2018 20:30:00 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYHjjdZ89R0/3k7Vh0gfszsr/sbCqsjLhLQidRCVG9Rf08ZMKNNVE51od2etkB/E9XqJA/q X-Received: by 2002:a62:6c85:: with SMTP id h127-v6mr21388619pfc.65.1536550200264; Sun, 09 Sep 2018 20:30:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536550200; cv=none; d=google.com; s=arc-20160816; b=hjrN9C5c33SFDo52we6MRwfq/KL3PHK3vfMCwmjJkB/SfGT0S9iKAhbHndzHQK//FO DntbSv1js4F+uV68PSMXMXMc7zKRhwMiGSkkLhijvOg4b8dFfcAah281sbzUfoyuGJTi 5Wh8s7NpoDF5oLKZGuymGS8tDdbx8ifY0XfJhBOAQdYrZVGJ7WGeOq2B0xcN0YJDXIN8 UgvB0SYCqOoFB1MeJymFYaKFWhfZAoRZUj01By3MLk0PlTLrVifsqLkeRYjNrNNhXr7W WajLtT3CfeZ7cXGqBzH1E5KrNCvtkruKtcXKjG6J6g1nlBQXuEmGi9vWepz8ODZCXRwF WykA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject; bh=aRyCU8HYeWdPdd3B3RShNFGQxNNrux3Pgq5w64kJL/8=; b=Kvz/W8YsvEphkAIJTK464Y5dnLyZFa1Y4tO1zYYXmaKmN0LtBHMTEouP+05x7zUS41 qcNrSILlrdXvmhuO35x/pKQtWP8xiNQS/QBPNpFmfX5X3BbkCJ0a1M7xQC66lIfEzRee uPcrnkQbW28GL4TL/HHzYOlDbFw6qEkHyptN9ULxOr8eEMhI+KKX8WBsE7914LvtimOO rUvkZr1W3zfOCONpq/jgtJcGRKI7CCYJXPPC53hn4jX5SyDI6/WH0NrusjYvj/tcPxwD cgbwwxmDws0tZZI4miXcEowbMysOSHBTeoKuRRX1nhGbK7x9HOaHQtlci48vKN2Ep9wq CA4A== ARC-Authentication-Results: i=1; mx.google.com; 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 x3-v6si14178294plo.350.2018.09.09.20.29.45; Sun, 09 Sep 2018 20:30:00 -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; 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 S1726587AbeIJITB (ORCPT + 99 others); Mon, 10 Sep 2018 04:19:01 -0400 Received: from vps-vb.mhejs.net ([37.28.154.113]:36082 "EHLO vps-vb.mhejs.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726024AbeIJITB (ORCPT ); Mon, 10 Sep 2018 04:19:01 -0400 Received: from MUA by vps-vb.mhejs.net with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) (envelope-from ) id 1fz7mI-0006gd-US; Mon, 10 Sep 2018 00:01:58 +0200 Subject: Re: [PATCH] r8169: inform about CLKRUN protocol issue when behind a CardBus bridge To: David Miller Cc: nic_swsd@realtek.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180909.080907.992434701890231030.davem@davemloft.net> From: "Maciej S. Szmigiero" Openpgp: preference=signencrypt Autocrypt: addr=mail@maciej.szmigiero.name; prefer-encrypt=mutual; keydata= xsFNBFpGusUBEADXUMM2t7y9sHhI79+2QUnDdpauIBj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4Jd9nXD/9jstJU6L1MLyr/ydKOnY48pSlZYgII9rSnFyLUHzNcW2c/ qw9LPMlDcK13tiVRQgKT4W+RvsET/tZCQcap2OF3Z6vd1naTur7oJvgvVM5lVhUia2O60kEZ XNlMLFwLSmGXhaAXNBySpzN2xStSLCtbK58r7Vf9QS0mR0PGU2v68Cb8fFWcYu2Yzn3RXf0Y dIVWvaQG9whxZq5MdJm5dknfTcCG+MtmbP/DnpQpjAlgVmDgMgYTBW1W9etU36YW0pTqEYuv 6cmRgSAKEDaYHhFLTR1+lLJkp5fFo3Sjm7XqmXzfSv9JGJGMKzoFOMBoLYv+VFnMoLX5UJAs 0JyFqFY2YxGyLd4J103NI/ocqQeU0TVvOZGVkENPSxIESnbxPghsEC0MWEbGsvqA8FwvU7Xf GhZPYzTRf7CndDnezEA69EhwpZXKs4CvxbXo5PDTv0OWzVaAWqq8s8aTMJWWAhvobFozJ63z afYHkuEjMo0Xps3o3uvKg7coooH521nNsv4ci+KeBq3mgMCRAy0g/Ef+Ql7mt900RCBHu4tk tOhPc3J1ep/e2WAJ4ngUqJhilzyCJnzVJ4cT79VK/uPtlfUCZdUz+jTC88TmP1p5wlucS31k Thy/CV4cqDFB8yzEujTSiRzd7neG3sH0vcxBd69uvSxLZPLGID840k0v5sftPA== Message-ID: <0a5f601c-88cc-4d5e-94f1-f38dbd093fc0@maciej.szmigiero.name> Date: Mon, 10 Sep 2018 00:01:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20180909.080907.992434701890231030.davem@davemloft.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09.09.2018 17:09, David Miller wrote: > From: "Maciej S. Szmigiero" > Date: Thu, 6 Sep 2018 18:10:53 +0200 > >> It turns out that at least some r8169 CardBus cards don't operate correctly >> when CLKRUN protocol is enabled - the symptoms are recurring timeouts >> during PHY reads / writes and a very high packet drop rate. >> This is true of at least RTL8169sc/8110sc (XID 18000000) chip in >> Sunrich C-160 CardBus NIC. >> >> Such behavior was observed on two separate laptops, the first one has >> TI PCIxx12 CardBus bridge, while the second one has Ricoh RL5c476II. >> >> Setting CLKRUN_En bit in CONFIG 3 register via an EEPROM write didn't >> improve things in either case (this is probably why it wasn't set by the >> card manufacturer). >> The only way to fix the issue was to disable the CLKRUN protocol either >> in the CardBus bridge (only possible in the TI one) or in the southbridge. >> >> Since the problem takes some time to debug let's warn people that have >> the suspect configuration (Conventional PCI r8169 NIC behind a CardBus >> bridge) so they know what they can do if they encounter it. >> >> Signed-off-by: Maciej S. Szmigiero > > I don't know about this. > > Barking at the user in the kernel log about an obscure knob (which btw > doesn't exist for all cardbus bridges without other patches you are > posting elsewhere) is rarely effective. > > We should just disable clkrun automatically we know it causes problems. Unfortunately, as you wrote above, this workaround is only available on TI CardBus bridges (and I hope will be available for two Ricoh ones soon, too), while for other CardBus bridges it is either not implemented or not available at all. So we can't reliably just turn it on automatically when needed. BTW, it seems that my RTL8169 card isn't the only model affected. In fact, the original CLKRUN protocol disabling workaround on TI bridges was implemented in 2005 because somebody's RTL8139 also had this problem: https://lkml.org/lkml/2005/2/5/129 The main reason I wanted to add this warning is to save people time debugging this issue, as it is rather unobvious. But if this solution is unacceptable then I hope at least this description will pop out in search results when searching for some related keywords. Thanks, Maciej