<?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 IMX8QXP USB2.0(device),suspend and resume, causing a memory leak (swiotlb buffer is full ) in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/IMX8QXP-USB2-0-device-suspend-and-resume-causing-a-memory-leak/m-p/1501591#M193473</link>
    <description>&lt;P&gt;board:imx8qxp-mek&lt;/P&gt;&lt;P&gt;code:imx-4.14.98-2.3.1&lt;/P&gt;&lt;P&gt;USB is used as a 2.0 composite device (2 CDC-ACM, 1 CDC-ECM).&lt;/P&gt;&lt;P&gt;when the usb is connect to pc, after multiple suspend/wake-up , there must be a DMA-map allocation failure error, after which any DMA-mapp assignment is&amp;nbsp; failure (looks like an map and umap mismatch)&lt;BR /&gt;--------------------------&lt;BR /&gt;i also test as the following script for USB separately(&lt;FONT color="#FF6600"&gt;usb configfs file as: usb-gadget.sh&lt;/FONT&gt;)&lt;/P&gt;&lt;P&gt;for (( ; ; ))&lt;BR /&gt;do&lt;BR /&gt;&amp;nbsp; &amp;nbsp; echo "" &amp;gt; /sys/kernel/config/usb_gadget/g1/UDC&lt;BR /&gt;&amp;nbsp; &amp;nbsp; msleep 500&lt;BR /&gt;&amp;nbsp; &amp;nbsp; echo "ci_hdrc.0" &amp;gt; /sys/kernel/config/usb_gadget/g1/UDC&lt;BR /&gt;&amp;nbsp; &amp;nbsp; msleep 1000&lt;BR /&gt;&amp;nbsp; &amp;nbsp; test_cnt=$[test_cnt + 1]&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;echo "test_cnt="$test_cnt&lt;BR /&gt;done&lt;/P&gt;&lt;P&gt;After reaching a number of times(about 2500), it can be reproduced.&lt;/P&gt;&lt;P&gt;---------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;some log as follow:&lt;/P&gt;&lt;P&gt;[11:06:11][ 7057.450529] configfs-gadget gadget: high-speed config #1: c&lt;BR /&gt;[11:06:11][ 7057.473679] br0: port 1(unetd0) entered blocking state&lt;BR /&gt;[11:06:11][ 7057.474343] br0: port 1(unetd0) entered forwarding state&lt;BR /&gt;[11:06:11][ 7057.873054] sdhci-esdhc-imx 5b010000.usdhc: swiotlb buffer is full (sz: 4096 bytes)&lt;BR /&gt;[11:06:11][ 7057.874040] sdhci-esdhc-imx 5b010000.usdhc: DMA: Out of SW-IOMMU space for 4096 bytes&lt;BR /&gt;[11:06:11][ 7057.875086] cqhci_dma_map: sg-len: 4&lt;BR /&gt;[11:06:11][ 7057.875545] mmc0: cqhci_prep_tran_desc: unable to map sg lists, -12&lt;BR /&gt;[11:06:11][ 7057.876338] mmc0: cqhci: failed to setup tx desc: -12&lt;BR /&gt;[11:06:11][ 7057.876997] print_req_error: I/O error, dev mmcblk0, sector 4091280&lt;BR /&gt;[11:06:11][ 7057.877851] Aborting journal on device mmcblk0p2-8.&lt;BR /&gt;[11:06:11][ 7057.879411] EXT4-fs error (device mmcblk0p2): ext4_journal_check_start:61: Detected aborted journal&lt;BR /&gt;[11:06:11][ 7057.880562] EXT4-fs (mmcblk0p2): Remounting filesystem read-only&lt;BR /&gt;[11:06:11]test_cnt=40&lt;BR /&gt;[11:06:12][ 7058.478710] br0: port 1(unetd0) entered disabled state&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Aug 2022 06:45:01 GMT</pubDate>
    <dc:creator>awii76</dc:creator>
    <dc:date>2022-08-05T06:45:01Z</dc:date>
    <item>
      <title>IMX8QXP USB2.0(device),suspend and resume, causing a memory leak (swiotlb buffer is full )</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8QXP-USB2-0-device-suspend-and-resume-causing-a-memory-leak/m-p/1501591#M193473</link>
      <description>&lt;P&gt;board:imx8qxp-mek&lt;/P&gt;&lt;P&gt;code:imx-4.14.98-2.3.1&lt;/P&gt;&lt;P&gt;USB is used as a 2.0 composite device (2 CDC-ACM, 1 CDC-ECM).&lt;/P&gt;&lt;P&gt;when the usb is connect to pc, after multiple suspend/wake-up , there must be a DMA-map allocation failure error, after which any DMA-mapp assignment is&amp;nbsp; failure (looks like an map and umap mismatch)&lt;BR /&gt;--------------------------&lt;BR /&gt;i also test as the following script for USB separately(&lt;FONT color="#FF6600"&gt;usb configfs file as: usb-gadget.sh&lt;/FONT&gt;)&lt;/P&gt;&lt;P&gt;for (( ; ; ))&lt;BR /&gt;do&lt;BR /&gt;&amp;nbsp; &amp;nbsp; echo "" &amp;gt; /sys/kernel/config/usb_gadget/g1/UDC&lt;BR /&gt;&amp;nbsp; &amp;nbsp; msleep 500&lt;BR /&gt;&amp;nbsp; &amp;nbsp; echo "ci_hdrc.0" &amp;gt; /sys/kernel/config/usb_gadget/g1/UDC&lt;BR /&gt;&amp;nbsp; &amp;nbsp; msleep 1000&lt;BR /&gt;&amp;nbsp; &amp;nbsp; test_cnt=$[test_cnt + 1]&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;echo "test_cnt="$test_cnt&lt;BR /&gt;done&lt;/P&gt;&lt;P&gt;After reaching a number of times(about 2500), it can be reproduced.&lt;/P&gt;&lt;P&gt;---------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;some log as follow:&lt;/P&gt;&lt;P&gt;[11:06:11][ 7057.450529] configfs-gadget gadget: high-speed config #1: c&lt;BR /&gt;[11:06:11][ 7057.473679] br0: port 1(unetd0) entered blocking state&lt;BR /&gt;[11:06:11][ 7057.474343] br0: port 1(unetd0) entered forwarding state&lt;BR /&gt;[11:06:11][ 7057.873054] sdhci-esdhc-imx 5b010000.usdhc: swiotlb buffer is full (sz: 4096 bytes)&lt;BR /&gt;[11:06:11][ 7057.874040] sdhci-esdhc-imx 5b010000.usdhc: DMA: Out of SW-IOMMU space for 4096 bytes&lt;BR /&gt;[11:06:11][ 7057.875086] cqhci_dma_map: sg-len: 4&lt;BR /&gt;[11:06:11][ 7057.875545] mmc0: cqhci_prep_tran_desc: unable to map sg lists, -12&lt;BR /&gt;[11:06:11][ 7057.876338] mmc0: cqhci: failed to setup tx desc: -12&lt;BR /&gt;[11:06:11][ 7057.876997] print_req_error: I/O error, dev mmcblk0, sector 4091280&lt;BR /&gt;[11:06:11][ 7057.877851] Aborting journal on device mmcblk0p2-8.&lt;BR /&gt;[11:06:11][ 7057.879411] EXT4-fs error (device mmcblk0p2): ext4_journal_check_start:61: Detected aborted journal&lt;BR /&gt;[11:06:11][ 7057.880562] EXT4-fs (mmcblk0p2): Remounting filesystem read-only&lt;BR /&gt;[11:06:11]test_cnt=40&lt;BR /&gt;[11:06:12][ 7058.478710] br0: port 1(unetd0) entered disabled state&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 06:45:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8QXP-USB2-0-device-suspend-and-resume-causing-a-memory-leak/m-p/1501591#M193473</guid>
      <dc:creator>awii76</dc:creator>
      <dc:date>2022-08-05T06:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8QXP USB2.0(device),suspend and resume, causing a memory leak (swiotlb buffer is full )</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8QXP-USB2-0-device-suspend-and-resume-causing-a-memory-leak/m-p/1508755#M194054</link>
      <description>&lt;P&gt;You may try to increase the IO_TLB_SEGSIZE in the include/linux/swiotlb.h.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2022 10:42:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8QXP-USB2-0-device-suspend-and-resume-causing-a-memory-leak/m-p/1508755#M194054</guid>
      <dc:creator>jimmychan</dc:creator>
      <dc:date>2022-08-19T10:42:04Z</dc:date>
    </item>
  </channel>
</rss>

