1504412 - Scanning using a Canon PiXMA multi-function scanner extremely unreliable

This commit is contained in:
Zdenek Dohnal 2017-10-20 17:55:46 +02:00
parent 4599d426f3
commit 7bfb0d6711
2 changed files with 56 additions and 1 deletions

View File

@ -0,0 +1,49 @@
diff -up sane-backends-1.0.27/backend/pixma_mp150.c.mg5300 sane-backends-1.0.27/backend/pixma_mp150.c
--- sane-backends-1.0.27/backend/pixma_mp150.c.mg5300 2017-10-20 17:39:18.535552297 +0200
+++ sane-backends-1.0.27/backend/pixma_mp150.c 2017-10-20 17:44:48.517691957 +0200
@@ -168,6 +168,7 @@
#define MX420_PID 0x174f
#define MX880_PID 0x1750
+/* Generation 5 */
/* 2011 new devices (untested) */
#define MG2100_PID 0x1751
#define MG3100_PID 0x1752
@@ -1354,7 +1355,7 @@ mp150_check_param (pixma_t * s, pixma_sc
{
uint8_t k = 1;
- /* ADF/ADF duplex mode: max scan res is 600 dpi, at least for generation 4 */
+ /* ADF/ADF duplex mode: max scan res is 600 dpi, at least for generation 4+ */
if (mp->generation >= 4)
k = sp->xdpi / MIN (sp->xdpi, 600);
sp->x /= k;
@@ -1381,7 +1382,7 @@ mp150_scan (pixma_t * s)
if (mp->state != state_idle)
return PIXMA_EBUSY;
- /* Generation 4: send XML dialog */
+ /* Generation 4+: send XML dialog */
/* adf: first page or idle */
if (mp->generation == 4 && mp->adf_state == state_idle)
{
@@ -1423,7 +1424,7 @@ mp150_scan (pixma_t * s)
if (error < 0)
return error;
- /* Generation 4: send XML dialog */
+ /* Generation 4+: send XML dialog */
/* adf: first page or idle */
if (mp->generation == 4 && mp->adf_state == state_idle)
{
@@ -1647,8 +1648,8 @@ mp150_finish_scan (pixma_t * s)
if (error < 0)
PDBG (pixma_dbg (1, "WARNING:abort_session() failed %d\n", error));
- /* Generation 4: send XML end of scan dialog */
- if (mp->generation == 4)
+ /* Generation 4+: send XML end of scan dialog */
+ if (mp->generation >= 4)
{
if (!send_xml_dialog (s, XML_END))
PDBG (pixma_dbg (1, "WARNING:XML_END dialog failed \n"));

View File

@ -33,7 +33,7 @@
Summary: Scanner access software
Name: sane-backends
Version: 1.0.27
Release: 5%{?dist}
Release: 6%{?dist}
# lib/ is LGPLv2+, backends are GPLv2+ with exceptions
# Tools are GPLv2+, docs are public domain
# see LICENSE for details
@ -51,6 +51,8 @@ Patch0: sane-backends-1.0.25-udev.patch
Patch1: sane-backends-1.0.23-soname.patch
# Fedora-specific (for now): make installed sane-config multi-lib aware again
Patch2: sane-backends-1.0.23-sane-config-multilib.patch
# Backported upstream patch - rhbz#1504412
Patch3: sane-backends-mg5300.patch
URL: http://www.sane-project.org
@ -178,6 +180,7 @@ access image acquisition devices available on the local host.
%patch0 -p1 -b .udev
%patch1 -p1 -b .soname
%patch2 -p1 -b .sane-config-multilib
%patch3 -p1 -b .mg5300
%build
CFLAGS="%optflags -fno-strict-aliasing"
@ -328,6 +331,9 @@ exit 0
%{_unitdir}/saned@.service
%changelog
* Fri Oct 20 2017 Zdenek Dohnal <zdohnal@redhat.com> - 1.0.27-6
- 1504412 - Scanning using a Canon PiXMA multi-function scanner extremely unreliable
* Tue Aug 15 2017 Zdenek Dohnal <zdohnal@redhat.com> - 1.0.27-5
- requiring systemd-udev, because sane-backends puts files into its directories
and own maindocdir