<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb/mtu3, branch v5.4.151</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.4.151</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.4.151'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-09-12T06:56:41+00:00</updated>
<entry>
<title>usb: mtu3: fix the wrong HS mult value</title>
<updated>2021-09-12T06:56:41+00:00</updated>
<author>
<name>Chunfeng Yun</name>
<email>chunfeng.yun@mediatek.com</email>
</author>
<published>2021-08-13T06:30:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e00d39ca92bbcfd10da652580af33a4873a75567'/>
<id>urn:sha1:e00d39ca92bbcfd10da652580af33a4873a75567</id>
<content type='text'>
commit 44e4439d8f9f8d0e9da767d1f31e7c211081feca upstream.

usb_endpoint_maxp() returns actual max packet size, @mult will
always be zero, fix it by using usb_endpoint_maxp_mult() instead
to get mult.

Fixes: 4d79e042ed8b ("usb: mtu3: add support for usb3.1 IP")
Cc: stable@vger.kernel.org
Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Link: https://lore.kernel.org/r/1628836253-7432-3-git-send-email-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: mtu3: use @mult for HS isoc or intr</title>
<updated>2021-09-12T06:56:41+00:00</updated>
<author>
<name>Chunfeng Yun</name>
<email>chunfeng.yun@mediatek.com</email>
</author>
<published>2021-08-13T06:30:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c3ffd35014708a94acddd97b27847e76c2a250f3'/>
<id>urn:sha1:c3ffd35014708a94acddd97b27847e76c2a250f3</id>
<content type='text'>
commit fd7cb394ec7efccc3985feb0978cee4d352e1817 upstream.

For HS isoc or intr, should use @mult but not @burst
to save mult value.

Fixes: 4d79e042ed8b ("usb: mtu3: add support for usb3.1 IP")
Cc: stable@vger.kernel.org
Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Link: https://lore.kernel.org/r/1628836253-7432-2-git-send-email-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: mtu3: fix memory corruption in mtu3_debugfs_regset()</title>
<updated>2020-12-30T10:50:58+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2020-12-03T08:41:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=57e22590c41b59430d8c2ac54d3496f6f59d2bef'/>
<id>urn:sha1:57e22590c41b59430d8c2ac54d3496f6f59d2bef</id>
<content type='text'>
commit 3f6f6343a29d9ea7429306b83b18e66dc1331d5c upstream.

This code is using the wrong sizeof() so it does not allocate enough
memory.  It allocates 32 bytes but 72 are required.  That will lead to
memory corruption.

Fixes: ae07809255d3 ("usb: mtu3: add debugfs interface files")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Link: https://lore.kernel.org/r/X8ikqc4Mo2/0G72j@mwanda
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: mtu3: fix panic in mtu3_gadget_stop()</title>
<updated>2020-11-10T11:37:33+00:00</updated>
<author>
<name>Macpaul Lin</name>
<email>macpaul.lin@mediatek.com</email>
</author>
<published>2020-11-06T05:54:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b9d91fa921642581ef749f4f6ee2b90f0dba9710'/>
<id>urn:sha1:b9d91fa921642581ef749f4f6ee2b90f0dba9710</id>
<content type='text'>
commit 20914919ad31849ee2b9cfe0428f4a20335c9e2a upstream.

This patch fixes a possible issue when mtu3_gadget_stop()
already assigned NULL to mtu-&gt;gadget_driver during mtu_gadget_disconnect().

