<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/usb/dwc2, branch linux-5.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-06-22T12:28:07Z</updated>
<entry>
<title>usb: dwc2: Fix memory leak in dwc2_hcd_init</title>
<updated>2022-06-22T12:28:07Z</updated>
<author>
<name>Miaoqian Lin</name>
</author>
<published>2022-05-30T08:54:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=52bfcedbfd5bf962dbdcb6e761f4d0dd3ba26dfd'/>
<id>urn:sha1:52bfcedbfd5bf962dbdcb6e761f4d0dd3ba26dfd</id>
<content type='text'>
commit 3755278f078460b021cd0384562977bf2039a57a upstream.

usb_create_hcd will alloc memory for hcd, and we should
call usb_put_hcd to free it when platform_get_resource()
fails to prevent memory leak.
goto error2 label instead error1 to fix this.

Fixes: 856e6e8e0f93 ("usb: dwc2: check return value after calling platform_get_resource()")
Cc: stable &lt;stable@kernel.org&gt;
Acked-by: Minas Harutyunyan &lt;hminas@synopsys.com&gt;
Signed-off-by: Miaoqian Lin &lt;linmq006@gmail.com&gt;
Link: https://lore.kernel.org/r/20220530085413.44068-1-linmq006@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: gadget: don't reset gadget's driver-&gt;bus</title>
<updated>2022-06-14T16:45:10Z</updated>
<author>
<name>Marek Szyprowski</name>
</author>
<published>2022-05-05T10:46:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d2159feb9d28ce496d77df98313ab454646372ac'/>
<id>urn:sha1:d2159feb9d28ce496d77df98313ab454646372ac</id>
<content type='text'>
[ Upstream commit 3120aac6d0ecd9accf56894aeac0e265f74d3d5a ]

UDC driver should not touch gadget's driver internals, especially it
should not reset driver-&gt;bus. This wasn't harmful so far, but since
commit fc274c1e9973 ("USB: gadget: Add a new bus for gadgets") gadget
subsystem got it's own bus and messing with -&gt;bus triggers the
following NULL pointer dereference:

dwc2 12480000.hsotg: bound driver g_ether
8&lt;--- cut here ---
Unable to handle kernel NULL pointer dereference at virtual address 00000000
[00000000] *pgd=00000000
Internal error: Oops: 5 [#1] SMP ARM
Modules linked in: ...
CPU: 0 PID: 620 Comm: modprobe Not tainted 5.18.0-rc5-next-20220504 #11862
Hardware name: Samsung Exynos (Flattened Device Tree)
PC is at module_add_driver+0x44/0xe8
LR is at sysfs_do_create_link_sd+0x84/0xe0
...
Process modprobe (pid: 620, stack limit = 0x(ptrval))
...
 module_add_driver from bus_add_driver+0xf4/0x1e4
 bus_add_driver from driver_register+0x78/0x10c
 driver_register from usb_gadget_register_driver_owner+0x40/0xb4
 usb_gadget_register_driver_owner from do_one_initcall+0x44/0x1e0
 do_one_initcall from do_init_module+0x44/0x1c8
 do_init_module from load_module+0x19b8/0x1b9c
 load_module from sys_finit_module+0xdc/0xfc
 sys_finit_module from ret_fast_syscall+0x0/0x54
Exception stack(0xf1771fa8 to 0xf1771ff0)
...
dwc2 12480000.hsotg: new device is high-speed
---[ end trace 0000000000000000 ]---

Fix this by removing driver-&gt;bus entry reset.

Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Link: https://lore.kernel.org/r/20220505104618.22729-1-m.szyprowski@samsung.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>Merge 5.17-rc6 into usb-next</title>
<updated>2022-02-28T20:42:36Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2022-02-28T20:42:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ca9400ef7f6793288db95ca658dede6e71e777d6'/>
<id>urn:sha1:ca9400ef7f6793288db95ca658dede6e71e777d6</id>
<content type='text'>
We need the USB fixes in here, and it resolves a merge conflict in:
	drivers/usb/dwc3/dwc3-pci.c

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: drd: fix soft connect when gadget is unconfigured</title>
<updated>2022-02-17T15:10:21Z</updated>
<author>
<name>Fabrice Gasnier</name>
</author>
<published>2022-02-16T08:12:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=32fde84362c40961726a5c91f35ad37355ccc0c6'/>
<id>urn:sha1:32fde84362c40961726a5c91f35ad37355ccc0c6</id>
<content type='text'>
When the gadget driver hasn't been (yet) configured, and the cable is
connected to a HOST, the SFTDISCON gets cleared unconditionally, so the
HOST tries to enumerate it.
At the host side, this can result in a stuck USB port or worse. When
getting lucky, some dmesg can be observed at the host side:
 new high-speed USB device number ...
 device descriptor read/64, error -110

Fix it in drd, by checking the enabled flag before calling
dwc2_hsotg_core_connect(). It will be called later, once configured,
by the normal flow:
- udc_bind_to_driver
 - usb_gadget_connect
   - dwc2_hsotg_pullup
     - dwc2_hsotg_core_connect

Fixes: 17f934024e84 ("usb: dwc2: override PHY input signals with usb role switch support")
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Fabrice Gasnier &lt;fabrice.gasnier@foss.st.com&gt;
Link: https://lore.kernel.org/r/1644999135-13478-1-git-send-email-fabrice.gasnier@foss.st.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: Add platform specific data for Intel's Agilex</title>
<updated>2022-02-11T10:15:22Z</updated>
<author>
<name>Dinh Nguyen</name>
</author>
<published>2022-01-25T16:18:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3d8d3504d23351bcbab7be08f82c5dfabc3c9e0a'/>
<id>urn:sha1:3d8d3504d23351bcbab7be08f82c5dfabc3c9e0a</id>
<content type='text'>
The DWC2 IP on the Agilex platform does not support clock-gating.

Acked-by: Minas Harutyunyan &lt;Minas.Harutyunyan@synopsys.com&gt;
Signed-off-by: Dinh Nguyen &lt;dinguyen@kernel.org&gt;
Link: https://lore.kernel.org/r/20220125161821.1951906-2-dinguyen@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: gadget: don't try to disable ep0 in dwc2_hsotg_suspend</title>
<updated>2022-01-26T12:49:35Z</updated>
<author>
<name>Amelie Delaunay</name>
</author>
<published>2021-12-07T13:01:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ac55d163855924aa5af9f1560977da8f346963c8'/>
<id>urn:sha1:ac55d163855924aa5af9f1560977da8f346963c8</id>
<content type='text'>
Calling dwc2_hsotg_ep_disable on ep0 (in/out) will lead to the following
logs before returning -EINVAL:
dwc2 49000000.usb-otg: dwc2_hsotg_ep_disable: called for ep0
dwc2 49000000.usb-otg: dwc2_hsotg_ep_disable: called for ep0

To avoid these two logs while suspending, start disabling the endpoint
from the index 1, as done in dwc2_hsotg_udc_stop:

	/* all endpoints should be shutdown */
	for (ep = 1; ep &lt; hsotg-&gt;num_of_eps; ep++) {
		if (hsotg-&gt;eps_in[ep])
			dwc2_hsotg_ep_disable_lock(&amp;hsotg-&gt;eps_in[ep]-&gt;ep);
		if (hsotg-&gt;eps_out[ep])
			dwc2_hsotg_ep_disable_lock(&amp;hsotg-&gt;eps_out[ep]-&gt;ep);
	}

Acked-by: Minas Harutyunyan &lt;Minas.Harutyunyan@synopsys.com&gt;
Signed-off-by: Amelie Delaunay &lt;amelie.delaunay@foss.st.com&gt;
Link: https://lore.kernel.org/r/20211207130101.270314-1-amelie.delaunay@foss.st.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: gadget: initialize max_speed from params</title>
<updated>2022-01-06T14:28:12Z</updated>
<author>
<name>John Keeping</name>
</author>
<published>2022-01-06T11:57:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=92ef98a4caacad6d4a1490dda45d81ae5ccf5bc9'/>
<id>urn:sha1:92ef98a4caacad6d4a1490dda45d81ae5ccf5bc9</id>
<content type='text'>
DWC2 may be paired with a full-speed PHY which is not capable of
high-speed operation.  Report this correctly to the gadget core by
setting max_speed from the core parameters.

Prior to commit 5324bad66f09f ("usb: dwc2: gadget: implement
udc_set_speed()") this didn't cause the hardware to be configured
incorrectly, although the speed may have been reported incorrectly.  But
after that commit params.speed is updated based on a value passed in by
the gadget core which may set it to a faster speed than is supported by
the hardware.  Initialising the max_speed parameter ensures the speed
passed to dwc2_gadget_set_speed() will be one supported by the hardware.

Fixes: 5324bad66f09f ("usb: dwc2: gadget: implement udc_set_speed()")
Acked-by: Minas Harutyunyan &lt;Minas.Harutyunyan@synopsys.com&gt;
Signed-off-by: John Keeping &lt;john@metanate.com&gt;
Link: https://lore.kernel.org/r/20220106115731.1473909-1-john@metanate.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: do not gate off the hardware if it does not support clock gating</title>
<updated>2022-01-06T14:27:53Z</updated>
<author>
<name>Dinh Nguyen</name>
</author>
<published>2022-01-04T13:59:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=34146c68083f1aef6709196b3dc888c1ceffd357'/>
<id>urn:sha1:34146c68083f1aef6709196b3dc888c1ceffd357</id>
<content type='text'>
We should not be clearing the HCD_FLAG_HW_ACCESSIBLE bit if the hardware
does not support clock gating.

Fixes: 50fb0c128b6e ("usb: dwc2: Add clock gating entering flow by system suspend")
Acked-by: Minas Harutyunyan &lt;Minas.Harutyunyan@synopsys.com&gt;
Signed-off-by: Dinh Nguyen &lt;dinguyen@kernel.org&gt;
Link: https://lore.kernel.org/r/20220104135922.734776-1-dinguyen@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: Simplify a bitmap declaration</title>
<updated>2021-12-30T12:16:13Z</updated>
<author>
<name>Christophe JAILLET</name>
</author>
<published>2021-12-23T07:40:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=db3e8244bd1c46f5a416fd1e6821036ecc59884a'/>
<id>urn:sha1:db3e8244bd1c46f5a416fd1e6821036ecc59884a</id>
<content type='text'>
Use DECLARE_BITMAP() instead of hand writing it.

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Link: https://lore.kernel.org/r/a2bf604d26dbe9816fdaae0faf4b4837ecacc6d3.1640245180.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 5.16-rc6 into usb-next</title>
<updated>2021-12-20T08:58:10Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2021-12-20T08:58:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=236c9ad1f87088bb07ebdd136b8432f83dfd1e14'/>
<id>urn:sha1:236c9ad1f87088bb07ebdd136b8432f83dfd1e14</id>
<content type='text'>
We need the USB fixes in here as well.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
