Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp414042ybf; Wed, 26 Feb 2020 15:40:46 -0800 (PST) X-Google-Smtp-Source: APXvYqwJ4v8fmVnQFBQW0YB/piOSVR4UYrl/Z8Esmy07NWu9ZGhqeZDCNu5pdAGMq9P/WRj7Ych5 X-Received: by 2002:a9d:aea:: with SMTP id 97mr1064766otq.51.1582760446559; Wed, 26 Feb 2020 15:40:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582760446; cv=none; d=google.com; s=arc-20160816; b=CNM6vDaeLG9xk2Ggb22qrOMh3MCdYB1lHyZDoCORDMpk1lTIh0qmF5p2rx9FwKsjoJ xCFHPY3o6hVsC4lN9yFjpc0uRF2SegiOPyLnzvVQoLXnOaeLhxa/1l17vJO9F3c2TTiH 8NWmk4wVZW+i5DGSLp/tOhcjHbzek8lkL2llVHO3LPG/DhZwEKGdoqu1SzNv7gOHthpL wkDGPiTR7wKZDxqxZS9bqqbR5CoZg0VoU2CFEGxaX3JYPTBUEJqMXP/qSI26/xlMTFLu S9dwH5JOyJUmdu+rfnORvYdDHIJtAl0E93E1JIpkDrTBocXIN6+7W1q8DbFYYQPTSub7 v7Dw== 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=/zvwuQzMVyu/TdqK56I2p7OTWodLcL8mzDknB3/DWOE=; b=tX9CIUitEuSzYXNOnU+Pw4b2Jgoni4JpU+8Wn104+3hm+8ylWaWuCRqmUWlRsvg0T2 RKi5i0kvt7l9N4RRQJFljbbF/oPzA0kHlN+3Re5FdxViRrVN/xATVrhpZidATaYJWPFc ZpKEccw2w6QXA/N68lj4BjCZmm6JtgqaSlDotxFHy1C0SWvFt/qrnaMK8z4D18RRzuQG EE4yXCm0NILZ07/oo/BZHc1fzaZuez57g5MDLB405SwfJp1YHoLbXHQO7g2OBsYX+GjQ SZDimyIZ67Q2N1gO7nMJaph+qyMa0a1dJrCAphP63Khi0XCUB/qP8CPotWh+aLePjEtM 8woQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XI6hYN+N; 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 t20si329856oih.70.2020.02.26.15.40.34; Wed, 26 Feb 2020 15:40: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=@gmail.com header.s=20161025 header.b=XI6hYN+N; 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 S1727979AbgBZXka (ORCPT + 99 others); Wed, 26 Feb 2020 18:40:30 -0500 Received: from mail-lj1-f173.google.com ([209.85.208.173]:41767 "EHLO mail-lj1-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727935AbgBZXk3 (ORCPT ); Wed, 26 Feb 2020 18:40:29 -0500 Received: by mail-lj1-f173.google.com with SMTP id h23so1124165ljc.8; Wed, 26 Feb 2020 15:40:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/zvwuQzMVyu/TdqK56I2p7OTWodLcL8mzDknB3/DWOE=; b=XI6hYN+NzZh/3ZislvkBSf4E7btI9gXm0ArDRVNuwWX9/kaHdAjXTvgMDWCvhtGUIW Dl97JEHdcSjr6tczhNN8zlMURx8PoCZBVEM5BZpjPcJCMzIjMfXPtjqJA2YTIUBrZkDw DZ+BxF9ReLYoSoUwIFSO3UI+ScKklW3LmS2vJ5dcX6Wejjcj2nTzCE2K54AK2BZ3bEqL 84fp3Kw83xfC8r3NMPJAeMqKERf56bxUVoQJhZ2B8BH9bhwSyvjNHYL96+M4mcneKbmr VaGDqFWnJ76qFBBjuIJYjzo5nn5MmgJAiSxTwbLCiQT9b268UvcETkSMRDuT04GP8UzU ePNQ== 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=/zvwuQzMVyu/TdqK56I2p7OTWodLcL8mzDknB3/DWOE=; b=le0m3Yw9pVSfz1yKgddGMFcq6IM5IFgfq2ctnET5UZt2VOy7q9WXVXE+8tZ8e8hp0i w6eitWNiC2wy+r9dLjONQAjEu2DAe7FpZ+ZPy2F0ZzXyNv1OfrUE8DpF+AQJMEIWVZEh r48BHx2AoftCyPndSK2lWEfq3dQzm1S8Kzi13iTxFRD2sb7l8tOTmhGtqRLr6RwTfq8v 7UB8PGKAicF8/3foG8ZeHK+cyVhCN56t5PIz2DYo4ZydqKhCbUqVF2Ib8rMRp0triPZS fn7mWOASIS+/f9YoPdoki7mJkDA5vt0E69tQsIWaaAEV3x1p6jbJsocEbNt0HikWeq1C Ow3A== X-Gm-Message-State: ANhLgQ27l5klWOfqi/JNXpj5e5WCYsjiv1CPAxbZg7WJHsFVbSknHicr HwiWZjRZf8UKZYbHhPkQds9ujSylBLzI0pv22dA= X-Received: by 2002:a2e:b78e:: with SMTP id n14mr842381ljo.269.1582760426044; Wed, 26 Feb 2020 15:40:26 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Fabio Estevam Date: Wed, 26 Feb 2020 20:40:23 -0300 Message-ID: Subject: Re: Help needed in understanding weird PCIe issue on imx6q (PCIe just goes bad) To: Fawad Lateef Cc: Linux Kernel Mailing List , linux-pci@vger.kernel.org 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 Hi Fawad, On Sat, Feb 22, 2020 at 12:26 PM Fawad Lateef wrote: > > Hello, > > I am trying to figure-out an issue on our i.MX6Q platform based design > where PCIe interface goes bad. > > We have a Phytec i.MX6Q eMMC SOM, attached to our custom designed > board. PCIe root-complex from i.MX6Q is attached to PLX switch > (PEX8605). > > Linux kernel version is 4.19.9x and also 4.14.134 (from phytec's Does it happen with 5.4 or 5.5 too? Which dts are you using? > Then I enable the #PERST pin of PLX switch, everything is still good > (no rescan on Linux is done yet) > > ~ # echo 139 > /sys/class/gpio/export > ~ # echo out > /sys/class/gpio/gpio139/direction > ~ # echo 1 > /sys/class/gpio/gpio139/value Not sure why you toggle the PERST pin from userspace. You should do it via reset-gpio property in the device tree.