0xda157's home-manager and nixos config

add patch for moverio

0xda157 4606908b 765a30d0

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