[&lt;ffffff9008161974&gt;] notifier_call_chain+0xa4/0x128
[&lt;ffffff9008161fd4&gt;] __atomic_notifier_call_chain+0x84/0x138
[&lt;ffffff9008162ec0&gt;] notify_die+0xb0/0x120
[&lt;ffffff900809e340&gt;] die+0x1f8/0x5d0
[&lt;ffffff90080d03b4&gt;] __do_kernel_fault+0x19c/0x280
[&lt;ffffff90080d04dc&gt;] do_bad_area+0x44/0x140
[&lt;ffffff90080d0f9c&gt;] do_translation_fault+0x4c/0x90
[&lt;ffffff9008080a78&gt;] do_mem_abort+0xb8/0x258
[&lt;ffffff90080849d0&gt;] el1_da+0x24/0x3c
[&lt;ffffff9009bde01c&gt;] mtu3_gadget_disconnect+0xac/0x128
[&lt;ffffff9009bd576c&gt;] mtu3_irq+0x34c/0xc18
[&lt;ffffff90082ac03c&gt;] __handle_irq_event_percpu+0x2ac/0xcd0
[&lt;ffffff90082acae0&gt;] handle_irq_event_percpu+0x80/0x138
[&lt;ffffff90082acc44&gt;] handle_irq_event+0xac/0x148
[&lt;ffffff90082b71cc&gt;] handle_fasteoi_irq+0x234/0x568
[&lt;ffffff90082a8708&gt;] generic_handle_irq+0x48/0x68
[&lt;ffffff90082a96ac&gt;] __handle_domain_irq+0x264/0x1740
[&lt;ffffff90080819f4&gt;] gic_handle_irq+0x14c/0x250
[&lt;ffffff9008084cec&gt;] el1_irq+0xec/0x194
[&lt;ffffff90085b985c&gt;] dma_pool_alloc+0x6e4/0xae0
[&lt;ffffff9008d7f890&gt;] cmdq_mbox_pool_alloc_impl+0xb0/0x238
[&lt;ffffff9008d80904&gt;] cmdq_pkt_alloc_buf+0x2dc/0x7c0
[&lt;ffffff9008d80f60&gt;] cmdq_pkt_add_cmd_buffer+0x178/0x270
[&lt;ffffff9008d82320&gt;] cmdq_pkt_perf_begin+0x108/0x148
[&lt;ffffff9008d824d8&gt;] cmdq_pkt_create+0x178/0x1f0
[&lt;ffffff9008f96230&gt;] mtk_crtc_config_default_path+0x328/0x7a0
[&lt;ffffff90090246cc&gt;] mtk_drm_idlemgr_kick+0xa6c/0x1460
[&lt;ffffff9008f9bbb4&gt;] mtk_drm_crtc_atomic_begin+0x1a4/0x1a68
[&lt;ffffff9008e8df9c&gt;] drm_atomic_helper_commit_planes+0x154/0x878
[&lt;ffffff9008f2fb70&gt;] mtk_atomic_complete.isra.16+0xe80/0x19c8
[&lt;ffffff9008f30910&gt;] mtk_atomic_commit+0x258/0x898
[&lt;ffffff9008ef142c&gt;] drm_atomic_commit+0xcc/0x108
[&lt;ffffff9008ef7cf0&gt;] drm_mode_atomic_ioctl+0x1c20/0x2580
[&lt;ffffff9008ebc768&gt;] drm_ioctl_kernel+0x118/0x1b0
[&lt;ffffff9008ebcde8&gt;] drm_ioctl+0x5c0/0x920
[&lt;ffffff900863b030&gt;] do_vfs_ioctl+0x188/0x1820
[&lt;ffffff900863c754&gt;] SyS_ioctl+0x8c/0xa0

Fixes: df2069acb005 ("usb: Add MediaTek USB3 DRD driver")
Signed-off-by: Macpaul Lin &lt;macpaul.lin@mediatek.com&gt;
Acked-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/1604642069-20961-1-git-send-email-macpaul.lin@mediatek.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: mtu3: clear dual mode of u3port when disable device</title>
<updated>2020-08-19T06:16:02+00:00</updated>
<author>
<name>Chunfeng Yun</name>
<email>chunfeng.yun@mediatek.com</email>
</author>
<published>2020-07-27T07:14:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0e76c2ffb8f0bd347e749e1ada2ca64ac1ce75fe'/>
<id>urn:sha1:0e76c2ffb8f0bd347e749e1ada2ca64ac1ce75fe</id>
<content type='text'>
[ Upstream commit f1e51e99ed498d4aa9ae5df28e43d558ea627781 ]

