<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb/core/driver.c, branch v6.18.21</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-09-15T06:18:40+00:00</updated>
<entry>
<title>Merge 6.17-rc6 into usb-next</title>
<updated>2025-09-15T06:18:40+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2025-09-15T06:18:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a4d43c1f17b9f143af5868285c513c866e9cf67b'/>
<id>urn:sha1:a4d43c1f17b9f143af5868285c513c866e9cf67b</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: host: enable USB offload during system sleep</title>
<updated>2025-09-12T12:08:02+00:00</updated>
<author>
<name>Guan-Yu Lin</name>
<email>guanyulin@google.com</email>
</author>
<published>2025-09-11T14:20:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=38d627bc8522a6a2fd6f9454c8b3b5d3848f5f03'/>
<id>urn:sha1:38d627bc8522a6a2fd6f9454c8b3b5d3848f5f03</id>
<content type='text'>
Sharing a USB controller with another entity via xhci-sideband driver
creates power management complexities. To prevent the USB controller
from being inadvertently deactivated while in use by the other entity, a
usage-count based mechanism is implemented. This allows the system to
manage power effectively, ensuring the controller remains available
whenever needed.
In order to maintain full functionality of an offloaded USB devices,
several changes are made within the suspend flow of such devices:
- skip usb_suspend_device() so that the port/hub are still active for
  USB transfers via offloaded path.
- not suspending the endpoints which are used by USB interfaces marked
  with needs_remote_wakeup. Namely, skip usb_suspend_interface() and
  usb_hcd_flush_endpoint() on associated USB interfaces. This reserves a
  pending interrupt urb during system suspend for handling the interrupt
  transfer, which is necessary since remote wakeup doesn't apply in the
  offloaded USB devices when controller is still active.
- not flushing the endpoints of actively offloaded USB devices. Given
  that the USB devices is used by another entity, unilaterally flush the
  endpoint might lead to unexpected behavior on another entity.
- not suspending the xhci controller. This is done by skipping the
  suspend/resume callbacks in the xhci platform driver.

Signed-off-by: Guan-Yu Lin &lt;guanyulin@google.com&gt;
Link: https://lore.kernel.org/r/20250911142051.90822-5-guanyulin@google.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/20250911142051.90822-5-guanyulin@google.com
</content>
</entry>
<entry>
<title>USB: core: remove the move buf action</title>
<updated>2025-09-12T11:41:55+00:00</updated>
<author>
<name>Edward Adam Davis</name>
<email>eadavis@qq.com</email>
</author>
<published>2025-09-10T07:58:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9dfec4a51df9cf0dcc23cb4ac6fc314bf9e999d0'/>
<id>urn:sha1:9dfec4a51df9cf0dcc23cb4ac6fc314bf9e999d0</id>
<content type='text'>
The buffer size of sysfs is fixed at PAGE_SIZE, and the page offset
of the buf parameter of sysfs_emit_at() must be 0, there is no need
to manually manage the buf pointer offset.

Fixes: 711d41ab4a0e ("usb: core: Use sysfs_emit_at() when showing dynamic IDs")
Reported-by: syzbot+b6445765657b5855e869@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=b6445765657b5855e869
Tested-by: syzbot+b6445765657b5855e869@syzkaller.appspotmail.com
Signed-off-by: Edward Adam Davis &lt;eadavis@qq.com&gt;
Link: https://lore.kernel.org/r/tencent_B32D6D8C9450EBFEEE5ACC2C7B0E6C402D0A@qq.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: Check no positive return values from pm_runtime_resume_and_get()</title>
<updated>2025-08-17T10:16:26+00:00</updated>
<author>
<name>Sakari Ailus</name>
<email>sakari.ailus@linux.intel.com</email>
</author>
<published>2025-08-15T11:31:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=23cd838a178a81183da9db6cb3390bb540b000a5'/>
<id>urn:sha1:23cd838a178a81183da9db6cb3390bb540b000a5</id>
<content type='text'>
pm_runtime_resume_and_get() always returns a negative error code or zero;
there's no need to check for positive values such as returned by
pm_runtime_get_sync(). Simply drop the check.

Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20250815113121.925641-1-sakari.ailus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: lower "Device is not authorized for usage" message to info</title>
<updated>2025-08-13T14:55:27+00:00</updated>
<author>
<name>Dominique Martinet</name>
<email>dominique.martinet@atmark-techno.com</email>
</author>
<published>2025-08-01T07:52:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b12daf363f3d4ded1c12d01ab7c45b6179c586ab'/>
<id>urn:sha1:b12daf363f3d4ded1c12d01ab7c45b6179c586ab</id>
<content type='text'>
This message is not a useful error in practice:
- when using tools such as usbguard, the message is always printed but
  it does not presume anything regarding the actual device acceptance
  (later 'authorized to connect' message is at info level, and not
   displayed on console)
- this can be a source of flood if a usb device connection is flaky
- ... and it is only displayed as the result of an admin action
  (modifying authorized_default), working as intended, so not likely
  to be an error.

This is still useful to know when looking at usb devices problems, so
info seems appropriate for this class of messages together with the
later eventual authorized message.

