move init. code to m.i. section
authorkstailey <kstailey@openbsd.org>
Tue, 11 Mar 1997 03:40:49 +0000 (03:40 +0000)
committerkstailey <kstailey@openbsd.org>
Tue, 11 Mar 1997 03:40:49 +0000 (03:40 +0000)
sys/scsi/README.ss
sys/scsi/ss.c
sys/scsi/ss_mustek.c
sys/scsi/ss_scanjet.c

index dc8da5b..9634c9a 100644 (file)
@@ -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
index cd906c3..15c3738 100644 (file)
@@ -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
         */
index 58379d3..cc24443 100644 (file)
@@ -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);
 }
 
index 3c19819..f74adfa 100644 (file)
@@ -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;