From: kstailey Date: Tue, 11 Mar 1997 03:40:49 +0000 (+0000) Subject: move init. code to m.i. section X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=430abf96ff78b665d8ac6fb6d3326dd9bd5b8e06;p=openbsd move init. code to m.i. section --- diff --git a/sys/scsi/README.ss b/sys/scsi/README.ss index dc8da5bdb8b..9634c9ae39f 100644 --- a/sys/scsi/README.ss +++ b/sys/scsi/README.ss @@ -1,4 +1,4 @@ -$OpenBSD: README.ss,v 1.4 1997/03/11 02:34:25 kstailey Exp $ +$OpenBSD: README.ss,v 1.5 1997/03/11 03:40:49 kstailey Exp $ If you think SCSI tape drives are quirky you haven't seen anything. @@ -33,6 +33,9 @@ common code for ssread() in ss.c could be used. Other Considerations +SCSI disconnect is missing from many scanners. Sucks huh? A slow +peripheral that also monopolizes the bus. + The image data from the scanner driver is currently supposed to resemble headerless PBM "rawbits". Depending on this is probably a bad idea especially because it cannot always be attained. The Fujutisu M3096G diff --git a/sys/scsi/ss.c b/sys/scsi/ss.c index cd906c3e388..15c37389f96 100644 --- a/sys/scsi/ss.c +++ b/sys/scsi/ss.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ss.c,v 1.25 1997/03/11 03:19:16 kstailey Exp $ */ +/* $OpenBSD: ss.c,v 1.26 1997/03/11 03:40:49 kstailey Exp $ */ /* $NetBSD: ss.c,v 1.10 1996/05/05 19:52:55 christos Exp $ */ /* @@ -287,6 +287,20 @@ ssattach(parent, self, aux) else ss_identify_scanner(ss, sa->sa_inqbuf); + /* + * populate the scanio struct with legal values + */ + ss->sio.scan_width = 1200; + ss->sio.scan_height = 1200; + ss->sio.scan_x_resolution = 100; + ss->sio.scan_y_resolution = 100; + ss->sio.scan_x_origin = 0; + ss->sio.scan_y_origin = 0; + ss->sio.scan_brightness = 128; + ss->sio.scan_contrast = 128; + ss->sio.scan_quality = 100; + ss->sio.scan_image_mode = SIM_GRAYSCALE; + /* * Set up the buf queue for this device */ diff --git a/sys/scsi/ss_mustek.c b/sys/scsi/ss_mustek.c index 58379d359b5..cc24443c3a7 100644 --- a/sys/scsi/ss_mustek.c +++ b/sys/scsi/ss_mustek.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ss_mustek.c,v 1.7 1997/03/10 02:29:40 kstailey Exp $ */ +/* $OpenBSD: ss_mustek.c,v 1.8 1997/03/11 03:40:50 kstailey Exp $ */ /* $NetBSD: ss_mustek.c,v 1.4 1996/05/05 19:52:57 christos Exp $ */ /* @@ -126,21 +126,6 @@ mustek_attach(ss, sa) /* install special handlers */ ss->special = mustek_special; - /* - * populate the scanio struct with legal values - * the default should come from user space - */ - ss->sio.scan_width = 1200; - ss->sio.scan_height = 1200; - ss->sio.scan_x_resolution = 99; - ss->sio.scan_y_resolution = 99; - ss->sio.scan_x_origin = 0; - ss->sio.scan_y_origin = 0; - ss->sio.scan_brightness = 100; - ss->sio.scan_contrast = 100; - ss->sio.scan_quality = 100; - ss->sio.scan_image_mode = SIM_GRAYSCALE; - mustek_compute_sizes(ss); } diff --git a/sys/scsi/ss_scanjet.c b/sys/scsi/ss_scanjet.c index 3c198198366..f74adfad9a3 100644 --- a/sys/scsi/ss_scanjet.c +++ b/sys/scsi/ss_scanjet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ss_scanjet.c,v 1.16 1997/03/10 02:29:40 kstailey Exp $ */ +/* $OpenBSD: ss_scanjet.c,v 1.17 1997/03/11 03:40:50 kstailey Exp $ */ /* $NetBSD: ss_scanjet.c,v 1.6 1996/05/18 22:58:01 christos Exp $ */ /* @@ -122,21 +122,8 @@ scanjet_attach(ss, sa) /* now install special handlers */ ss->special = scanjet_special; - /* - * populate the scanio struct with legal values - */ - ss->sio.scan_width = 1200; - ss->sio.scan_height = 1200; - ss->sio.scan_x_resolution = 100; - ss->sio.scan_y_resolution = 100; - ss->sio.scan_x_origin = 0; - ss->sio.scan_y_origin = 0; - ss->sio.scan_brightness = 128; - ss->sio.scan_contrast = 128; - ss->sio.scan_quality = 100; - ss->sio.scan_image_mode = SIM_GRAYSCALE; - - error = scanjet_set_window(ss, SCSI_POLL); + error = scanjet_set_window(ss, SCSI_POLL);/* XXX needed? */ + if (error) { printf(" set_window failed\n"); return;