Signed-off-by: Dominique Martinet &lt;dominique.martinet@atmark-techno.com&gt;
Link: https://lore.kernel.org/r/20250801-usb-auth-v1-1-a59bfdf0293f@atmark-techno.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: core: Use sysfs_emit_at() when showing dynamic IDs</title>
<updated>2025-06-24T14:40:12+00:00</updated>
<author>
<name>Hanne-Lotta Mäenpää</name>
<email>hannelotta@gmail.com</email>
</author>
<published>2025-06-21T16:40:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=711d41ab4a0e4230e394fd5da5b85604ddb9fc51'/>
<id>urn:sha1:711d41ab4a0e4230e394fd5da5b85604ddb9fc51</id>
<content type='text'>
When formatting the dynamic USB device IDs to show to
the user space, instead of scnprintf() function use
sysfs_emit_at(). The functions are equivalent, but
using the latter is recommended as it ensures that
no buffer overruns occur.

Testing the change can be done by assigning new IDs
to the USB driver's sysfs attribute new_id,
and then checking that the same values are returned.

For example:

echo 4533 7515 &gt; /sys/bus/usb/drivers/usbfs/new_id
cat /sys/bus/usb/drivers/usbfs/new_id

The output should match the assigned IDs (4533 7515).

Signed-off-by: Hanne-Lotta Mäenpää &lt;hannelotta@gmail.com&gt;
Link: https://lore.kernel.org/r/20250621164005.4004-1-hannelotta@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: Optimize goto logic in API usb_register_driver()</title>
<updated>2024-12-23T17:40:34+00:00</updated>
<author>
<name>Zijun Hu</name>
<email>quic_zijuhu@quicinc.com</email>
</author>
<published>2024-12-12T15:30:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e9509b499349965ee866aae8eea85e909d798c11'/>
<id>urn:sha1:e9509b499349965ee866aae8eea85e909d798c11</id>
<content type='text'>
usb_register_driver() uses complex goto statements to handle simple error
cases, move down the goto label 'out' a bit to

- Simplify goto logic
- Leverage pr_err() prompt for driver registering failure.

Signed-off-by: Zijun Hu &lt;quic_zijuhu@quicinc.com&gt;
Link: https://lore.kernel.org/r/20241212-fix_usb-v1-1-300eb440c753@quicinc.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: make to_usb_device_driver() use container_of_const()</title>
<updated>2024-11-14T16:57:33+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2024-11-13T14:04:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d6fa15bbcf9604e3c14816410550d2cf22b955e4'/>
<id>urn:sha1:d6fa15bbcf9604e3c14816410550d2cf22b955e4</id>
<content type='text'>
Turns out that we have some const pointers being passed to
to_usb_device_driver() but were not catching this.  Change the macro to
properly propagate the const-ness of the pointer so that we will notice
when we try to write to memory that we shouldn't be writing to.

This requires fixing up the usb_driver_applicable() function as well,
because it can handle a const * to struct usb_driver.

Cc: Johan Hovold &lt;johan@kernel.org&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: Grant Grundler &lt;grundler@chromium.org&gt;
Cc: Yajun Deng &lt;yajun.deng@linux.dev&gt;
Cc: Oliver Neukum &lt;oneukum@suse.com&gt;
Cc: Douglas Anderson &lt;dianders@chromium.org&gt;
Cc: linux-usb@vger.kernel.org
Link: https://lore.kernel.org/r/2024111342-lagoon-reapprove-5e49@gregkh
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: make to_usb_driver() use container_of_const()</title>
<updated>2024-11-14T16:57:29+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2024-11-13T14:04:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2f3aab7aecb827ba93c6222646eb0faa8228d590'/>
<id>urn:sha1:2f3aab7aecb827ba93c6222646eb0faa8228d590</id>
<content type='text'>
Turns out that we have some const pointers being passed to
to_usb_driver() but were not catching this.  Change the macro to
properly propagate the const-ness of the pointer so that we will notice
when we try to write to memory that we shouldn't be writing to.

This requires fixing up the usb_match_dynamic_id() function as well,
because it can handle a const * to struct usb_driver.

Cc: Johan Hovold &lt;johan@kernel.org&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: Grant Grundler &lt;grundler@chromium.org&gt;
Cc: Yajun Deng &lt;yajun.deng@linux.dev&gt;
Cc: Oliver Neukum &lt;oneukum@suse.com&gt;
Cc: Douglas Anderson &lt;dianders@chromium.org&gt;
Cc: linux-usb@vger.kernel.org
Link: https://lore.kernel.org/r/2024111339-shaky-goldsmith-b233@gregkh
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: properly lock dynamic id list when showing an id</title>
<updated>2024-11-14T16:05:25+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2024-11-13T06:49:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=81f5c72d041b92490261354a528b60e66ed2fa3b'/>
<id>urn:sha1:81f5c72d041b92490261354a528b60e66ed2fa3b</id>
<content type='text'>
When walking the list of dynamic ids for a driver, no lock was being
held, which meant that an id could be removed or added while the list
was being iterated.  Fix this up by properly grabing the lock while we
walk the list.

Reported-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: linux-usb@vger.kernel.org
Link: https://lore.kernel.org/r/2024111324-tubby-facecloth-d4a0@gregkh
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
