<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/next/linux-next.git/drivers/usb/dwc2, branch master</title>
<subtitle>The linux-next integration testing tree</subtitle>
<id>https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/atom?h=master</id>
<link rel='self' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/'/>
<updated>2026-09-18T12:33:32+00:00</updated>
<entry>
<title>Merge branch 'usb-next' of https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git</title>
<updated>2026-09-18T12:33:32+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2026-09-18T12:33:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f383d44f5ae84159c193aa359ba3c42b1df85d46'/>
<id>urn:sha1:f383d44f5ae84159c193aa359ba3c42b1df85d46</id>
<content type='text'>
</content>
</entry>
<entry>
<title>usb: dwc2: fix typos in comments</title>
<updated>2026-09-10T15:10:12+00:00</updated>
<author>
<name>Hemanth Selam</name>
<email>hemanth.selam@gmail.com</email>
</author>
<published>2026-09-04T10:55:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=bbed88f72dbbb960080282de3b90ca0933fa6226'/>
<id>urn:sha1:bbed88f72dbbb960080282de3b90ca0933fa6226</id>
<content type='text'>
Fix typos in comments, reported by scripts/checkpatch.pl using the
misspelling list in scripts/spelling.txt.  Only touches comments, no code
changes.

Assisted-by: Cursor:claude-opus-5
Signed-off-by: Hemanth Selam &lt;hemanth.selam@gmail.com&gt;
Link: https://patch.msgid.link/20260904105555.37215-1-hemanth.selam@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: dwc2: shut down wakeup timer before freeing HCD state</title>
<updated>2026-09-10T15:08:19+00:00</updated>
<author>
<name>Runyu Xiao</name>
<email>runyu.xiao@seu.edu.cn</email>
</author>
<published>2026-09-04T06:53:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=fd772af9512cdecb83de34a461801533828e77fd'/>
<id>urn:sha1:fd772af9512cdecb83de34a461801533828e77fd</id>
<content type='text'>
dwc2_wakeup_detected() accesses the DWC2 host state and can rearm the
wakeup timer.  dwc2_hcd_free() currently deletes the timer only after
freeing host-owned state, and timer_delete() does not synchronize a
callback or prevent it from being queued again.

Stop and shut down the timer in dwc2_hcd_release(), before the HCD
resources are freed.  This covers both the HCD initialization error path
and normal HCD removal.

Fixes: 7359d482eb4d ("staging: HCD files for the DWC2 driver")
Cc: stable &lt;stable@kernel.org&gt;
Assisted-by: Codex:GPT-5
Signed-off-by: Runyu Xiao &lt;runyu.xiao@seu.edu.cn&gt;
Reviewed-by: Thinh Nguyen &lt;Thinh.Nguyen@synopsys.com&gt;
Link: https://patch.msgid.link/20260904065323.4047026-1-runyu.xiao@seu.edu.cn
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: debugfs: fix memory leak of hsotg-&gt;regset</title>
<updated>2026-09-10T13:42:17+00:00</updated>
<author>
<name>Huang Wei</name>
<email>huangwei@kylinos.cn</email>
</author>
<published>2026-09-09T02:10:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=5f56bc090804559f56e4a1fd950ae2a24cf36518'/>
<id>urn:sha1:5f56bc090804559f56e4a1fd950ae2a24cf36518</id>
<content type='text'>
hsotg-&gt;regset is allocated in dwc2_debugfs_init() using devm_kzalloc(),
which ties its lifetime to the device (struct dwc2_hsotg) rather than
to the debugfs entries it serves. dwc2_debugfs_exit() removes the
debugfs directory but leaves hsotg-&gt;regset allocated until the device
itself is removed, so the pointer dangles for the remainder of the
device lifetime.

Switch to kzalloc() and free it explicitly in dwc2_debugfs_exit() so
the regset lifetime matches the debugfs lifetime. Set the pointer to
NULL after freeing to avoid a stale dangling pointer.

