Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp799705imm; Wed, 22 Aug 2018 12:51:32 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbrkbvRsPuRL/rxjYhIWnD6tFxDIGZiXAYqYR0yeGQltwty0MOH84citDwwvrzl39i9qApT X-Received: by 2002:a62:cc8e:: with SMTP id j14-v6mr6438046pfk.215.1534967492613; Wed, 22 Aug 2018 12:51:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534967492; cv=none; d=google.com; s=arc-20160816; b=UrLNoWm0s1aZa1m0yQOvLrd5TEa41vaLxGlSxJaJ1yGEi1xPhefNmPIH9x2lGNkPKr KRANZiL0n4pncWXKMa8CMDMYDwE1u6BNA0LLZWSZ7m7jWfcMD2hRpQMK7urgqcT1l+AK ct2PEpK4+hy6i2rS2tPfHO0iGGEV/XTiwUFNwaamhC0RYrtn7fSBDCGSP0O07rpZUDzi vStbrwKiiIcBhPoyhbY17TwHewLHGIJpj8q5HT2YQB5EUxmvcLv8Gu69Es6EUHOsmKfo WbsG7wPMbRV51Ly+I1C4SZqwWuOSWArHPnS1PCbhwRd+Ma9nLVmbfDWwbnxZoXDHhFS1 UXTA== 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:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=QjcFsy1hrLnfBzUs8upIYxSPVkXhUFXEb2cCCKoEP6s=; b=rCfm6YYDDBpt++yc9OofRuAyVEW+eAWKhWTnws3UURfxllkjs+u6KAMpFr67m2V6sf 2BDDmuJLUTII+GlRKjzhCzDid378yGS2NHuEMfyx5PCz8W97zTEP6KmkmbEd8cMTfYjh A2tNXjjq74Ra6m2K6XKswt4gDxjetSQ50n1RK6u0fg7yH0yuMheGAkKfQx82yZMuN1gH 0MA4aAibbhievrkAzv2A5SnX1aKAxQH9Fi2ru2Zm/MzdukQ3v+J9Eia6AVpH1zf7KLMh MjtudMkzmrAph7fSXyrqYtg+b4VwGOHCEQvXd2d1MNcwT64UMn7VAWjGvstUHJmkpAeT mf8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dxqyQaPS; 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 k11-v6si2252008pgj.688.2018.08.22.12.51.17; Wed, 22 Aug 2018 12:51:32 -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=@gmail.com header.s=20161025 header.b=dxqyQaPS; 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 S1728259AbeHVXQY (ORCPT + 99 others); Wed, 22 Aug 2018 19:16:24 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35335 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727687AbeHVXQX (ORCPT ); Wed, 22 Aug 2018 19:16:23 -0400 Received: by mail-wm0-f66.google.com with SMTP id o18-v6so3411531wmc.0; Wed, 22 Aug 2018 12:50:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=QjcFsy1hrLnfBzUs8upIYxSPVkXhUFXEb2cCCKoEP6s=; b=dxqyQaPS2mznNyk7pbGSv8EL5F5VKCoEEheo+ZyWPMXmZ7HVIN2NITwo+87i5YOoWO 0OXm85hGv28wQtNKvXJ/WZzcgiqBRWjVeAH2mqEs6hSNGx9KGM6VotQlWNstZux9nN5b VF5maAofs6KUmlBtebfCssBlGc5/NrjHlTGGwm2vD8g+FMg3ePB0Ywf0M7I0s8uiPnto sHctwWG7zDKZNuSsAye8I5IhX+9DczaF6r5WUrmc/Je79OgPYPDCGjnt38g6h0AXCIc8 +6Z9XYztbs8BwdGoE7zNfMBZfFBbNTkxiR4jVSUDb2UP+t59tlV4nSz4bM2Q6efKaUM2 dd2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=QjcFsy1hrLnfBzUs8upIYxSPVkXhUFXEb2cCCKoEP6s=; b=N56jbFmCHEKKuAabOI+49ZREAJkH5IuEEuuScMfRbHNvbkRG00IKnZ1tW1OtXGMfko nFPh/EiAzdU7+g4mGT622YxBcv8L8Xcjy7oTrOvd/fgJWlnxES3M5IPRFb68m2/VeN8q OrzCKE18V1uP4uotqClm3Gcy/1UJ5axL0/3vQNqo8qrODJUOG3Q3p1yKNfpa/YRAtTA3 Tm/qFBeKNyZIHDnM63IZwYj9+xgYvTLKE7bjKLgQZMO1V0/30rpsm3KmBlrgR0uvxx9A Vfvwo5Wporw52f3UGmBbFC5u1WDpW93/cmz9HH68ZybLxyT7fXQ7BwZhOYy9s4bAG791 65+w== X-Gm-Message-State: APzg51Alc8naKi7wLH9XL5UVAt5Lc3o6tg3zpqb4bOCTknpleMFozS66 mtzJYrHRWgUYnwHuSytJJ8I= X-Received: by 2002:a1c:65c5:: with SMTP id z188-v6mr636660wmb.57.1534967407896; Wed, 22 Aug 2018 12:50:07 -0700 (PDT) Received: from ?IPv6:2003:ea:8bd4:d600:44d7:7992:4d57:b314? (p200300EA8BD4D60044D779924D57B314.dip0.t-ipconnect.de. [2003:ea:8bd4:d600:44d7:7992:4d57:b314]) by smtp.googlemail.com with ESMTPSA id 34-v6sm3262674wra.20.2018.08.22.12.50.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Aug 2018 12:50:07 -0700 (PDT) Subject: Re: [PATCH] r8169: don't use MSI-X on RTL8106e To: Thomas Gleixner Cc: David Miller , helgaas@kernel.org, jian-hong@endlessm.com, nic_swsd@realtek.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux@endlessm.com, linux-pci@vger.kernel.org, marc.zyngier@arm.com, hch@lst.de References: <20180820184438.GA154536@bhelgaas-glaptop.roam.corp.google.com> <9d7d960a-6c55-dc4b-7969-f5cf46bff0ce@gmail.com> <20180821.123108.89921430801253333.davem@davemloft.net> From: Heiner Kallweit Message-ID: <36bd086d-8d26-5162-ae24-95b259571221@gmail.com> Date: Wed, 22 Aug 2018 21:49:56 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22.08.2018 13:44, Thomas Gleixner wrote: > On Tue, 21 Aug 2018, Heiner Kallweit wrote: >> On 21.08.2018 21:31, David Miller wrote: >>> From: Heiner Kallweit >>> Date: Mon, 20 Aug 2018 22:46:48 +0200 >>> >>>> I'm in contact with Realtek and according to them few chip versions >>>> seem to clear MSI-X table entries on resume from suspend. Checking >>>> with them how this could be fixed / worked around. >>>> Worst case we may have to disable MSI-X in general. >>> >>> I worry that if the chip does this, and somehow MSI-X is enabled and >>> an interrupt is generated, the chip will write to the cleared out >>> MSI-X address. This will either write garbage into memory or cause >>> a bus error and require PCI error recovery. >>> >>> It also looks like your test patch doesn't fix things for people who >>> have tested it. >>> >> The test patch was based on the first info from Realtek which made me >> think that the base address of the MSI-X table is cleared, what >> obviously is not the case. >> >> After some further tests it seems that the solution isn't as simple >> as storing the MSI-X table entries on suspend and restore them on >> resume. On my system (where MSI-X works fine) MSI-X table entries >> on resume are partially different from the ones on suspend. > > Which is not a surprise. Please don't try to fiddle with that at the driver > level. The irq and PCI core code are the ones in charge and if you'd > restore at the wrong point then hell breaks lose. > Instead of spending a lot of effort on a workaround which may not be acceptable, it may be better to fall back to MSI on all affected chip versions. For two chip versions which were reported to have this issues we're doing this already. I asked Realtek whether they have an overview which chip versions are affected, let's see .. The Realtek chips provide an alternative, register-based way to access the MSI-X table, and their Windows driver seems to use it. See here: https://patchwork.kernel.org/patch/4149171/ But as we handle all MSI-X basics in the PCI core, this isn't an option. > Can you please do the following: > > 1) Store the PCI config space at suspend time > 2) Compare the PCI config space at resume time and print the difference > > Do that on a working and a non-working version of Realtek NICs. > > Thanks, > > tglx > > >