Skip to content

Commit 57ea819

Browse files
committed
Merge tag 'usb-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB and Thunderbolt updates from Greg KH: "Here is the big set of USB and Thunderbolt driver changes for 5.17-rc1. Nothing major in here, just lots of little updates and cleanups. These include: - some USB header fixes picked from Ingo's header-splitup work - more USB4/Thunderbolt hardware support added - USB gadget driver updates and additions - USB typec additions (includes some acpi changes, which were acked by the ACPI maintainer) - core USB fixes as found by syzbot that were too late for 5.16-final - USB dwc3 driver updates - USB dwc2 driver updates - platform_get_irq() conversions of some USB drivers - other minor USB driver updates and additions All of these have been in linux-next for a while with no reported issues" * tag 'usb-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (111 commits) docs: ABI: fixed formatting in configfs-usb-gadget-uac2 usb: gadget: u_audio: Subdevice 0 for capture ctls usb: gadget: u_audio: fix calculations for small bInterval usb: dwc2: gadget: initialize max_speed from params usb: dwc2: do not gate off the hardware if it does not support clock gating usb: dwc3: qcom: Fix NULL vs IS_ERR checking in dwc3_qcom_probe headers/deps: USB: Optimize <linux/usb/ch9.h> dependencies, remove <linux/device.h> USB: common: debug: add needed kernel.h include headers/prep: Fix non-standard header section: drivers/usb/host/ohci-tmio.c headers/prep: Fix non-standard header section: drivers/usb/cdns3/core.h headers/prep: usb: gadget: Fix namespace collision USB: core: Fix bug in resuming hub's handling of wakeup requests USB: Fix "slab-out-of-bounds Write" bug in usb_hcd_poll_rh_status usb: dwc3: dwc3-qcom: Add missing platform_device_put() in dwc3_qcom_acpi_register_core usb: gadget: clear related members when goto fail usb: gadget: don't release an existing dev->buf usb: dwc2: Simplify a bitmap declaration usb: Remove usb_for_each_port() usb: typec: port-mapper: Convert to the component framework usb: Link the ports to the connectors they are attached to ...
2 parents 342465f + cbb4f5f commit 57ea819

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+4172
-978
lines changed

Documentation/ABI/testing/configfs-usb-gadget-uac1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ Description:
2727
(in 1/256 dB)
2828
p_volume_res playback volume control resolution
2929
(in 1/256 dB)
30-
req_number the number of pre-allocated request
30+
req_number the number of pre-allocated requests
3131
for both capture and playback
3232
===================== =======================================

Documentation/ABI/testing/configfs-usb-gadget-uac2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,6 @@ Description:
3030
(in 1/256 dB)
3131
p_volume_res playback volume control resolution
3232
(in 1/256 dB)
33+
req_number the number of pre-allocated requests
34+
for both capture and playback
3335
===================== =======================================

Documentation/ABI/testing/sysfs-bus-usb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,15 @@ Description:
244244
is permitted, "u2" if only u2 is permitted, "u1_u2" if both u1 and
245245
u2 are permitted.
246246

247+
What: /sys/bus/usb/devices/.../<hub_interface>/port<X>/connector
248+
Date: December 2021
249+
Contact: Heikki Krogerus <[email protected]>
250+
Description:
251+
Link to the USB Type-C connector when available. This link is
252+
only created when USB Type-C Connector Class is enabled, and
253+
only if the system firmware is capable of describing the
254+
connection between a port and its connector.
255+
247256
What: /sys/bus/usb/devices/.../power/usb2_lpm_l1_timeout
248257
Date: May 2013
249258
Contact: Mathias Nyman <[email protected]>

Documentation/devicetree/bindings/usb/dwc2.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ properties:
114114

115115
usb-role-switch: true
116116

117+
role-switch-default-mode: true
118+
117119
g-rx-fifo-size:
118120
$ref: /schemas/types.yaml#/definitions/uint32
119121
description: size of rx fifo size in gadget mode.
@@ -136,6 +138,17 @@ properties:
136138
description: If present indicates that we need to reset the PHY when we
137139
detect a wakeup. This is due to a hardware errata.
138140

141+
port:
142+
description:
143+
Any connector to the data bus of this controller should be modelled
144+
using the OF graph bindings specified, if the "usb-role-switch"
145+
property is used.
146+
$ref: /schemas/graph.yaml#/properties/port
147+
148+
dependencies:
149+
port: [ usb-role-switch ]
150+
role-switch-default-mode: [ usb-role-switch ]
151+
139152
required:
140153
- compatible
141154
- reg