If not clear u3port's dual mode when disable device, the IP
will fail to enter sleep mode when suspend.

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Link: https://lore.kernel.org/r/1595834101-13094-10-git-send-email-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 missing include of mtu3_dr.h</title>
<updated>2019-10-27T06:58:44+00:00</updated>
<author>
<name>Ben Dooks (Codethink)</name>
<email>ben.dooks@codethink.co.uk</email>
</author>
<published>2019-10-17T17:27:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b26a4052cf9a93672f154976de14705fbf8a8179'/>
<id>urn:sha1:b26a4052cf9a93672f154976de14705fbf8a8179</id>
<content type='text'>
The declarations of ssusb_gadget_{init,exit} are
in the mtu3_dr.h file but the code does that implements
them does not include this. Add the include to fix the
following sparse warnigns:

drivers/usb/mtu3/mtu3_core.c:825:5: warning: symbol 'ssusb_gadget_init' was not declared. Should it be static?
drivers/usb/mtu3/mtu3_core.c:925:6: warning: symbol 'ssusb_gadget_exit' was not declared. Should it be static?

Acked-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Signed-off-by: Ben Dooks &lt;ben.dooks@codethink.co.uk&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: mtu3: register a USB Role Switch for dual role mode</title>
<updated>2019-09-03T18:02:15+00:00</updated>
<author>
<name>Chunfeng Yun</name>
<email>chunfeng.yun@mediatek.com</email>
</author>
<published>2019-08-29T09:22:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1ac91ac5d097c1928efe6691d72c619462a9e3c5'/>
<id>urn:sha1:1ac91ac5d097c1928efe6691d72c619462a9e3c5</id>
<content type='text'>
Because extcon is not allowed for new bindings, and the
dual role switch is supported by USB Role Switch,
especially for Type-C drivers, so register a USB Role
Switch to support the new way

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Link: https://lore.kernel.org/r/1567070558-29417-12-git-send-email-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: Remove dev_err() usage after platform_get_irq()</title>
<updated>2019-07-30T18:29:18+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>swboyd@chromium.org</email>
</author>
<published>2019-07-30T18:15:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b33f37064b743d4c5771d3bfc65976790b7396cc'/>
<id>urn:sha1:b33f37064b743d4c5771d3bfc65976790b7396cc</id>
<content type='text'>
We don't need dev_err() messages when platform_get_irq() fails now that
platform_get_irq() prints an error message itself when something goes
wrong. Let's remove these prints with a simple semantic patch.

// &lt;smpl&gt;
@@
expression ret;
struct platform_device *E;
@@

ret =
(
platform_get_irq(E, ...)
|
platform_get_irq_byname(E, ...)
);

if ( \( ret &lt; 0 \| ret &lt;= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// &lt;/smpl&gt;

While we're here, remove braces on if statements that only have one
statement (manually).

Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Link: https://lore.kernel.org/r/20190730181557.90391-47-swboyd@chromium.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "usb: mtu3: fix up undefined reference to usb_debug_root"</title>
<updated>2019-06-10T17:43:57+00:00</updated>
<author>
<name>Chunfeng Yun</name>
<email>chunfeng.yun@mediatek.com</email>
</author>
<published>2019-06-10T02:52:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e137d34f94ebcb6508d7c8614ac045583fffbe2a'/>
<id>urn:sha1:e137d34f94ebcb6508d7c8614ac045583fffbe2a</id>
<content type='text'>
It's not needed after [1] is applied, because usb_debug_root is created
by usb common core but not usbcore now.

[1] 812086d362a1 ("USB: move usb debugfs directory creation to the usb common core")

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: mtu3: fix up undefined reference to usb_debug_root</title>
<updated>2019-05-21T08:08:56+00:00</updated>
<author>
<name>Chunfeng Yun</name>
<email>chunfeng.yun@mediatek.com</email>
</author>
<published>2019-05-05T06:02:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9610450ea31eb061b9914de2bf6ced424956182d'/>
<id>urn:sha1:9610450ea31eb061b9914de2bf6ced424956182d</id>
<content type='text'>
When CONFIG_USB is not set, and CONFIG_USB_GADGET is set,
there is an issue:

ld:
drivers/usb/mtu3/mtu3_debugfs.o: in function 'ssusb_debugfs_create_root':
mtu3_debugfs.c:(.text+0xba3): undefined reference to 'usb_debug_root'

usb_debug_root is only built when CONFIG_USB is enabled, so here drop it
and use NULL instead.

Reported-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt; # build-tested
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
