diff options
Diffstat (limited to 'sys/scsi')
-rw-r--r-- | sys/scsi/cd.c | 56 | ||||
-rw-r--r-- | sys/scsi/ch.c | 26 | ||||
-rw-r--r-- | sys/scsi/pt.c | 12 | ||||
-rw-r--r-- | sys/scsi/scsi_all.h | 6 | ||||
-rw-r--r-- | sys/scsi/scsi_base.c | 50 | ||||
-rw-r--r-- | sys/scsi/scsi_cd.h | 6 | ||||
-rw-r--r-- | sys/scsi/scsi_changer.h | 10 | ||||
-rw-r--r-- | sys/scsi/scsi_debug.h | 6 | ||||
-rw-r--r-- | sys/scsi/scsi_disk.h | 8 | ||||
-rw-r--r-- | sys/scsi/scsi_driver.c | 14 | ||||
-rw-r--r-- | sys/scsi/scsi_driver.h | 4 | ||||
-rw-r--r-- | sys/scsi/scsi_generic.h | 4 | ||||
-rw-r--r-- | sys/scsi/scsi_ioctl.c | 6 | ||||
-rw-r--r-- | sys/scsi/scsi_tape.h | 18 | ||||
-rw-r--r-- | sys/scsi/scsiconf.c | 32 | ||||
-rw-r--r-- | sys/scsi/scsiconf.h | 8 | ||||
-rw-r--r-- | sys/scsi/sctarg.c | 12 | ||||
-rw-r--r-- | sys/scsi/sd.c | 38 | ||||
-rw-r--r-- | sys/scsi/st.c | 58 | ||||
-rw-r--r-- | sys/scsi/uk.c | 4 | ||||
-rw-r--r-- | sys/scsi/worm.c | 18 |
21 files changed, 198 insertions, 198 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c index cb6b010..550b5da 100644 --- a/sys/scsi/cd.c +++ b/sys/scsi/cd.c @@ -14,7 +14,7 @@ * * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 * - * $Id: cd.c,v 1.39 1995/04/23 22:07:48 gibbs Exp $ + * $Id: cd.c,v 1.40 1995/05/03 18:09:06 dufault Exp $ */ #define SPLCD splbio @@ -128,7 +128,7 @@ struct scsi_device cd_switch = #define CD_EJECT -2 static int -cd_externalize(struct proc *p, struct kern_devconf *kdc, void *userp, +cd_externalize(struct proc *p, struct kern_devconf *kdc, void *userp, size_t len) { return scsi_externalize(SCSI_LINK(&cd_switch, kdc->kdc_unit), @@ -170,7 +170,7 @@ cd_registerdev(int unit) * The routine called by the low level scsi routine when it discovers * A device suitable for this driver */ -int +int cdattach(struct scsi_link *sc_link) { u_int32 unit; @@ -211,7 +211,7 @@ cdattach(struct scsi_link *sc_link) /* * open the device. Make sure the partition info is a up-to-date as can be. */ -errval +errval cd_open(dev_t dev, int flags, int fmt, struct proc *p, struct scsi_link *sc_link) { @@ -268,7 +268,7 @@ struct scsi_link *sc_link) scsi_prevent(sc_link, PR_PREVENT, SCSI_SILENT); SC_DEBUG(sc_link, SDEV_DB3, ("'start' attempted ")); /* - * Load the physical device parameters + * Load the physical device parameters */ if (cd_get_parms(unit, 0)) { errcode = ENXIO; @@ -325,7 +325,7 @@ struct scsi_link *sc_link) * close the device.. only called if we are the LAST * occurence of an open device */ -errval +errval cd_close(dev_t dev, int flag, int fmt, struct proc *p, struct scsi_link *sc_link) { @@ -356,7 +356,7 @@ cd_close(dev_t dev, int flag, int fmt, struct proc *p, * understand. The transfer is described by a buf and will include only one * physical transfer. */ -void +void cd_strategy(struct buf *bp, struct scsi_link *sc_link) { struct buf *dp; @@ -447,7 +447,7 @@ cd_strategy(struct buf *bp, struct scsi_link *sc_link) * must be called at the correct (highish) spl level * cdstart() is called at SPLCD from cdstrategy and scsi_done */ -void +void cdstart(unit, flags) u_int32 unit; u_int32 flags; @@ -484,7 +484,7 @@ cdstart(unit, flags) goto bad; /* no I/O.. media changed or something */ } /* - * We have a buf, now we should make a command + * We have a buf, now we should make a command * * First, translate the block to absolute and put it in terms of the * logical blocksize of the device. Really a bit silly until we have @@ -544,7 +544,7 @@ cdstart(unit, flags) * Perform special action on behalf of the user. * Knows about the internals of this device */ -errval +errval cd_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p, struct scsi_link *sc_link) { @@ -582,7 +582,7 @@ struct scsi_link *sc_link) break; /* - * a bit silly, but someone might want to test something on a + * a bit silly, but someone might want to test something on a * section of cdrom. */ case DIOCWDINFO: @@ -675,7 +675,7 @@ struct scsi_link *sc_link) args->data_format, args->track, &data, len); if (error) break; - len = min(len, ((data.header.data_len[0] << 8) + + len = min(len, ((data.header.data_len[0] << 8) + data.header.data_len[1] + sizeof(struct cd_sub_channel_header))); if (copyout(&data, args->data, len) != 0) { @@ -686,7 +686,7 @@ struct scsi_link *sc_link) case CDIOREADTOCHEADER: { /* ??? useless bcopy? XXX */ struct ioc_toc_header th; - error = cd_read_toc(unit, 0, 0, + error = cd_read_toc(unit, 0, 0, (struct cd_toc_entry *)&th, sizeof th); if (error) break; @@ -887,11 +887,11 @@ struct scsi_link *sc_link) /* * Load the label information on the named device * Actually fabricate a disklabel - * + * * EVENTUALLY take information about different * data tracks from the TOC and put it in the disklabel */ -errval +errval cd_getdisklabel(unit) u_int8 unit; { @@ -940,7 +940,7 @@ cd_getdisklabel(unit) /* * Find out from the device what it's capacity is */ -u_int32 +u_int32 cd_size(unit, flags) int unit; int flags; @@ -997,7 +997,7 @@ cd_size(unit, flags) /* * Get the requested page into the buffer given */ -static errval +static errval cd_get_mode(unit, data, page) u_int32 unit; struct cd_mode_data *data; @@ -1026,7 +1026,7 @@ cd_get_mode(unit, data, page) /* * Get the requested page into the buffer given */ -errval +errval cd_set_mode(unit, data) u_int32 unit; struct cd_mode_data *data; @@ -1052,7 +1052,7 @@ cd_set_mode(unit, data) /* * Get scsi driver to send a "start playing" command */ -errval +errval cd_play(unit, blk, len) u_int32 unit, blk, len; { @@ -1080,7 +1080,7 @@ cd_play(unit, blk, len) /* * Get scsi driver to send a "start playing" command */ -errval +errval cd_play_big(unit, blk, len) u_int32 unit, blk, len; { @@ -1110,7 +1110,7 @@ cd_play_big(unit, blk, len) /* * Get scsi driver to send a "start playing" command */ -errval +errval cd_play_tracks(unit, strack, sindex, etrack, eindex) u_int32 unit, strack, sindex, etrack, eindex; { @@ -1136,7 +1136,7 @@ cd_play_tracks(unit, strack, sindex, etrack, eindex) /* * Get scsi driver to send a "play msf" command */ -errval +errval cd_play_msf(unit, startm, starts, startf, endm, ends, endf) u_int32 unit, startm, starts, startf, endm, ends, endf; { @@ -1165,7 +1165,7 @@ cd_play_msf(unit, startm, starts, startf, endm, ends, endf) /* * Get scsi driver to send a "start up" command */ -errval +errval cd_pause(unit, go) u_int32 unit, go; { @@ -1189,7 +1189,7 @@ cd_pause(unit, go) /* * Get scsi driver to send a "RESET" command */ -errval +errval cd_reset(unit) u_int32 unit; { @@ -1199,7 +1199,7 @@ cd_reset(unit) /* * Read subchannel */ -errval +errval cd_read_subchannel(unit, mode, format, track, data, len) u_int32 unit, mode, format; int track; @@ -1232,7 +1232,7 @@ cd_read_subchannel(unit, mode, format, track, data, len) /* * Read table of contents */ -static errval +static errval cd_read_toc(unit, mode, start, data, len) u_int32 unit, mode, start; struct cd_toc_entry *data; @@ -1270,7 +1270,7 @@ cd_read_toc(unit, mode, start, data, len) * Get the scsi driver to send a full inquiry to the device and use the * results to fill out the disk parameter structure. */ -static errval +static errval cd_get_parms(unit, flags) int unit; int flags; @@ -1284,7 +1284,7 @@ cd_get_parms(unit, flags) return (0); /* * give a number of sectors so that sec * trks * cyls - * is <= disk_size + * is <= disk_size */ if (cd_size(unit, flags)) { sc_link->flags |= SDEV_MEDIA_LOADED; diff --git a/sys/scsi/ch.c b/sys/scsi/ch.c index 14534b7..a7c36d9 100644 --- a/sys/scsi/ch.c +++ b/sys/scsi/ch.c @@ -1,8 +1,8 @@ -/* +/* * Written by grefen@????? * Based on scsi drivers by Julian Elischer (julian@tfs.com) * - * $Id: ch.c,v 1.19 1995/05/03 18:09:08 dufault Exp $ + * $Id: ch.c,v 1.20 1995/05/11 19:26:46 rgrimes Exp $ */ #include <sys/types.h> @@ -95,7 +95,7 @@ struct scsi_device ch_switch = #define CH_OPEN 0x01 static int -ch_externalize(struct proc *p, struct kern_devconf *kdc, void *userp, +ch_externalize(struct proc *p, struct kern_devconf *kdc, void *userp, size_t len) { return scsi_externalize(SCSI_LINK(&ch_switch, kdc->kdc_unit), @@ -128,7 +128,7 @@ ch_registerdev(int unit) * The routine called by the low level scsi routine when it discovers * a device suitable for this driver. */ -errval +errval chattach(struct scsi_link *sc_link) { u_int32 unit; @@ -156,7 +156,7 @@ chattach(struct scsi_link *sc_link) /* * open the device. */ -errval +errval ch_open(dev_t dev, int flags, int fmt, struct proc *p, struct scsi_link *sc_link) { @@ -205,7 +205,7 @@ struct scsi_link *sc_link) * close the device.. only called if we are the LAST * occurence of an open device */ -errval +errval ch_close(dev_t dev, int flag, int fmt, struct proc *p, struct scsi_link *sc_link) { @@ -218,7 +218,7 @@ ch_close(dev_t dev, int flag, int fmt, struct proc *p, * Perform special action on behalf of the user * Knows about the internals of this device */ -errval +errval ch_ioctl(dev_t dev, int cmd, caddr_t arg, int mode, struct proc *p, struct scsi_link *sc_link) { @@ -277,7 +277,7 @@ struct proc *p, struct scsi_link *sc_link) return (ret ? ESUCCESS : EIO); } -errval +errval ch_getelem(unit, stat, type, from, data, flags) u_int32 unit, from, flags; int type; @@ -317,7 +317,7 @@ ch_getelem(unit, stat, type, from, data, flags) return ret; } -errval +errval ch_move(unit, stat, chm, from, to, flags) u_int32 unit, chm, from, to, flags; short *stat; @@ -353,7 +353,7 @@ ch_move(unit, stat, chm, from, to, flags) return ret; } -errval +errval ch_position(unit, stat, chm, to, flags) u_int32 unit, chm, to, flags; short *stat; @@ -395,10 +395,10 @@ ch_position(unit, stat, chm, to, flags) /* * Get the scsi driver to send a full inquiry to the - * device and use the results to fill out the global + * device and use the results to fill out the global * parameter structure. */ -static errval +static errval ch_mode_sense(unit, flags) u_int32 unit, flags; { @@ -424,7 +424,7 @@ ch_mode_sense(unit, flags) return 0; /* - * First do a mode sense + * First do a mode sense */ /* sc_link->flags &= ~SDEV_MEDIA_LOADED; *//*XXX */ bzero(&scsi_cmd, sizeof(scsi_cmd)); diff --git a/sys/scsi/pt.c b/sys/scsi/pt.c index 3194cd8..2d1a10b 100644 --- a/sys/scsi/pt.c +++ b/sys/scsi/pt.c @@ -1,4 +1,4 @@ -/* +/* * pt: Processor Type driver. * * Copyright (C) 1995, HD Associates, Inc. @@ -37,7 +37,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: pt.c,v 1.3 1995/04/23 22:07:49 gibbs Exp $ + * $Id: pt.c,v 1.4 1995/05/03 18:09:09 dufault Exp $ */ /* @@ -99,7 +99,7 @@ struct scsi_device pt_switch = * continues to be drained. * ptstart() is called at splbio */ -void +void ptstart(unit, flags) u_int32 unit; u_int32 flags; @@ -170,7 +170,7 @@ ptstart(unit, flags) } /* go back and see if we can cram more work in.. */ } -void +void pt_strategy(struct buf *bp, struct scsi_link *sc_link) { struct buf **dp; @@ -183,9 +183,9 @@ pt_strategy(struct buf *bp, struct scsi_link *sc_link) opri = splbio(); - /* + /* * Use a bounce buffer if necessary - */ + */ #ifdef BOUNCE_BUFFERS if (sc_link->flags & SDEV_BOUNCE) vm_bounce_alloc(bp); diff --git a/sys/scsi/scsi_all.h b/sys/scsi/scsi_all.h index 7d806c7..8da591e 100644 --- a/sys/scsi/scsi_all.h +++ b/sys/scsi/scsi_all.h @@ -4,7 +4,7 @@ * * TRW Financial Systems, in accordance with their agreement with Carnegie * Mellon University, makes this software available to CMU to distribute - * or use in any manner that they see fit as long as this message is kept with + * or use in any manner that they see fit as long as this message is kept with * the software. For this reason TFS also grants any other persons or * organisations permission to use or modify this software. * @@ -14,7 +14,7 @@ * * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 * - * $Id: scsi_all.h,v 1.11 1995/03/04 12:36:55 bde Exp $ + * $Id: scsi_all.h,v 1.12 1995/04/14 15:10:29 dufault Exp $ */ /* @@ -344,7 +344,7 @@ struct scsi_mode_header_big */ #define SCSI_OK 0x00 #define SCSI_CHECK 0x02 -#define SCSI_BUSY 0x08 +#define SCSI_BUSY 0x08 #define SCSI_INTERM 0x10 #define SCSI_QUEUE_FULL 0x28 #endif /*_SCSI_SCSI_ALL_H*/ diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c index b1cf2cc..487173a 100644 --- a/sys/scsi/scsi_base.c +++ b/sys/scsi/scsi_base.c @@ -2,13 +2,13 @@ * Written By Julian ELischer * Copyright julian Elischer 1993. * Permission is granted to use or redistribute this file in any way as long - * as this notice remains. Julian Elischer does not guarantee that this file - * is totally correct for any given task and users of this file must + * as this notice remains. Julian Elischer does not guarantee that this file + * is totally correct for any given task and users of this file must * accept responsibility for any damage that occurs from the application of this * file. - * + * * Written by Julian Elischer (julian@dialix.oz.au) - * $Id: scsi_base.c,v 1.27 1995/04/14 15:10:31 dufault Exp $ + * $Id: scsi_base.c,v 1.28 1995/04/23 22:07:50 gibbs Exp $ */ #define SPLSD splbio @@ -34,7 +34,7 @@ struct scsi_xfer *next_free_xs; /* * Get a scsi transfer structure for the caller. Charge the structure - * to the device that is referenced by the sc_link structure. If the + * to the device that is referenced by the sc_link structure. If the * sc_link structure has no 'credits' then the device already has the * maximum number or outstanding operations under way. In this stage, * wait on the structure so that when one is freed, we are awoken again @@ -88,7 +88,7 @@ get_xs(sc_link, flags) * return the struct to the free pool and credit the device with it * If another process is waiting for an xs, do a wakeup, let it proceed */ -void +void free_xs(xs, sc_link, flags) struct scsi_xfer *xs; struct scsi_link *sc_link; /* who to credit for returning it */ @@ -117,7 +117,7 @@ free_xs(xs, sc_link, flags) /* * Find out from the device what its capacity is. */ -u_int32 +u_int32 scsi_read_capacity(sc_link, blk_size, flags) struct scsi_link *sc_link; u_int32 *blk_size; @@ -198,7 +198,7 @@ scsi_target_mode(sc_link, on_off) /* * Get scsi driver to send a "are you ready?" command */ -errval +errval scsi_test_unit_ready(sc_link, flags) struct scsi_link *sc_link; u_int32 flags; @@ -222,7 +222,7 @@ scsi_test_unit_ready(sc_link, flags) /* * Do a scsi operation, asking a device to run as SCSI-II if it can. */ -errval +errval scsi_change_def(sc_link, flags) struct scsi_link *sc_link; u_int32 flags; @@ -248,7 +248,7 @@ scsi_change_def(sc_link, flags) * Do a scsi operation asking a device what it is * Use the scsi_cmd routine in the switch table. */ -errval +errval scsi_inquire(sc_link, inqbuf, flags) struct scsi_link *sc_link; struct scsi_inquiry_data *inqbuf; @@ -274,7 +274,7 @@ scsi_inquire(sc_link, inqbuf, flags) /* * Prevent or allow the user to remove the media */ -errval +errval scsi_prevent(sc_link, type, flags) struct scsi_link *sc_link; u_int32 type, flags; @@ -298,7 +298,7 @@ scsi_prevent(sc_link, type, flags) /* * Get scsi driver to send a "start up" command */ -errval +errval scsi_start_unit(sc_link, flags) struct scsi_link *sc_link; u_int32 flags; @@ -323,7 +323,7 @@ scsi_start_unit(sc_link, flags) /* * Get scsi driver to send a "stop" command */ -errval +errval scsi_stop_unit(sc_link, eject, flags) struct scsi_link *sc_link; u_int32 eject; @@ -351,7 +351,7 @@ scsi_stop_unit(sc_link, eject, flags) /* * This routine is called by the scsi interrupt when the transfer is complete. */ -void +void scsi_done(xs) struct scsi_xfer *xs; { @@ -395,7 +395,7 @@ scsi_done(xs) } /* XXX: This isn't used anywhere. Do you have plans for it, * Julian? (dufault@hda.com). - * This allows a private 'done' handler to + * This allows a private 'done' handler to * resubmit the command if it wants to retry, * In this case the xs must NOT be freed. (julian) */ @@ -435,7 +435,7 @@ scsi_done(xs) * long the data is supposed to be. If we have a buf * to associate with the transfer, we need that too. */ -errval +errval scsi_scsi_cmd(sc_link, scsi_cmd, cmdlen, data_addr, datalen, retries, timeout, bp, flags) struct scsi_link *sc_link; @@ -502,7 +502,7 @@ scsi_scsi_cmd(sc_link, scsi_cmd, cmdlen, data_addr, datalen, #ifdef BOUNCE_BUFFERS xs->data = (caddr_t) vm_bounce_kva_alloc( (datalen + PAGE_SIZE - 1)/PAGE_SIZE); #else - xs->data = malloc(datalen, M_TEMP, M_WAITOK); + xs->data = malloc(datalen, M_TEMP, M_WAITOK); #endif /* I think waiting is ok *//*XXX */ switch ((int)(flags & (SCSI_DATA_IN | SCSI_DATA_OUT))) { @@ -533,12 +533,12 @@ retry: * Do the transfer. If we are polling we will return: * COMPLETE, Was poll, and scsi_done has been called * TRY_AGAIN_LATER, Adapter short resources, try again - * + * * if under full steam (interrupts) it will return: * SUCCESSFULLY_QUEUED, will do a wakeup when complete * TRY_AGAIN_LATER, (as for polling) * After the wakeup, we must still check if it succeeded - * + * * If we have a bp however, all the error proccessing * and the buffer code both expect us to return straight * to them, so as soon as the command is queued, return @@ -710,13 +710,13 @@ errval scsi_retry(xs,delay) /* * handle checking for errors.. - * called at interrupt time from scsi_done() and + * called at interrupt time from scsi_done() and * at user time from scsi_scsi_cmd(), depending on whether * there was a bp (basically, if there is a bp, there may be no * associated process at the time. (it could be an async operation)) * lower level routines shouldn't know about xs->bp.. we are the lowest. */ -static errval +static errval sc_err1(xs) struct scsi_xfer *xs; { @@ -870,12 +870,12 @@ void scsi_sense_print(xs) printf(" %s", desc); } - + if (ext->extra_len >= 7 && ext->fru) { printf(" field replaceable unit: %x", ext->fru); } - if (ext->extra_len >= 10 && + if (ext->extra_len >= 10 && (ext->sense_key_spec_1 & SSD_SCS_VALID)) { printf(" sks:%x,%x", ext->sense_key_spec_1, (ext->sense_key_spec_2 | @@ -907,7 +907,7 @@ void scsi_sense_print(xs) * * THIS IS THE DEFAULT SENSE HANDLER */ -static errval +static errval scsi_interpret_sense(xs) struct scsi_xfer *xs; { @@ -1083,7 +1083,7 @@ scsi_interpret_sense(xs) */ /* - * convert a physical address to 3 bytes, + * convert a physical address to 3 bytes, * MSB at the lowest address, * LSB at the highest. */ diff --git a/sys/scsi/scsi_cd.h b/sys/scsi/scsi_cd.h index 0a4759b..7b8f63c 100644 --- a/sys/scsi/scsi_cd.h +++ b/sys/scsi/scsi_cd.h @@ -4,7 +4,7 @@ * * TRW Financial Systems, in accordance with their agreement with Carnegie * Mellon University, makes this software available to CMU to distribute - * or use in any manner that they see fit as long as this message is kept with + * or use in any manner that they see fit as long as this message is kept with * the software. For this reason TFS also grants any other persons or * organisations permission to use or modify this software. * @@ -14,7 +14,7 @@ * * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 * - * $Id: scsi_cd.h,v 1.6 93/08/26 21:09:19 julian Exp Locker: julian $ + * $Id: scsi_cd.h,v 1.6 1993/11/18 05:02:52 rgrimes Exp $ */ #ifndef _SCSI_SCSI_CD_H #define _SCSI_SCSI_CD_H 1 @@ -89,7 +89,7 @@ struct scsi_play u_char control; }; -struct scsi_play_big +struct scsi_play_big { u_char op_code; u_char byte2; /* same as above */ diff --git a/sys/scsi/scsi_changer.h b/sys/scsi/scsi_changer.h index 85819c8..d7d628a 100644 --- a/sys/scsi/scsi_changer.h +++ b/sys/scsi/scsi_changer.h @@ -9,7 +9,7 @@ * * TRW Financial Systems, in accordance with their agreement with Carnegie * Mellon University, makes this software available to CMU to distribute - * or use in any manner that they see fit as long as this message is kept with + * or use in any manner that they see fit as long as this message is kept with * the software. For this reason TFS also grants any other persons or * organisations permission to use or modify this software. * @@ -19,7 +19,7 @@ * * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 * - * $Id: scsi_changer.h,v 1.5 93/08/26 21:09:22 julian Exp Locker: julian $ + * $Id: scsi_changer.h,v 1.6 1993/11/18 05:02:53 rgrimes Exp $ */ #ifndef _SCSI_SCSI_CHANGER_H #define _SCSI_SCSI_CHANGER_H 1 @@ -68,7 +68,7 @@ struct scsi_position_to_element u_char invert; u_char control; }; - + /* * Opcodes */ @@ -76,7 +76,7 @@ struct scsi_position_to_element #define MOVE_MEDIUM 0xa5 #define READ_ELEMENT_STATUS 0xb8 -struct scsi_element_status_data +struct scsi_element_status_data { u_char first_element_reported[2]; u_char number_of_elements_reported[2]; @@ -84,7 +84,7 @@ struct scsi_element_status_data u_char byte_count_of_report[3]; }; -struct element_status_page +struct element_status_page { u_char element_type_code; u_char flags; diff --git a/sys/scsi/scsi_debug.h b/sys/scsi/scsi_debug.h index 480ff14..578cd43 100644 --- a/sys/scsi/scsi_debug.h +++ b/sys/scsi/scsi_debug.h @@ -2,7 +2,7 @@ /* * Written by Julian Elischer (julian@tfs.com) * - * $Id: scsi_debug.h,v 1.3 93/10/10 09:26:05 julian Exp Locker: julian $ + * $Id: scsi_debug.h,v 1.1 1993/11/18 05:02:54 rgrimes Exp $ */ #ifndef _SCSI_SCSI_DEBUG_H #define _SCSI_SCSI_DEBUG_H 1 @@ -12,7 +12,7 @@ * the following DEBUG bits are defined to exist in the flags word of * the scsi_link structure. */ -#define SDEV_DB1 0x10 /* scsi commands, errors, data */ +#define SDEV_DB1 0x10 /* scsi commands, errors, data */ #define SDEV_DB2 0x20 /* routine flow tracking */ #define SDEV_DB3 0x40 /* internal to routine flows */ #define SDEV_DB4 0x80 /* level 4 debugging for this dev */ @@ -21,7 +21,7 @@ #define DEBUGTARG 9 /*9 = dissable*/ #define DEBUGLUN 0 #define DEBUGLEVEL (SDEV_DB1|SDEV_DB2) - + /* * This is the usual debug macro for use with the above bits */ diff --git a/sys/scsi/scsi_disk.h b/sys/scsi/scsi_disk.h index a2720d5..ecac2a4 100644 --- a/sys/scsi/scsi_disk.h +++ b/sys/scsi/scsi_disk.h @@ -11,7 +11,7 @@ * Grenoble, FRANCE * * All Rights Reserved - * + * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted, * provided that the above copyright notice appears in all copies and @@ -20,7 +20,7 @@ * Foundation not be used in advertising or publicity pertaining to * distribution of the software without specific, written prior * permission. - * + * * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR @@ -36,7 +36,7 @@ * * TRW Financial Systems, in accordance with their agreement with Carnegie * Mellon University, makes this software available to CMU to distribute - * or use in any manner that they see fit as long as this message is kept with + * or use in any manner that they see fit as long as this message is kept with * the software. For this reason TFS also grants any other persons or * organisations permission to use or modify this software. * @@ -46,7 +46,7 @@ * * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 * - * $Id: scsi_disk.h,v 1.6 1993/11/18 05:02:55 rgrimes Exp $ + * $Id: scsi_disk.h,v 1.7 1995/01/08 15:13:40 ats Exp $ */ /* diff --git a/sys/scsi/scsi_driver.c b/sys/scsi/scsi_driver.c index 40b8559..23370a9 100644 --- a/sys/scsi/scsi_driver.c +++ b/sys/scsi/scsi_driver.c @@ -1,4 +1,4 @@ -/* +/* * Copyright (C) 1995, HD Associates, Inc. * PO Box 276 * Pepperell, MA 01463 @@ -35,7 +35,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: scsi_driver.c,v 1.8 1995/04/14 15:10:33 dufault Exp $ + * $Id: scsi_driver.c,v 1.9 1995/05/03 18:09:11 dufault Exp $ * */ #include <sys/types.h> @@ -102,7 +102,7 @@ int scsi_device_attach(struct scsi_link *sc_link) return errcode; } -int +int scsi_open(dev_t dev, int flags, int fmt, struct proc *p, struct scsi_device *device) { @@ -117,7 +117,7 @@ struct scsi_device *device) sc_link = SCSI_LINK(device, unit); /* - * Check the unit is legal + * Check the unit is legal */ if (sc_link == 0 || sc_link->sd == 0) return ENXIO; @@ -143,7 +143,7 @@ struct scsi_device *device) return errcode; } -int +int scsi_close(dev_t dev, int flags, int fmt, struct proc *p, struct scsi_device *device) { @@ -162,7 +162,7 @@ struct scsi_device *device) return errcode; } -int +int scsi_ioctl(dev_t dev, u_int32 cmd, caddr_t arg, int flags, struct proc *p, struct scsi_device *device) { @@ -177,7 +177,7 @@ struct scsi_device *device) return errcode; } -void +void scsi_minphys(struct buf *bp, struct scsi_device *device) { struct scsi_link *sc_link = SCSI_LINK(device, GETUNIT(device, bp->b_dev)); diff --git a/sys/scsi/scsi_driver.h b/sys/scsi/scsi_driver.h index 9d325ef..ec2e1c8 100644 --- a/sys/scsi/scsi_driver.h +++ b/sys/scsi/scsi_driver.h @@ -1,4 +1,4 @@ -/* +/* * Copyright (C) 1995, HD Associates, Inc. * PO Box 276 * Pepperell, MA 01463 @@ -35,7 +35,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: scsi_driver.h,v 1.2 1995/03/04 20:50:52 dufault Exp $ + * $Id: scsi_driver.h,v 1.3 1995/04/14 15:10:34 dufault Exp $ * */ #ifndef _SCSI__DRIVER_H_ diff --git a/sys/scsi/scsi_generic.h b/sys/scsi/scsi_generic.h index db694f4..e1a3d88 100644 --- a/sys/scsi/scsi_generic.h +++ b/sys/scsi/scsi_generic.h @@ -1,4 +1,4 @@ -/* +/* * Contributed by HD Associates (contact: dufault@hda.com) * Copyright (c) 1992, 1993 HD Associates * @@ -33,7 +33,7 @@ * SUCH DAMAGE. * * from: @(#)stdio.h 5.17 (Berkeley) 6/3/91 - * $Id: scsi_generic.h,v 1.2 1993/10/16 17:21:05 rgrimes Exp $ + * $Id: scsi_generic.h,v 1.3 1995/01/08 13:38:31 dufault Exp $ */ /* generic SCSI header file. We use the same minor number format diff --git a/sys/scsi/scsi_ioctl.c b/sys/scsi/scsi_ioctl.c index 6e4d6cb..9471307 100644 --- a/sys/scsi/scsi_ioctl.c +++ b/sys/scsi/scsi_ioctl.c @@ -1,4 +1,4 @@ -/* +/* * Copyright (C) 1992, 1993, 1994, HD Associates, Inc. * PO Box 276 * Pepperell, MA 01463 @@ -36,7 +36,7 @@ * SUCH DAMAGE. *End copyright * - * $Id: scsi_ioctl.c,v 1.14 1995/05/03 18:09:12 dufault Exp $ + * $Id: scsi_ioctl.c,v 1.15 1995/05/09 02:38:15 dyson Exp $ * * */ @@ -142,7 +142,7 @@ struct scsi_xfer *xs; /* Pseudo strategy function * Called by scsi_do_ioctl() via physio/physstrat if there is to * be data transfered, and directly if there is no data transfer. - * + * * Can't be used with block devices or raw_read/raw_write directly * from the cdevsw/bdevsw tables because they couldn't have added * the screq structure. [JRE] diff --git a/sys/scsi/scsi_tape.h b/sys/scsi/scsi_tape.h index 602ac71..0e184d1 100644 --- a/sys/scsi/scsi_tape.h +++ b/sys/scsi/scsi_tape.h @@ -8,7 +8,7 @@ * * TRW Financial Systems, in accordance with their agreement with Carnegie * Mellon University, makes this software available to CMU to distribute - * or use in any manner that they see fit as long as this message is kept with + * or use in any manner that they see fit as long as this message is kept with * the software. For this reason TFS also grants any other persons or * organisations permission to use or modify this software. * @@ -21,7 +21,7 @@ /* * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 * - * $Id: scsi_tape.h,v 1.11 1995/03/21 11:21:03 dufault Exp $ + * $Id: scsi_tape.h,v 1.12 1995/04/29 21:30:26 joerg Exp $ */ #ifndef SCSI_SCSI_TAPE_H #define SCSI_SCSI_TAPE_H 1 @@ -80,8 +80,8 @@ struct scsi_erase u_char op_code; u_char byte2; #define SE_LONG 0x01 /* - ** Archive Viper 2525 doesn't allow short - ** erase, other tapes possibly don't allow + ** Archive Viper 2525 doesn't allow short + ** erase, other tapes possibly don't allow ** that, too. */ #define SE_IMMED 0x02 @@ -160,7 +160,7 @@ struct blk_desc_cipher * This structure defines the various mode pages that tapes know about. */ #define PAGE_HEADERLEN 2 -struct tape_pages +struct tape_pages { u_char pg_code; /* page code */ #define ST_PAGE_CONFIGURATION 0x10 @@ -171,9 +171,9 @@ struct tape_pages #define ST_P_CODE 0x3F /* page code */ #define ST_P_PS 0x80 /* page savable */ u_char pg_length; /* page length */ - union + union { - struct + struct { u_char active_format; /* active format for density*/ #define ST_P_CAP 0x40 /* change active Partition */ @@ -206,7 +206,7 @@ struct tape_pages u_char data_compress_alg; /* 0 = off, 1 = default */ u_char reserved; /* The standard says so */ } configuration; - struct + struct { #define ST_MAXPARTS 16 /*for now*/ u_char max_add_parts; /* that drive allows */ @@ -232,7 +232,7 @@ struct tape_pages u_char low; }part[ST_MAXPARTS]; } medium_partition; - struct + struct { struct { diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c index d551ccb..d1771f8 100644 --- a/sys/scsi/scsiconf.c +++ b/sys/scsi/scsiconf.c @@ -16,7 +16,7 @@ * * New configuration setup: dufault@hda.com * - * $Id: scsiconf.c,v 1.28 1995/04/23 07:47:10 bde Exp $ + * $Id: scsiconf.c,v 1.29 1995/05/03 18:09:13 dufault Exp $ */ #include <sys/types.h> @@ -162,14 +162,14 @@ struct scsidevs { #define SC_ONE_LU 0x00 #define SC_MORE_LUS 0x02 -static struct scsidevs unknowndev = +static struct scsidevs unknowndev = { - T_UNKNOWN, 0, "*", "*", "*", + T_UNKNOWN, 0, "*", "*", "*", "uk", SC_MORE_LUS }; #ifdef NEW_SCSICONF -static st_modes mode_tandberg3600 = +static st_modes mode_tandberg3600 = { {0, 0, 0}, /* minor 0,1,2,3 */ {0, ST_Q_FORCE_VAR_MODE, QIC_525}, /* minor 4,5,6,7 */ @@ -218,11 +218,11 @@ static struct scsidevs knowndevs[] = { #if NSD > 0 { - T_DIRECT, T_FIXED, "MAXTOR", "XT-4170S", "B5A", + T_DIRECT, T_FIXED, "MAXTOR", "XT-4170S", "B5A", "mx1", SC_ONE_LU }, { - T_DIRECT, T_FIXED, "*", "*", "*", + T_DIRECT, T_FIXED, "*", "*", "*", "sd", SC_ONE_LU }, #endif /* NSD */ @@ -248,20 +248,20 @@ static struct scsidevs knowndevs[] = "st", SC_ONE_LU, 0, mode_wangdat1300 }, { - T_SEQUENTIAL, T_REMOV, "*", "*", "*", + T_SEQUENTIAL, T_REMOV, "*", "*", "*", "st", SC_ONE_LU, 0, mode_unktape }, #endif /* NST */ #if NCH > 0 { - T_CHANGER, T_REMOV, "*", "*", "*", + T_CHANGER, T_REMOV, "*", "*", "*", "ch", SC_ONE_LU }, #endif /* NCH */ #if NCD > 0 #ifndef UKTEST /* make cdroms unrecognised to test the uk driver */ { - T_READONLY, T_REMOV, "SONY", "CD-ROM CDU-8012", "3.1a", + T_READONLY, T_REMOV, "SONY", "CD-ROM CDU-8012", "3.1a", "cd", SC_ONE_LU }, { @@ -434,7 +434,7 @@ scsi_device_lookup_by_name(char *name) /* scsi_init: Do all the one time processing. This initializes the * type drivers and initializes the configuration. */ -static void +static void scsi_init(void) { static int done = 0; @@ -462,7 +462,7 @@ scsi_init(void) if (IS_SPECIFIED(scsi_cinit[i].unit) && free_bus <= scsi_cinit[i].unit) free_bus = scsi_cinit[i].unit + 1; - + /* Lowest free unit for each type for auto-configure is one * more than the first one not specified in the config file: */ @@ -903,7 +903,7 @@ scsi_probe_bus(int bus, int targ, int lun) sc_link->device = scsi_device_lookup(type); (void)scsi_assign_unit(sc_link); - + if (scsi_alloc_unit(sc_link)) { if (scsi_device_attach(sc_link) == 0) { @@ -989,7 +989,7 @@ scsi_probedev(sc_link, maybe_more, type_p) char version[4 + 1]; inqbuf = &sc_link->inqbuf; - + bzero(inqbuf, sizeof(*inqbuf)); /* * Ask the device what it is @@ -1117,7 +1117,7 @@ scsi_probedev(sc_link, maybe_more, type_p) /* * Try make as good a match as possible with - * available sub drivers + * available sub drivers */ bestmatch = (scsi_selectdev( qualifier, type, remov ? T_REMOV : T_FIXED, manu, model, version)); @@ -1159,7 +1159,7 @@ scsi_dev_lookup(d_open) #ifdef NEW_SCSICONF /* * Compare name with pattern, return 0 on match. - * Short pattern matches trailing blanks in name, + * Short pattern matches trailing blanks in name, * wildcard '*' in pattern matches rest of name */ int @@ -1183,7 +1183,7 @@ match(pattern, name) /* * Try make as good a match as possible with - * available sub drivers + * available sub drivers */ struct scsidevs * scsi_selectdev(qualifier, type, remov, manu, model, rev) diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h index 1a9765e..53574cd 100644 --- a/sys/scsi/scsiconf.h +++ b/sys/scsi/scsiconf.h @@ -14,7 +14,7 @@ * * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 * - * $Id: scsiconf.h,v 1.24 1995/04/23 22:07:51 gibbs Exp $ + * $Id: scsiconf.h,v 1.25 1995/05/03 18:09:14 dufault Exp $ */ #ifndef SCSI_SCSICONF_H #define SCSI_SCSICONF_H 1 @@ -54,9 +54,9 @@ typedef unsigned char u_int8; * * ------------- * - * The key to all this is the scsi_link structure which associates all the + * The key to all this is the scsi_link structure which associates all the * other structures with each other in the correct configuration. The - * scsi_link is the connecting information that allows each part of the + * scsi_link is the connecting information that allows each part of the * scsi system to find the associated other parts. */ @@ -313,7 +313,7 @@ struct scsi_link #define SDEV_WAITING 0x0002 /* a process is waiting for this */ #define SDEV_OPEN 0x0004 /* at least 1 open session */ #define SDEV_BOUNCE 0x0008 /* XXX-HA: unit needs DMA bounce buffer */ -#define SDEV_DBX 0x00F0 /* debugging flags (scsi_debug.h) */ +#define SDEV_DBX 0x00F0 /* debugging flags (scsi_debug.h) */ #define SDEV_ONCE_ONLY 0x0100 /* unit can only be opened once */ #define SDEV_BOOTVERBOSE 0x0200 /* be noisy during boot */ #define SDEV_RESIDS_WORK 0x0400 /* XXX-HA: Residuals work */ diff --git a/sys/scsi/sctarg.c b/sys/scsi/sctarg.c index d7513db..2e433ac 100644 --- a/sys/scsi/sctarg.c +++ b/sys/scsi/sctarg.c @@ -1,4 +1,4 @@ -/* +/* * sctarg: Processor Type driver. * * Copyright (C) 1995, HD Associates, Inc. @@ -37,7 +37,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: sctarg.c,v 1.1 1995/04/14 15:10:41 dufault Exp $ + * $Id: sctarg.c,v 1.2 1995/05/03 18:09:15 dufault Exp $ */ /* @@ -156,7 +156,7 @@ struct scsi_link *sc_link) * continues to be drained. * sctargstart() is called at splbio */ -void +void sctargstart(unit) u_int32 unit; { @@ -228,7 +228,7 @@ sctargstart(unit) } /* go back and see if we can cram more work in.. */ } -void +void sctarg_strategy(struct buf *bp, struct scsi_link *sc_link) { struct buf **dp; @@ -241,9 +241,9 @@ sctarg_strategy(struct buf *bp, struct scsi_link *sc_link) opri = splbio(); - /* + /* * Use a bounce buffer if necessary - */ + */ #ifdef BOUNCE_BUFFERS if (sc_link->flags & SDEV_BOUNCE) vm_bounce_alloc(bp); diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index e7bd97a..1ae8533 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -14,7 +14,7 @@ * * Ported to run under 386BSD by Julian Elischer (julian@dialix.oz.au) Sept 1992 * - * $Id: sd.c,v 1.63 1995/05/03 18:09:17 dufault Exp $ + * $Id: sd.c,v 1.64 1995/05/08 16:53:33 bde Exp $ */ #define SPLSD splbio @@ -117,7 +117,7 @@ struct scsi_device sd_switch = static struct scsi_xfer sx; static int -sd_externalize(struct proc *p, struct kern_devconf *kdc, void *userp, +sd_externalize(struct proc *p, struct kern_devconf *kdc, void *userp, size_t len) { return scsi_externalize(SCSI_LINK(&sd_switch, kdc->kdc_unit), @@ -158,7 +158,7 @@ sd_registerdev(int unit) * The routine called by the low level scsi routine when it discovers * a device suitable for this driver. */ -errval +errval sdattach(struct scsi_link *sc_link) { u_int32 unit; @@ -170,7 +170,7 @@ sdattach(struct scsi_link *sc_link) dp = &(sd->params); - if (sc_link->opennings > SDOUTSTANDING) + if (sc_link->opennings > SDOUTSTANDING) sc_link->opennings = SDOUTSTANDING; /* * Use the subdriver to request information regarding @@ -237,7 +237,7 @@ sd_open(dev, mode, fmt, p, sc_link) dev, unit, PARTITION(dev))); /* - * "unit attention" errors should occur here if the + * "unit attention" errors should occur here if the * drive has been restarted or the pack changed. * just ingnore the result, it's a decoy instruction * The error code will act on the error though @@ -280,7 +280,7 @@ sd_open(dev, mode, fmt, p, sc_link) SC_DEBUG(sc_link, SDEV_DB3, ("device ok\n")); /* - * Load the physical device parameters + * Load the physical device parameters */ sd_get_parms(unit, 0); /* sets SDEV_MEDIA_LOADED */ if (sd->params.secsiz != SECSIZE) { /* XXX One day... */ @@ -330,7 +330,7 @@ bad: * close the device.. only called if we are the LAST occurence of an open * device. Convenient now but usually a pain. */ -errval +errval sd_close(dev, fflag, fmt, p, sc_link) dev_t dev; int fflag; @@ -389,9 +389,9 @@ sd_strategy(struct buf *bp, struct scsi_link *sc_link) opri = SPLSD(); dp = &sd->buf_queue; - /* + /* * Use a bounce buffer if necessary - */ + */ #ifdef BOUNCE_BUFFERS if (sc_link->flags & SDEV_BOUNCE) vm_bounce_alloc(bp); @@ -448,7 +448,7 @@ sdstrategy1(struct buf *bp) * must be called at the correct (highish) spl level * sdstart() is called at SPLSD from sdstrategy and scsi_done */ -void +void sdstart(u_int32 unit, u_int32 flags) { register struct scsi_link *sc_link = SCSI_LINK(&sd_switch, unit); @@ -465,7 +465,7 @@ sdstart(u_int32 unit, u_int32 flags) while (sc_link->opennings) { /* - * there is excess capacity, but a special waits + * there is excess capacity, but a special waits * It'll need the adapter as soon as we clear out of the * way and let it run (user level wait). */ @@ -547,7 +547,7 @@ bad: * Perform special action on behalf of the user * Knows about the internals of this device */ -errval +errval sd_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p, struct scsi_link *sc_link) { @@ -587,7 +587,7 @@ sd_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p, /* * Find out from the device what it's capacity is */ -u_int32 +u_int32 sd_size(unit, flags) int unit, flags; { @@ -630,7 +630,7 @@ sd_size(unit, flags) /* * Tell the device to map out a defective block */ -errval +errval sd_reassign_blocks(unit, block) int unit, block; { @@ -663,10 +663,10 @@ sd_reassign_blocks(unit, block) /* * Get the scsi driver to send a full inquiry to the - * device and use the results to fill out the disk + * device and use the results to fill out the disk * parameter structure. */ -errval +errval sd_get_parms(unit, flags) int unit, flags; { @@ -734,7 +734,7 @@ sd_get_parms(unit, flags) /* * KLUDGE!!(for zone recorded disks) * give a number of sectors so that sec * trks * cyls - * is <= disk_size + * is <= disk_size * can lead to wasted space! THINK ABOUT THIS ! */ disk_parms->heads = scsi_sense.pages.rigid_geometry.nheads; @@ -780,7 +780,7 @@ sdsize(dev_t dev) * This will issue a retry when the device returns a * non-media hardware failure. The CDC-WREN IV does this * when you access it during thermal calibrarion, so the drive - * is pretty useless without this. + * is pretty useless without this. * * In general, you probably almost always would like to issue a retry * for your disk I/O. It can't hurt too much (the caller only retries @@ -910,7 +910,7 @@ sddump(dev_t dev) /* * Fill out the scsi_xfer structure * Note: we cannot sleep as we may be an interrupt - * don't use scsi_scsi_cmd() as it may want + * don't use scsi_scsi_cmd() as it may want * to wait for an xs. */ bzero(xs, sizeof(sx)); diff --git a/sys/scsi/st.c b/sys/scsi/st.c index f8c168f..4320f56 100644 --- a/sys/scsi/st.c +++ b/sys/scsi/st.c @@ -12,7 +12,7 @@ * on the understanding that TFS is not responsible for the correct * functioning of this software in any circumstances. * - * $Id: st.c,v 1.34 1995/04/29 21:30:29 joerg Exp $ + * $Id: st.c,v 1.35 1995/05/03 18:09:19 dufault Exp $ */ /* @@ -285,7 +285,7 @@ struct scsi_device st_switch = ST_FM_WRITTEN | ST_2FM_AT_EOD | ST_PER_ACTION) static int -st_externalize(struct proc *p, struct kern_devconf *kdc, void *userp, +st_externalize(struct proc *p, struct kern_devconf *kdc, void *userp, size_t len) { return scsi_externalize(SCSI_LINK(&st_switch, kdc->kdc_unit), @@ -319,7 +319,7 @@ st_registerdev(int unit) * a device suitable for this driver */ -errval +errval stattach(struct scsi_link *sc_link) { u_int32 unit; @@ -507,7 +507,7 @@ st_loadquirks(sc_link) /* * open the device. */ -errval +errval st_open(dev_t dev, int flags, int fmt, struct proc *p, struct scsi_link *sc_link) { @@ -568,7 +568,7 @@ struct scsi_link *sc_link) st_unmount(unit, NOEJECT); } /* - * If we are not mounted, then we should start a new + * If we are not mounted, then we should start a new * mount session. */ if (!(st->flags & ST_MOUNTED)) { @@ -593,7 +593,7 @@ struct scsi_link *sc_link) * close the device.. only called if we are the LAST * occurence of an open device */ -errval +errval st_close(dev_t dev, int flag, int fmt, struct proc *p, struct scsi_link *sc_link) { @@ -760,7 +760,7 @@ st_unmount(int unit, boolean eject) * initial operation, make a decision as to how we should be set * to run (regarding blocking and EOD marks) */ -errval +errval st_decide_mode(unit, first_read) u_int32 unit; boolean first_read; @@ -896,7 +896,7 @@ done: * The transfer is described by a buf and will include * only one physical transfer. */ -void +void st_strategy(struct buf *bp, struct scsi_link *sc_link) { struct buf **dp; @@ -935,9 +935,9 @@ st_strategy(struct buf *bp, struct scsi_link *sc_link) } opri = splbio(); - /* + /* * Use a bounce buffer if necessary - */ + */ #ifdef BOUNCE_BUFFERS if (sc_link->flags & SDEV_BOUNCE) vm_bounce_alloc(bp); @@ -988,7 +988,7 @@ done: * continues to be drained. * ststart() is called at splbio */ -void +void ststart(unit, flags) u_int32 unit; u_int32 flags; @@ -1117,7 +1117,7 @@ badnews: * Perform special action on behalf of the user; * knows about the internals of this device */ -errval +errval st_ioctl(dev_t dev, int cmd, caddr_t arg, int flag, struct proc *p, struct scsi_link *sc_link) { @@ -1282,7 +1282,7 @@ try_new_value: /* * As the drive liked it, if we are setting a new default, * set it into the structures as such. - * + * * The means for deciding this are not finalised yet */ if (IS_CTLMODE(dev)) { @@ -1305,7 +1305,7 @@ try_new_value: /* * Do a synchronous read. */ -errval +errval st_read(unit, buf, size, flags) u_int32 unit, size, flags; char *buf; @@ -1348,7 +1348,7 @@ st_read(unit, buf, size, flags) /* * Ask the drive what it's min and max blk sizes are. */ -errval +errval st_rd_blk_lim(unit, flags) u_int32 unit, flags; { @@ -1394,7 +1394,7 @@ st_rd_blk_lim(unit, flags) /* * Get the scsi driver to send a full inquiry to the - * device and use the results to fill out the global + * device and use the results to fill out the global * parameter structure. * * called from: @@ -1402,7 +1402,7 @@ st_rd_blk_lim(unit, flags) * open * ioctl (to reset original blksize) */ -static errval +static errval st_mode_sense(unit, flags, page, pagelen, pagecode) u_int32 unit, flags; struct tape_pages *page; @@ -1442,7 +1442,7 @@ st_mode_sense(unit, flags, page, pagelen, pagecode) + sizeof(struct blk_desc) + (page ? pagelen : 0); /* - * Set up a mode sense + * Set up a mode sense */ bzero(&scsi_cmd, sizeof(scsi_cmd)); scsi_cmd.op_code = MODE_SENSE; @@ -1450,7 +1450,7 @@ st_mode_sense(unit, flags, page, pagelen, pagecode) scsi_cmd.length = dat_len; /* - * do the command, + * do the command, * use the results to set blksiz, numblks and density * or if we need it as a template for the mode select * store it away. @@ -1489,7 +1489,7 @@ st_mode_sense(unit, flags, page, pagelen, pagecode) * Send a filled out parameter structure to the drive to * set it into the desire modes etc. */ -errval +errval st_mode_select(unit, flags, page, pagelen) u_int32 unit, flags; struct tape_pages *page; @@ -1604,7 +1604,7 @@ u_int32 unit,mode; /* * skip N blocks/filemarks/seq filemarks/eom */ -errval +errval st_space(unit, number, what, flags) u_int32 unit, what, flags; int32 number; @@ -1689,7 +1689,7 @@ st_space(unit, number, what, flags) /* * write N filemarks */ -errval +errval st_write_filemarks(unit, number, flags) u_int32 unit, flags; int32 number; @@ -1741,7 +1741,7 @@ st_write_filemarks(unit, number, flags) * nmarks returns the number of marks to skip (or, if position * true, which were skipped) to get back original position. */ -int32 +int32 st_chkeod(unit, position, nmarks, flags) u_int32 unit; boolean position; @@ -1771,7 +1771,7 @@ st_chkeod(unit, position, nmarks, flags) /* * load/unload (with retension if true) */ -errval +errval st_load(unit, type, flags) u_int32 unit, type, flags; { @@ -1807,7 +1807,7 @@ st_load(unit, type, flags) /* * Rewind the device */ -errval +errval st_rewind(unit, immed, flags) u_int32 unit, flags; boolean immed; @@ -1838,8 +1838,8 @@ st_rewind(unit, immed, flags) /* ** Erase the device -*/ -errval +*/ +errval st_erase(unit, immed, flags) u_int32 unit, flags; boolean immed; @@ -1883,7 +1883,7 @@ st_erase(unit, immed, flags) * The unix error number to pass back... (0 = report no error) * (SCSIRET_CONTINUE = continue processing) */ -errval +errval st_interpret_sense(xs) struct scsi_xfer *xs; { @@ -1929,7 +1929,7 @@ st_interpret_sense(xs) ,info); /*XXX*/ /* is this how it works ? */ /* check def of ILI for fixed blk tapes */ - + /* * This quirk code helps the drive read * the first tape block, regardless of diff --git a/sys/scsi/uk.c b/sys/scsi/uk.c index d3c3506..0518612 100644 --- a/sys/scsi/uk.c +++ b/sys/scsi/uk.c @@ -1,8 +1,8 @@ -/* +/* * Driver for a device we can't identify. * by Julian Elischer (julian@tfs.com) * - * $Id: uk.c,v 1.7 1995/03/01 22:24:47 dufault Exp $ + * $Id: uk.c,v 1.8 1995/03/04 20:51:08 dufault Exp $ * * If you find that you are adding any code to this file look closely * at putting it in "scsi_driver.c" instead. diff --git a/sys/scsi/worm.c b/sys/scsi/worm.c index b62fc02..9f5375d 100644 --- a/sys/scsi/worm.c +++ b/sys/scsi/worm.c @@ -1,4 +1,4 @@ -/* +/* * worm: Write Once device driver * * Copyright (C) 1995, HD Associates, Inc. @@ -37,7 +37,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: worm.c,v 1.5 1995/05/03 23:38:20 gpalmer Exp $ + * $Id: worm.c,v 1.6 1995/05/03 23:53:32 dufault Exp $ */ /* XXX This is PRELIMINARY. @@ -123,7 +123,7 @@ static int worm_size(struct scsi_link *sc_link) return ret; } -errval +errval wormattach(struct scsi_link *sc_link) { struct scsi_data *worm = sc_link->sd; @@ -156,7 +156,7 @@ wormattach(struct scsi_link *sc_link) * into. In particular, the removable media checking should be * handled in one place. */ -void +void wormstart(unit, flags) u_int32 unit; u_int32 flags; @@ -248,7 +248,7 @@ badnews: } /* go back and see if we can cram more work in.. */ } -void +void worm_strategy(struct buf *bp, struct scsi_link *sc_link) { struct buf **dp; @@ -272,10 +272,10 @@ worm_strategy(struct buf *bp, struct scsi_link *sc_link) opri = splbio(); - /* + /* * Use a bounce buffer if necessary * XXX: How can we move this up? - */ + */ #ifdef BOUNCE_BUFFERS if (sc_link->flags & SDEV_BOUNCE) vm_bounce_alloc(bp); @@ -301,7 +301,7 @@ worm_strategy(struct buf *bp, struct scsi_link *sc_link) /* * Open the device. XXX: I'm completely guessing at this sequence. */ -int +int worm_open(dev_t dev, int flags, int fmt, struct proc *p, struct scsi_link *sc_link) { @@ -347,7 +347,7 @@ struct scsi_link *sc_link) return 0; } -int +int worm_close(dev_t dev, int flag, int fmt, struct proc *p, struct scsi_link *sc_link) { |