Documentation/devicetree/bindings/usb/dwc3-xilinx.txt

Lines changed: 0 additions & 56 deletions
This file was deleted.
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/usb/dwc3-xilinx.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Xilinx SuperSpeed DWC3 USB SoC controller
8+
9+
maintainers:
10+
- Manish Narani <[email protected]>
11+
12+
properties:
13+
compatible:
14+
items:
15+
- enum:
16+
- xlnx,zynqmp-dwc3
17+
- xlnx,versal-dwc3
18+
reg:
19+
maxItems: 1
20+
21+
"#address-cells":
22+
enum: [ 1, 2 ]
23+
24+
"#size-cells":
25+
enum: [ 1, 2 ]
26+
27+
ranges: true
28+
29+
power-domains:
30+
description: specifies a phandle to PM domain provider node
31+
maxItems: 1
32+
33+
clocks:
34+
description:
35+
A list of phandle and clock-specifier pairs for the clocks
36+
listed in clock-names.
37+
items:
38+
- description: Master/Core clock, has to be >= 125 MHz
39+
for SS operation and >= 60MHz for HS operation.
40+
- description: Clock source to core during PHY power down.
41+
42+
clock-names:
43+
items:
44+
- const: bus_clk
45+
- const: ref_clk
46+
47+
resets:
48+
description:
49+
A list of phandles for resets listed in reset-names.
50+
51+
items:
52+
- description: USB core reset
53+
- description: USB hibernation reset
54+
- description: USB APB reset
55+
56+
reset-names:
57+
items:
58+
- const: usb_crst
59+
- const: usb_hibrst
60+
- const: usb_apbrst
61+
62+
phys:
63+
minItems: 1
64+
maxItems: 2
65+
66+
phy-names:
67+
minItems: 1
68+
maxItems: 2
69+
items:
70+
enum:
71+
- usb2-phy
72+
- usb3-phy
73+
74+
# Required child node:
75+
76+
patternProperties:
77+
"^usb@[0-9a-f]+$":
78+
$ref: snps,dwc3.yaml#
79+
80+
required:
81+
- compatible
82+
- reg
83+
- "#address-cells"
84+
- "#size-cells"
85+
- ranges
86+
- power-domains
87+
- clocks
88+
- clock-names
89+
- resets
90+
- reset-names
91+
92+
additionalProperties: false
93+
94+
examples:
95+
- |
96+
#include <dt-bindings/dma/xlnx-zynqmp-dpdma.h>
97+
#include <dt-bindings/power/xlnx-zynqmp-power.h>
98+
#include <dt-bindings/reset/xlnx-zynqmp-resets.h>
99+
#include <dt-bindings/clock/xlnx-zynqmp-clk.h>
100+
#include <dt-bindings/reset/xlnx-zynqmp-resets.h>
101+
#include <dt-bindings/phy/phy.h>
102+
axi {
103+
#address-cells = <2>;
104+
#size-cells = <2>;
105+
106+
usb@0 {
107+
#address-cells = <0x2>;
108+
#size-cells = <0x2>;
109+
compatible = "xlnx,zynqmp-dwc3";
110+
reg = <0x0 0xff9d0000 0x0 0x100>;
111+
clocks = <&zynqmp_clk USB0_BUS_REF>, <&zynqmp_clk USB3_DUAL_REF>;
112+
clock-names = "bus_clk", "ref_clk";
113+
power-domains = <&zynqmp_firmware PD_USB_0>;
114+
resets = <&zynqmp_reset ZYNQMP_RESET_USB1_CORERESET>,
115+
<&zynqmp_reset ZYNQMP_RESET_USB1_HIBERRESET>,
116+
<&zynqmp_reset ZYNQMP_RESET_USB1_APB>;
117+
reset-names = "usb_crst", "usb_hibrst", "usb_apbrst";
118+
phys = <&psgtr 2 PHY_TYPE_USB3 0 2>;
119+
phy-names = "usb3-phy";
120+
ranges;
121+
122+
usb@fe200000 {
123+
compatible = "snps,dwc3";
124+
reg = <0x0 0xfe200000 0x0 0x40000>;
125+
interrupt-names = "host", "otg";
126+
interrupts = <0 65 4>, <0 69 4>;
127+
dr_mode = "host";
128+
dma-coherent;
129+
};
130+
};
131+
};

