diff --git a/sane-backends-1.0.21-SCX4500W.patch b/sane-backends-1.0.21-SCX4500W.patch new file mode 100644 index 0000000..78c1aa0 --- /dev/null +++ b/sane-backends-1.0.21-SCX4500W.patch @@ -0,0 +1,34 @@ +From 0643804b4e76c0047df1d61ebee1adfe4696d9d4 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Wed, 3 Nov 2010 17:54:24 +0100 +Subject: [PATCH] patch: SCX4500W + +Squashed commit of the following: + +commit d3d53225c2a5ee271141bd058e628ffa66d0c065 +Author: Nils Philippsen +Date: Wed Nov 3 17:53:32 2010 +0100 + + add USB id for SCX-4500W +--- + doc/descriptions/xerox_mfp.desc | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/doc/descriptions/xerox_mfp.desc b/doc/descriptions/xerox_mfp.desc +index 406510f..6b8aa5f 100644 +--- a/doc/descriptions/xerox_mfp.desc ++++ b/doc/descriptions/xerox_mfp.desc +@@ -48,6 +48,10 @@ + :usbid "0x04e8" "0x3426" + :status :good + ++:model "SCX-4500W" ++:interface "USB" ++:usbid "0x04e8" "0x342b" ++ + :model "CLX-3170fn" + :interface "USB" + :usbid "0x04e8" "0x342a" +-- +1.7.3.2 + diff --git a/sane-backends-1.0.22-xerox_mfp-fix-usb-devices.patch b/sane-backends-1.0.22-xerox_mfp-fix-usb-devices.patch new file mode 100644 index 0000000..6c41805 --- /dev/null +++ b/sane-backends-1.0.22-xerox_mfp-fix-usb-devices.patch @@ -0,0 +1,81 @@ +From 9792fb4ac11443553771d4f311a985333b503594 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Tue, 10 May 2011 10:22:02 +0200 +Subject: [PATCH] patch: xerox_mfp-fix-usb-devices + +Squashed commit of the following: + +commit 962a5a657b750f99b274d58763667bd199f5cb5d +Author: Alex Belkin +Date: Tue Mar 8 17:57:19 2011 +0300 + + keep usb device by default (correct for bug introduced by tcp sub-backend + (cherry picked from commit 5ea227caeacd504b64eef301e83fa63e0a25b3f7) +--- + backend/xerox_mfp.c | 27 +++++++++++---------------- + 1 files changed, 11 insertions(+), 16 deletions(-) + +diff --git a/backend/xerox_mfp.c b/backend/xerox_mfp.c +index e08b50f..d4672a7 100644 +--- a/backend/xerox_mfp.c ++++ b/backend/xerox_mfp.c +@@ -37,10 +37,10 @@ + static const SANE_Device **devlist = NULL; /* sane_get_devices array */ + static struct device *devices_head = NULL; /* sane_get_devices list */ + +-transport available_transports[] = { ++enum { TRANSPORT_USB, TRANSPORT_TCP, TRANSPORTS_MAX }; ++transport available_transports[TRANSPORTS_MAX] = { + { "usb", usb_dev_request, usb_dev_open, usb_dev_close, usb_configure_device }, + { "tcp", tcp_dev_request, tcp_dev_open, tcp_dev_close, tcp_configure_device }, +- { 0 } + }; + + static int resolv_state(int state) +@@ -824,7 +824,13 @@ free_devices (void) + devices_head = NULL; + } + +-/* SANE API ignores return code of this callback */ ++static transport *tr_from_devname(SANE_String_Const devname) ++{ ++ if (strncmp("tcp", devname, 3) == 0) ++ return &available_transports[TRANSPORT_TCP]; ++ return &available_transports[TRANSPORT_USB]; ++} ++ + static SANE_Status + list_one_device (SANE_String_Const devname) + { +@@ -839,12 +845,7 @@ list_one_device (SANE_String_Const devname) + return SANE_STATUS_GOOD; + } + +- for (tr = available_transports; tr->ttype; tr++) { +- if (!strncmp (devname, tr->ttype, strlen(tr->ttype))) +- break; +- } +- if (!tr->ttype) +- return SANE_STATUS_INVAL; ++ tr = tr_from_devname(devname); + + dev = calloc (1, sizeof (struct device)); + if (dev == NULL) +@@ -878,13 +879,7 @@ list_one_device (SANE_String_Const devname) + static SANE_Status + list_conf_devices (UNUSED (SANEI_Config * config), const char *devname) + { +- transport *tr; +- +- for (tr = available_transports; tr->ttype; tr++) { +- if (!strncmp (devname, tr->ttype, strlen(tr->ttype))) +- return tr->configure_device(devname, list_one_device); +- } +- return SANE_STATUS_INVAL; ++ return tr_from_devname(devname)->configure_device(devname, list_one_device); + } + + SANE_Status +-- +1.7.5.1 + diff --git a/sane-backends.changes b/sane-backends.changes index 67b741f..de90b79 100644 --- a/sane-backends.changes +++ b/sane-backends.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Feb 5 20:18:31 UTC 2012 - lnussel@suse.de + +- add usb id for SCX4500W +- fix usb device handling regression in xerox_mfp (bnc#745245) + ------------------------------------------------------------------- Sun Nov 20 06:28:34 UTC 2011 - coolo@suse.com diff --git a/sane-backends.spec b/sane-backends.spec index 25114e6..f7b0ff8 100644 --- a/sane-backends.spec +++ b/sane-backends.spec @@ -1,7 +1,7 @@ # # spec file for package sane-backends # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -153,6 +153,10 @@ Patch103: install-umax_pp-tool.patch # Patch104 removes descriptions-external/hpoj.desc from doc/Makefile.am # because it is intentionally removed from the sources in the prep section: Patch104: no-descriptions-external-hpoj.patch +# additional usb id +Patch105: sane-backends-1.0.21-SCX4500W.patch +# fix usb device support in xerox_mfp (bnc#745245) +Patch106: sane-backends-1.0.22-xerox_mfp-fix-usb-devices.patch # Patch105 sane-backends-1.0.20-xerox_mfp.diff backports post 1.0.20 xerox_mfp changes # and is therefore removed since sane-backends-1.0.21 which contains those changes. # Install into this non-root directory (required when norootforbuild is used): @@ -350,6 +354,8 @@ Authors: # Patch104 removes descriptions-external/hpoj.desc from doc/Makefile.am # because it is intentionally removed from the sources in the prep section: %patch104 +%patch105 -p1 +%patch106 -p1 # 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.