Skip to content

Commit 05df423

Browse files
committed
Merge: USB/TBT code rebase of supported drivers to upstream v6.11
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/5592 JIRA: https://issues.redhat.com/browse/RHEL-59051 CVE: CVE-2024-44960 CVE JIRA: https://issues.redhat.com/browse/RHEL-57138 CVE: CVE-2024-46675 CVE JIRA: https://issues.redhat.com/browse/RHEL-64322 This MR rebases supported USB/TBT drivers to upstream kernel v6.11. By design, changes on this rebase are limited to supported USB/Thunderbolt drivers and infrastructure. Changes which happen to touch the drivers but are tree-wide are selectively or partially pulled in, whenever relevant. Notes: I) Omits: Omitted-fix: aefa036 ("phy: freescale: imx8qm-hsio: Include bitfield.h for FIELD_PREP") Omitted-fix: 2d6213b ("crypto: spacc - Add ifndef around MIN") Omitted-fix: b8fc70a ("Revert "crypto: spacc - Add SPAcc Skcipher support") Omitted-fix: bf79175 ("thunderbolt: Add only on-board retimers when !CONFIG_USB4_DEBUGFS_MARGINING") II) This MR drops `rtsx_pci_ms` driver because it became dead code with commit <c0e5f4e73a71> ("misc: rtsx: Add support for RTS5261"), which as consequence was latter dropped on commit <d0f459259c13> ("memstick: rtsx_pci_ms: Remove Realtek PCI memstick driver"). The latter is being merged here. III) This MR also includes minmax updates to fix these build and test errors: 1 - Signedness error: ``` drivers/usb/typec/ucsi/ucsi.c: In function 'ucsi_get_pd_message': ./include/linux/build_bug.h:78:41: error: static assertion failed: "min(bytes, (((con->ucsi)->version < 0x0200) ? 0x10 : 0xff)) signedness error, fix types or consider umin() before min_t()" 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) ``` 2 - ISO C90 error: ``` drivers/scsi/Makefile:196: FORCE prerequisite is missing lib/vsprintf.c: In function 'resource_string': lib/vsprintf.c:1068:9: error: ISO C90 forbids variable length array 'sym' [-Werror=vla] 1068 | char sym[max(2*RSRC_BUF_SIZE + DECODED_BUF_SIZE, | ^~~~ ``` 3 - Oops on drm_gem_shmem CKI testing: ``` Unable to handle kernel paging request at virtual address ffffffff80000000 ... Internal error: Oops: 0000000096000146 [#1] SMP ... drm_gem_shmem_test_obj_create_private+0x1cc/0x41c [drm_gem_shmem_test] ... # drm_gem_shmem_test_obj_create_private: try faulted: last line seen drivers/gpu/drm/tests/drm_gem_shmem_test.c:120 # drm_gem_shmem_test_obj_create_private: internal error occurred preventing test case from running: -4 ``` Signed-off-by: Desnes Nunes <[email protected]> Approved-by: José Ignacio Tornos Martínez <[email protected]> Approved-by: Bastien Nocera <[email protected]> Approved-by: Tony Camuso <[email protected]> Approved-by: Rafael Aquini <[email protected]> Approved-by: Chris von Recklinghausen <[email protected]> Approved-by: Ivan Vecera <[email protected]> Approved-by: David Arcari <[email protected]> Approved-by: Eric Chanudet <[email protected]> Approved-by: Adam Jackson <[email protected]> Approved-by: CKI KWF Bot <[email protected]> Merged-by: Rado Vrbovsky <[email protected]>
2 parents 7ea05ac + 037b1f0 commit 05df423

File tree

150 files changed

+3624
-2292
lines changed

Some content is hidden

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

150 files changed

+3624
-2292
lines changed

