Hi,
Here's a patch against 2.5.1-pre7 that updates the usb scanner driver to
the latest version.
thanks,
greg k-h
diff -Nru a/Documentation/usb/scanner.txt b/Documentation/usb/scanner.txt
--- a/Documentation/usb/scanner.txt Fri Dec 7 21:30:07 2001
+++ b/Documentation/usb/scanner.txt Fri Dec 7 21:30:07 2001
@@ -83,7 +83,7 @@
`mknod /dev/usbscanner1 c 180 49`
.
.
- `mknod /dev/usbscanner15 180 63`
+ `mknod /dev/usbscanner15 c 180 63`
If you foresee using only one scanner it is best to:
diff -Nru a/drivers/usb/scanner.c b/drivers/usb/scanner.c
--- a/drivers/usb/scanner.c Fri Dec 7 21:30:08 2001
+++ b/drivers/usb/scanner.c Fri Dec 7 21:30:08 2001
@@ -278,6 +278,28 @@
* - Users are now notified to consult the Documentation/usb/scanner.txt
* for common error messages rather than the maintainer.
*
+ * 0.4.7 11/28/2001
+ * - Fixed typo in Documentation/scanner.txt. Thanks to
+ * Karel <[EMAIL PROTECTED]> for pointing it out.
+ * - Added ID's for a Memorex 6136u. Thanks to �lvaro Gaspar de
+ * Valenzuela" <[EMAIL PROTECTED]>.
+ * - Added ID's for Agfa e25. Thanks to Heinrich
+ * Rust <[EMAIL PROTECTED]>. Also reported to work with
+ * Linux and SANE (?).
+ * - Added Canon FB620U, D646U, and 1220U ID's. Thanks to Paul
+ * Rensing <[EMAIL PROTECTED]>. For more info
+ * on Linux support for these models, contact
+ * [EMAIL PROTECTED]
+ * - Added Plustek OpticPro UT12, OpticPro U24, KYE/Genius
+ * ColorPage-HR6 V2 ID's in addition to many "Unknown" models
+ * under those vendors. Thanks to
+ * Jaeger, Gerhard" <[EMAIL PROTECTED]>. These scanner are
+ * apparently based upon the LM983x IC's.
+ * - Applied Frank's patch that addressed some locking and module
+ * referencing counts. Thanks to both
+ * Frank Zago <[EMAIL PROTECTED]> and
+ * Oliver Neukum <[EMAIL PROTECTED]> for reviewing/testing.
+ *
* TODO
* - Performance
* - Select/poll methods
@@ -324,17 +346,16 @@
struct scn_usb_data *scn;
unsigned char *data;
scn = urb->context;
- down(&(scn->sem));
+
data = &scn->button;
data += 0; /* Keep gcc from complaining about unused var */
if (urb->status) {
- up(&(scn->sem));
return;
}
dbg("irq_scanner(%d): data:%x", scn->scn_minor, *data);
- up(&(scn->sem));
+
return;
}
@@ -358,6 +379,7 @@
if (!p_scn_table[scn_minor]) {
up(&scn_mutex);
+ MOD_DEC_USE_COUNT;
err("open_scanner(%d): Unable to access minor data", scn_minor);
return -ENODEV;
}
@@ -606,7 +628,7 @@
}
ret = result;
break;
- } else if ((result < 0) && (result != USB_ST_DATAUNDERRUN)) {
+ } else if ((result < 0) && (result != -EREMOTEIO)) {
warn("read_scanner(%d): funky result:%d. Consult
Documentation/usb/scanner.txt.", scn_minor, (int)result);
ret = -EIO;
break;
@@ -939,6 +961,7 @@
/* Check to make sure that the last slot isn't already taken */
if (p_scn_table[scn_minor]) {
err("probe_scanner: No more minor devices remaining.");
+ up(&scn_mutex);
return NULL;
}
@@ -946,6 +969,7 @@
if (!(scn = kmalloc (sizeof (struct scn_usb_data), GFP_KERNEL))) {
err("probe_scanner: Out of memory.");
+ up(&scn_mutex);
return NULL;
}
memset (scn, 0, sizeof(struct scn_usb_data));
@@ -1028,9 +1052,11 @@
if (scn->devfs == NULL)
dbg("scanner%d: device node registration failed", scn_minor);
+ p_scn_table[scn_minor] = scn;
+
up(&scn_mutex);
- return p_scn_table[scn_minor] = scn;
+ return scn;
}
static void
diff -Nru a/drivers/usb/scanner.h b/drivers/usb/scanner.h
--- a/drivers/usb/scanner.h Fri Dec 7 21:30:07 2001
+++ b/drivers/usb/scanner.h Fri Dec 7 21:30:07 2001
@@ -86,12 +86,23 @@
{ USB_DEVICE(0x06bd, 0x2061) }, /* Another SnapScan 1212U (?)*/
{ USB_DEVICE(0x06bd, 0x0100) }, /* SnapScan Touch */
{ USB_DEVICE(0x06bd, 0x2091) }, /* SnapScan e20 */
+ { USB_DEVICE(0x06bd, 0x2095) }, /* SnapScan e25 */
{ USB_DEVICE(0x06bd, 0x2097) }, /* SnapScan e26 */
{ USB_DEVICE(0x06bd, 0x208d) }, /* Snapscan e40 */
+ /* Canon */
+ { USB_DEVICE(0x04a9, 0x2202) }, /* FB620U */
+ { USB_DEVICE(0x04a9, 0x220b) }, /* D646U */
+ { USB_DEVICE(0x04a9, 0x2207) }, /* 1220U */
/* Colorado -- See Primax/Colorado below */
/* Epson -- See Seiko/Epson below */
/* Genius */
{ USB_DEVICE(0x0458, 0x2001) }, /* ColorPage-Vivid Pro */
+ { USB_DEVICE(0x0458, 0x2007) }, /* ColorPage HR6 V2 */
+ { USB_DEVICE(0x0458, 0x2008) }, /* Unknown */
+ { USB_DEVICE(0x0458, 0x2009) }, /* Unknown */
+ { USB_DEVICE(0x0458, 0x2013) }, /* Unknown */
+ { USB_DEVICE(0x0458, 0x2015) }, /* Unknown */
+ { USB_DEVICE(0x0458, 0x2016) }, /* Unknown */
/* Hewlett Packard */
{ USB_DEVICE(0x03f0, 0x0205) }, /* 3300C */
{ USB_DEVICE(0x03f0, 0x0405) }, /* 3400C */
@@ -108,6 +119,8 @@
{ USB_DEVICE(0x0638, 0x0268) }, /* 1200U */
/* Lifetec */
{ USB_DEVICE(0x05d8, 0x4002) }, /* Lifetec LT9385 */
+ /* Memorex */
+ { USB_DEVICE(0x0461, 0x0346) }, /* 6136u - repackaged Primax ? */
/* Microtek -- No longer supported - Enable SCSI and USB Microtek in kernel
config */
// { USB_DEVICE(0x05da, 0x0099) }, /* ScanMaker X6 - X6U */
// { USB_DEVICE(0x05da, 0x0094) }, /* Phantom 336CX - C3 */
@@ -128,6 +141,19 @@
{ USB_DEVICE(0x0400, 0x1001) }, /* BearPaw 2400 */
{ USB_DEVICE(0x055f, 0x0008) }, /* 1200 CU Plus */
{ USB_DEVICE(0x0ff5, 0x0010) }, /* BearPaw 1200F */
+ /* Plustek */
+ { USB_DEVICE(0x07b3, 0x0017) }, /* OpticPro UT12 */
+ { USB_DEVICE(0x07b3, 0x0011) }, /* OpticPro UT24 */
+ { USB_DEVICE(0x07b3, 0x0005) }, /* Unknown */
+ { USB_DEVICE(0x07b3, 0x0007) }, /* Unknown */
+ { USB_DEVICE(0x07b3, 0x000F) }, /* Unknown */
+ { USB_DEVICE(0x07b3, 0x0010) }, /* Unknown */
+ { USB_DEVICE(0x07b3, 0x0012) }, /* Unknown */
+ { USB_DEVICE(0x07b3, 0x0013) }, /* Unknown */
+ { USB_DEVICE(0x07b3, 0x0014) }, /* Unknown */
+ { USB_DEVICE(0x07b3, 0x0015) }, /* Unknown */
+ { USB_DEVICE(0x07b3, 0x0016) }, /* Unknown */
+ { USB_DEVICE(0x07b3, 0x0012) }, /* Unknown */
/* Primax/Colorado */
{ USB_DEVICE(0x0461, 0x0300) }, /* G2-300 #1 */
{ USB_DEVICE(0x0461, 0x0380) }, /* G2-600 #1 */
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel