Received: by 10.192.165.148 with SMTP id m20csp1071491imm; Wed, 25 Apr 2018 12:06:54 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+7TX5ErFICGblQGUkcIr07ZAer4NMzQEzAkx6aGw5xex9o8TTNpnwmLd765eEy91+BnRqu X-Received: by 10.99.110.198 with SMTP id j189mr24134717pgc.86.1524683214337; Wed, 25 Apr 2018 12:06:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524683214; cv=none; d=google.com; s=arc-20160816; b=jicaTUGlEB5bSC6JRsjAJSu3ooZsK92ilnnyWC5hkLLE//wpLfhMcQerEpuQvCgiDY /0Gw5Ib+NQe8+0iZoilVo3BjfVRwk07Jf1eT0erksTYA5KOpGYkdWMZPZm6df2S7uJ7C eIHkJk9sj22asVvamoEE5wBh4ZadynmYQtxSXf1OFWc//xnr2MvnQUUFNn6WcdDVIZlg zqQyBdteNiCuHS84cxBLnUhdSR2JseA8UFEhQn4EkknUYHXvXVmWIvpOTH1J8oXWd5xy YF9StVSSxDpH+y2Vl1s6Mxrspwx7r4UfmmPdJuaxZDAgMb8qXJjoxYobIfMkYMh+6OLo X9Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=xvqUM4+Tw5bdxD88OarSxYRu8XIW0KgeWsYGq2xxD5Q=; b=lkpe4vrcUzN9WFhAwx8eCCpYvS9zkEPkjOYQ3Zqxo9ahfKfax/+LZDJOm+xGKl6I+d prjlIY15UIad02+9VP4jiZqVPH05F6Ovhue7z1eKFhtZ/oWZAaDJPNayeCFp4/RGJYSY f1iKNzxXljTlB9bLI3BTSHGCjK4ZrcGfllt5XZC3OvcjxZWrDs0bR9Ha9Wm9JEQT10rl 2dMEO9EZ13+Oo1hgIkabDa96kHWpRyjl0nQEHyV1MsQrRkplJIFVAKPEndxnBFZhhGZH m2LmDIefo0bJUbXR44aZ6mI52uLv2vdmy122hUEndbmencWy1HUm0N0b+K/j2LTZnygF gWYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=XCy82sAb; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w71si16695552pfd.273.2018.04.25.12.06.39; Wed, 25 Apr 2018 12:06: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=@google.com header.s=20161025 header.b=XCy82sAb; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756238AbeDYTF2 (ORCPT + 99 others); Wed, 25 Apr 2018 15:05:28 -0400 Received: from mail-yw0-f178.google.com ([209.85.161.178]:34604 "EHLO mail-yw0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755145AbeDYTF0 (ORCPT ); Wed, 25 Apr 2018 15:05:26 -0400 Received: by mail-yw0-f178.google.com with SMTP id h14-v6so6868119ywm.1 for ; Wed, 25 Apr 2018 12:05:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xvqUM4+Tw5bdxD88OarSxYRu8XIW0KgeWsYGq2xxD5Q=; b=XCy82sAbz6S3OpBqznh40WY4q6WAHA0XXZ47PdG3mXRVvSnlD97Rt/zrixKn2lrn8D 1hIam7+94pFMmaFetCJOPu2nMhv/qCkAFNto4gBr16r70Z0f3iljF4SOyaywWEUUCdpf cpqwmNVz5CQZoc6OSorqpDzLC67LBRPmuzPQOR5eYaKOLmBQ3G2k41bqMhbJ8C3v5IQl jDpsfUnGTkeSL9htEPXMwprQ1pq2g3szFTfMfV31xOW8pm9qELYj2+7Rww07G//5JBU7 fvUVDwGezInhsg4SfHeKiJETPrWny10QZhF89AD/uelkoMrBNQG/TzfNsY7vEoHWyn7t pBhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xvqUM4+Tw5bdxD88OarSxYRu8XIW0KgeWsYGq2xxD5Q=; b=d/RZEIu25cEyQmkKiBfptpD8qTXPptiL0Q17uvvshkiGM9xW/dYIb31EStIjY5xfF0 k7FRDMT7Vn1lvf1Y1NhaE/A0J6bBiInARB8CYTqzsJJElL950nfESJRx4tvNvSXbCeWp ZaGXGTynQeKFleifIkA1aLFJoYFp4a/tdciUTKKPAX5AFSC0bXp9dYjbvtUM1+sUkN3D 2OHfkU22oWVHLkI3ONocZSqmk0RZ8v8vHxCMCUDwW38thqUUSKOz1JKf1uXbvYEEKOJ1 07V2qzLDYsC3LPUWhI/5YqZSaftS+PzIiumWaTpFAQfd4iNoh4wbBz4jEkpXcmqxZ53E MxVg== X-Gm-Message-State: ALQs6tAOUZhXYYjGH3MsbQ+zHfRQxiSXVQJwULkcoZf94Iw/6/i4bShD xK4c4EOMcPIF0N+sGGxxQrvOyg2S4V3Z144G/7dqYt0= X-Received: by 2002:a81:618a:: with SMTP id v132-v6mr13502116ywb.20.1524683125436; Wed, 25 Apr 2018 12:05:25 -0700 (PDT) MIME-Version: 1.0 References: <000701d3dc6f$61f91230$25eb3690$@dommel.be> In-Reply-To: <000701d3dc6f$61f91230$25eb3690$@dommel.be> From: Bjorn Helgaas Date: Wed, 25 Apr 2018 19:05:14 +0000 Message-ID: Subject: Re: [Bug 199473] New: pcieport does not scan devices behind PEX switch, while resources are allocated To: janpieter.sollie@dommel.be Cc: linux-pci@vger.kernel.org, Linux Kernel Mailing List 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 [Please retain the mailing list cc when replying] On Wed, Apr 25, 2018 at 3:28 AM Janpieter Sollie wrote: > Hi Bjorn, > I'm at work now, but I saw your mail contained much more info than only the remark "does it work at 4.17?", so I'll try to answer all your questions: > 1. as stated, it only assigns the address space of the second and 3rd device when the PCI device is hotplugged and then the pc is restarted on a port before the first device. In this case: > - The Ellesmere 01.0-[4f] device is connected to port 3 (0-7) and is always reported. For other devices, this is not the case. > - The other devices are at port 1 and 2. When adding them on a higher port, the workaround does not work. > - The devices 05.0-[4c] and 07.0-[4b] are ALSO NOT VISIBLE in the BIOS IRQ listing, it just talks about an endpoint. Not even with the workaround. So a trick to discard bios info and let the PCIe switch report its devices would be nice. BIOS info is not used when we enumerate devices, so I don't think there's really anything to discard. > 2. I am always building my kernel from the kernel.org sources, not from Gentoo sources, so it's not a distro problem. > 3. The workaround only works with kernel 4.17 > 4. You are probably right about the Broadcom driver, as it only picks up the endpoint at 42.00.1 when loaded. I have no idea wat it does either, besides taining the kernel. Let's simplify the situation by focusing only on v4.17. We can also ignore the Broadcom driver, since it's not involved in enumeration. > So, to summarize: > - Why are ports 4-7 not working when a device is plugged in at port 3? I don't know what "port 3" and "ports 4-7" refer to. Are these labels on slots in an expansion chassis? Something from lspci, e.g., the port number from Link Capabilites, or the slot number from Slot Capabilities? > - Why do I need a hotplug event to push the device name into the kernel after a cold start? This is complete madness, isn't it? I don't know why the hotplug would make a difference. It does sound like complete madness. > - Why are resources allocated while the PCI slot is empty? I don't know exactly what resources you're referring to (bus numbers, MMIO space, I/O port space). In general we try to allocate some space for all of those even if the slot is currently empty, because that makes it possible to hot-add devices in the slot later. In this case, the bus number space is quite constrained because the host bridge leading to the PEX switch only supports [bus 40-4f]. But I think that should be enough for this case, since the only switch in this tree is the PEX, and your Bonaire/Tobago/Ellesmere devices are all endpoints that only require one bus number each. If you run "lspci -vv" as root, it'll decode more details. > -----Original Message----- > From: Bjorn Helgaas [mailto:bhelgaas@google.com] > Sent: dinsdag 24 april 2018 21:31 > To: janpieter.sollie@dommel.be > Cc: linux-pci@vger.kernel.org; Linux Kernel Mailing List > Subject: Fwd: [Bug 199473] New: pcieport does not scan devices behind PEX switch, while resources are allocated > Thanks for the report! > I don't understand exactly what the issue is yet. You attached lspci > output from v4.14.27 and v4.17-rc1. The v4.17-rc1 output shows several > devices (4b:00, 4c:00, 4f:00) below the PEX switch, while the v4.14.27 > output shows only the 4f:00 devices. > Is the problem that v4.14.27 doesn't find the 4b:00 and 4c:00 devices? > Does v4.17-rc1 work correctly? > If v4.17-rc1 works but v4.14.27 does not, it's probably a question of > working with your distro to see if they can (1) identify some change that > fixed things, and (2) backport that change to the distro kernel. > The Broadcom driver you attached at comment #4 shouldn't be related to this > problem. Device enumeration is performed by the PCI core and doesn't > require any additional drivers. I didn't look at the Broadcom driver, so I > don't know what it does. The PEX switch does include an endpoint > (42:00.1); it's possible the driver is for some functionality provided by > that endpoint. > ---------- Forwarded message --------- > From: > Date: Mon, Apr 23, 2018 at 12:20 AM > Subject: [Bug 199473] New: pcieport does not scan devices behind PEX > switch, while resources are allocated > To: > https://bugzilla.kernel.org/show_bug.cgi?id=199473 > Bug ID: 199473 > Summary: pcieport does not scan devices behind PEX switch, > while resources are allocated > Product: Drivers > Version: 2.5 > Kernel Version: 4.17-rc1 > Hardware: x86-64 > OS: Linux > Tree: Mainline > Status: NEW > Severity: normal > Priority: P1 > Component: PCI > Assignee: drivers_pci@kernel-bugs.osdl.org > Reporter: janpieter.sollie@dommel.be > Regression: No > Created attachment 275511 > --> https://bugzilla.kernel.org/attachment.cgi?id=275511&action=edit > dmesg stable kernel > pcieport assigns the PEX 8619 pcie expander switch ports, but does not scan > them for additional objects behind the ports. only 1 device is added @ pci > region 4f. Workaround for getting all devices online: while pc is on, > remove > the card, reinsert it at a slot before the working device, and make a cold > start. > It would be nice if the pcie switches are scanned properly. > -- > You are receiving this mail because: > You are watching the assignee of the bug.