<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/usb/mtu3, branch linux-6.3.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.3.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.3.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-05-11T14:17:27Z</updated>
<entry>
<title>usb: mtu3: fix kernel panic at qmu transfer done irq handler</title>
<updated>2023-05-11T14:17:27Z</updated>
<author>
<name>Chunfeng Yun</name>
</author>
<published>2023-04-17T02:51:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3a7d4959560a2ee493ef222e3b63d359365f41ec'/>
<id>urn:sha1:3a7d4959560a2ee493ef222e3b63d359365f41ec</id>
<content type='text'>
[ Upstream commit d28f4091ea7ec3510fd6a3c6d433234e7a2bef14 ]

When handle qmu transfer irq, it will unlock @mtu-&gt;lock before give back
request, if another thread handle disconnect event at the same time, and
try to disable ep, it may lock @mtu-&gt;lock and free qmu ring, then qmu
irq hanlder may get a NULL gpd, avoid the KE by checking gpd's value before
handling it.

e.g.
qmu done irq on cpu0                 thread running on cpu1

qmu_done_tx()
  handle gpd [0]
    mtu3_requ_complete()        mtu3_gadget_ep_disable()
      unlock @mtu-&gt;lock
        give back request         lock @mtu-&gt;lock
                                    mtu3_ep_disable()
                                      mtu3_gpd_ring_free()
                                   unlock @mtu-&gt;lock
      lock @mtu-&gt;lock
    get next gpd [1]

[1]: goto [0] to handle next gpd, and next gpd may be NULL.

Fixes: 48e0d3735aa5 ("usb: mtu3: supports new QMU format")
Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Link: https://lore.kernel.org/r/20230417025203.18097-3-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>usb: mtu3: fix the failure of qmu stop</title>
<updated>2023-01-19T13:12:08Z</updated>
<author>
<name>Chunfeng Yun</name>
</author>
<published>2023-01-19T03:33:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5aba179c34291ef67206bce6fa0fe0873c8dfc4e'/>
<id>urn:sha1:5aba179c34291ef67206bce6fa0fe0873c8dfc4e</id>
<content type='text'>
This happens when do stress test of uvc stream on/off which will
enable/disable endpoints. uvc has four tx requests, and may disable
endpoint between queue tx requests as following:
    enable ep --&gt; start qmu
    queue tx request0
    queue tx request1
    queue tx request2 --&gt; resume qmu
    disable ep --&gt; stop qmu may fail [1]
    queue tx request3 --&gt; will resume qmu, may cause qmu can't work
                          when enable ep next time [2]

[1]: when the tx fifo has some data to transmit, and
    try to stop qmu (stop ep) meanwhile resume qmu (queue tx request),
    it may cause stop qmu timeout, then can be fixed by flushing fifo
    when stop qmu.
[2]: it resumes qmu again, shall stop qmu again.

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Reported-by: Min Guo &lt;min.guo@mediatek.com&gt;
Link: https://lore.kernel.org/r/20230119033322.21426-1-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: mtu3: fix failed runtime suspend in host only mode</title>
<updated>2022-09-30T11:55:48Z</updated>
<author>
<name>Chunfeng Yun</name>
</author>
<published>2022-09-29T06:44:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1c703e29da5efac6180e4c189029fa34b7e48e97'/>
<id>urn:sha1:1c703e29da5efac6180e4c189029fa34b7e48e97</id>
<content type='text'>
When the dr_mode is "host", after the host enter runtime suspend,
the mtu3 can't do it, because the mtu3's device wakeup function is
not enabled, instead it's enabled in gadget init function, to fix
the issue, init wakeup early in mtu3's probe()

Fixes: 6b587394c65c ("usb: mtu3: support suspend/resume for dual-role mode")
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Reported-by: Tianping Fang &lt;tianping.fang@mediatek.com&gt;
Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Link: https://lore.kernel.org/r/20220929064459.32522-1-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'trace-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace</title>
<updated>2022-08-05T16:41:12Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2022-08-05T16:41:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=965a9d75e3d250088a269e0c903e86fe775b48c6'/>
<id>urn:sha1:965a9d75e3d250088a269e0c903e86fe775b48c6</id>
<content type='text'>
Pull tracing updates from Steven Rostedt:

 - Runtime verification infrastructure

   This is the biggest change here. It introduces the runtime
   verification that is necessary for running Linux on safety critical
   systems.

   It allows for deterministic automata models to be inserted into the
   kernel that will attach to tracepoints, where the information on
   these tracepoints will move the model from state to state.

   If a state is encountered that does not belong to the model, it will
   then activate a given reactor, that could just inform the user or
   even panic the kernel (for which safety critical systems will detect
   and can recover from).

 - Two monitor models are also added: Wakeup In Preemptive (WIP - not to
   be confused with "work in progress"), and Wakeup While Not Running
   (WWNR).

 - Added __vstring() helper to the TRACE_EVENT() macro to replace
   several vsnprintf() usages that were all doing it wrong.

 - eprobes now can have their event autogenerated when the event name is
   left off.

 - The rest is various cleanups and fixes.

