tangled
alpha
login
or
join now
da157.id
/
nix-config
0
fork
atom
0xda157's home-manager and nixos config
0
fork
atom
overview
issues
pulls
pipelines
add patch for moverio
0xda157
3 months ago
4606908b
765a30d0
+49
2 changed files
expand all
collapse all
unified
split
modules
hosts
nixos
enceladus
default.nix
moverio.patch
+7
modules/hosts/nixos/enceladus/default.nix
···
29
29
};
30
30
};
31
31
32
32
+
boot.kernelPatches = [
33
33
+
{
34
34
+
name = "moverio-bt40";
35
35
+
patch = ./moverio.patch;
36
36
+
}
37
37
+
];
38
38
+
32
39
nixpkgs.config.allowUnfree = true;
33
40
34
41
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
+42
modules/hosts/nixos/enceladus/moverio.patch
···
1
1
+
--
2
2
+
drivers/usb/class/cdc-acm.c | 9 +++++++++
3
3
+
drivers/usb/class/cdc-acm.h | 1 +
4
4
+
2 files changed, 10 insertions(+)
5
5
+
6
6
+
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
7
7
+
index 54be4aa1dcb2..00c72ddd4ce1 100644
8
8
+
--- a/drivers/usb/class/cdc-acm.c
9
9
+
+++ b/drivers/usb/class/cdc-acm.c
10
10
+
@@ -1225,6 +1225,12 @@ static int acm_probe(struct usb_interface *intf,
11
11
+
if (!data_interface || !control_interface)
12
12
+
return -ENODEV;
13
13
+
goto skip_normal_probe;
14
14
+
+ } else if (quirks == NO_UNION_12) {
15
15
+
+ data_interface = usb_ifnum_to_if(usb_dev, 2);
16
16
+
+ control_interface = usb_ifnum_to_if(usb_dev, 1);
17
17
+
+ if (!data_interface || !control_interface)
18
18
+
+ return -ENODEV;
19
19
+
+ goto skip_normal_probe;
20
20
+
}
21
21
+
22
22
+
/* normal probing*/
23
23
+
@@ -1746,6 +1752,9 @@ static const struct usb_device_id acm_ids[] = {
24
24
+
{ USB_DEVICE(0x045b, 0x024D), /* Renesas R-Car E3 USB Download mode */
25
25
+
.driver_info = DISABLE_ECHO, /* Don't echo banner */
26
26
+
},
27
27
+
+ { USB_DEVICE(0x04b8, 0x0d12), /* EPSON HMD Com&Sens */
28
28
+
+ .driver_info = NO_UNION_12, /* union descriptor is garbage */
29
29
+
+ },
30
30
+
{ USB_DEVICE(0x0e8d, 0x0003), /* FIREFLY, MediaTek Inc; andrey.arapov@gmail.com */
31
31
+
.driver_info = NO_UNION_NORMAL, /* has no union descriptor */
32
32
+
},
33
33
+
diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h
34
34
+
index 759ac15631d3..0e32330391ca 100644
35
35
+
--- a/drivers/usb/class/cdc-acm.h
36
36
+
+++ b/drivers/usb/class/cdc-acm.h
37
37
+
@@ -113,3 +113,4 @@ struct acm {
38
38
+
#define CLEAR_HALT_CONDITIONS BIT(5)
39
39
+
#define SEND_ZERO_PACKET BIT(6)
40
40
+
#define DISABLE_ECHO BIT(7)
41
41
+
+#define NO_UNION_12 BIT(8)
42
42
+
--