Documentation/ABI/testing/sysfs-bus-pci-drivers-xhci_hcd

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,13 @@ Description:
7575
The default value is 1 (GNU Remote Debug command).
7676
Other permissible value is 0 which is for vendor defined debug
7777
target.
78+
79+
What: /sys/bus/pci/drivers/xhci_hcd/.../dbc_poll_interval_ms
80+
Date: February 2024
81+
Contact: Mathias Nyman <[email protected]>
82+
Description:
83+
This attribute adjust the polling interval used to check for
84+
DbC events. Unit is milliseconds. Accepted values range from 0
85+
up to 5000. The default value is 64 ms.
86+
This polling interval is used while DbC is enabled but has no
87+
active data transfers.

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6855,6 +6855,9 @@
68556855
usb-storage.delay_use=
68566856
[UMS] The delay in seconds before a new device is
68576857
scanned for Logical Units (default 1).
6858+
Optionally the delay in milliseconds if the value has
6859+
suffix with "ms".
6860+
Example: delay_use=2567ms
68586861

68596862
usb-storage.quirks=
68606863
[UMS] A list of quirks entries to supplement or

Documentation/devicetree/bindings/usb/cdns,usb3.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,11 @@ properties:
4242
- const: otg
4343
- const: wakeup
4444

45-
dr_mode:
46-
enum: [host, otg, peripheral]
45+
port:
46+
$ref: /schemas/graph.yaml#/properties/port
47+
description:
48+
This port is used with the 'usb-role-switch' property to connect the
49+
cdns3 to type C connector.
4750

4851
maximum-speed:
4952
enum: [super-speed, high-speed, full-speed]
@@ -70,14 +73,20 @@ properties:
7073
description: Enable resetting of PHY if Rx fail is detected
7174
type: boolean
7275

76+
dependencies:
77+
port: [ usb-role-switch ]
78+
7379
required:
7480
- compatible
7581
- reg
7682
- reg-names
7783
- interrupts
7884
- interrupt-names
7985

80-
additionalProperties: false
86+
allOf:
87+
- $ref: usb-drd.yaml#
88+
89+
unevaluatedProperties: false
8190

8291
examples:
8392
- |
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/usb/fsl,usb2.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Freescale SOC USB controllers
8+
9+
maintainers:
10+
- Frank Li <[email protected]>
11+
12+
description: |
13+
The device node for a USB controller that is part of a Freescale
14+
SOC is as described in the document "Open Firmware Recommended
15+
Practice: Universal Serial Bus" with the following modifications
16+
and additions.
17+
18+
properties:
19+
compatible:
20+
oneOf:
21+
- enum:
22+
- fsl-usb2-mph
23+
- fsl-usb2-dr
24+
- items:
25+
- enum:
26+
- fsl-usb2-dr-v2.2
27+
- fsl-usb2-dr-v2.5
28+
- const: fsl-usb2-dr
29+
30+
reg:
31+
maxItems: 1
32+
33+
interrupts:
34+
maxItems: 1
35+
36+
phy_type:
37+
$ref: /schemas/types.yaml#/definitions/string
38+
enum: [ulpi, serial, utmi, utmi_wide]
39+
40+
port0:
41+
$ref: /schemas/types.yaml#/definitions/flag
42+
description:
43+
Indicates port0 is connected for fsl-usb2-mph compatible controllers.
44+
45+
port1:
46+
$ref: /schemas/types.yaml#/definitions/flag
47+
description:
48+
Indicates port1 is connected for "fsl-usb2-mph" compatible controllers.
49+
50+
fsl,invert-drvvbus:
51+
$ref: /schemas/types.yaml#/definitions/flag
52+
description:
53+
for MPC5121 USB0 only. Indicates the
54+
port power polarity of internal PHY signal DRVVBUS is inverted.
55+
56+
fsl,invert-pwr-fault:
57+
$ref: /schemas/types.yaml#/definitions/flag
58+
description:
59+
for MPC5121 USB0 only. Indicates
60+
the PWR_FAULT signal polarity is inverted.
61+
62+
required:
63+
- compatible
64+
- reg
65+
- interrupts
66+
- phy_type
67+
68+
allOf:
69+
- $ref: usb-drd.yaml#
70+
71+
unevaluatedProperties: false
72+
73+
examples:
74+
- |
75+
#include <dt-bindings/interrupt-controller/irq.h>
76+
77+
usb@22000 {
78+
compatible = "fsl-usb2-mph";
79+
reg = <22000 1000>;
80+
interrupts = <27 IRQ_TYPE_EDGE_RISING>;
81+
phy_type = "ulpi";
82+
port0;
83+
port1;
84+
};
85+
86+
- |
87+
#include <dt-bindings/interrupt-controller/irq.h>
88+
89+
usb@23000 {
90+
compatible = "fsl-usb2-dr";
91+
reg = <23000 1000>;
92+
interrupts = <26 IRQ_TYPE_EDGE_RISING>;
93+
dr_mode = "otg";
94+
phy_type = "ulpi";
95+
};