* tag 'trace-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (50 commits)
  rv: Unlock on error path in rv_unregister_reactor()
  tracing: Use alignof__(struct {type b;}) instead of offsetof()
  tracing/eprobe: Show syntax error logs in error_log file
  scripts/tracing: Fix typo 'the the' in comment
  tracepoints: It is CONFIG_TRACEPOINTS not CONFIG_TRACEPOINT
  tracing: Use free_trace_buffer() in allocate_trace_buffers()
  tracing: Use a struct alignof to determine trace event field alignment
  rv/reactor: Add the panic reactor
  rv/reactor: Add the printk reactor
  rv/monitor: Add the wwnr monitor
  rv/monitor: Add the wip monitor
  rv/monitor: Add the wip monitor skeleton created by dot2k
  Documentation/rv: Add deterministic automata instrumentation documentation
  Documentation/rv: Add deterministic automata monitor synthesis documentation
  tools/rv: Add dot2k
  Documentation/rv: Add deterministic automaton documentation
  tools/rv: Add dot2c
  Documentation/rv: Add a basic documentation
  rv/include: Add instrumentation helper functions
  rv/include: Add deterministic automata monitor definition via C macros
  ...
</content>
</entry>
<entry>
<title>USB: mtu3: tracing: Use the new __vstring() helper</title>
<updated>2022-07-24T23:11:18Z</updated>
<author>
<name>Steven Rostedt (Google)</name>
</author>
<published>2022-07-19T15:27:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=730dbb8ddac6b92573658c3cb03555df1bdf95aa'/>
<id>urn:sha1:730dbb8ddac6b92573658c3cb03555df1bdf95aa</id>
<content type='text'>
Instead of open coding a __dynamic_array() with a fixed length (which
defeats the purpose of the dynamic array in the first place). Use the new
__vstring() helper that will use a va_list and only write enough of the
string into the ring buffer that is needed.

Link: https://lkml.kernel.org/r/20220719112719.17e796c6@gandalf.local.home

Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: linux-usb@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mediatek@lists.infradead.org
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Tested-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>usb: mtu3: support function remote wakeup</title>
<updated>2022-07-08T12:53:30Z</updated>
<author>
<name>Chunfeng Yun</name>
</author>
<published>2022-07-08T07:19:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1742b765982cd6d9d5e76ba040598981d53e0a0f'/>
<id>urn:sha1:1742b765982cd6d9d5e76ba040598981d53e0a0f</id>
<content type='text'>
Add function wake notification to support function remote wakeup,
currently assume the composite device only enable function wake
for the first interface.

Forward request to function driver when the recipient is an interface,
including:
GetStatus() request to the first interface in a function returns the
information about 'function remote wakeup' and 'function remote wakeup
capalbe';
SetFeature request of FUNCTION_SUSPEND to an interface recipient, the
controller driver saves the suspend option;

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Link: https://lore.kernel.org/r/20220708071903.25752-5-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: mtu3: check capability of usb3 dual role</title>
<updated>2022-07-08T12:53:26Z</updated>
<author>
<name>Chunfeng Yun</name>
</author>
<published>2022-07-08T07:19:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=683ff6e485f1d16fe3ad4f5fbd04af11ce917caf'/>
<id>urn:sha1:683ff6e485f1d16fe3ad4f5fbd04af11ce917caf</id>
<content type='text'>
It is capable of supporting usb3 dual role if there is at least one
usb3 port for device and xhci controller, we can check it from the
controller's capability, so no need the property "mediatek,usb3-drd"
anymore, but I find the property is not decribed in dt-binding.
Meanwhile, also take into account if the u3 port is disabled when the
u3 phy is shared with pcie.

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Link: https://lore.kernel.org/r/20220708071903.25752-4-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: mtu3: add feature to disable device's usb3 port</title>
<updated>2022-07-08T12:53:23Z</updated>
<author>
<name>Chunfeng Yun</name>
</author>
<published>2022-07-08T07:19:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=269f49ff381aade6cfd20deeae86a8af7ae35b5a'/>
<id>urn:sha1:269f49ff381aade6cfd20deeae86a8af7ae35b5a</id>
<content type='text'>
We may want to disable device's usb3 port when the combo phy is switched
from usb3 mode to pcie mode for some projects.
Meanwhile rename member @is_u3_ip to @u3_capable to avoid misleading, due
to the member's value may be changed when disable usb3 port, but the
controller is still a usb3 IP which also tells us how to manage the fifo.

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Link: https://lore.kernel.org/r/20220708071903.25752-3-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: mtu3: print endpoint type as string</title>
<updated>2022-07-08T12:53:18Z</updated>
<author>
<name>Chunfeng Yun</name>
</author>
<published>2022-07-08T07:19:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3cb7982207260e91cd7ba77120ba2e0613c8dbf2'/>
<id>urn:sha1:3cb7982207260e91cd7ba77120ba2e0613c8dbf2</id>
<content type='text'>
Print endpoint type as string instead of decimal value to make
the log more readable.

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Link: https://lore.kernel.org/r/20220708071903.25752-2-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: mtu3: register mtu3_irq by threaded irq</title>
<updated>2022-06-10T09:52:52Z</updated>
<author>
<name>Chunfeng Yun</name>
</author>
<published>2022-06-09T07:42:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=13118959cb1a67eb80bf06152e35e0df733615e2'/>
<id>urn:sha1:13118959cb1a67eb80bf06152e35e0df733615e2</id>
<content type='text'>
Use threaded irq to improve time consuming top-half

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Link: https://lore.kernel.org/r/20220609074233.15532-3-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
