From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754466AbdL2APZ (ORCPT ); Thu, 28 Dec 2017 19:15:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:52900 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751199AbdL2APY (ORCPT ); Thu, 28 Dec 2017 19:15:24 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0AB3E20671 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=helgaas@kernel.org Date: Thu, 28 Dec 2017 18:15:19 -0600 From: Bjorn Helgaas To: Alexandru Chirvasitu Cc: Thomas Gleixner , Dou Liyang , Pavel Machek , kernel list , Ingo Molnar , "Maciej W. Rozycki" , Mikael Pettersson , Josh Poulson , Mihai Costache , Stephen Hemminger , Marc Zyngier , linux-pci@vger.kernel.org, Haiyang Zhang , Dexuan Cui , Simon Xiao , Saeed Mahameed , Jork Loeser , Bjorn Helgaas , devel@linuxdriverproject.org, KY Srinivasan Subject: Re: PROBLEM: 4.15.0-rc3 APIC causes lockups on Core 2 Duo laptop Message-ID: <20171229001519.GD19819@bhelgaas-glaptop.roam.corp.google.com> References: <20171228172250.GD10658@chirva-slack.chirva-slack> <20171228175009.ucxr4to2nb42e3s4@D-69-91-141-110.dhcp4.washington.edu> <20171228225014.GE10658@chirva-slack.chirva-slack> <20171228233058.c76a4upqbx6elmvg@D-69-91-141-110.dhcp4.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171228233058.c76a4upqbx6elmvg@D-69-91-141-110.dhcp4.washington.edu> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 28, 2017 at 06:30:58PM -0500, Alexandru Chirvasitu wrote: > Attached, but heads up on this: when redirecting the output of lspci > -vvv to a text file as root I get > > pcilib: sysfs_read_vpd: read failed: Input/output error > > I can find bugs filed for various distros to this same effect, but > haven't tracked down any explanations. This is a tangent, but I think you should *always* see "Input/output error" on this system when running "lspci -vvv" as root, regardless of whether you redirect the output (the error probably goes to stderr, not stdout, so it's probably easy to miss when not redirecting the output). I think this is the -EIO return from pci_vpd_read(), which probably means pci_vpd_size() returned 0 for one of your devices, which means the VPD data provided by the device wasn't formatted correctly. If this happens, you should see a warning in dmesg about it ("invalid VPD tag" or similar) -- could you verify that? It's possible we should return something other than -EIO, or maybe pcilib should do something other than emitting the warning. In pcilib, sysfs_read_vpd() emits the warning [1], and it would seem sort of ugly to special-case EIO, so maybe we should change this in the kernel. It looks like your Qualcomm Atheros Attansic NIC at 06:00.0 is the only device with VPD, so that's probably the one: 06:00.0 Ethernet controller: Qualcomm Atheros Attansic L2 Fast Ethernet Capabilities: [6c] Vital Product Data Not readable I think lspci would still print "Not readable" if we just made the kernel return 0 instead of -EIO [2]. Bjorn [1] https://git.kernel.org/pub/scm/utils/pciutils/pciutils.git/tree/lib/sysfs.c#n410 [2] https://git.kernel.org/pub/scm/utils/pciutils/pciutils.git/tree/ls-vpd.c#n87