Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1829723imm; Thu, 23 Aug 2018 09:24:54 -0700 (PDT) X-Google-Smtp-Source: AA+uWPw3BQjPkx42oO08bGbNxVDuwQiqsplM0CXpJuVIBxFOms2uKDPHfaHDCsYmA6M6AjiFpJGr X-Received: by 2002:a63:91:: with SMTP id 139-v6mr25488208pga.389.1535041494444; Thu, 23 Aug 2018 09:24:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535041494; cv=none; d=google.com; s=arc-20160816; b=lQiQW2G4uyRJu6Ixh1MQT7SGF2u9X5XjcHPX7VTba2ongOi+5sdrcn6RqADktVvsOo z6mIDXMiIXj8vwSa6nyoevXKjWzRKxBvbIE6fEr2qsM+GILk7SAkeW41k04za2CUtr1A d4L5NjP+EhTQdxFZ/8tqAhkVeWvVjtgYVVZxq4Hi8atASUpwtcto5yW5Y06mpIiXE/oK mVHGkNxrO0RlIYrcVcnxdsVv4pHtGAWywxyulWS9vUSwY5cn/M7MC0GFRrWnxGoID+kQ OO1B+Ip764jmrNMeXHCE+HqMEUxe8iaSCUMsD53JQJXMjpACaBGd4GZVDUb4I1WgKNI4 MZqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=i62wcpQ8qieZSWaigDgmb09LEdjCKRdjBChAbRBz7UY=; b=dhX1UU0lkyFrTgWRRMBK6IuP8LalmPE0g8HDYj7Kg9AoHiPdh3K3t8WUXQCUVHk5gA TxOzNw8sgurUok82zochbOqKKClS2MB4ADPoEp2fTvYcI7qOJnjj9HS18OlAqafhTaht BWWz4lhZ6KVn1b+IIHySud0LeZUdkZpBGrgc3jTlGn0i2K5iVi50GiZSg59WDBHUx/W0 wwdIXAhpRjCs6zpkQ5RNTvIjRJYXlt13TuodwpAXtRywUZObWLd9SXX/7EYGFlK2C9eo 8ysKvXU/75Uua/Gl2Ky3Im+6uHmopHAksU6oQgapi8Nq3Fndgjfz8vHGGmVQ1z5Md8cn dmog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IZM6sgtg; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b59-v6si4684923plc.11.2018.08.23.09.24.39; Thu, 23 Aug 2018 09:24:54 -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=IZM6sgtg; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731162AbeHWRHx (ORCPT + 99 others); Thu, 23 Aug 2018 13:07:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:43440 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731028AbeHWRHx (ORCPT ); Thu, 23 Aug 2018 13:07:53 -0400 Received: from localhost (173-25-171-118.client.mchsi.com [173.25.171.118]) (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 6D87F20837; Thu, 23 Aug 2018 13:38:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1535031487; bh=sf8dFpHwUQ2c7joZvk7s57A8+J0HgP2Iv+GAKcK3oAg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IZM6sgtgayl+Yo+LKF3vxmw/kezjLG/z6CF4WjIAE0MGgmc8GvU/nrVnv4fEyFXFH pNZUfHdEyV5JXbosF8eygUqNerrFk/PJSmsnfagAGjIwqNPnUqEKaCoHMiC6hzry53 po2VDUTVTWOiOUAGCaKkHSNEi1HuotEBK/iHPQTo= Date: Thu, 23 Aug 2018 08:38:05 -0500 From: Bjorn Helgaas To: Jian-Hong Pan Cc: Heiner Kallweit , Thomas Gleixner , David Miller , Realtek linux nic maintainers , netdev@vger.kernel.org, Linux Kernel , Linux Upstreaming Team , linux-pci@vger.kernel.org, marc.zyngier@arm.com, hch@lst.de Subject: Re: [PATCH] r8169: don't use MSI-X on RTL8106e Message-ID: <20180823133805.GE154536@bhelgaas-glaptop.roam.corp.google.com> References: <20180820184438.GA154536@bhelgaas-glaptop.roam.corp.google.com> <9d7d960a-6c55-dc4b-7969-f5cf46bff0ce@gmail.com> <20180821.123108.89921430801253333.davem@davemloft.net> <36bd086d-8d26-5162-ae24-95b259571221@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 23, 2018 at 06:46:28PM +0800, Jian-Hong Pan wrote: > > On 22.08.2018 13:44, Thomas Gleixner wrote: > >> Can you please do the following: > > Tested on ASUS X441AUR equipped with RTL8106e. > This is the laptop whose ethernet does not come back after resume, if > it does not fallback to MSI. > ... > dev@endless:~$ sudo lspci -xnnvvs 02:00.0 > ... > 00: ec 10 36 81 07 04 10 00 07 00 00 02 10 00 00 00 > 10: 01 e0 00 00 00 00 00 00 04 00 10 ef 00 00 00 00 > 20: 0c 00 00 e0 00 00 00 00 00 00 00 00 43 10 0f 20 > 30: 00 00 00 00 40 00 00 00 00 00 00 00 ff 01 00 00 > > After comparing, there is no difference between before suspend and > after resume. It'd be better to compare the hex data directly and ignore the lspci decoding, since lspci doesn't decode everything. You only dumped the first 0x40 bytes of config space, and all capabilities, including the MSI and MSI-X capabilities, are past that: > Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+ > Capabilities: [b0] MSI-X: Enable+ Count=4 Masked- > Vector table: BAR=4 offset=00000000 > PBA: BAR=4 offset=00000800 In addition, some of the MSI-X information for this device is in BAR 4. "lspci -xxx" will dump all config space, and you can use a tool like http://cmp.felk.cvut.cz/~pisa/linux/rdwrmem.c or https://github.com/billfarrow/pcimem to dump the BAR contents.