Reported-by: kakapapa2 &lt;kakapapa2@gmail.com&gt;
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219977
Reviewed-by: Thinh Nguyen &lt;Thinh.Nguyen@synopsys.com&gt;
Signed-off-by: Huang Wei &lt;huangwei@kylinos.cn&gt;
Link: https://patch.msgid.link/20260909021014.906548-1-huangwei@kylinos.cn
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: truncate PIO RX FIFO reads to the request's remaining space</title>
<updated>2026-09-10T13:42:14+00:00</updated>
<author>
<name>Haofeng Li</name>
<email>lihaofeng@kylinos.cn</email>
</author>
<published>2026-08-26T13:34:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=44969e9a46ff678df0215ba0caab5590675ff8ea'/>
<id>urn:sha1:44969e9a46ff678df0215ba0caab5590675ff8ea</id>
<content type='text'>
dwc2_hsotg_rx_data() reads the OUT packet length from the RX FIFO status
(GRXSTS.BYTECNT, host-controlled) and, when it exceeds the remaining
space of the active gadget request (max_req = req.length - req.actual),
merely fires WARN_ON_ONCE(1) and then stores the whole packet into
hs_req-&gt;req.buf + req-&gt;req.actual via dwc2_readl_rep():

    req.actual += size;
    dwc2_readl_rep(hsotg, EPFIFO(ep_idx), req.buf + actual,
                   DIV_ROUND_UP(size, 4));

A packet larger than the request buffer therefore over-writes up to
maxpacket bytes past it.  The rounded-up word read additionally emits up
to 3 bytes past the logical end even when the size does not exceed the
remaining space (short-request boundary).

Attack chain (USB peripheral/gadget mode, PIO only; the attacker is the
USB host):

    malicious host -&gt; OUT packet on epN -&gt; RX FIFO interrupt
      -&gt; dwc2_hsotg_handle_rx() (GRXSTS_PKTSTS_OUTRX / SETUPRX)
      -&gt; dwc2_hsotg_rx_data(hsotg, epnum, BYTECNT=64) with the queued
         request having req.length=8, req.actual=7 (1 byte left)
      -&gt; "to_read(64) &gt; max_req(1)" -&gt; WARN_ON_ONCE(1) only
      -&gt; dwc2_readl_rep() writes 16 words at req.buf+7
      -&gt; 63 bytes past the 8-byte request buffer

Reproduced (kernel 7.2.0+, KASAN/SLUB debug): calling the real
dwc2_hsotg_rx_data() with the above state (request buffer 8 bytes,
actual 7, size 64) triggers the WARN and leaves req.actual = 71 (the
64 bytes are accrued regardless), and the SLUB redzone immediately
after the 8-byte object plus neighbouring slab objects are overwritten
with FIFO content (byte 7 changes from a marker to FIFO data) - the
out-of-bounds write is visible byte-for-byte.  The FIFO read is done by
raw 32-bit I/O words, which generic KASAN does not instrument, so the
redzone/neighbour clobber is the forensic evidence.

Signed-off-by: Haofeng Li &lt;lihaofeng@kylinos.cn&gt;
Assisted-by: opencode:deepseek-v4-flash-free
Link: https://patch.msgid.link/20260826133401.3796639-1-lihaofeng@kylinos.cn
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: handle OTG HNP SetFeature requests</title>
<updated>2026-09-10T13:42:12+00:00</updated>
<author>
<name>Adrian Ng Ho Yin</name>
<email>adrian.ho.yin.ng@altera.com</email>
</author>
<published>2026-08-17T08:00:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f94d9e6a38d581a826ac4ae7b1865b6918d6cd27'/>
<id>urn:sha1:f94d9e6a38d581a826ac4ae7b1865b6918d6cd27</id>
<content type='text'>
Without handling for b_hnp_enable, a_hnp_support, and a_alt_hnp_support,
HNP cannot be enabled when two OTG controllers are connected.

Handle SetFeature for these OTG selectors, gated on otg_caps.hnp_support.
The OTG specification only defines SetFeature for them, so reject
ClearFeature with -EINVAL instead of silently accepting it. Use dev_dbg
for status updates to avoid noisy logs.

Advertise the core's HNP/SRP capability during gadget init by restoring
GUSBCFG_HNPCAP/SRPCAP from otg_caps, mirroring dwc2_gusbcfg_init() on the
host side, instead of clearing them unconditionally.

Clear the HNP flags and GOTGCTL_DEVHNPEN on disconnect/reset so OTG state
does not leak across sessions.

Signed-off-by: Adrian Ng Ho Yin &lt;adrian.ho.yin.ng@altera.com&gt;
Signed-off-by: Tze Yee Ng &lt;tze.yee.ng@altera.com&gt;
Link: https://patch.msgid.link/e1f4718cadf28c4348bcf6ebb025f71732416538.1786950594.git.tze.yee.ng@altera.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: gadget: Remove redundant dev_err()</title>
<updated>2026-09-01T14:27:29+00:00</updated>
<author>
<name>Pan Chuang</name>
<email>panchuang@vivo.com</email>
</author>
<published>2026-07-31T03:54:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=a5419bee83db523750beea78ca87d8a7d42bc4c8'/>
<id>urn:sha1:a5419bee83db523750beea78ca87d8a7d42bc4c8</id>
<content type='text'>
Since commit 55b48e23f5c4 ("genirq/devres: Add error handling in
devm_request_*_irq()"), devm_request_irq() automatically logs
detailed error messages on failure. Remove the now-redundant
driver-specific dev_err() calls.

Signed-off-by: Pan Chuang &lt;panchuang@vivo.com&gt;
Link: https://patch.msgid.link/20260731035448.252289-4-panchuang@vivo.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: gadget: Exit partial power down state when changing USB pull-up</title>
<updated>2026-08-14T01:48:41+00:00</updated>
<author>
<name>Francesco Lavra</name>
<email>flavra@baylibre.com</email>
</author>
<published>2026-07-28T15:44:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=bf1e90189a98ca4a824fd64b4f3c6043d13c98ea'/>
<id>urn:sha1:bf1e90189a98ca4a824fd64b4f3c6043d13c98ea</id>
<content type='text'>
When a USB host suspends a connected device, the DWC2 USB device controller
enters a partial power down state where controller registers are not
accessible. If the USB gadget is then disconnected or deactivated
(e.g. when a gadget function is unbound from the controller), the `pullup`
callback in struct usb_gadget_ops is invoked; if the controller is kept in
partial power down, the register write in dwc2_hsotg_core_disconnect() does
not take effect; as a result, the USB host keeps seeing the device as
connected, even though the device is disabled.

Properly exit partial power down state in the pullup callback, so that the
USB host detects a device disconnection as intended.

Fixes: 97861781daff ("usb: dwc2: Allow entering hibernation from USB_SUSPEND interrupt")
Cc: stable@vger.kernel.org
Signed-off-by: Francesco Lavra &lt;flavra@baylibre.com&gt;
Link: https://patch.msgid.link/20260728154420.2021519-1-flavra@baylibre.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 7.2-rc3 into usb-next</title>
<updated>2026-07-13T05:09:28+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2026-07-13T05:09:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b60af0b9e752aa77f29daac026dd2314cc2a0bb0'/>
<id>urn:sha1:b60af0b9e752aa77f29daac026dd2314cc2a0bb0</id>
<content type='text'>
We need the USB fixes in here as well to build on top of.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: add missing @remotewakeup kernel-doc parameter</title>
<updated>2026-07-10T13:56:06+00:00</updated>
<author>
<name>Rosen Penev</name>
<email>rosenp@gmail.com</email>
</author>
<published>2026-06-04T00:05:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=e71b845c1d9e5054172f32da6c8fba2b7cb8e4ca'/>
<id>urn:sha1:e71b845c1d9e5054172f32da6c8fba2b7cb8e4ca</id>
<content type='text'>
Add the @remotewakeup kernel-doc parameter description to the
dwc2_wakeup_from_lpm_l1() function.

Fixes: 5d69a3b54e5a ("usb: dwc2: gadget: LPM flow fix")
Assisted-by: opencode:big-pickle
Signed-off-by: Rosen Penev &lt;rosenp@gmail.com&gt;
Link: https://patch.msgid.link/20260604000513.15753-1-rosenp@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
