1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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,
|