diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2006-05-11 00:46:00 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2006-05-11 00:46:00 +0000 |
commit | 5c63d182406271b85863839f3a5bb71c76a2b955 (patch) | |
tree | b2b1ebdc5b95399bb7e4a2391e61a066c3e01dd2 /sys/scsi | |
parent | 24c37208828a4118465e88d32a4ff64c28c07880 (diff) |
Zap trailing whitespace.
Diffstat (limited to 'sys/scsi')
-rw-r--r-- | sys/scsi/cd.c | 42 | ||||
-rw-r--r-- | sys/scsi/cd.h | 4 | ||||
-rw-r--r-- | sys/scsi/ch.c | 4 | ||||
-rw-r--r-- | sys/scsi/scsi_all.h | 6 | ||||
-rw-r--r-- | sys/scsi/scsi_base.c | 16 | ||||
-rw-r--r-- | sys/scsi/scsi_ioctl.c | 16 | ||||
-rw-r--r-- | sys/scsi/scsi_message.h | 12 | ||||
-rw-r--r-- | sys/scsi/scsiconf.c | 16 | ||||
-rw-r--r-- | sys/scsi/scsiconf.h | 4 | ||||
-rw-r--r-- | sys/scsi/sd.c | 8 | ||||
-rw-r--r-- | sys/scsi/ses.c | 10 | ||||
-rw-r--r-- | sys/scsi/ses.h | 6 | ||||
-rw-r--r-- | sys/scsi/ss.c | 8 | ||||
-rw-r--r-- | sys/scsi/ss_mustek.c | 4 | ||||
-rw-r--r-- | sys/scsi/ss_mustek.h | 4 | ||||
-rw-r--r-- | sys/scsi/ss_scanjet.c | 18 | ||||
-rw-r--r-- | sys/scsi/st.c | 20 | ||||
-rw-r--r-- | sys/scsi/uk.c | 6 |
18 files changed, 102 insertions, 102 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c index af6787de82a..4ae7920d7ff 100644 --- a/sys/scsi/cd.c +++ b/sys/scsi/cd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd.c,v 1.106 2006/03/15 20:20:42 miod Exp $ */ +/* $OpenBSD: cd.c,v 1.107 2006/05/11 00:45:59 krw Exp $ */ /* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */ /* @@ -284,7 +284,7 @@ cddetach(self, flags) /* * Open the device. Make sure the partition info is as up-to-date as can be. */ -int +int cdopen(dev, flag, fmt, p) dev_t dev; int flag, fmt; @@ -333,7 +333,7 @@ cdopen(dev, flag, fmt, p) error = scsi_test_unit_ready(sc_link, TEST_READY_RETRIES_CD, (rawopen ? SCSI_SILENT : 0) | SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_MEDIA_CHANGE); - + /* Start the cd spinning if necessary. */ if (error == EIO) error = scsi_start(sc_link, SSS_START, @@ -389,7 +389,7 @@ out: /* Insure only one open at a time. */ sc_link->flags |= SDEV_OPEN; SC_DEBUG(sc_link, SDEV_DB3, ("open complete\n")); - /* It's OK to fall through because dk_openmask is now non-zero. */ + /* It's OK to fall through because dk_openmask is now non-zero. */ bad: if (cd->sc_dk.dk_openmask == 0) { scsi_prevent(sc_link, PR_ALLOW, @@ -406,7 +406,7 @@ bad: * Close the device. Only called if we are the last occurrence of an open * device. */ -int +int cdclose(dev, flag, fmt, p) dev_t dev; int flag, fmt; @@ -517,7 +517,7 @@ cdstrategy(bp) * not doing anything, otherwise just wait for completion */ cdstart(cd); - + device_unref(&cd->sc_dev); splx(s); return; @@ -552,7 +552,7 @@ done: * must be called at the correct (highish) spl level * cdstart() is called at splbio from cdstrategy and scsi_done */ -void +void cdstart(v) void *v; { @@ -740,7 +740,7 @@ void lba2msf (lba, m, s, f) u_long lba; u_char *m, *s, *f; -{ +{ u_long tmp; tmp = lba + CD_BLOCK_OFFSET; /* offset of first logical frame */ @@ -811,7 +811,7 @@ cdioctl(dev, cmd, addr, flag, p) case CDIOCCLRDEBUG: case CDIOCRESET: case DVD_AUTH: - case DVD_READ_STRUCT: + case DVD_READ_STRUCT: case MTIOCTOP: if (part == RAW_PART) break; @@ -862,7 +862,7 @@ cdioctl(dev, cmd, addr, flag, p) cd->flags &= ~CDF_LABELLING; cdunlock(cd); break; - + case DIOCWLABEL: error = EBADF; break; @@ -918,7 +918,7 @@ cdioctl(dev, cmd, addr, flag, p) if ((error = cd_read_toc(cd, 0, 0, &th, sizeof(th), 0)) != 0) break; - if (cd->sc_link->quirks & ADEV_LITTLETOC) + if (cd->sc_link->quirks & ADEV_LITTLETOC) th.len = letoh16(th.len); else th.len = betoh16(th.len); @@ -1080,7 +1080,7 @@ cdioctl(dev, cmd, addr, flag, p) close_tray: case CDIOCCLOSE: - error = scsi_start(cd->sc_link, SSS_START|SSS_LOEJ, + error = scsi_start(cd->sc_link, SSS_START|SSS_LOEJ, SCSI_IGNORE_NOT_READY | SCSI_IGNORE_MEDIA_CHANGE); break; @@ -1238,7 +1238,7 @@ cd_size(cd, flags) struct scsi_read_cd_capacity scsi_cmd; int blksize; u_long size; - + /* Reasonable defaults for drives that don't support READ_CD_CAPACITY */ cd->params.blksize = 2048; @@ -1308,7 +1308,7 @@ cd_setchan(cd, p0, p1, p2, p3, flags) else error = scsi_mode_select(cd->sc_link, SMS_PF, &data->hdr, flags, 20000); - } + } free(data, M_TEMP); return (error); @@ -1338,7 +1338,7 @@ cd_getvol(cd, arg, flags) arg->vol[1] = audio->port[1].volume; arg->vol[2] = audio->port[2].volume; arg->vol[3] = audio->port[3].volume; - } + } free(data, M_TEMP); return (0); @@ -1367,7 +1367,7 @@ cd_setvol(cd, arg, flags) if (error != 0) { free(data, M_TEMP); return (error); - } + } mask_volume[0] = audio->port[0].volume; mask_volume[1] = audio->port[1].volume; @@ -1381,7 +1381,7 @@ cd_setvol(cd, arg, flags) if (error != 0) { free(data, M_TEMP); return (error); - } + } audio->port[0].volume = arg->vol[0] & mask_volume[0]; audio->port[1].volume = arg->vol[1] & mask_volume[1]; @@ -1410,7 +1410,7 @@ cd_load_unload(cd, options, slot) cmd.opcode = LOAD_UNLOAD; cmd.options = options; /* ioctl uses ATAPI values */ cmd.slot = slot; - + return (scsi_scsi_cmd(cd->sc_link, (struct scsi_generic *)&cmd, sizeof(cmd), 0, 0, CDRETRIES, 200000, NULL, 0)); } @@ -1892,7 +1892,7 @@ dvd_read_disckey(cd, s) struct scsi_read_dvd_structure cmd; struct scsi_read_dvd_structure_data *buf; int error; - + buf = malloc(sizeof(*buf), M_TEMP, M_WAITOK); if (buf == NULL) return (ENOMEM); @@ -1948,7 +1948,7 @@ dvd_read_manufact(cd, s) struct scsi_read_dvd_structure cmd; struct scsi_read_dvd_structure_data *buf; int error; - + buf = malloc(sizeof(*buf), M_TEMP, M_WAITOK); if (buf == NULL) return (ENOMEM); @@ -1968,7 +1968,7 @@ dvd_read_manufact(cd, s) bcopy(buf->data, s->manufact.value, s->manufact.len); else error = EIO; - } + } free(buf, M_TEMP); return (error); diff --git a/sys/scsi/cd.h b/sys/scsi/cd.h index 36a421f696e..aab8e8a8ea7 100644 --- a/sys/scsi/cd.h +++ b/sys/scsi/cd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cd.h,v 1.10 2006/03/05 14:58:10 krw Exp $ */ +/* $OpenBSD: cd.h,v 1.11 2006/05/11 00:45:59 krw Exp $ */ /* $NetBSD: scsi_cd.h,v 1.6 1996/03/19 03:06:39 mycroft Exp $ */ /* @@ -133,7 +133,7 @@ struct scsi_read_cd_capacity { struct scsi_load_unload { u_int8_t opcode; u_int8_t reserved; -#define IMMED 0x1 +#define IMMED 0x1 u_int8_t reserved2[2]; u_int8_t options; #define START 0x1 diff --git a/sys/scsi/ch.c b/sys/scsi/ch.c index e33572ea98f..0889cab23bc 100644 --- a/sys/scsi/ch.c +++ b/sys/scsi/ch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ch.c,v 1.23 2005/09/11 17:34:27 krw Exp $ */ +/* $OpenBSD: ch.c,v 1.24 2006/05/11 00:45:59 krw Exp $ */ /* $NetBSD: ch.c,v 1.26 1997/02/21 22:06:52 thorpej Exp $ */ /* @@ -44,7 +44,7 @@ #include <sys/buf.h> #include <sys/proc.h> #include <sys/user.h> -#include <sys/chio.h> +#include <sys/chio.h> #include <sys/device.h> #include <sys/malloc.h> #include <sys/conf.h> diff --git a/sys/scsi/scsi_all.h b/sys/scsi/scsi_all.h index 2869ba8b795..7b2bde2bfba 100644 --- a/sys/scsi/scsi_all.h +++ b/sys/scsi/scsi_all.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_all.h,v 1.34 2005/09/11 17:34:27 krw Exp $ */ +/* $OpenBSD: scsi_all.h,v 1.35 2006/05/11 00:45:59 krw Exp $ */ /* $NetBSD: scsi_all.h,v 1.10 1996/09/12 01:57:17 thorpej Exp $ */ /* @@ -333,7 +333,7 @@ struct scsi_mode_header_big { u_int8_t medium_type; u_int8_t dev_spec; u_int8_t reserved; -#define LONGLBA 0x01 +#define LONGLBA 0x01 u_int8_t reserved2; u_int8_t blk_desc_len[2]; }; @@ -388,7 +388,7 @@ struct scsi_status_iu_header { #define SCSI_OK 0x00 #define SCSI_CHECK 0x02 #define SCSI_COND_MET 0x04 -#define SCSI_BUSY 0x08 +#define SCSI_BUSY 0x08 #define SCSI_INTERM 0x10 #define SCSI_INTERM_COND_MET 0x14 #define SCSI_RESV_CONFLICT 0x18 diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c index 3f1399320f0..ef727d11fde 100644 --- a/sys/scsi/scsi_base.c +++ b/sys/scsi/scsi_base.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_base.c,v 1.101 2006/05/07 20:50:21 krw Exp $ */ +/* $OpenBSD: scsi_base.c,v 1.102 2006/05/11 00:45:59 krw Exp $ */ /* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */ /* @@ -64,7 +64,7 @@ char *scsi_decode_sense(struct scsi_sense_data *, int); #define DECODE_SENSE_KEY 1 #define DECODE_ASC_ASCQ 2 #define DECODE_SKSV 3 - + struct pool scsi_xfer_pool; /* @@ -147,7 +147,7 @@ scsi_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 scsi_free_xs(xs) struct scsi_xfer *xs; { @@ -259,7 +259,7 @@ scsi_size(sc_link, flags, blksize) SC_DEBUG(sc_link, SDEV_DB1, ("READ CAPACITY error (%#x)\n", error)); return (0); - } + } max_addr = _4btol(rdcap.addr); if (blksize) @@ -275,14 +275,14 @@ scsi_size(sc_link, flags, blksize) printf("only the first 4,294,967,295 sectors will be used.\n"); return (0xffffffffUL); } - + return (max_addr + 1); } /* * Get scsi driver to send a "are you ready?" command */ -int +int scsi_test_unit_ready(sc_link, retries, flags) struct scsi_link *sc_link; int retries; @@ -458,7 +458,7 @@ scsi_mode_sense_page(hdr, page_len) if ((total_length - header_length) < page_len) return (NULL); - + return ((u_char *)hdr + header_length); } @@ -953,7 +953,7 @@ scsi_delay(xs, seconds) /* Invalid combination! */ return (EIO); } - + while (seconds-- > 0) if (tsleep(&lbolt, PRIBIO, "scbusy", 0)) /* Signal == abort xs. */ diff --git a/sys/scsi/scsi_ioctl.c b/sys/scsi/scsi_ioctl.c index 6951f452939..8b651edfe63 100644 --- a/sys/scsi/scsi_ioctl.c +++ b/sys/scsi/scsi_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_ioctl.c,v 1.23 2006/04/20 20:31:13 miod Exp $ */ +/* $OpenBSD: scsi_ioctl.c,v 1.24 2006/05/11 00:45:59 krw Exp $ */ /* $NetBSD: scsi_ioctl.c,v 1.23 1996/10/12 23:23:17 christos Exp $ */ /* @@ -30,11 +30,11 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* +/* * Contributed by HD Associates (hd@world.std.com). * Copyright (c) 1992, 1993 HD Associates * - * Berkeley style copyright. + * Berkeley style copyright. */ #include <sys/types.h> @@ -345,7 +345,7 @@ scsi_do_ioctl( struct scsi_link *sc_link, dev_t dev, u_long cmd, caddr_t addr, case SCIOCIDENTIFY: { struct scsi_addr *sca = (struct scsi_addr *)addr; - sca->type = (sc_link->flags & SDEV_ATAPI) + sca->type = (sc_link->flags & SDEV_ATAPI) ? TYPE_ATAPI : TYPE_SCSI; sca->scbus = sc_link->scsibus; sca->target = sc_link->target; @@ -358,7 +358,7 @@ scsi_do_ioctl( struct scsi_link *sc_link, dev_t dev, u_long cmd, caddr_t addr, case SCIOCCOMMAND: if (scsi_readsafe_cmd[((scsireq_t *)addr)->cmd[0]]) break; - /* FALLTHROUGH */ + /* FALLTHROUGH */ case SCIOCDEBUG: case SCIOCREPROBE: case OSCIOCREPROBE: @@ -366,9 +366,9 @@ scsi_do_ioctl( struct scsi_link *sc_link, dev_t dev, u_long cmd, caddr_t addr, if ((flag & FWRITE) == 0) return (EPERM); break; - default: + default: if (sc_link->adapter->ioctl) - return ((sc_link->adapter->ioctl)(sc_link, cmd, addr, + return ((sc_link->adapter->ioctl)(sc_link, cmd, addr, flag, p)); else return (ENOTTY); @@ -390,7 +390,7 @@ scsi_do_ioctl( struct scsi_link *sc_link, dev_t dev, u_long cmd, caddr_t addr, si->si_uio.uio_resid = screq->datalen; si->si_uio.uio_offset = 0; si->si_uio.uio_segflg = UIO_USERSPACE; - si->si_uio.uio_rw = + si->si_uio.uio_rw = (screq->flags & SCCMD_READ) ? UIO_READ : UIO_WRITE; si->si_uio.uio_procp = p; error = physio(scsistrategy, &si->si_bp, dev, diff --git a/sys/scsi/scsi_message.h b/sys/scsi/scsi_message.h index ccc5fec2e57..0bb8a2c958a 100644 --- a/sys/scsi/scsi_message.h +++ b/sys/scsi/scsi_message.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_message.h,v 1.7 2004/10/17 05:36:43 krw Exp $ */ +/* $OpenBSD: scsi_message.h,v 1.8 2006/05/11 00:45:59 krw Exp $ */ /* Messages (1 byte) */ /* I/T (M)andatory or (O)ptional */ #define MSG_CMDCOMPLETE 0x00 /* M/M */ @@ -27,12 +27,12 @@ #define MSG_ORDERED_Q_TAG 0x22 /* O/O */ #define MSG_IGN_WIDE_RESIDUE 0x23 /* O/O */ -/* Identify message */ /* M/M */ -#define MSG_IDENTIFYFLAG 0x80 -#define MSG_IDENTIFY_DISCFLAG 0x40 +/* Identify message */ /* M/M */ +#define MSG_IDENTIFYFLAG 0x80 +#define MSG_IDENTIFY_DISCFLAG 0x40 #define MSG_IDENTIFY(lun, disc) (((disc) ? 0xc0 : MSG_IDENTIFYFLAG) | (lun)) #define MSG_ISIDENTIFY(m) ((m) & MSG_IDENTIFYFLAG) -#define MSG_IDENTIFY_LUNMASK 0x01F +#define MSG_IDENTIFY_LUNMASK 0x01F /* Extended messages (opcode and length) */ #define MSG_EXT_SDTR 0x01 @@ -43,7 +43,7 @@ #define MSG_EXT_WDTR_BUS_8_BIT 0x00 #define MSG_EXT_WDTR_BUS_16_BIT 0x01 -#define MSG_EXT_WDTR_BUS_32_BIT 0x02 +#define MSG_EXT_WDTR_BUS_32_BIT 0x02 #define MSG_EXT_PPR 0x04 #define MSG_EXT_PPR_LEN 0x06 diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c index 7eb632a4ba4..07ef3de9f96 100644 --- a/sys/scsi/scsiconf.c +++ b/sys/scsi/scsiconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.c,v 1.100 2006/01/21 12:18:49 miod Exp $ */ +/* $OpenBSD: scsiconf.c,v 1.101 2006/05/11 00:45:59 krw Exp $ */ /* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */ /* @@ -190,7 +190,7 @@ scsibusactivate(dev, act) return (config_activate_children(dev, act)); } -int +int scsibusdetach(dev, type) struct device *dev; int type; @@ -205,7 +205,7 @@ scsibusdetach(dev, type) if (sb->sc_link[i] != NULL) free(sb->sc_link[i], M_DEVBUF); } - + free(sb->sc_link, M_DEVBUF); return (0); @@ -320,7 +320,7 @@ scsi_strvis(dst, src, len) while (len > 0 && (src[0] == ' ' || src[0] == '\t' || src[0] == '\n' || src[0] == '\0' || src[0] == 0xff)) ++src, --len; - while (len > 0 && (src[len-1] == ' ' || src[len-1] == '\t' || + while (len > 0 && (src[len-1] == ' ' || src[len-1] == '\t' || src[len-1] == '\n' || src[len-1] == '\0' || src[len-1] == 0xff)) --len; @@ -669,7 +669,7 @@ scsi_probedev(scsi, inqbuflun0, target, lun) } finger = (const struct scsi_quirk_inquiry_pattern *)scsi_inqmatch( - &inqbuf, scsi_quirk_patterns, + &inqbuf, scsi_quirk_patterns, sizeof(scsi_quirk_patterns)/sizeof(scsi_quirk_patterns[0]), sizeof(scsi_quirk_patterns[0]), &priority); @@ -680,7 +680,7 @@ scsi_probedev(scsi, inqbuflun0, target, lun) if ((inqbuf.version & SID_ANSII) >= 2) { if ((inqbuf.flags & SID_CmdQue) != 0) sc_link->quirks &= ~SDEV_NOTAGS; - if ((inqbuf.flags & SID_Sync) != 0) + if ((inqbuf.flags & SID_Sync) != 0) sc_link->quirks &= ~SDEV_NOSYNC; if ((inqbuf.flags & SID_WBus16) != 0) sc_link->quirks &= ~SDEV_NOWIDE; @@ -729,11 +729,11 @@ scsi_probedev(scsi, inqbuflun0, target, lun) scsi->sc_link[target][lun] = sc_link; - /* + /* * Generate a TEST_UNIT_READY command. This gives drivers waiting for * valid quirks data a chance to set wide/sync/tag options * appropriately. It also clears any outstanding ACA conditions that - * INQUIRY may leave behind. + * INQUIRY may leave behind. * * Do this now so that any messages generated by config_attach() do not * have negotiation messages inserted into their midst. diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h index 3ed02565c4e..0d774d40a50 100644 --- a/sys/scsi/scsiconf.h +++ b/sys/scsi/scsiconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.h,v 1.63 2005/12/02 16:24:08 marco Exp $ */ +/* $OpenBSD: scsiconf.h,v 1.64 2006/05/11 00:45:59 krw Exp $ */ /* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */ /* @@ -91,7 +91,7 @@ struct scsi_xfer; struct scsi_link; /* - * Temporary hack + * Temporary hack */ extern int scsi_autoconf; diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index 51448cdb7dc..d44a7e985a6 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.104 2006/03/15 20:20:42 miod Exp $ */ +/* $OpenBSD: sd.c,v 1.105 2006/05/11 00:45:59 krw Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -671,7 +671,7 @@ sdstart(v) * fit in a "small" cdb, use it. */ if (!(sc_link->flags & SDEV_ATAPI) && - !(sc_link->quirks & SDEV_ONLYBIG) && + !(sc_link->quirks & SDEV_ONLYBIG) && ((blkno & 0x1fffff) == blkno) && ((nblks & 0xff) == nblks)) { /* @@ -1376,12 +1376,12 @@ sd_get_parms(sd, dp, flags) blksize = _2btol(flex->bytes_s); if (dp->disksize == 0) dp->disksize = heads * cyls * sectors; - } + } } break; } -validate: +validate: if (buf) free(buf, M_TEMP); diff --git a/sys/scsi/ses.c b/sys/scsi/ses.c index 80dbd9662ae..612f9333ce9 100644 --- a/sys/scsi/ses.c +++ b/sys/scsi/ses.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ses.c,v 1.36 2006/05/09 05:51:54 deraadt Exp $ */ +/* $OpenBSD: ses.c,v 1.37 2006/05/11 00:45:59 krw Exp $ */ /* * Copyright (c) 2005 David Gwynne <dlg@openbsd.org> @@ -75,7 +75,7 @@ struct ses_softc { SES_ENC_STD, SES_ENC_DELL } sc_enctype; - + u_char *sc_buf; ssize_t sc_buflen; @@ -278,8 +278,8 @@ ses_read_config(struct ses_softc *sc) #endif if (cold) - flags |= SCSI_AUTOCONF; - + flags |= SCSI_AUTOCONF; + if (scsi_scsi_cmd(sc->sc_link, (struct scsi_generic *)&cmd, sizeof(cmd), buf, SES_BUFLEN, 2, 3000, NULL, flags) != 0) { free(buf, M_DEVBUF); @@ -592,7 +592,7 @@ ses_write_config(struct ses_softc *sc) if (cold) flags |= SCSI_AUTOCONF; - + if (scsi_scsi_cmd(sc->sc_link, (struct scsi_generic *)&cmd, sizeof(cmd), sc->sc_buf, sc->sc_buflen, 2, 3000, NULL, flags) != 0) return (1); diff --git a/sys/scsi/ses.h b/sys/scsi/ses.h index 245b4e931c8..6b05e9c3aab 100644 --- a/sys/scsi/ses.h +++ b/sys/scsi/ses.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ses.h,v 1.9 2005/08/23 23:44:28 dlg Exp $ */ +/* $OpenBSD: ses.h,v 1.10 2006/05/11 00:45:59 krw Exp $ */ /* * Copyright (c) 2005 Marco Peereboom * All rights reserved. @@ -96,7 +96,7 @@ struct ses_enc_desc { u_int8_t vendor_id[8]; u_int8_t prod_id[16]; u_int8_t prod_rev[4]; - u_int8_t vendor[0]; + u_int8_t vendor[0]; } __packed; /* type descriptor header */ @@ -201,7 +201,7 @@ struct ses_status { #define SES_S_COOL_IDENT(d) ((d)->f1 & (1<<6)) /* identify */ #define SES_S_COOL_SPEED_MASK 0x03 #define SES_S_COOL_SPEED(d) ((d)->f2 + \ - ((u_int16_t)((d)->f2 & SES_S_COOL_SPEED_MASK) << 8)) + ((u_int16_t)((d)->f2 & SES_S_COOL_SPEED_MASK) << 8)) #define SES_S_COOL_FACTOR 10 #define SES_S_COOL_CODE(d) ((d)->f3 & 0x7) /* actual speed code */ #define SES_S_COOL_C_STOPPED 0x0 /* stopped */ diff --git a/sys/scsi/ss.c b/sys/scsi/ss.c index 08ecf0d89c3..7563130714a 100644 --- a/sys/scsi/ss.c +++ b/sys/scsi/ss.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ss.c,v 1.53 2005/12/17 20:29:16 krw Exp $ */ +/* $OpenBSD: ss.c,v 1.54 2006/05/11 00:45:59 krw Exp $ */ /* $NetBSD: ss.c,v 1.10 1996/05/05 19:52:55 christos Exp $ */ /* @@ -92,14 +92,14 @@ struct quirkdata { */ int (*vendor_unique_sw)(struct ss_softc *, struct scan_io *, struct scsi_set_window *, void *); - /* + /* * If the scanner requires use of GET_BUFFER_STATUS before READ * it can be called from ss_minphys(). */ void (*special_minphys)(struct ss_softc *, struct buf *); /* - * + * */ int (*compute_sizes)(void); }; @@ -243,7 +243,7 @@ const struct ss_quirk_inquiry_pattern ss_quirk_patterns[] = { }}, #endif }; - + int ssmatch(struct device *, void *, void *); void ssattach(struct device *, struct device *, void *); diff --git a/sys/scsi/ss_mustek.c b/sys/scsi/ss_mustek.c index 87cbf390be3..b8847beec1e 100644 --- a/sys/scsi/ss_mustek.c +++ b/sys/scsi/ss_mustek.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ss_mustek.c,v 1.12 2005/06/05 21:03:50 krw Exp $ */ +/* $OpenBSD: ss_mustek.c,v 1.13 2006/05/11 00:45:59 krw Exp $ */ /* $NetBSD: ss_mustek.c,v 1.4 1996/05/05 19:52:57 christos Exp $ */ /* @@ -573,6 +573,6 @@ mustek_compute_sizes(ss) ss->sio.scan_lines = (ss->sio.scan_height * ss->sio.scan_y_resolution) / 1200; - ss->sio.scan_window_size = ss->sio.scan_lines * + ss->sio.scan_window_size = ss->sio.scan_lines * ((ss->sio.scan_pixels_per_line * ss->sio.scan_bits_per_pixel) / 8); } diff --git a/sys/scsi/ss_mustek.h b/sys/scsi/ss_mustek.h index cf5e562c00e..b692aa2c56a 100644 --- a/sys/scsi/ss_mustek.h +++ b/sys/scsi/ss_mustek.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ss_mustek.h,v 1.6 2005/06/05 21:03:50 krw Exp $ */ +/* $OpenBSD: ss_mustek.h,v 1.7 2006/05/11 00:45:59 krw Exp $ */ /* $NetBSD: ss_mustek.h,v 1.2 1996/03/19 03:08:37 mycroft Exp $ */ /* @@ -120,7 +120,7 @@ struct mustek_get_status_cmd { struct mustek_get_status_data { #define MUSTEK_READY 0 -#define MUSTEK_BUSY -1 +#define MUSTEK_BUSY -1 u_int8_t ready_busy; /* 0 = ready */ u_int8_t bytes_per_line[2]; /* LSB */ u_int8_t lines[3]; /* LSB */ diff --git a/sys/scsi/ss_scanjet.c b/sys/scsi/ss_scanjet.c index c0d5b606a35..01be5125fea 100644 --- a/sys/scsi/ss_scanjet.c +++ b/sys/scsi/ss_scanjet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ss_scanjet.c,v 1.28 2006/01/17 20:22:38 miod Exp $ */ +/* $OpenBSD: ss_scanjet.c,v 1.29 2006/05/11 00:45:59 krw Exp $ */ /* $NetBSD: ss_scanjet.c,v 1.6 1996/05/18 22:58:01 christos Exp $ */ /* @@ -161,7 +161,7 @@ scanjet_attach(ss, sa) /* now install special handlers */ ss->special = scanjet_special; - /* + /* * fill in the rest of the scan_io struct by calling * set_window and compute_sizes routines */ @@ -274,7 +274,7 @@ scanjet_trigger_scanner(ss) uprintf("%s: trigger_scanner failed\n", ss->sc_dev.dv_xname); return (error); } - + return (0); } @@ -319,7 +319,7 @@ scanjet_read(ss, bp) /* * Do a synchronous write. Used to send control messages. */ -int +int scanjet_ctl_write(ss, buf, size, flags) struct ss_softc *ss; char *buf; @@ -374,7 +374,7 @@ static void show_es(char *es) } #endif -/* +/* * simulate SCSI_SET_WINDOW for ScanJets */ int @@ -398,9 +398,9 @@ scanjet_set_window(ss, flags) switch (ss->sio.scan_image_mode) { case SIM_BINARY_MONOCHROME: ss->sio.scan_bits_per_pixel = 1; - /* + /* * Use line art mode (\033*aoT) and make image data be - * min-is-white ala PBM (\033*a0I). + * min-is-white ala PBM (\033*a0I). */ strlcat(escape_codes, "\033*a0T\033*a0I", sizeof escape_codes); break; @@ -414,7 +414,7 @@ scanjet_set_window(ss, flags) break; case SIM_GRAYSCALE: ss->sio.scan_bits_per_pixel = 8; - /* + /* * Use grayscale mode (\033*a4T) and make image data be * min-is-black ala PGM (\033*a1I) */ @@ -436,7 +436,7 @@ scanjet_set_window(ss, flags) * If the escape sequence has been truncated at this point, appending * the next sequence will also cause truncation, and this time we pay * attention. - */ + */ len = strlen(escape_codes); n = snprintf(escape_codes + len, sizeof escape_codes - len, "\033*a%dG\033*a%dL\033*a%dK", diff --git a/sys/scsi/st.c b/sys/scsi/st.c index 9ed1bfe42ab..5e918ddb35a 100644 --- a/sys/scsi/st.c +++ b/sys/scsi/st.c @@ -1,4 +1,4 @@ -/* $OpenBSD: st.c,v 1.50 2005/09/11 17:34:27 krw Exp $ */ +/* $OpenBSD: st.c,v 1.51 2006/05/11 00:45:59 krw Exp $ */ /* $NetBSD: st.c,v 1.71 1997/02/21 23:03:49 thorpej Exp $ */ /* @@ -492,7 +492,7 @@ st_loadquirks(st) /* * open the device. */ -int +int stopen(dev, flags, mode, p) dev_t dev; int flags; @@ -953,7 +953,7 @@ done: * continues to be drained. * ststart() is called at splbio */ -void +void ststart(v) void *v; { @@ -1441,10 +1441,10 @@ st_mode_sense(st, flags) if (error != 0) { free(data, M_TEMP); return (error); - } + } /* It is valid for no page0 to be available. */ - + if (big) dev_spec = data->hdr_big.dev_spec; else @@ -1454,7 +1454,7 @@ st_mode_sense(st, flags) st->flags |= ST_READONLY; else st->flags &= ~ST_READONLY; - + st->numblks = block_count; st->media_blksize = block_size; st->media_density = density; @@ -1467,7 +1467,7 @@ st_mode_sense(st, flags) ("%sbuffered\n", dev_spec & SMH_DSP_BUFF_MODE ? "" : "un")); sc_link->flags |= SDEV_MEDIA_LOADED; - + free(data, M_TEMP); return (0); } @@ -1494,7 +1494,7 @@ st_mode_select(st, flags) if (outbuf == NULL) { free(inbuf, M_TEMP); return (ENOMEM); - } + } /* * This quirk deals with drives that have only one valid mode and think @@ -1514,7 +1514,7 @@ st_mode_select(st, flags) free(inbuf, M_TEMP); free(outbuf, M_TEMP); return (0); - } + } bzero(outbuf, sizeof(*outbuf)); bzero(&general, sizeof(general)); @@ -1580,7 +1580,7 @@ st_mode_select(st, flags) sizeof(general)); error = scsi_mode_select_big(st->sc_link, 0, &outbuf->hdr_big, - flags, ST_CTL_TIME); + flags, ST_CTL_TIME); free(inbuf, M_TEMP); free(outbuf, M_TEMP); return (error); diff --git a/sys/scsi/uk.c b/sys/scsi/uk.c index cd7cb71ef9f..2a64c26f873 100644 --- a/sys/scsi/uk.c +++ b/sys/scsi/uk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uk.c,v 1.8 2005/04/06 02:51:13 krw Exp $ */ +/* $OpenBSD: uk.c,v 1.9 2006/05/11 00:45:59 krw Exp $ */ /* $NetBSD: uk.c,v 1.15 1996/03/17 00:59:57 thorpej Exp $ */ /* @@ -30,7 +30,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* +/* * Dummy driver for a device we can't identify. * Originally by Julian Elischer (julian@tfs.com) */ @@ -130,7 +130,7 @@ ukopen(dev, flag, fmt, p) uk = uk_cd.cd_devs[unit]; if (!uk) return ENXIO; - + sc_link = uk->sc_link; SC_DEBUG(sc_link, SDEV_DB1, |