From dec28456dd9b6c2c389c0bf5e595488e50b7b74bb6f9477985eabe0407e2575a Mon Sep 17 00:00:00 2001 From: OBS User mrdocs Date: Mon, 16 Sep 2013 00:30:49 +0000 Subject: [PATCH 1/3] Accepting request 199164 from home:pinysuse:branches:graphics As described in - when operating on a hp scanjet 8200 - the avision driver gets stuck in a loop trying to detect an ADF, even if none is present. In order circumvent this issue, following workaround has been implemented: 1) create an option "enforce-no-adf" in the file avision.conf 2) patch the code in avision.c to make use of this option, if the conditions that lead to the unsuccessful ADF search (namely detection of NO ADF but reporting of SOME ADF type) is given. > Per default the new option is inactive by comment; activate at your own risk! > patches have been marked with tags <2013-09-15_PNu>, please remove them if accepted. An upstream report was added to OBS-URL: https://build.opensuse.org/request/show/199164 OBS-URL: https://build.opensuse.org/package/show/graphics/sane-backends?expand=0&rev=70 --- avision.c.patch | 48 ++++++++++++++++++++++++++++++++++++++++++++++ avision.conf.patch | 10 ++++++++++ sane-backends.spec | 10 ++++++++++ 3 files changed, 68 insertions(+) create mode 100644 avision.c.patch create mode 100644 avision.conf.patch diff --git a/avision.c.patch b/avision.c.patch new file mode 100644 index 0000000..89d9f81 --- /dev/null +++ b/avision.c.patch @@ -0,0 +1,48 @@ +--- backend/avision.c.orig 2012-07-01 04:00:44.000000000 +0200 ++++ backend/avision.c 2013-09-15 13:24:31.150933718 +0200 +@@ -1273,6 +1273,12 @@ + static SANE_Bool force_a4 = SANE_FALSE; + static SANE_Bool force_a3 = SANE_FALSE; + ++/* <2013-09-15_PNu> ++ * HP Scanjet 8200 w/o ADF fails during the ADF reset loop in get_accessories_info() ++ * Brute force option enforce-no-adf ++ */ ++static SANE_Bool enforce_no_adf = SANE_FALSE; ++ + /* hardware resolutions to interpolate from */ + static const int hw_res_list_c5[] = + { +@@ -3208,6 +3214,17 @@ + + dev->inquiry_adf |= result [0]; + ++ /* <2013-09-15_PNu> ++ * HP Scanjet 8200 w/o ADF fails during the following ADF reset loop ++ */ ++ if (enforce_no_adf) { ++ if (result[0] == 0) { ++ result[2] = 0; /* to prevent fail of following loop */ ++ DBG (3, "get_accessories_info: no adf enforced!\n"); ++ } ++ } ++ /* */ ++ + if (dev->hw->feature_type2 & AV_ADF_FLIPPING_DUPLEX) + { + if (result[0] == 1) +@@ -7637,6 +7654,14 @@ + linenumber); + static_calib_list [2] = SANE_TRUE; + } ++ else if (strcmp (word, "enforce-no-adf") == 0) { ++ /* <2013-09-15_PNu> ++ * Brute force option enforce-no-adf ++ */ ++ DBG (3, "sane_reload_devices: config file line %d: enforce-no-adf\n", ++ linenumber); ++ enforce_no_adf = SANE_TRUE; ++ } + else + DBG (1, "sane_reload_devices: config file line %d: options unknown!\n", + linenumber); diff --git a/avision.conf.patch b/avision.conf.patch new file mode 100644 index 0000000..472daf2 --- /dev/null +++ b/avision.conf.patch @@ -0,0 +1,10 @@ +--- backend/avision.conf.in.orig 2013-09-09 01:19:36.843243005 +0200 ++++ backend/avision.conf.in 2013-09-15 13:13:40.697769805 +0200 +@@ -8,6 +8,7 @@ + #option disable-gamma-table + #option disable-calibration + #option force-a4 ++#option enforce-no-adf + + #scsi AVISION + #scsi FCPA diff --git a/sane-backends.spec b/sane-backends.spec index 0643ce6..dae6f50 100644 --- a/sane-backends.spec +++ b/sane-backends.spec @@ -188,6 +188,11 @@ Patch108: fix-no-return-in-nonvoid-function.patch # Furthermore it removes "unsupported" models from epkowa.desc because # otherwise there would be confusing model entries shown in yast2-scanner: Patch109: adapt_epkowa.desc_for_yast2-scanner.patch +# +Patch110: avision.conf.patch +Patch111: avision.c.patch +# Patch 110 and 111 implement scanjet 8200 ADF workaround acc. https://bugzilla.novell.com/show_bug.cgi?id=840443 +# # Install into this non-root directory (required when norootforbuild is used): BuildRoot: %{_tmppath}/%{name}-%{version}-build # Prerequire /sbin/ldconfig which is used in the traditional bash scriptlets for post/postun: @@ -284,6 +289,11 @@ package or remove it when it is already installed. # Patch109 adapt_epkowa.desc_for_yast2-scanner.patch adapts epkowa.desc for yast2-scanner # see https://bugzilla.novell.com/show_bug.cgi?id=788756#c14 %patch109 +# +# hope this is the right place to insert +%patch110 +%patch111 +# # Source100... is SUSE specific stuff: # Remove hpoj.desc completely to avoid confusion with its successor hpaio.desc # because since openSUSE 10.3 the package hp-officeJet (for hpoj.desc) is dropped. From a17e996b616e3ca3997b6915528f86ee562945557fc3490121919d3ef018a4ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Tue, 24 Sep 2013 12:52:59 +0000 Subject: [PATCH 2/3] Mon Sep 15 23:23:23 UTC 2013 - piny@gmx.com - workaround for hp scanjet 8200 As described in when operating on a hp scanjet 8200 the avision driver gets stuck in a loop trying to detect an ADF, even if none is present. In order circumvent this issue, following workaround has been implemented: 1) create an option "enforce-no-adf" in the file avision.conf 2) patch the code in avision.c to make use of this option, if the conditions that lead to the unsuccessful ADF search (namely detection of NO ADF but reporting of SOME ADF type) is given. Per default the new option is inactive by comment; activate at your own risk! An upstream report was added to - created patch110 for avision.conf - created patch111 for avision.c - introduced patch110 and patch111 into sane-backends.spec OBS-URL: https://build.opensuse.org/package/show/graphics/sane-backends?expand=0&rev=71 --- sane-backends.changes | 19 +++++++++++++++++++ sane-backends.spec | 7 ++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/sane-backends.changes b/sane-backends.changes index affa5e3..7fcf71e 100644 --- a/sane-backends.changes +++ b/sane-backends.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Mon Sep 15 23:23:23 UTC 2013 - piny@gmx.com + +- workaround for hp scanjet 8200 + As described in + when operating on a hp scanjet 8200 the avision driver gets stuck + in a loop trying to detect an ADF, even if none is present. + In order circumvent this issue, following workaround has been implemented: + 1) create an option "enforce-no-adf" in the file avision.conf + 2) patch the code in avision.c to make use of this option, + if the conditions that lead to the unsuccessful ADF search + (namely detection of NO ADF but reporting of SOME ADF type) is given. + Per default the new option is inactive by comment; activate at your own risk! + An upstream report was added to + +- created patch110 for avision.conf +- created patch111 for avision.c +- introduced patch110 and patch111 into sane-backends.spec + ------------------------------------------------------------------- Thu Apr 4 15:52:19 UTC 2013 - meissner@suse.com diff --git a/sane-backends.spec b/sane-backends.spec index dae6f50..e7741aa 100644 --- a/sane-backends.spec +++ b/sane-backends.spec @@ -189,9 +189,10 @@ Patch108: fix-no-return-in-nonvoid-function.patch # otherwise there would be confusing model entries shown in yast2-scanner: Patch109: adapt_epkowa.desc_for_yast2-scanner.patch # -Patch110: avision.conf.patch -Patch111: avision.c.patch -# Patch 110 and 111 implement scanjet 8200 ADF workaround acc. https://bugzilla.novell.com/show_bug.cgi?id=840443 +# Patch 110 and 111 implement scanjet 8200 ADF workaround - bnc#840443 +# https://alioth.debian.org/tracker/index.php?func=detail&aid=314108&group_id=30186&atid=410366 +Patch110: avision.conf.patch +Patch111: avision.c.patch # # Install into this non-root directory (required when norootforbuild is used): BuildRoot: %{_tmppath}/%{name}-%{version}-build From 36c74c156a7281c2ef2eac74c0450501733d972debb649dee572cba59621580b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Tue, 24 Sep 2013 12:54:56 +0000 Subject: [PATCH 3/3] - OBS-URL: https://build.opensuse.org/package/show/graphics/sane-backends?expand=0&rev=72 --- sane-backends.changes | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sane-backends.changes b/sane-backends.changes index 7fcf71e..676a350 100644 --- a/sane-backends.changes +++ b/sane-backends.changes @@ -1,5 +1,5 @@ ------------------------------------------------------------------- -Mon Sep 15 23:23:23 UTC 2013 - piny@gmx.com +Mon Sep 15 23:23:23 UTC 2013 - piny@gmx.com - workaround for hp scanjet 8200 As described in @@ -7,7 +7,7 @@ Mon Sep 15 23:23:23 UTC 2013 - piny@gmx.com in a loop trying to detect an ADF, even if none is present. In order circumvent this issue, following workaround has been implemented: 1) create an option "enforce-no-adf" in the file avision.conf - 2) patch the code in avision.c to make use of this option, + 2) patch the code in avision.c to make use of this option, if the conditions that lead to the unsuccessful ADF search (namely detection of NO ADF but reporting of SOME ADF type) is given. Per default the new option is inactive by comment; activate at your own risk!