Documentation/devicetree/bindings/usb/qcom,dwc3.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ properties:
1313
compatible:
1414
items:
1515
- enum:
16+
- qcom,ipq4019-dwc3
1617
- qcom,ipq6018-dwc3
18+
- qcom,ipq8064-dwc3
1719
- qcom,msm8996-dwc3
1820
- qcom,msm8998-dwc3
1921
- qcom,sc7180-dwc3
@@ -23,9 +25,11 @@ properties:
2325
- qcom,sdx55-dwc3
2426
- qcom,sm4250-dwc3
2527
- qcom,sm6115-dwc3
28+
- qcom,sm6350-dwc3
2629
- qcom,sm8150-dwc3
2730
- qcom,sm8250-dwc3
2831
- qcom,sm8350-dwc3
32+
- qcom,sm8450-dwc3
2933
- const: qcom,dwc3
3034

3135
reg:

Documentation/driver-api/usb/writing_usb_driver.rst

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ usually in the driver's init function, as shown here::
9494
/* register this driver with the USB subsystem */
9595
result = usb_register(&skel_driver);
9696
if (result < 0) {
97-
err("usb_register failed for the "__FILE__ "driver."
98-
"Error number %d", result);
97+
pr_err("usb_register failed for the %s driver. Error number %d\n",
98+
skel_driver.name, result);
9999
return -1;
100100
}
101101

@@ -170,8 +170,8 @@ structure. This is done so that future calls to file operations will
170170
enable the driver to determine which device the user is addressing. All
171171
of this is done with the following code::
172172

173-
/* increment our usage count for the module */
174-
++skel->open_count;
173+
/* increment our usage count for the device */
174+
kref_get(&dev->kref);
175175

176176
/* save our object in the file's private structure */
177177
file->private_data = dev;
@@ -188,24 +188,26 @@ space, points the urb to the data and submits the urb to the USB
188188
subsystem. This can be seen in the following code::
189189

190190
/* we can only write as much as 1 urb will hold */
191-
bytes_written = (count > skel->bulk_out_size) ? skel->bulk_out_size : count;
191+
size_t writesize = min_t(size_t, count, MAX_TRANSFER);
192192

193193
/* copy the data from user space into our urb */
194-
copy_from_user(skel->write_urb->transfer_buffer, buffer, bytes_written);
194+
copy_from_user(buf, user_buffer, writesize);
195195

196196
/* set up our urb */
197-
usb_fill_bulk_urb(skel->write_urb,
198-
skel->dev,
199-
usb_sndbulkpipe(skel->dev, skel->bulk_out_endpointAddr),
200-
skel->write_urb->transfer_buffer,
201-
bytes_written,
197+
usb_fill_bulk_urb(urb,
198+
dev->udev,
199+
usb_sndbulkpipe(dev->udev, dev->bulk_out_endpointAddr),
200+
buf,
201+
writesize,
202202
skel_write_bulk_callback,
203-
skel);
203+
dev);
204204

205205
/* send the data out the bulk port */
206-
result = usb_submit_urb(skel->write_urb);
207-
if (result) {
208-
err("Failed submitting write urb, error %d", result);
206+
retval = usb_submit_urb(urb, GFP_KERNEL);
207+
if (retval) {
208+
dev_err(&dev->interface->dev,
209+
"%s - failed submitting write urb, error %d\n",
210+
__func__, retval);
209211
}
210212

211213

Documentation/usb/gadget-testing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ The uac1 function provides these attributes in its function directory:
931931
p_volume_min playback volume control min value (in 1/256 dB)
932932
p_volume_max playback volume control max value (in 1/256 dB)
933933
p_volume_res playback volume control resolution (in 1/256 dB)
934-
req_number the number of pre-allocated request for both capture
934+
req_number the number of pre-allocated requests for both capture
935935
and playback
936936
================ ====================================================
937937

MAINTAINERS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21033,6 +21033,14 @@ F: drivers/scsi/xen-scsifront.c
2103321033
F: drivers/xen/xen-scsiback.c
2103421034
F: include/xen/interface/io/vscsiif.h
2103521035

21036+
XEN PVUSB DRIVER
21037+
M: Juergen Gross <[email protected]>
21038+
L: [email protected] (moderated for non-subscribers)
21039+
21040+
S: Supported
21041+
F: drivers/usb/host/xen*
21042+
F: include/xen/interface/io/usbif.h
21043+
2103621044
XEN SOUND FRONTEND DRIVER
2103721045
M: Oleksandr Andrushchenko <[email protected]>
2103821046
L: [email protected] (moderated for non-subscribers)

0 commit comments

Comments
 (0)