<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: pcie driver failed with errno -22 when request_irq(). in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/pcie-driver-failed-with-errno-22-when-request-irq/m-p/1068072#M156941</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chenguang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.9.88 kernel is very old and not more supported, recommended to&lt;/P&gt;&lt;P&gt;try latest kernels described on link&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applications-processors:IMXLINUX?tab=In-Depth_Tab" title="https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applications-processors:IMXLINUX?tab=In-Depth_Tab"&gt;Embedded Linux for i.MX Applications Processors | NXP&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Jun 2020 23:37:28 GMT</pubDate>
    <dc:creator>igorpadykov</dc:creator>
    <dc:date>2020-06-19T23:37:28Z</dc:date>
    <item>
      <title>pcie driver failed with errno -22 when request_irq().</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/pcie-driver-failed-with-errno-22-when-request-irq/m-p/1068071#M156940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, Experts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been long trapped on failure when&amp;nbsp;loading altera pcie driver .ko module. I am trying to connect IMX8MQ with altera cyclone thru PCIE1.0/1 lane. My kernel is 4.9.88 and demo board is IMX8MQ evk and Terasic C5P, they are connected thru a M.2 to pcie adaptor.&lt;/P&gt;&lt;P&gt;The failure was reported when calling request_irq(), and return -22, which is EINVAL. Then I digged into the kernel and found failure was happened in irq_settings_can_request()&amp;nbsp; (/kernel/irq/manage.c),&amp;nbsp; which means the irq line is not allowed to request.&lt;/P&gt;&lt;P&gt;In the probe function of pcie driver, before request_irq(), I used&amp;nbsp;pci_alloc_irq_vectors(pdev, 1,1, PCI_IRQ_ALL_TYPES) to enable one MSI, following is the debug log:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[ 72.098972] alt_up_pci init(), build at Jun 19 2020 08:57:28&lt;BR /&gt;[ 72.105806] alt_up_pci 0001:01:00.0: enabling device (0000 -&amp;gt; 0002)&lt;BR /&gt;[ 72.112302] pci_enable_device OK. &lt;BR /&gt;[ 72.115856] pci_request_regions OK. &lt;BR /&gt;[ 72.119611] pci_set_dma_mask OK. &lt;BR /&gt;[ 72.123050] pci_set_consistent_dma_mask OK. &lt;BR /&gt;[ 72.127508] alt_up_pci BAR2 initialized.&lt;BR /&gt;[ 72.131749] alt_up_pci BAR4 initialized.&lt;BR /&gt;[ 72.135848] PCIE BAR initialization OK. &lt;BR /&gt;[ 72.139904] alt_up_pci DMA0 initialized as type2. &lt;BR /&gt;[ 72.144890] alt_up_pci_dev_init OK. &lt;BR /&gt;[ 72.148590] pci_alloc_irq_vectors OK. &lt;BR /&gt;[ 72.152470] mydev-&amp;gt;irq_line is 15! &lt;BR /&gt;[ 72.156082] Sanity-check passed!&lt;BR /&gt;[ 72.159431] irq_to_desc passed!&lt;BR /&gt;[ 72.162695] desc-&amp;gt;status_use_accessors value is 68608 &lt;BR /&gt;[ 72.168150] _IRQ_NOREQUEST value is 2048 &lt;BR /&gt;[ 72.172274] _IRQ_PER_CPU_DEVID value is 131072 &lt;BR /&gt;[ 72.176973] return val of request_irq is -22! &lt;BR /&gt;[ 72.181528] pci_request_irq() failed. &lt;BR /&gt;[ 72.185484] alt_up_pci_probe() failed with error: -22&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The status_use_accessors value is 0x10c00, and&amp;nbsp;&lt;SPAN&gt;irq_settings_can_request(), where this value and with _IRQ_NOREQEUST， the result is not zero, so EINVAL returned.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is really puzzled for me. What I am dong wrong ? Attachment is pcie driver.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2020 10:35:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/pcie-driver-failed-with-errno-22-when-request-irq/m-p/1068071#M156940</guid>
      <dc:creator>mcggoal</dc:creator>
      <dc:date>2020-06-19T10:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: pcie driver failed with errno -22 when request_irq().</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/pcie-driver-failed-with-errno-22-when-request-irq/m-p/1068072#M156941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chenguang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.9.88 kernel is very old and not more supported, recommended to&lt;/P&gt;&lt;P&gt;try latest kernels described on link&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applications-processors:IMXLINUX?tab=In-Depth_Tab" title="https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applications-processors:IMXLINUX?tab=In-Depth_Tab"&gt;Embedded Linux for i.MX Applications Processors | NXP&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2020 23:37:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/pcie-driver-failed-with-errno-22-when-request-irq/m-p/1068072#M156941</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2020-06-19T23:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: pcie driver failed with errno -22 when request_irq().</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/pcie-driver-failed-with-errno-22-when-request-irq/m-p/1068073#M156942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, Igor&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Recompile the kernel is too time consuming for me, and my disk space is no allowed to do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could&amp;nbsp;you give some further suggestion based on the 4.9.88 kernel ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2020 03:56:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/pcie-driver-failed-with-errno-22-when-request-irq/m-p/1068073#M156942</guid>
      <dc:creator>mcggoal</dc:creator>
      <dc:date>2020-06-22T03:56:26Z</dc:date>
    </item>
  </channel>
</rss>

