diff options
-rw-r--r-- | sys/scsi/ss.c | 38 | ||||
-rw-r--r-- | sys/scsi/ss_mustek.c | 13 | ||||
-rw-r--r-- | sys/scsi/ss_scanjet.c | 13 |
3 files changed, 37 insertions, 27 deletions
diff --git a/sys/scsi/ss.c b/sys/scsi/ss.c index b531948812c..23981f3a157 100644 --- a/sys/scsi/ss.c +++ b/sys/scsi/ss.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ss.c,v 1.9 1997/02/27 06:20:23 tholo Exp $ */ +/* $OpenBSD: ss.c,v 1.10 1997/03/06 12:44:41 kstailey Exp $ */ /* $NetBSD: ss.c,v 1.10 1996/05/05 19:52:55 christos Exp $ */ /* @@ -79,6 +79,8 @@ void ssstrategy __P((struct buf *)); void ssstart __P((void *)); void ssminphys __P((struct buf *)); +static int ss_set_window __P((struct ss_softc *, struct scan_io *)); + struct scsi_device ss_switch = { NULL, ssstart, @@ -445,9 +447,6 @@ ssioctl(dev, cmd, addr, flag, p) error = (ss->special->get_params)(ss); if (error) return (error); - } else { - /* XXX add code for SCSI2 scanner, if any */ - return (EOPNOTSUPP); } bcopy(&ss->sio, addr, sizeof(struct scan_io)); break; @@ -460,8 +459,12 @@ ssioctl(dev, cmd, addr, flag, p) if (error) return (error); } else { - /* XXX add code for SCSI2 scanner, if any */ +#ifdef NOTYET + /* add routine to validate paramters */ + ss_set_window(ss, sio); +#else return (EOPNOTSUPP); +#endif } break; case SCIOCRESTART: @@ -487,3 +490,28 @@ ssioctl(dev, cmd, addr, flag, p) } return (error); } + +#ifdef NOTYET +static int +ss_set_window(sc, sio) + struct ss_softc *; + struct scan_io *; +{ + struct scsi_set_window window_cmd; + struct scsi_window_header window_header; + struct scsi_window_data window_data; + + bzero(&window_cmd, sizeof(window_cmd)); + window_cmd.opcode = SET_WINDOW; + _lto3l(sizeof(window_data), window_cmd.length); + + bzero(&window_header, sizeof(window_header)); + _lto2l(, window_header.len); + + bzero(&window_data, sizeof(window_data)); + _lto2l(sio->sio.scan_x_resolution, window_data.x_res); + _lto2l(sio->sio.scan_y_resolution, window_data.y_res); + _lto2l(sio->, window_data.x_org); + _lto2l(sio->, window_data.y_org); +} +#endif diff --git a/sys/scsi/ss_mustek.c b/sys/scsi/ss_mustek.c index 8e75453a7da..3afe58a1e7c 100644 --- a/sys/scsi/ss_mustek.c +++ b/sys/scsi/ss_mustek.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ss_mustek.c,v 1.5 1996/05/10 12:31:40 deraadt Exp $ */ +/* $OpenBSD: ss_mustek.c,v 1.6 1997/03/06 12:44:42 kstailey Exp $ */ /* $NetBSD: ss_mustek.c,v 1.4 1996/05/05 19:52:57 christos Exp $ */ /* @@ -69,7 +69,6 @@ #define MUSTEK_RETRIES 4 -int mustek_get_params __P((struct ss_softc *)); int mustek_set_params __P((struct ss_softc *, struct scan_io *)); int mustek_trigger_scanner __P((struct ss_softc *)); void mustek_minphys __P((struct ss_softc *, struct buf *)); @@ -86,7 +85,7 @@ void mustek_compute_sizes __P((struct ss_softc *)); struct ss_special mustek_special = { mustek_set_params, mustek_trigger_scanner, - mustek_get_params, + NULL, mustek_minphys, mustek_read, mustek_rewind_scanner, @@ -145,14 +144,6 @@ mustek_attach(ss, sa) mustek_compute_sizes(ss); } -int -mustek_get_params (ss) - struct ss_softc *ss; -{ - - return (0); -} - /* * check the parameters if the mustek is capable of fulfilling it * but don't send the command to the scanner in case the user wants diff --git a/sys/scsi/ss_scanjet.c b/sys/scsi/ss_scanjet.c index 5e794d03f47..5f472ecf997 100644 --- a/sys/scsi/ss_scanjet.c +++ b/sys/scsi/ss_scanjet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ss_scanjet.c,v 1.14 1996/12/08 14:25:50 niklas Exp $ */ +/* $OpenBSD: ss_scanjet.c,v 1.15 1997/03/06 12:44:42 kstailey Exp $ */ /* $NetBSD: ss_scanjet.c,v 1.6 1996/05/18 22:58:01 christos Exp $ */ /* @@ -55,7 +55,6 @@ #define SCANJET_RETRIES 4 -int scanjet_get_params __P((struct ss_softc *)); int scanjet_set_params __P((struct ss_softc *, struct scan_io *)); int scanjet_trigger_scanner __P((struct ss_softc *)); int scanjet_read __P((struct ss_softc *, struct buf *)); @@ -76,7 +75,7 @@ __inline static char *strchr __P((/* const */ char *, char)); struct ss_special scanjet_special = { scanjet_set_params, scanjet_trigger_scanner, - scanjet_get_params, + NULL, NULL, /* no special minphys */ scanjet_read, /* scsi 6-byte read */ NULL, /* no "rewind" code (yet?) */ @@ -151,14 +150,6 @@ scanjet_attach(ss, sa) printf("\n"); } -int -scanjet_get_params(ss) - struct ss_softc *ss; -{ - - return (0); -} - /* * check the parameters if the scanjet is capable of fulfilling it * but don't send the command to the scanner in case the user wants |