|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7, v6.14-rc6, v6.14-rc5, v6.14-rc4 |
|
| #
c749f058 |
| 20-Feb-2025 |
Kannappan R <[email protected]> |
USB: core: Add eUSB2 descriptor and parsing in USB core
Add support for the 'eUSB2 Isochronous Endpoint Companion Descriptor' introduced in the recent USB 2.0 specification 'USB 2.0 Double Isochrono
USB: core: Add eUSB2 descriptor and parsing in USB core
Add support for the 'eUSB2 Isochronous Endpoint Companion Descriptor' introduced in the recent USB 2.0 specification 'USB 2.0 Double Isochronous IN Bandwidth' ECN.
It allows embedded USB2 (eUSB2) devices to report and use higher bandwidths for isochronous IN transfers in order to support higher camera resolutions on the lid of laptops and tablets with minimal change to the USB2 protocol.
The motivation for expanding USB 2.0 is further clarified in an additional Embedded USB2 version 2.0 (eUSB2v2) supplement to the USB 2.0 specification. It points out this is optimized for performance, power and cost by using the USB 2.0 low-voltage, power efficient PHY and half-duplex link for the asymmetric camera bandwidth needs, avoiding the costly and complex full-duplex USB 3.x symmetric link and gigabit receivers.
eUSB2 devices that support the higher isochronous IN bandwidth and the new descriptor can be identified by their device descriptor bcdUSB value of 0x0220
Co-developed-by: Amardeep Rai <[email protected]> Signed-off-by: Amardeep Rai <[email protected]> Signed-off-by: Kannappan R <[email protected]> Co-developed-by: Mathias Nyman <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Acked-by: Alan Stern <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc3, v6.14-rc2, v6.14-rc1, v6.13, v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3, v6.13-rc2, v6.13-rc1, v6.12 |
|
| #
d6fa15bb |
| 13-Nov-2024 |
Greg Kroah-Hartman <[email protected]> |
USB: make to_usb_device_driver() use container_of_const()
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
USB: make to_usb_device_driver() use container_of_const()
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 <[email protected]> Cc: Alan Stern <[email protected]> Cc: Grant Grundler <[email protected]> Cc: Yajun Deng <[email protected]> Cc: Oliver Neukum <[email protected]> Cc: Douglas Anderson <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/2024111342-lagoon-reapprove-5e49@gregkh Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| #
2f3aab7a |
| 13-Nov-2024 |
Greg Kroah-Hartman <[email protected]> |
USB: make to_usb_driver() use container_of_const()
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
USB: make to_usb_driver() use container_of_const()
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 <[email protected]> Cc: Alan Stern <[email protected]> Cc: Grant Grundler <[email protected]> Cc: Yajun Deng <[email protected]> Cc: Oliver Neukum <[email protected]> Cc: Douglas Anderson <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/2024111339-shaky-goldsmith-b233@gregkh Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| #
0b3144da |
| 13-Nov-2024 |
Greg Kroah-Hartman <[email protected]> |
USB: make single lock for all usb dynamic id lists
There are a number of places where we accidentally pass in a constant structure to later cast it off to a dynamic one, and then attempt to grab a l
USB: make single lock for all usb dynamic id lists
There are a number of places where we accidentally pass in a constant structure to later cast it off to a dynamic one, and then attempt to grab a lock on it, which is not a good idea. To help resolve this, move the dynamic id lock out of the dynamic id structure for the driver and into one single lock for all USB dynamic ids. As this lock should never have any real contention (it's only every accessed when a device is added or removed, which is always serialized) there should not be any difference except for some memory savings.
Note, this just converts the existing use of the dynamic id lock to the new static lock, there is one place that is accessing the dynamic id list without grabbing the lock, that will be fixed up in a follow-on change.
Cc: Johan Hovold <[email protected]> Cc: Herve Codina <[email protected]> Cc: Rob Herring <[email protected]> Cc: Alan Stern <[email protected]> Cc: Grant Grundler <[email protected]> Cc: Oliver Neukum <[email protected]> Cc: Yajun Deng <[email protected]> Cc: Douglas Anderson <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/2024111322-kindly-finalist-d247@gregkh Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v6.12-rc7, v6.12-rc6, v6.12-rc5, v6.12-rc4, v6.12-rc3, v6.12-rc2, v6.12-rc1, v6.11, v6.11-rc7, v6.11-rc6 |
|
| #
f46a6e16 |
| 30-Aug-2024 |
Mathias Nyman <[email protected]> |
usb: Add tunnel_mode parameter to usb device structure
Add 'tunnel_mode' enum to usb device structure to describe if a USB3 link is tunneled over USB4, or connected directly using native USB2/USB3 p
usb: Add tunnel_mode parameter to usb device structure
Add 'tunnel_mode' enum to usb device structure to describe if a USB3 link is tunneled over USB4, or connected directly using native USB2/USB3 protocols.
Tunneled devices depend on USB4 NHI host to maintain the tunnel. Knowledge about tunneled devices is important to ensure correct suspend and resume order between USB4 hosts and tunneled devices. i.e. make sure tunnel is up before the USB device using it resumes.
USB hosts such as xHCI may have vendor specific ways to detect tunneled connections. This 'tunnel_mode' parameter can be set by USB3 host driver during hcd->driver->update_device(hcd, udev) callback.
tunnel_mode can be set to: USB_LINK_UNKNOWN = 0 USB_LINK_NATIVE USB_LINK_TUNNELED
USB_LINK_UNKNOWN is used in case host is not capable of detecting tunneled links.
Signed-off-by: Mathias Nyman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v6.11-rc5, v6.11-rc4, v6.11-rc3, v6.11-rc2, v6.11-rc1, v6.10, v6.10-rc7 |
|
| #
a5f81642 |
| 06-Jul-2024 |
Kerem Karabay <[email protected]> |
USB: core: add 'shutdown' callback to usb_driver
Currently there is no standardized method for USB drivers to handle shutdown events. This patch simplifies running code on shutdown for USB devices b
USB: core: add 'shutdown' callback to usb_driver
Currently there is no standardized method for USB drivers to handle shutdown events. This patch simplifies running code on shutdown for USB devices by adding a shutdown callback to usb_driver.
Signed-off-by: Kerem Karabay <[email protected]> Signed-off-by: Aditya Garg <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v6.10-rc6, v6.10-rc5, v6.10-rc4, v6.10-rc3, v6.10-rc2, v6.10-rc1, v6.9, v6.9-rc7 |
|
| #
562be61b |
| 04-May-2024 |
Christophe JAILLET <[email protected]> |
usb: core: Remove the useless struct usb_devmap which is just a bitmap
struct usb_devmap is really just a bitmap. No need to have a dedicated structure for that.
Simplify code and use DECLARE_BITMA
usb: core: Remove the useless struct usb_devmap which is just a bitmap
struct usb_devmap is really just a bitmap. No need to have a dedicated structure for that.
Simplify code and use DECLARE_BITMAP() directly instead.
Signed-off-by: Christophe JAILLET <[email protected]> Acked-by: Alan Stern <[email protected]> Link: https://lore.kernel.org/r/1d818575ff7a1e8317674aecf761ee23c89fdc84.1714815990.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v6.9-rc6, v6.9-rc5, v6.9-rc4, v6.9-rc3, v6.9-rc2, v6.9-rc1, v6.8, v6.8-rc7, v6.8-rc6, v6.8-rc5, v6.8-rc4, v6.8-rc3, v6.8-rc2, v6.8-rc1, v6.7 |
|
| #
49a78b05 |
| 04-Jan-2024 |
Yajun Deng <[email protected]> |
USB: core: Use device_driver directly in struct usb_driver and usb_device_driver
There is usbdrv_wrap in struct usb_driver and usb_device_driver, it contains device_driver and for_devices. for_devic
USB: core: Use device_driver directly in struct usb_driver and usb_device_driver
There is usbdrv_wrap in struct usb_driver and usb_device_driver, it contains device_driver and for_devices. for_devices is used to distinguish between device drivers and interface drivers.
Like the is_usb_device(), it tests the type of the device. We can test that if the probe of device_driver is equal to usb_probe_device in is_usb_device_driver(), and then the struct usbdrv_wrap is no longer needed.
Clean up struct usbdrv_wrap, use device_driver directly in struct usb_driver and usb_device_driver. This makes the code cleaner.
Signed-off-by: Yajun Deng <[email protected]> Acked-by: Alan Stern <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v6.7-rc8, v6.7-rc7 |
|
| #
1760bfa7 |
| 23-Dec-2023 |
Randy Dunlap <[email protected]> |
usb: linux/usb.h: fix Excess kernel-doc description warning
Remove the @removable: line to prevent the kernel-doc warning:
include/linux/usb.h:732: warning: Excess struct member 'removable' descrip
usb: linux/usb.h: fix Excess kernel-doc description warning
Remove the @removable: line to prevent the kernel-doc warning:
include/linux/usb.h:732: warning: Excess struct member 'removable' description in 'usb_device'
Signed-off-by: Randy Dunlap <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v6.7-rc6, v6.7-rc5, v6.7-rc4 |
|
| #
a87b8e3b |
| 01-Dec-2023 |
Douglas Anderson <[email protected]> |
usb: core: Allow subclassed USB drivers to override usb_choose_configuration()
For some USB devices we might want to do something different for usb_choose_configuration(). One example here is the r8
usb: core: Allow subclassed USB drivers to override usb_choose_configuration()
For some USB devices we might want to do something different for usb_choose_configuration(). One example here is the r8152 driver where we want to end up using the vendor driver with the preferred interface.
The r8152 driver tried to make things work by implementing a USB generic_subclass driver and then overriding the normal config selection after it happened. This is less than ideal and also caused breakage if someone deauthorized and re-authorized the USB device because the USB core ended up going back to it's default logic for choosing the best config. I made an attempt to fix this [1] but it was a bit ugly.
Let's do this better and allow USB generic_subclass drivers to override usb_choose_configuration().
[1] https://lore.kernel.org/r/20231130154337.1.Ie00e07f07f87149c9ce0b27ae4e26991d307e14b@changeid
Suggested-by: Alan Stern <[email protected]> Signed-off-by: Douglas Anderson <[email protected]> Reviewed-by: Alan Stern <[email protected]> Link: https://lore.kernel.org/r/20231201102946.v2.2.Iade5fa31997f1a0ca3e1dec0591633b02471df12@changeid Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v6.7-rc3, v6.7-rc2, v6.7-rc1, v6.6, v6.6-rc7, v6.6-rc6, v6.6-rc5, v6.6-rc4, v6.6-rc3, v6.6-rc2 |
|
| #
1cf56299 |
| 14-Sep-2023 |
Randy Li <[email protected]> |
USB: dma: remove unused function prototype
usb_buffer_map_sg() and usb_buffer_unmap_sg() have no definition since the beginning of v5.4. The rest are gone from 2.6.12.
Signed-off-by: Randy Li <ayak
USB: dma: remove unused function prototype
usb_buffer_map_sg() and usb_buffer_unmap_sg() have no definition since the beginning of v5.4. The rest are gone from 2.6.12.
Signed-off-by: Randy Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v6.6-rc1, v6.5, v6.5-rc7, v6.5-rc6 |
|
| #
1e4c5742 |
| 09-Aug-2023 |
Alan Stern <[email protected]> |
USB: Remove remnants of Wireless USB and UWB
Wireless USB has long been defunct, and kernel support for it was removed in 2020 by commit caa6772db4c1 ("Staging: remove wusbcore and UWB from the kern
USB: Remove remnants of Wireless USB and UWB
Wireless USB has long been defunct, and kernel support for it was removed in 2020 by commit caa6772db4c1 ("Staging: remove wusbcore and UWB from the kernel tree.").
Nevertheless, some vestiges of the old implementation still clutter up the USB subsystem and one or two other places. Let's get rid of them once and for all.
The only parts still left are the user-facing APIs in include/uapi/linux/usb/ch9.h. (There are also a couple of misleading instances, such as the Sierra Wireless USB modem, which is a USB modem made by Sierra Wireless.)
Signed-off-by: Alan Stern <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v6.5-rc5, v6.5-rc4, v6.5-rc3, v6.5-rc2, v6.5-rc1, v6.4, v6.4-rc7, v6.4-rc6, v6.4-rc5, v6.4-rc4, v6.4-rc3, v6.4-rc2, v6.4-rc1, v6.3, v6.3-rc7 |
|
| #
13890626 |
| 10-Apr-2023 |
Alan Stern <[email protected]> |
USB: core: Add routines for endpoint checks in old drivers
Many of the older USB drivers in the Linux USB stack were written based simply on a vendor's device specification. They use the endpoint i
USB: core: Add routines for endpoint checks in old drivers
Many of the older USB drivers in the Linux USB stack were written based simply on a vendor's device specification. They use the endpoint information in the spec and assume these endpoints will always be present, with the properties listed, in any device matching the given vendor and product IDs.
While that may have been true back then, with spoofing and fuzzing it is not true any more. More and more we are finding that those old drivers need to perform at least a minimum of checking before they try to use any endpoint other than ep0.
To make this checking as simple as possible, we now add a couple of utility routines to the USB core. usb_check_bulk_endpoints() and usb_check_int_endpoints() take an interface pointer together with a list of endpoint addresses (numbers and directions). They check that the interface's current alternate setting includes endpoints with those addresses and that each of these endpoints has the right type: bulk or interrupt, respectively.
Although we already have usb_find_common_endpoints() and related routines meant for a similar purpose, they are not well suited for this kind of checking. Those routines find endpoints of various kinds, but only one (either the first or the last) of each kind, and they don't verify that the endpoints' addresses agree with what the caller expects.
In theory the new routines could be more general: They could take a particular altsetting as their argument instead of always using the interface's current altsetting. In practice I think this won't matter too much; multiple altsettings tend to be used for transferring media (audio or visual) over isochronous endpoints, not bulk or interrupt. Drivers for such devices will generally require more sophisticated checking than these simplistic routines provide.
Signed-off-by: Alan Stern <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v6.3-rc6 |
|
| #
539adfed |
| 05-Apr-2023 |
Bastien Nocera <[email protected]> |
USB: core: Fix docs warning caused by wireless_status feature
Fix wrongly named 'dev' parameter in doc block, should have been iface: drivers/usb/core/message.c:1939: warning: Function parameter or
USB: core: Fix docs warning caused by wireless_status feature
Fix wrongly named 'dev' parameter in doc block, should have been iface: drivers/usb/core/message.c:1939: warning: Function parameter or member 'iface' not described in 'usb_set_wireless_status' drivers/usb/core/message.c:1939: warning: Excess function parameter 'dev' description in 'usb_set_wireless_status'
And fix missing struct member doc in kernel API, and reorder to match struct: include/linux/usb.h:270: warning: Function parameter or member 'wireless_status_work' not described in 'usb_interface'
Reported-by: Stephen Rothwell <[email protected]> Link: https://lore.kernel.org/linux-next/[email protected]/T/#t Fixes: 0a4db185f078 ("USB: core: Add API to change the wireless_status") Signed-off-by: Bastien Nocera <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Link: https://lore.kernel.org/r/[email protected] [bentiss: fix checkpatch warning] Signed-off-by: Benjamin Tissoires <[email protected]>
show more ...
|
|
Revision tags: v6.3-rc5, v6.3-rc4, v6.3-rc3, v6.3-rc2, v6.3-rc1 |
|
| #
0a4db185 |
| 02-Mar-2023 |
Bastien Nocera <[email protected]> |
USB: core: Add API to change the wireless_status
This adds the API that allows device specific drivers to tell user-space about whether the wireless device is connected to its receiver dongle.
See
USB: core: Add API to change the wireless_status
This adds the API that allows device specific drivers to tell user-space about whether the wireless device is connected to its receiver dongle.
See "USB: core: Add wireless_status sysfs attribute" for a detailed explanation of what this attribute should be used for.
Signed-off-by: Bastien Nocera <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Acked-by: Alan Stern <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
show more ...
|
| #
f98e0640 |
| 02-Mar-2023 |
Bastien Nocera <[email protected]> |
USB: core: Add wireless_status sysfs attribute
Add a wireless_status sysfs attribute to USB devices to keep track of whether a USB device that's comprised of a receiver dongle and an emitter device
USB: core: Add wireless_status sysfs attribute
Add a wireless_status sysfs attribute to USB devices to keep track of whether a USB device that's comprised of a receiver dongle and an emitter device over a, most of the time proprietary, wireless link has its emitter connected or disconnected.
This will be used by user-space OS components to determine whether the battery-powered part of the device is wirelessly connected or not, allowing, for example: - upower to hide the battery for devices where the device is turned off but the receiver plugged in, rather than showing 0%, or other values that could be confusing to users - Pipewire to hide a headset from the list of possible inputs or outputs or route audio appropriately if the headset is suddenly turned off, or turned on - libinput to determine whether a keyboard or mouse is present when its receiver is plugged in.
This is done at the USB interface level as: - the interface on which the wireless status is detected is sometimes not the same as where it could be consumed (eg. the audio interface on a headset dongle will still appear even if the headset is turned off), and we cannot have synchronisation of status across subsystems. - this behaviour is not specific to HID devices, even if the protocols used to determine whether or not the remote device is connected can be HID.
This is not an attribute that is meant to replace protocol specific APIs, such as the ones available for WWAN, WLAN/Wi-Fi, or Bluetooth or any other sort of networking, but solely for wireless devices with an ad-hoc “lose it and your device is e-waste” receiver dongle.
The USB interface will only be exporting the wireless_status sysfs attribute if it gets set through the API exported in the next commit.
Signed-off-by: Bastien Nocera <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Acked-by: Alan Stern <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
show more ...
|
| #
130eac41 |
| 28-Mar-2023 |
Arnd Bergmann <[email protected]> |
xhci: use pm_ptr() instead of #ifdef for CONFIG_PM conditionals
A recent patch caused an unused-function warning in builds with CONFIG_PM disabled, after the function became marked 'static':
driver
xhci: use pm_ptr() instead of #ifdef for CONFIG_PM conditionals
A recent patch caused an unused-function warning in builds with CONFIG_PM disabled, after the function became marked 'static':
drivers/usb/host/xhci-pci.c:91:13: error: 'xhci_msix_sync_irqs' defined but not used [-Werror=unused-function] 91 | static void xhci_msix_sync_irqs(struct xhci_hcd *xhci) | ^~~~~~~~~~~~~~~~~~~
This could be solved by adding another #ifdef, but as there is a trend towards removing CONFIG_PM checks in favor of helper macros, do the same conversion here and use pm_ptr() to get either a function pointer or NULL but avoid the warning.
As the hidden functions reference some other symbols, make sure those are visible at compile time, at the minimal cost of a few extra bytes for 'struct usb_device'.
Fixes: 9abe15d55dcc ("xhci: Move xhci MSI sync function to to xhci-pci") Signed-off-by: Arnd Bergmann <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v6.2, v6.2-rc8, v6.2-rc7, v6.2-rc6, v6.2-rc5, v6.2-rc4, v6.2-rc3, v6.2-rc2, v6.2-rc1 |
|
| #
11cefeb2 |
| 12-Dec-2022 |
Johan Hovold <[email protected]> |
USB: fix misleading usb_set_intfdata() kernel doc
The struct device driver-data pointer is used for any data that a driver may need in various callbacks while bound to the device. For convenience, s
USB: fix misleading usb_set_intfdata() kernel doc
The struct device driver-data pointer is used for any data that a driver may need in various callbacks while bound to the device. For convenience, subsystems typically provide wrappers such as usb_set_intfdata() of the generic accessor functions for use in bus callbacks.
There is generally no longer any need for a driver to clear the pointer, but since commit 0998d0631001 ("device-core: Ensure drvdata = NULL when no driver is bound") the driver-data pointer is set to NULL by driver core post unbind anyway.
For historical reasons, USB core also clears this pointer when an explicitly claimed interface is released.
Due to a misunderstanding, a misleading kernel doc comment for usb_set_intfdata() was recently added which claimed that the driver data pointer must not be cleared during disconnect before "all actions [are] completed", which is both imprecise and incorrect.
Specifically, drivers like cdc-acm which claim additional interfaces use the driver-data pointer as a flag which is cleared when the first interface is unbound. As long as a driver does not do something odd like dereference the pointer in, for example, completion callbacks, this can be done at any time during disconnect. And in any case this is no different than for any other resource, like the driver data itself, which may be freed by the disconnect callback.
Note that the comment actually also claimed that the interface itself was somehow being set to NULL by driver core.
Fix the kernel doc by removing incorrect, overly specific and misleading details and adding a comment about why some drivers do clear the driver-data pointer.
Fixes: 27ef17849779 ("usb: add usb_set_intfdata() documentation") Signed-off-by: Johan Hovold <[email protected]> Acked-by: Alan Stern <[email protected]> Acked-by: Vincent Mailhol <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| #
28e1ff70 |
| 21-Dec-2022 |
Ricardo Ribalda <[email protected]> |
USB: Improve usb_fill_* documentation
Document the transfer buffer requirement. That is, the buffer must be DMAble - otherwise data corruption might occur.
Acked-by: Randy Dunlap <rdunlap@infradead
USB: Improve usb_fill_* documentation
Document the transfer buffer requirement. That is, the buffer must be DMAble - otherwise data corruption might occur.
Acked-by: Randy Dunlap <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Ricardo Ribalda <[email protected]> Acked-by: Alan Stern <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| #
cd702d18 |
| 16-Jan-2023 |
Mathias Nyman <[email protected]> |
usb: acpi: add helper to check port lpm capability using acpi _DSM
Add a helper to evaluate ACPI usb device specific method (_DSM) provided in case the USB3 port shouldn't enter U1 and U2 link state
usb: acpi: add helper to check port lpm capability using acpi _DSM
Add a helper to evaluate ACPI usb device specific method (_DSM) provided in case the USB3 port shouldn't enter U1 and U2 link states.
This _DSM was added as port specific retimer configuration may lead to exit latencies growing beyond U1/U2 exit limits, and OS needs a way to find which ports can't support U1/U2 link power management states.
This _DSM is also used by windows: Link: https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/usb-device-specific-method---dsm-
Some patch issues found in testing resolved by Ron Lee
Cc: [email protected] Tested-by: Ron Lee <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v6.1, v6.1-rc8 |
|
| #
983055bf |
| 30-Nov-2022 |
Vincent Mailhol <[email protected]> |
USB: core: export usb_cache_string()
usb_cache_string() can also be useful for the drivers so export it.
Signed-off-by: Vincent Mailhol <[email protected]> Acked-by: Greg Kroah-Hartman <gr
USB: core: export usb_cache_string()
usb_cache_string() can also be useful for the drivers so export it.
Signed-off-by: Vincent Mailhol <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
show more ...
|
| #
c3da6792 |
| 05-Dec-2022 |
Greg Kroah-Hartman <[email protected]> |
usb.h: take advantage of container_of_const()
Instead of rolling our own const-checking logic in to_usb_interface() and to_usb_device() use the newly added container_of_const() instead, making the l
usb.h: take advantage of container_of_const()
Instead of rolling our own const-checking logic in to_usb_interface() and to_usb_device() use the newly added container_of_const() instead, making the logic much simpler overall.
Reviewed-by: Sakari Ailus <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| #
27ef1784 |
| 28-Nov-2022 |
Vincent Mailhol <[email protected]> |
usb: add usb_set_intfdata() documentation
USB drivers do not need to call usb_set_intfdata(intf, NULL) in their usb_driver::disconnect callback because the core already does it in [1].
However, thi
usb: add usb_set_intfdata() documentation
USB drivers do not need to call usb_set_intfdata(intf, NULL) in their usb_driver::disconnect callback because the core already does it in [1].
However, this fact is widely unknown, c.f.:
$ git grep "usb_set_intfdata(.*NULL)" | wc -l 215
Especially, setting the interface to NULL before all action completed can result in a NULL pointer dereference. Not calling usb_set_intfdata() at all in disconnect() is the safest method.
Add documentation to usb_set_intfdata() to clarify this point.
Also remove the call in usb-skeletion's disconnect() not to confuse the new comers.
[1] function usb_unbind_interface() from drivers/usb/core/driver.c Link: https://elixir.bootlin.com/linux/v6.0/source/drivers/usb/core/driver.c#L497
Signed-off-by: Vincent Mailhol <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v6.1-rc7, v6.1-rc6, v6.1-rc5, v6.1-rc4, v6.1-rc3, v6.1-rc2, v6.1-rc1, v6.0 |
|
| #
5033ac5c |
| 01-Oct-2022 |
Greg Kroah-Hartman <[email protected]> |
USB: make devnode() callback in usb_class_driver take a const *
With the changes to the driver core to make more pointers const, the USB subsystem also needs to be modified to take a const * for the
USB: make devnode() callback in usb_class_driver take a const *
With the changes to the driver core to make more pointers const, the USB subsystem also needs to be modified to take a const * for the devnode callback so that the driver core's constant pointer will also be properly propagated.
Cc: Benjamin Tissoires <[email protected]> Cc: Juergen Stuber <[email protected]> Reviewed-by: Johan Hovold <[email protected]> Acked-by: Pete Zaitcev <[email protected]> Reviewed-by: Jiri Kosina <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| #
593efa40 |
| 16-Oct-2022 |
Greg Kroah-Hartman <[email protected]> |
USB: allow some usb functions to take a const pointer.
The functions to_usb_interface(), to_usb_device, and interface_to_usbdev() sometimes would like to take a const * and return a const * back. A
USB: allow some usb functions to take a const pointer.
The functions to_usb_interface(), to_usb_device, and interface_to_usbdev() sometimes would like to take a const * and return a const * back. As we are doing pointer math, a call to container_of() loses the const-ness of a pointer, so use a _Generic() macro to pick the proper inline function to call instead.
Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|