Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp197090ima; Thu, 31 Jan 2019 14:55:46 -0800 (PST) X-Google-Smtp-Source: ALg8bN5lWzuUSbLt5J96cq1pXzSl6P4EHYA6xu7KoOZoxE33UWfGjfAgdu/lXyBbIEbu9idyhK0d X-Received: by 2002:a63:9b11:: with SMTP id r17mr33534537pgd.416.1548975346497; Thu, 31 Jan 2019 14:55:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548975346; cv=none; d=google.com; s=arc-20160816; b=pU9ab8sUyxGYeqM/+YbHz+Rqs3iAjfqNjyEQELaWz8urGQKoqnmODBtkevA1daf+tE DHwWatsnXaseAaZsjJDYeHiLwRaYYhTe6hCQ0nHAvKR6PlAqYFkkVidu75SKRTGSk3X6 uuMmN5AJczbv4m3ad7L5HJsG8s/mUUS9m0u50OtWxAVrlYUgJJmBglk7dk0MqxCmxWdl JaD8jo+zDcKNjQtXnQ4nQK+8fCoqh0Cj9dsMmEfeOS7Y1sZix4MAXCQ/NFxv0E+NLEWo Rg6tNW2+xEQbM43r6G3eqRfE/0WbqjFpksUuY52d1jK0qQPQqE5Ce7Py6OKUFQJ7t37j t0Tw== 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; bh=/hX5KDMKgR+lXyknno+hpKg6MWnLWVX48Cnsfqsnspc=; b=cCpZPxPq6L3+tKz+FAdb/7as0VgZKLoxC8oXaPv6govHN89aCpQAj3mjjYbz8479nT DNdntwdcnOfFmCKaD3CtwoQWayao3jMJD2dPIVsk5JnJIp9KTZdV4BmlaWlbhqDFZtO4 Ok/gLpST4SvwlaMCQoh/zqAK28LuChZzZwHfpoSx49EJtAJcsaTeqCK8mrCHYwZ3jkAq MbULqB14fEUY+aXHZWhcZBUs4IHMPGclru5eF8AFILNz8cO2Dz7lhPAot3b21V9/AdYx q2HRGcBY0hIedUEvfcLpdOBK3dS4upqiy0O1LO6pqv6FCEGwF/M7wflTcIu8mkm8gBOn QnEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=qmLpXeYW; 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 n59si5750819plb.388.2019.01.31.14.55.30; Thu, 31 Jan 2019 14:55:46 -0800 (PST) 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=qmLpXeYW; 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 S1729349AbfAaVt1 (ORCPT + 99 others); Thu, 31 Jan 2019 16:49:27 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:55052 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728758AbfAaVt1 (ORCPT ); Thu, 31 Jan 2019 16:49:27 -0500 Received: by mail-wm1-f65.google.com with SMTP id a62so4046833wmh.4 for ; Thu, 31 Jan 2019 13:49:25 -0800 (PST) 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=/hX5KDMKgR+lXyknno+hpKg6MWnLWVX48Cnsfqsnspc=; b=qmLpXeYWcHEWhyE7P2gE8DF4YSUTwEzDjJtWZ4xjtWa/n+5yaJocE08bYG7MrZjmXx FS57NtnHJKecyUlQ7XiD//SLig7arDbjSmpEHLBDYXd1gcfi+mrT5IvggQDkAH+8w3CC ZTi48CKGW0Eif/QZISdovqKXS3moSa9wKG8wWsfQaD1HSM1qzTlaj4fE2oGuKd6pu51v ONhVNUzGg6v0dGGQa8QMQAsys5okLES0ZF9yvbGHF0UQ3QVP0mR6YQu84rDq/4BlGri6 fMqSS4Kmka4P5eE4JNxWIqJVt26gR7kpqrp0YinaGXZgfOrMBT5ryqlv6ZIDDT9jBL6d F/mw== 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=/hX5KDMKgR+lXyknno+hpKg6MWnLWVX48Cnsfqsnspc=; b=VYzKpy6Z3EQSuXzjG2MPqZyqY+RABP+iwjCLtMFKET8gW4iGv3o+gOxm/Vvea2thBK 90p1f52i0rLcouLf6Exlpf6x0UgP/LoLzDg7V50DXME3e+0CBGL+C1xh8nTi8IG0zkjc i0VR9sr5MNmvFqI55AahxelwMRiwNW9kdas8uVUmRRpkPjar884EMjtBu8d/2dgtfC4Y 3QORglukaegwIci4sMl8xW5M+eTjX6wUWsudQJyhMZHJwd8cqOWAT6YvDR2pJZ+D908y QYPy3oNms8W9LwZ8eqI675uBjVxPYGw4X9ttesKvmAZJe4FKlfBf25DFhVlreSzwvwOq 9Ecw== X-Gm-Message-State: AJcUukfiGbsxBeTJ7Pk/T5ERPcgsZrSPWEgjtMD6FUeL063zr8kgTnLh 4VVxTih6Xw7VJs+1bu7DmDT7MkJ/R6JyK7bVy/cG X-Received: by 2002:a1c:4046:: with SMTP id n67mr29743285wma.123.1548971364896; Thu, 31 Jan 2019 13:49:24 -0800 (PST) MIME-Version: 1.0 References: <87o97wrbef.fsf@mntmn.com> In-Reply-To: <87o97wrbef.fsf@mntmn.com> From: Bjorn Helgaas Date: Thu, 31 Jan 2019 15:49:12 -0600 Message-ID: Subject: Re: Linux Kernel Regression: HAPS quirk breaks PCIe on i.MX6QP To: "Lukas F. Hartmann" Cc: thinhn@synopsys.com, Greg Kroah-Hartman , Lucas Stach , 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 [+cc linux-pci, linux-kernel] On Thu, Jan 31, 2019 at 11:21 AM Lukas F. Hartmann wrote: > > Hi Thinh, > > I'm writing you because you're the author in this commit: > https://github.com/torvalds/linux/commit/03e6742584af8866ba014874669d0440bed3a623 > > This quirk workaround breaks the PCIe on i.MX6QP, at least on my test > devices. The reason is because the Synposys PCIe IP in i.MX6QP has the > same device ID as the HAPS USB3 controller you are targeting in the > commit: 0xabcd. > > Definition: > > https://github.com/torvalds/linux/blob/master/include/linux/pci_ids.h#L2364 > > Here is a bit of lspci output on my i.MX6QP machine (without the problem): > > mntmn@reform:~/code/linux$ lspci -v > 00:00.0 PCI bridge: Synopsys, Inc. Device abcd (rev 01) (prog-if 00 > ^^^^ > [Normal decode]) > Flags: bus master, fast devsel, latency 0, IRQ 307 > Memory at 01000000 (32-bit, non-prefetchable) [size=1M] > Bus: primary=00, secondary=01, subordinate=ff, sec-latency=0 > ... > > The failure mode is that the PCIe controller shows up as a USB > controller and my ath9k wireless PCIe card cannot be assigned the > proper resources anymore (-ENOMEM even for very small BARs). > > Reverting this commit fixes the problem for me. I suggest to make the > check more specific to the platform/chipset you are targeting. So Synopsys apparently re-used Device ID 0xabcd? That's a pretty bad problem. It looks like we merged 03e6742584af ("PCI: Override Synopsys USB 3.x HAPS device class") for v5.0, and v5.0-final hasn't been released yet, so if we don't hear from Thinh with a resolution, we can still revert it. I set myself a reminder to revert this on Feb 11, but hopefully we'll have a better resolution before then. Bjorn