Documentation/devicetree/bindings/usb/fsl-usb.txt

Lines changed: 0 additions & 81 deletions
This file was deleted.

Documentation/devicetree/bindings/usb/genesys,gl850g.yaml

Lines changed: 55 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ title: Genesys Logic USB hub controller
99
maintainers:
1010
- Icenowy Zheng <[email protected]>
1111

12-
allOf:
13-
- $ref: usb-device.yaml#
14-
1512
properties:
1613
compatible:
1714
enum:
@@ -27,17 +24,44 @@ properties:
2724

2825
vdd-supply:
2926
description:
30-
the regulator that provides 3.3V core power to the hub.
27+
The regulator that provides 3.3V or 5.0V core power to the hub.
3128

3229
peer-hub:
3330
$ref: /schemas/types.yaml#/definitions/phandle
3431
description:
35-
phandle to the peer hub on the controller.
32+
For onboard hub controllers that support USB 3.x and USB 2.0 hubs
33+
with shared resets and power supplies, this property is used to identify
34+
the hubs with which these are shared.
3635

3736
required:
3837
- compatible
3938
- reg
4039

40+
allOf:
41+
- $ref: usb-device.yaml#
42+
- if:
43+
properties:
44+
compatible:
45+
contains:
46+
enum:
47+
- usb5e3,608
48+
then:
49+
properties:
50+
peer-hub: false
51+
vdd-supply: false
52+
53+
- if:
54+
properties:
55+
compatible:
56+
contains:
57+
enum:
58+
- usb5e3,610
59+
- usb5e3,620
60+
then:
61+
properties:
62+
peer-hub: true
63+
vdd-supply: true
64+
4165
additionalProperties: false
4266

4367
examples:
@@ -54,3 +78,29 @@ examples:
5478
reset-gpios = <&pio 7 2 GPIO_ACTIVE_LOW>;
5579
};
5680
};
81+
82+
- |
83+
#include <dt-bindings/gpio/gpio.h>
84+
usb {
85+
dr_mode = "host";
86+
#address-cells = <1>;
87+
#size-cells = <0>;
88+
89+
/* 2.0 hub on port 1 */
90+
hub_2_0: hub@1 {
91+
compatible = "usb5e3,610";
92+
reg = <1>;
93+
peer-hub = <&hub_3_0>;
94+
reset-gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
95+
vdd-supply = <&vcc_5v>;
96+
};
97+
98+
/* 3.1 hub on port 4 */
99+
hub_3_0: hub@2 {
100+
compatible = "usb5e3,620";
101+
reg = <2>;
102+
peer-hub = <&hub_2_0>;
103+
reset-gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
104+
vdd-supply = <&vcc_5v>;
105+
};
106+
};

Documentation/devicetree/bindings/usb/microchip,usb2514.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@ maintainers:
1010
- Fabio Estevam <[email protected]>
1111

1212
allOf:
13-
- $ref: usb-hcd.yaml#
13+
- $ref: usb-device.yaml#
1414

1515
properties:
1616
compatible:
1717
enum:
1818
- usb424,2412
1919
- usb424,2417
2020
- usb424,2514
21+
- usb424,2517
2122

2223
reg: true
2324

@@ -35,6 +36,13 @@ required:
3536
- compatible
3637
- reg
3738

39+
patternProperties:
40+
"^.*@[0-9a-f]{1,2}$":
41+
description: The hard wired USB devices
42+
type: object
43+
$ref: /schemas/usb/usb-device.yaml
44+
additionalProperties: true
45+
3846
unevaluatedProperties: false
3947

4048
examples:

0 commit comments

Comments
 (0)