about summary refs log tree commit diff
path: root/machines
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2016-04-03 23:25:12 +0200
committerProfpatsch <mail@profpatsch.de>2016-04-03 23:25:12 +0200
commitae0666f09ea8c08d9406bed1b32b89df68ac54f2 (patch)
tree8b06d3dd24d2f242b3bb25c875953476ba099b4d /machines
parentab0d19191f6bf7d787da71f241db2875993b0177 (diff)
machines/katara: kernel usb-failure patch
grabbed from https://www.spinics.net/lists/linux-usb/msg137228.html,
because it could still take a while until it arrives in upstream.
Diffstat (limited to 'machines')
-rw-r--r--machines/profpatsch/katara.nix1
-rw-r--r--machines/profpatsch/kernel-usb.patch11
-rw-r--r--machines/profpatsch/pkgs.nix6
3 files changed, 18 insertions, 0 deletions
diff --git a/machines/profpatsch/katara.nix b/machines/profpatsch/katara.nix
index c86e4e37..c9695151 100644
--- a/machines/profpatsch/katara.nix
+++ b/machines/profpatsch/katara.nix
@@ -32,6 +32,7 @@ in {
     boot.loader.grub.version = 2;
     boot.loader.grub.device = "/dev/sda";
     boot.initrd.luks.devices = [ { device = "/dev/sda2"; name = "cryptroot"; } ];
+    boot.kernelPackages = myPkgs.linuxPackages;
 
 
     ###########
diff --git a/machines/profpatsch/kernel-usb.patch b/machines/profpatsch/kernel-usb.patch
new file mode 100644
index 00000000..e51b1aad
--- /dev/null
+++ b/machines/profpatsch/kernel-usb.patch
@@ -0,0 +1,11 @@
+--- a/drivers/usb/storage/uas.c	2016-04-03 21:45:04.326212268 +0200
++++ b/drivers/usb/storage/uas.c	2016-04-03 21:51:45.263114257 +0200
+@@ -812,7 +812,7 @@
+ 	.slave_configure = uas_slave_configure,
+ 	.eh_abort_handler = uas_eh_abort_handler,
+ 	.eh_bus_reset_handler = uas_eh_bus_reset_handler,
+-	.can_queue = 65536,	/* Is there a limit on the _host_ ? */
++	.can_queue = MAX_CMNDS,	/* Is there a limit on the _host_ ? */
+ 	.this_id = -1,
+ 	.sg_tablesize = SG_NONE,
+ 	.skip_settle_delay = 1,
diff --git a/machines/profpatsch/pkgs.nix b/machines/profpatsch/pkgs.nix
index 7ea0fd1f..fb8450cf 100644
--- a/machines/profpatsch/pkgs.nix
+++ b/machines/profpatsch/pkgs.nix
@@ -28,4 +28,10 @@ with pkgs;
 
   # sent = pkgs:q.sent.override { patches = [ ./sent-bg.patch ]; };
   inherit sent;
+
+  linuxPackages = linuxPackages // {
+    kernel = linuxPackages.kernel.override {
+      kernelPatches = [ { name = "usb-fix"; patch = ./kernel-usb.patch; } ];
+    };
+  };
 }