<?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>i.MX ProcessorsのトピックRe: Real-time process stalls after USB device insertion</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Real-time-process-stalls-after-USB-device-insertion/m-p/1656989#M206503</link>
    <description>&lt;P&gt;For what it's worth, 5.15.71 has the same issue.&amp;nbsp; &amp;nbsp;(and so does the imx8mq running 5.4.24)&lt;/P&gt;&lt;P&gt;More about the methodology...assuming the device has audio ins and outs, configure JACK to use both, with frames=512 (for relatively low latency).&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;/usr/bin/jackd -s -d alsa -p 512 -r 48000 -C hw:your_input -P hw:your_output -i your_channels -o your_channels&lt;/LI-CODE&gt;&lt;P&gt;Connect in to out.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;jack_connect system:capture_1 system:playback_1&lt;/LI-CODE&gt;&lt;P&gt;Supply a signal to 'in' (sine waves, in my case), listen to the output.&amp;nbsp; Insert a USB stick.&amp;nbsp; Listen to the pops and clicks that result, coinciding with the 'scsi' and 'sd' messages sent to the console.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So again, is there any way to reduce the impact of the USB system during enumeration and device recognition, or maybe even just keep it from emitting messages to the console?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;</description>
    <pubDate>Wed, 24 May 2023 19:39:01 GMT</pubDate>
    <dc:creator>johnadamson</dc:creator>
    <dc:date>2023-05-24T19:39:01Z</dc:date>
    <item>
      <title>Real-time process stalls after USB device insertion</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Real-time-process-stalls-after-USB-device-insertion/m-p/1635579#M204387</link>
      <description>&lt;P&gt;Yocto Linux, gatesgarth.&amp;nbsp;&amp;nbsp;We have a thread that must meet a deadline.&amp;nbsp; We start the thread with SCHED_FIFO and set the thread priority to 54.&amp;nbsp; (the policy and number was determined through experimentation) This has worked well on the i.MX8MQ in previous kernels.&amp;nbsp; We then ported the code to the i.MX8MP and gatesgarth, kernel 5.10.9.&amp;nbsp; And for the most part, it still works.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But new to the mix is a USB port with USB type A 2.0 connector.&amp;nbsp; We've used the USB port previously, but the device was hardwired, no connector.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I insert a USB memory stick, the thread misses its deadline, every time.&amp;nbsp; I removed any systemd automounts or other reactions to the stick insertion, only what is built into the kernel remains, AFAICT, but no change.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What follows is what is emitted to dmesg on insertion.&amp;nbsp; &amp;nbsp;Any clues as to what could be going wrong, or what I might do to lower the impact of the USB driver?&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[ 173.488190] usb 1-1.4: New USB device found, idVendor=058f, idProduct=6387, bcdDevice= 1.02&lt;BR /&gt;[ 173.496583] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3&lt;BR /&gt;[ 173.504058] usb 1-1.4: Product: Flash Disk&lt;BR /&gt;[ 173.508349] usb 1-1.4: SerialNumber: 68174233&lt;BR /&gt;[ 173.516238] usb-storage 1-1.4:1.0: USB Mass Storage device detected&lt;BR /&gt;[ 173.522909] scsi host0: usb-storage 1-1.4:1.0&lt;BR /&gt;[ 174.589628] scsi 0:0:0:0: Direct-Access Flash Disk 8.07 PQ: 0 ANSI: 2&lt;BR /&gt;[ 174.599359] sd 0:0:0:0: [sda] 120832 512-byte logical blocks: (61.9 MB/59.0 MiB)&lt;BR /&gt;[ 174.607241] sd 0:0:0:0: [sda] Write Protect is off&lt;BR /&gt;[ 174.612086] sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00&lt;BR /&gt;[ 174.612466] sd 0:0:0:0: [sda] No Caching mode page found&lt;BR /&gt;[ 174.617800] sd 0:0:0:0: [sda] Assuming drive cache: write through&lt;BR /&gt;[ 174.633985] sda: sda1&lt;BR /&gt;[ 174.638844] sd 0:0:0:0: [sda] Attached SCSI removable disk&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2023 17:44:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Real-time-process-stalls-after-USB-device-insertion/m-p/1635579#M204387</guid>
      <dc:creator>johnadamson</dc:creator>
      <dc:date>2023-04-18T17:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: Real-time process stalls after USB device insertion</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Real-time-process-stalls-after-USB-device-insertion/m-p/1636334#M204460</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Sorry but 5.10.9 is not supported by nxp, you should change to 5.15.71 bsp based.&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 14:15:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Real-time-process-stalls-after-USB-device-insertion/m-p/1636334#M204460</guid>
      <dc:creator>Bio_TICFSL</dc:creator>
      <dc:date>2023-04-19T14:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: Real-time process stalls after USB device insertion</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Real-time-process-stalls-after-USB-device-insertion/m-p/1636417#M204473</link>
      <description>&lt;P&gt;This would be a helpful response if it was prefaced by any information indicating that it might actually fix something.&amp;nbsp; Do you have any knowledge of bugs in the 5.10.9 USB code that have been fixed in 5.15?&amp;nbsp; There's a vendor's BSP between my layer and the Freescale layer, and changing kernel versions is a non-trivial exercise.&amp;nbsp; Seems like 5.10.9 was the recommended kernel for the i.MX8MP/gatesgarth at some point.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 16:33:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Real-time-process-stalls-after-USB-device-insertion/m-p/1636417#M204473</guid>
      <dc:creator>johnadamson</dc:creator>
      <dc:date>2023-04-19T16:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: Real-time process stalls after USB device insertion</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Real-time-process-stalls-after-USB-device-insertion/m-p/1656989#M206503</link>
      <description>&lt;P&gt;For what it's worth, 5.15.71 has the same issue.&amp;nbsp; &amp;nbsp;(and so does the imx8mq running 5.4.24)&lt;/P&gt;&lt;P&gt;More about the methodology...assuming the device has audio ins and outs, configure JACK to use both, with frames=512 (for relatively low latency).&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;/usr/bin/jackd -s -d alsa -p 512 -r 48000 -C hw:your_input -P hw:your_output -i your_channels -o your_channels&lt;/LI-CODE&gt;&lt;P&gt;Connect in to out.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;jack_connect system:capture_1 system:playback_1&lt;/LI-CODE&gt;&lt;P&gt;Supply a signal to 'in' (sine waves, in my case), listen to the output.&amp;nbsp; Insert a USB stick.&amp;nbsp; Listen to the pops and clicks that result, coinciding with the 'scsi' and 'sd' messages sent to the console.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So again, is there any way to reduce the impact of the USB system during enumeration and device recognition, or maybe even just keep it from emitting messages to the console?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 19:39:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Real-time-process-stalls-after-USB-device-insertion/m-p/1656989#M206503</guid>
      <dc:creator>johnadamson</dc:creator>
      <dc:date>2023-05-24T19:39:01Z</dc:date>
    </item>
  </channel>
</rss>

