Subject: kern/12218: A back-port of the current-20010214 USB scanner driver to 1.5
To: None <gnats-bugs@gnats.netbsd.org>
From: Chris Baird <cjb@brushtail.apana.org.au>
List: netbsd-bugs
Date: 02/16/2001 12:11:19
>Number: 12218
>Category: kern
>Synopsis: A quick-and-dirty port of current's uscanner driver to 1.5
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Thu Feb 15 17:17:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Chris Baird
>Release: NetBSD-1.5
>Organization:
Australian Public Access Network Association
>Environment:
System: NetBSD brushtail.apana.org.au 1.5 NetBSD 1.5 (BRUSHTAIL) #41: Fri Feb 16 10:23:34 EST 2001 root@brushtail.apana.org.au:/usr/src/sys/arch/i386/compile/BRUSHTAIL i386
>Description:
Merging the usb "uscanner" driver from current-20010214 proves
to be a near-trivial task. While the uscanner code is still in its
infancy and might not be tested enough for inclusion in 1.5.1, it
'works well enough for me' and provides a useful driver to the latest
stable release.
>How-To-Repeat:
>Fix:
Patches meant as a guide only. The 1.5.x release team would no doubt
have better ideas regarding the new device.
/sys/arch/i386/i386/conf.c
*** 219,220 ****
--- 219,222 ----
cdev_decl(urio);
+ #include "uscanner.h"
+ cdev_decl(uscanner);
#include "vcoda.h"
*** 392,393 ****
--- 395,398 ----
cdev_ses_init(NSES,ses), /* 74: SCSI SES/SAF-TE */
+ cdev_ugen_init(NUSCANNER,uscanner), /* 75: USB scanner */
};
/sys/dev/DEVNAMES
*** 875,876 ****
--- 875,877 ----
usbbus MI
+ uscanner MI
ut vax
/sys/dev/usb/files.usb
*** 111 ****
--- 111,118 ----
file dev/usb/uftdi.c uftdi
+
+ # Scanners
+ # Generic scanner support
+ device uscanner
+ attach uscanner at uhub
+ file dev/usb/uscanner.c uscanner needs-flag
/sys/dev/usb/usb_port.h
*** 70,71 ****
--- 70,72 ----
#define UFTDI_DEBUG 1
+ #define USCANNER_DEBUG 1
#define Static
*** 224,225 ****
--- 225,227 ----
#define ugenpoll ugenselect
+ #define uscannerpoll uscannerselect
Also copy in the USB device lists and uscanner.c code.
# cp /usr/tmp/current/sys/dev/usb/usbdevs .
# cp /usr/tmp/current/sys/dev/usb/uscanner.c .
>Release-Note:
>Audit-Trail:
>Unformatted: