<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/drivers/usb/musb, branch v5.16</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>https://git.kobert.dev/pm24.git/atom/drivers/usb/musb?h=v5.16</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom/drivers/usb/musb?h=v5.16'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2021-10-22T09:12:45Z</updated>
<entry>
<title>usb: musb: Balance list entry in musb_gadget_queue</title>
<updated>2021-10-22T09:12:45Z</updated>
<author>
<name>Viraj Shah</name>
<email>viraj.shah@linutronix.de</email>
</author>
<published>2021-10-21T09:36:44Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=21b5fcdccb32ff09b6b63d4a83c037150665a83f'/>
<id>urn:sha1:21b5fcdccb32ff09b6b63d4a83c037150665a83f</id>
<content type='text'>
musb_gadget_queue() adds the passed request to musb_ep::req_list. If the
endpoint is idle and it is the first request then it invokes
musb_queue_resume_work(). If the function returns an error then the
error is passed to the caller without any clean-up and the request
remains enqueued on the list. If the caller enqueues the request again
then the list corrupts.

Remove the request from the list on error.

Fixes: ea2f35c01d5ea ("usb: musb: Fix sleeping function called from invalid context for hdrc glue")
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Viraj Shah &lt;viraj.shah@linutronix.de&gt;
Link: https://lore.kernel.org/r/20211021093644.4734-1-viraj.shah@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: musb: sunxi: Don't print error on MUSB_ULPI_BUSCONTROL access</title>
<updated>2021-10-22T09:12:14Z</updated>
<author>
<name>Roman Stratiienko</name>
<email>r.stratiienko@gmail.com</email>
</author>
<published>2021-10-19T13:12:44Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=02f8b1360312d888e3f4ae4ab47dec6cd542678d'/>
<id>urn:sha1:02f8b1360312d888e3f4ae4ab47dec6cd542678d</id>
<content type='text'>
Error message appears during suspend, where musb driver is storing
the register state in musb_save_context():
```
musb-sunxi 1c19000.usb: Error unknown readb offset 112
```

Print warning instead to avoid confusion.

