Message ID | CAOMZO5DU_AbK59WuU8kypC4aoq0KmCN9wa7oFMOHRyXaNEUWOQ@mail.gmail.com |
---|---|
State | Not Applicable |
Delegated to: | Stefano Babic |
Headers | show |
On Tuesday, May 27, 2014 at 02:30:27 PM, Fabio Estevam wrote: > Hi, > > Working on a mx6solo board with PCIe driver enabled in U-boot, I > notice that after doing several reboots a hang is seen on the PCIe > driver: [...] > Any suggestions? Take a look at SR# 1-1347946851 in the FSL internal bug tracker. It looks like the PCIe IP core implementation in the MX6 is bugged in my opinion. Best regards, Marek Vasut
Marek Vasut wrote: > Take a look at SR# 1-1347946851 in the FSL internal bug tracker. It > looks like the PCIe IP core implementation in the MX6 is bugged in my > opinion. Are there any publicly available info regarding this SR? Dave
On Tuesday, May 27, 2014 at 04:43:08 PM, David Müller (ELSOFT AG) wrote: > Marek Vasut wrote: > > Take a look at SR# 1-1347946851 in the FSL internal bug tracker. It > > looks like the PCIe IP core implementation in the MX6 is bugged in my > > opinion. > > Are there any publicly available info regarding this SR? Scrubbed the irrelevant bits: -->8-- Please find a defect report below for the i.MX6DL PCI express driver in current Linux 3.10.17-1.0.0-ga released by Freescale: Priority: High Issue Type: Defect Report Problem Category: Freescale Software Problem Domain: Serial Connectivity Project Name: Freescale SabreSDP Industry Segment: Industrial Target Processor: i.MX6DL Processors Target HW Platform: i.MX6DL SabreSDP Target OS: Linux Target Software Package: Linux imx_3.10.17_1.0.0_ga PC Host System O/S, Version: Not Applicable in this case Reproducibility: Rarely Steps to Reproduce: Prep: 1) Take MX6DL SabreSDP platform 2) Attach Intel i210 PCI express card 3) Install BSP with kernel 3.10.17-1.0.0-ga onto SD card 4) Boot the platform and confirm the i210 is recognized Test: 1) Power on the MX6DL SabreSDP 2) Boot the kernel 3) Verify the SabreSDP recognized the i210 4) When the platform reaches the init process, trigger a software-reboot 5) The software-reboot will put the platform back into U-Boot, so the SabreSDP will again continue from step 2) by booting the kernel automatically. Test steps 2)...5) must be performed at least 10000 times. Expected Results: 10000 of 10000 times, the PCI express i210 card will be recognized by the platform. The PCI express link will always reliably come up. Observed Results: After some hundreds of the soft-reboot cycles, the i210 is not recognized. This is caused by the PCI express link failing to come up. We see "link never came up" message in the kernel log. Description: We perform the test above -- soft-restarting the MX6DL SabreSDP platform with Linux 3.10.17-1.0.0-ga in quick sequences. We would expect for the PCIe link to reliably come up in all of the 10000 cycles, but in some of those cycles, the link fails to come up. Can you please confirm/replicate the issue and provide us with a fix ? --8<-- Best regards, Marek Vasut
Marek Vasut wrote: > Observed Results: After some hundreds of the soft-reboot cycles, the > i210 is not recognized. This is caused by the PCI express link > failing to come up. We see "link never came up" message in the kernel > log. Just a guest but maybe this is "errata #18" of the i210. A little bit off-topic but i'm facing the problem that Linux (kernel 3.14 + some patches) hangs regularly during PCIe initialisation on our custom iMX6 / i210 board. I use an additional delay in imx6_add_pcie_port() as a workaround so far. Dave
On Tue, May 27, 2014 at 9:30 AM, Fabio Estevam <festevam@gmail.com> wrote: > Hi, > > Working on a mx6solo board with PCIe driver enabled in U-boot, I > notice that after doing several reboots a hang is seen on the PCIe > driver: Just an update: we are able now to run overnight tests without PCI hangs. Sorry for the noise, but the hang was caused by a debug code. We still get "link never came up" issue on some boots, but this is a different one.
Hi David, On Wed, May 28, 2014 at 4:40 AM, "David Müller (ELSOFT AG)" <d.mueller@elsoft.ch> wrote: > Marek Vasut wrote: >> Observed Results: After some hundreds of the soft-reboot cycles, the >> i210 is not recognized. This is caused by the PCI express link >> failing to come up. We see "link never came up" message in the kernel >> log. > > Just a guest but maybe this is "errata #18" of the i210. > > A little bit off-topic but i'm facing the problem that Linux (kernel > 3.14 + some patches) hangs regularly during PCIe initialisation on our > custom iMX6 / i210 board. > > I use an additional delay in imx6_add_pcie_port() as a workaround so far. How much of additional delay? Could you please share your patch?
On Wednesday, May 28, 2014 at 06:42:41 PM, Fabio Estevam wrote: > On Tue, May 27, 2014 at 9:30 AM, Fabio Estevam <festevam@gmail.com> wrote: > > Hi, > > > > Working on a mx6solo board with PCIe driver enabled in U-boot, I > > notice that after doing several reboots a hang is seen on the PCIe > > > driver: > Just an update: we are able now to run overnight tests without PCI hangs. > > Sorry for the noise, but the hang was caused by a debug code. > > We still get "link never came up" issue on some boots, but this is a > different one. Does that mean FSL is unable to reliably bring PCIe link up on every boot on their platform please? Best regards, Marek Vasut
--- a/drivers/pci/pcie_imx.c +++ b/drivers/pci/pcie_imx.c @@ -385,7 +385,8 @@ static int imx_pcie_read_config(struct pci_controller *hose, */ imx_pcie_fix_dabt_handler(true); writel(0xffffffff, val); - *val = readl(va_address); + if (0x01ffc000 <= va_address && va_address <= 0x01ffffff) + *val = readl(va_address); imx_pcie_fix_dabt_handler(false); and the hang does not happen. However, not all devices connected to