Hi Antoine,

This patch fixes some broken PIXMA scanners, as successfully tested by 
Mikolaj Kucharski and myself.  The patch has been already sent upstream
but not verified/accepted yet:

        https://gitlab.com/sane-project/backends/-/issues/412

OK to get the patch in until there is a solution provided by upstream?

Thanks,
Marcus


Index: graphics/sane-backends/Makefile
===================================================================
RCS file: /cvs/ports/graphics/sane-backends/Makefile,v
retrieving revision 1.95
diff -u -p -u -p -r1.95 Makefile
--- graphics/sane-backends/Makefile     20 Dec 2020 09:56:36 -0000      1.95
+++ graphics/sane-backends/Makefile     9 Jan 2021 22:07:38 -0000
@@ -5,7 +5,7 @@ BROKEN-alpha=           ICE hp5590.c:1141: error:
 COMMENT=               API for accessing scanners, backends
 
 DISTNAME=              sane-backends-1.0.31
-REVISION=              1
+REVISION=              2
 
 SHARED_LIBS +=  sane                 2.1      # unknown
 
Index: graphics/sane-backends/patches/patch-backend_pixma_pixma_io_sanei_c
===================================================================
RCS file: graphics/sane-backends/patches/patch-backend_pixma_pixma_io_sanei_c
diff -N graphics/sane-backends/patches/patch-backend_pixma_pixma_io_sanei_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ graphics/sane-backends/patches/patch-backend_pixma_pixma_io_sanei_c 9 Jan 
2021 22:07:38 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Index: backend/pixma/pixma_io_sanei.c
+--- backend/pixma/pixma_io_sanei.c.orig        Sun Aug 23 13:59:20 2020
++++ backend/pixma/pixma_io_sanei.c     Tue Jan  5 15:30:06 2021
+@@ -538,8 +538,7 @@ pixma_wait_interrupt (pixma_io_t * io, void *buf, unsi
+ #endif
+       error = map_error (sanei_usb_read_int (io->dev, buf, &count));
+     }
+-  if (error == PIXMA_EIO ||
+-      (io->interface == INT_BJNP && error == PIXMA_EOF))     /* EOF is a bjnp 
timeout error! */
++  if (error == PIXMA_EIO || error == PIXMA_EOF)
+     error = PIXMA_ETIMEDOUT;  /* FIXME: SANE doesn't have ETIMEDOUT!! */
+   if (error == 0)
+     error = count;

Reply via email to