Signed-off-by: Roman Stratiienko &lt;r.stratiienko@gmail.com&gt;
Link: https://lore.kernel.org/r/20211019131244.1568560-1-r.stratiienko@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 5.15-rc6 into usb-next</title>
<updated>2021-10-18T07:40:52Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2021-10-18T07:40:52Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=c03fb16bafdfc42a158d0f35a0472128a7d2ff57'/>
<id>urn:sha1:c03fb16bafdfc42a158d0f35a0472128a7d2ff57</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>
<entry>
<title>usb: musb: dsps: Fix the probe error path</title>
<updated>2021-10-13T12:12:49Z</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2021-10-05T22:16:31Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=c2115b2b16421d93d4993f3fe4c520e91d6fe801'/>
<id>urn:sha1:c2115b2b16421d93d4993f3fe4c520e91d6fe801</id>
<content type='text'>
Commit 7c75bde329d7 ("usb: musb: musb_dsps: request_irq() after
initializing musb") has inverted the calls to
dsps_setup_optional_vbus_irq() and dsps_create_musb_pdev() without
updating correctly the error path. dsps_create_musb_pdev() allocates and
registers a new platform device which must be unregistered and freed
with platform_device_unregister(), and this is missing upon
dsps_setup_optional_vbus_irq() error.

While on the master branch it seems not to trigger any issue, I observed
a kernel crash because of a NULL pointer dereference with a v5.10.70
stable kernel where the patch mentioned above was backported. With this
kernel version, -EPROBE_DEFER is returned the first time
dsps_setup_optional_vbus_irq() is called which triggers the probe to
error out without unregistering the platform device. Unfortunately, on
the Beagle Bone Black Wireless, the platform device still living in the
system is being used by the USB Ethernet gadget driver, which during the
boot phase triggers the crash.

My limited knowledge of the musb world prevents me to revert this commit
which was sent to silence a robot warning which, as far as I understand,
does not make sense. The goal of this patch was to prevent an IRQ to
fire before the platform device being registered. I think this cannot
ever happen due to the fact that enabling the interrupts is done by the
-&gt;enable() callback of the platform musb device, and this platform
device must be already registered in order for the core or any other
user to use this callback.

Hence, I decided to fix the error path, which might prevent future
errors on mainline kernels while also fixing older ones.

Fixes: 7c75bde329d7 ("usb: musb: musb_dsps: request_irq() after initializing musb")
Cc: stable@vger.kernel.org
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/r/20211005221631.1529448-1-miquel.raynal@bootlin.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: musb: select GENERIC_PHY instead of depending on it</title>
<updated>2021-10-13T12:00:41Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2021-10-05T23:57:47Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=fde1fbedbaed4e76cef4600d775b185f59b9b568'/>
<id>urn:sha1:fde1fbedbaed4e76cef4600d775b185f59b9b568</id>
<content type='text'>
The kconfig symbol GENERIC_PHY says:
  All the users of this framework should select this config.
and around 136 out of 138 drivers do so, so change USB_MUSB_MEDIATEK
to do so also.

This (also) fixes a long circular dependency problem for an upcoming
patch.

Fixes: 0990366bab3c ("usb: musb: Add support for MediaTek musb controller")
Cc: Bin Liu &lt;b-liu@ti.com&gt;
Cc: Min Guo &lt;min.guo@mediatek.com&gt;
Cc: Yonglong Wu &lt;yonglong.wu@mediatek.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: linux-mediatek@lists.infradead.org
Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Link: https://lore.kernel.org/r/20211005235747.5588-1-rdunlap@infradead.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 5.15-rc3 into usb-next</title>
<updated>2021-09-27T14:34:40Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2021-09-27T14:34:40Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=ae9a6149884e04b3460bd9d7ffe29c5ec8d223d8'/>
<id>urn:sha1:ae9a6149884e04b3460bd9d7ffe29c5ec8d223d8</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>
<entry>
<title>usb: musb: tusb6010: uninitialized data in tusb_fifo_write_unaligned()</title>
<updated>2021-09-21T14:38:21Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2021-09-16T13:57:37Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=517c7bf99bad3d6b9360558414aae634b7472d80'/>
<id>urn:sha1:517c7bf99bad3d6b9360558414aae634b7472d80</id>
<content type='text'>
This is writing to the first 1 - 3 bytes of "val" and then writing all
four bytes to musb_writel().  The last byte is always going to be
garbage.  Zero out the last bytes instead.

Fixes: 550a7375fe72 ("USB: Add MUSB and TUSB support")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20210916135737.GI25094@kili
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: musb: tusb6010: check return value after calling platform_get_resource()</title>
<updated>2021-09-21T14:26:49Z</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2021-09-15T03:49:25Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=14651496a3de6807a17c310f63c894ea0c5d858e'/>
<id>urn:sha1:14651496a3de6807a17c310f63c894ea0c5d858e</id>
<content type='text'>
It will cause null-ptr-deref if platform_get_resource() returns NULL,
we need check the return value.

Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Link: https://lore.kernel.org/r/20210915034925.2399823-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: musb: mediatek: Expose role-switch control to userspace</title>
<updated>2021-09-14T09:55:22Z</updated>
<author>
<name>Sungbo Eo</name>
<email>mans0n@gorani.run</email>
</author>
<published>2021-08-30T15:59:03Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=7042b10141542f56e1b4179a228aefa8a5ac3fab'/>
<id>urn:sha1:7042b10141542f56e1b4179a228aefa8a5ac3fab</id>
<content type='text'>
The allow_userspace_control flag enables manual role-switch from userspace.
Turn this feature on like several other USB DRD controller drivers.

Tested-by: Frank Wunderlich &lt;frank-w@public-files.de&gt;
Acked-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Signed-off-by: Sungbo Eo &lt;mans0n@gorani.run&gt;
Link: https://lore.kernel.org/r/20210830155903.13907-3-mans0n@gorani.run
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: musb: musb_dsps: request_irq() after initializing musb</title>
<updated>2021-08-26T11:22:16Z</updated>
<author>
<name>Nadezda Lutovinova</name>
<email>lutovinova@ispras.ru</email>
</author>
<published>2021-08-19T16:33:23Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=7c75bde329d7e2a93cf86a5c15c61f96f1446cdc'/>
<id>urn:sha1:7c75bde329d7e2a93cf86a5c15c61f96f1446cdc</id>
<content type='text'>
If IRQ occurs between calling  dsps_setup_optional_vbus_irq()
and  dsps_create_musb_pdev(), then null pointer dereference occurs
since glue-&gt;musb wasn't initialized yet.

The patch puts initializing of neccesery data before registration
of the interrupt handler.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Nadezda Lutovinova &lt;lutovinova@ispras.ru&gt;
Link: https://lore.kernel.org/r/20210819163323.17714-1-lutovinova@ispras.ru
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
