summaryrefslogtreecommitdiff
path: root/backend/pieusb.c
diff options
context:
space:
mode:
Diffstat (limited to 'backend/pieusb.c')
-rw-r--r--backend/pieusb.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/backend/pieusb.c b/backend/pieusb.c
index a070fc0..f8dc073 100644
--- a/backend/pieusb.c
+++ b/backend/pieusb.c
@@ -110,6 +110,8 @@ extern void write_tiff_rgbi_header (FILE *fptr, int width, int height, int depth
/* device flags */
#define FLAG_SLIDE_TRANSPORT 0x01
+/* Some scanners do understand SLIDE_TRANSPORT but not CMD_17 - introducing a new flag */
+#define FLAG_CMD_17_NOSUPPORT 0x02
/* --------------------------------------------------------------------------
*
@@ -163,7 +165,6 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback __sane_unused__ authorize
DBG (DBG_info_sane, "sane_init() build %d\n", BUILD);
/* Set version code to current major, minor and build number */
- /* TODO: use V_MINOR instead or SANE_CURRENT_MINOR? If so, why? */
if (version_code)
*version_code = SANE_VERSION_CODE (SANE_CURRENT_MAJOR, SANE_CURRENT_MINOR, BUILD);
@@ -1004,10 +1005,12 @@ sane_start (SANE_Handle handle)
/* ----------------------------------------------------------------------
*
* Function 17
+ * This function is not supported by all scanners which are capable of
+ * slide transport, therefore FLAG_CMD_17_NOSUPPORT was introduced.
*
* ---------------------------------------------------------------------- */
- if (scanner->device->flags & FLAG_SLIDE_TRANSPORT) {
+ if ( (scanner->device->flags & FLAG_SLIDE_TRANSPORT) & !(scanner->device->flags & FLAG_CMD_17_NOSUPPORT) ) {
sanei_pieusb_cmd_17 (scanner->device_number, 1, &status);
if (status.pieusb_status != PIEUSB_STATUS_GOOD) {
DBG (DBG_error, "sane_start(): sanei_pieusb_cmd_17 failed: %d\n", status.pieusb_status);