summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/0155-genesys_gl847.patch63
-rw-r--r--debian/patches/series1
2 files changed, 64 insertions, 0 deletions
diff --git a/debian/patches/0155-genesys_gl847.patch b/debian/patches/0155-genesys_gl847.patch
new file mode 100644
index 0000000..27d6b2b
--- /dev/null
+++ b/debian/patches/0155-genesys_gl847.patch
@@ -0,0 +1,63 @@
+Description: Restore slow_back_home use, disable rewind for gl847
+Origin: upstream, https://gitlab.com/sane-project/backends/commit/4354fc7f6da2ee65cbe940a715f11abecdad3f49
+Bug: https://gitlab.com/sane-project/backends/issues/7
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=912603
+Forwarded: not-needed
+Last-Update: 2019-04-28
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/backend/genesys.c
+===================================================================
+--- trunk.orig/backend/genesys.c
++++ trunk/backend/genesys.c
+@@ -2070,11 +2070,17 @@ genesys_white_shading_calibration (Genes
+ dev->model->cmd_set->set_lamp_power (dev, dev->calib_reg, SANE_TRUE);
+ dev->model->cmd_set->set_motor_power (dev->calib_reg, motor);
+
+- /* if needed, go back before doin next scan, by using rewind, registers and
+- * slopes table are kept intact from previous scan */
+- if (dev->model->flags & GENESYS_FLAG_SHADING_REPARK && dev->model->cmd_set->rewind)
++ /* if needed, go back before doing next scan */
++ if (dev->model->flags & GENESYS_FLAG_SHADING_REPARK)
++
+ {
+- status = dev->model->cmd_set->rewind (dev);
++ /* rewind keeps registers and slopes table intact from previous
++ scan but is not available on all supported chipsets (or may
++ cause scan artifacts, see #7) */
++ status = (dev->model->cmd_set->rewind
++ ? dev->model->cmd_set->rewind (dev)
++ : dev->model->cmd_set->slow_back_home (dev, SANE_TRUE));
++
+ }
+
+ status =
+Index: trunk/backend/genesys_gl847.c
+===================================================================
+--- trunk.orig/backend/genesys_gl847.c
++++ trunk/backend/genesys_gl847.c
+@@ -1934,6 +1934,7 @@ gl847_end_scan (Genesys_Device * dev, Ge
+ * @param dev device to rewind
+ * @returns SANE_STATUS_GOOD on success
+ */
++#if 0
+ GENESYS_STATIC
+ SANE_Status gl847_rewind(Genesys_Device * dev)
+ {
+@@ -1965,6 +1966,7 @@ SANE_Status gl847_rewind(Genesys_Device
+ DBGCOMPLETED;
+ return SANE_STATUS_GOOD;
+ }
++#endif
+
+ /** Park head
+ * Moves the slider to the home (top) position slowly
+@@ -3793,7 +3795,7 @@ static Genesys_Command_Set gl847_cmd_set
+ gl847_led_calibration,
+
+ gl847_slow_back_home,
+- gl847_rewind,
++ NULL, /* disable gl847_rewind, see #7 */
+
+ sanei_genesys_bulk_write_register,
+ NULL,
diff --git a/debian/patches/series b/debian/patches/series
index 9da26a2..7dbb3bb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -26,3 +26,4 @@
0715-20-sane.hwdb_multi-arch.patch
0720-mustek_usb2-Avoid-stack-smashing.patch
0725-fix_link_60-libsane_rule.patch
+0155-genesys_gl847.patch