-/* $OpenBSD: cd.c,v 1.216 2014/12/15 02:11:57 tedu Exp $ */
+/* $OpenBSD: cd.c,v 1.217 2015/06/07 19:13:27 krw Exp $ */
/* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */
/*
scsi_prevent(sc->sc_link, PR_PREVENT,
SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_MEDIA_CHANGE |
SCSI_SILENT | SCSI_AUTOCONF);
- break;
+ break;
case DVACT_DEACTIVATE:
sc->sc_flags |= CDF_DYING;
scsi_xsh_del(&sc->sc_xsh);
goto done;
/* Place it in the queue of disk activities for this disk. */
- bufq_queue(&sc->sc_bufq, bp);
+ bufq_queue(&sc->sc_bufq, bp);
/*
* Tell the device to get going on the transfer if it's
bp = bufq_dequeue(&sc->sc_bufq);
if (bp == NULL) {
scsi_xs_put(xs);
- return;
- }
+ return;
+ }
/*
* We have a buf, now we should make a command
* fit in a "small" cdb, use it.
*/
if (!(sc_link->flags & SDEV_ATAPI) &&
- !(sc_link->quirks & SDEV_ONLYBIG) &&
+ !(sc_link->quirks & SDEV_ONLYBIG) &&
((secno & 0x1fffff) == secno) &&
((nsecs & 0xff) == nsecs)) {
/*
{
struct cd_softc *sc;
int error = 0;
-
+
if (cd_cd.cd_ndevs == 0 || (sc = cd_cd.cd_devs[0]) == NULL)
return (ENXIO);
-/* $OpenBSD: mpath.c,v 1.39 2015/03/14 03:38:52 jsg Exp $ */
+/* $OpenBSD: mpath.c,v 1.40 2015/06/07 19:13:27 krw Exp $ */
/*
* Copyright (c) 2009 David Gwynne <dlg@openbsd.org>
#include <sys/param.h>
#include <sys/systm.h>
-#include <sys/kernel.h>
+#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/device.h>
#include <sys/conf.h>
-/* $OpenBSD: mpath_hds.c,v 1.18 2015/03/14 03:38:52 jsg Exp $ */
+/* $OpenBSD: mpath_hds.c,v 1.19 2015/06/07 19:13:27 krw Exp $ */
/*
* Copyright (c) 2011 David Gwynne <dlg@openbsd.org>
#include <sys/param.h>
#include <sys/systm.h>
-#include <sys/kernel.h>
+#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/device.h>
#include <sys/conf.h>
-/* $OpenBSD: safte.c,v 1.51 2014/09/14 14:17:26 jsg Exp $ */
+/* $OpenBSD: safte.c,v 1.52 2015/06/07 19:13:27 krw Exp $ */
/*
* Copyright (c) 2005 David Gwynne <dlg@openbsd.org>
SCSISPC(inq->version) == 3)
return (2);
- if ((inq->device & SID_TYPE) != T_PROCESSOR ||
+ if ((inq->device & SID_TYPE) != T_PROCESSOR ||
SCSISPC(inq->version) != 2 ||
(inq->response_format & SID_ANSII) != 2)
return (0);
free(sc->sc_sensors, M_DEVBUF, 0);
} else {
for (i = 0; i < sc->sc_nsensors; i++)
- sensor_attach(&sc->sc_sensordev,
+ sensor_attach(&sc->sc_sensordev,
&sc->sc_sensors[i].se_sensor);
sensordev_install(&sc->sc_sensordev);
}
sensor_task_unregister(sc->sc_sensortask);
for (i = 0; i < sc->sc_nsensors; i++)
- sensor_detach(&sc->sc_sensordev,
+ sensor_detach(&sc->sc_sensordev,
&sc->sc_sensors[i].se_sensor);
free(sc->sc_sensors, M_DEVBUF, 0);
}
goto done;
}
- sc->sc_nsensors = config->nfans + config->npwrsup + config->ntemps +
+ sc->sc_nsensors = config->nfans + config->npwrsup + config->ntemps +
(config->doorlock ? 1 : 0) + (config->alarm ? 1 : 0);
sc->sc_sensors = mallocarray(sc->sc_nsensors, sizeof(struct safte_sensor),
oot = _2btol(sc->sc_temperrs);
for (i = 0; i < sc->sc_ntemps; i++)
- sc->sc_temps[i].se_sensor.status =
+ sc->sc_temps[i].se_sensor.status =
(oot & (1 << i)) ? SENSOR_S_CRIT : SENSOR_S_OK;
rw_exit_write(&sc->sc_lock);
xs->cmdlen = sizeof(*cmd);
xs->data = (void *)op;
xs->datalen = sizeof(*op);
- xs->retries = 2;
+ xs->retries = 2;
xs->timeout = 30000;
cmd = (struct safte_writebuf_cmd *)xs->cmd;
-/* $OpenBSD: scsi_all.h,v 1.54 2013/06/06 14:00:44 krw Exp $ */
+/* $OpenBSD: scsi_all.h,v 1.55 2015/06/07 19:13:27 krw Exp $ */
/* $NetBSD: scsi_all.h,v 1.10 1996/09/12 01:57:17 thorpej Exp $ */
/*
*
* 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.
*
u_int8_t byte2;
#define SMS_DBD 0x08 /* Disable Block Descriptors */
u_int8_t page;
-#define SMS_PAGE_CODE 0x3F
-#define SMS_PAGE_CTRL 0xC0
-#define SMS_PAGE_CTRL_CURRENT 0x00
-#define SMS_PAGE_CTRL_CHANGEABLE 0x40
-#define SMS_PAGE_CTRL_DEFAULT 0x80
-#define SMS_PAGE_CTRL_SAVED 0xC0
+#define SMS_PAGE_CODE 0x3F
+#define SMS_PAGE_CTRL 0xC0
+#define SMS_PAGE_CTRL_CURRENT 0x00
+#define SMS_PAGE_CTRL_CHANGEABLE 0x40
+#define SMS_PAGE_CTRL_DEFAULT 0x80
+#define SMS_PAGE_CTRL_SAVED 0xC0
u_int8_t unused;
u_int8_t length;
u_int8_t control;
#define T_PROCESSOR 3
#define T_WORM 4
#define T_CDROM 5
-#define T_SCANNER 6
-#define T_OPTICAL 7
-#define T_RDIRECT 14
+#define T_SCANNER 6
+#define T_OPTICAL 7
+#define T_RDIRECT 14
#define T_NODEVICE 0x1F
#define T_CHANGER 8
-/* $OpenBSD: scsi_base.c,v 1.220 2015/03/14 03:38:52 jsg Exp $ */
+/* $OpenBSD: scsi_base.c,v 1.221 2015/06/07 19:13:27 krw Exp $ */
/* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */
/*
int
scsi_ioh_add(struct scsi_iohandler *ioh)
{
- struct scsi_iopool *iopl = ioh->pool;
+ struct scsi_iopool *iopl = ioh->pool;
int rv = 0;
mtx_enter(&iopl->mtx);
* Page data may be invalid (e.g. all zeros)
* but we accept the device's word that this is
* the best it can do. Some devices will freak
- * out if their word is not accepted and
+ * out if their word is not accepted and
* MODE_SENSE_BIG is attempted.
*/
return (0);
case SENSE_NOT_READY_BECOMING_READY:
case SENSE_NOT_READY_FORMAT:
case SENSE_NOT_READY_REBUILD:
- case SENSE_NOT_READY_RECALC:
+ case SENSE_NOT_READY_RECALC:
case SENSE_NOT_READY_INPROGRESS:
case SENSE_NOT_READY_LONGWRITE:
case SENSE_NOT_READY_SELFTEST:
case SENSE_NOT_READY_INIT_REQUIRED:
SC_DEBUG(sc_link, SDEV_DB1,
- ("not ready (ASC_ASCQ == %#x)\n",
+ ("not ready (ASC_ASCQ == %#x)\n",
ASC_ASCQ(sense)));
return (scsi_delay(xs, 1));
case SENSE_NOMEDIUM:
break;
case 0x4d:
snprintf(result, len,
- "Tagged Overlapped Commands (0x%02x = TASK TAG)", ascq);
+ "Tagged Overlapped Commands (0x%02x = TASK TAG)", ascq);
return;
case 0x70:
snprintf(result, len,
-/* $OpenBSD: scsi_changer.h,v 1.5 2006/12/21 02:05:46 krw Exp $ */
+/* $OpenBSD: scsi_changer.h,v 1.6 2015/06/07 19:13:27 krw Exp $ */
/* $NetBSD: scsi_changer.h,v 1.7 1996/04/03 00:25:48 thorpej Exp $ */
/*
* bytes 48-83: Alternate volume tag information.
* (field omitted if AVOLTAG = 0)
*/
-
+
struct volume_tag pvoltag; /* omitted if PVOLTAG == 0 */
- struct volume_tag avoltag; /* omitted if AVOLTAG == 0 */
-
+ struct volume_tag avoltag; /* omitted if AVOLTAG == 0 */
+
/*
* bytes 84-87: Reserved (moved up if either of the above fields
* are omitted)
-/* $OpenBSD: scsi_debug.h,v 1.10 2011/06/21 22:36:42 matthew Exp $ */
+/* $OpenBSD: scsi_debug.h,v 1.11 2015/06/07 19:13:27 krw Exp $ */
/* $NetBSD: scsi_debug.h,v 1.7 1996/10/12 23:23:16 christos Exp $ */
/*
* the following DEBUG bits are defined to exist in the flags word of
* the scsi_link structure.
*/
-#define SDEV_DB1 0x0010 /* scsi commands, errors, data */
+#define SDEV_DB1 0x0010 /* scsi commands, errors, data */
#define SDEV_DB2 0x0020 /* routine flow tracking */
#define SDEV_DB3 0x0040 /* internal to routine flows */
#define SDEV_DB4 0x0080 /* level 4 debugging for this dev */
#define SC_DEBUG(sc_link,Level,Printstuff) \
if ((sc_link)->flags & (Level)) { \
sc_print_addr(sc_link); \
- printf Printstuff; \
+ printf Printstuff; \
}
#define SC_DEBUGN(sc_link,Level,Printstuff) \
if ((sc_link)->flags & (Level)) { \
- printf Printstuff; \
+ printf Printstuff; \
}
#else
#define SC_DEBUG(A,B,C)
-/* $OpenBSD: scsi_disk.h,v 1.34 2013/11/26 20:33:20 deraadt Exp $ */
+/* $OpenBSD: scsi_disk.h,v 1.35 2015/06/07 19:13:27 krw Exp $ */
/* $NetBSD: scsi_disk.h,v 1.10 1996/07/05 16:19:05 christos Exp $ */
/*
* Copyright 1990 by Open Software Foundation,
* Grenoble, FRANCE
*
- * All Rights Reserved
+ * All Rights Reserved
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby granted,
-/* $OpenBSD: scsi_ioctl.c,v 1.50 2015/03/14 03:38:52 jsg Exp $ */
+/* $OpenBSD: scsi_ioctl.c,v 1.51 2015/06/07 19:13:27 krw Exp $ */
/* $NetBSD: scsi_ioctl.c,v 1.23 1996/10/12 23:23:17 christos Exp $ */
/*
if ((sc_link->flags & (SDEV_ATAPI | SDEV_UMASS)) == 0)
/* A 'real' SCSI target. */
sca->type = TYPE_SCSI;
- else
+ else
/* An 'emulated' SCSI target. */
sca->type = TYPE_ATAPI;
sca->scbus = sc_link->bus->sc_dev.dv_unit;
-/* $OpenBSD: scsi_tape.h,v 1.8 2010/12/24 02:45:33 krw Exp $ */
+/* $OpenBSD: scsi_tape.h,v 1.9 2015/06/07 19:13:27 krw Exp $ */
/* $NetBSD: scsi_tape.h,v 1.9 1996/05/24 02:04:47 thorpej Exp $ */
/*
*
* 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.
*
-/* $OpenBSD: scsiconf.c,v 1.191 2015/03/14 03:38:52 jsg Exp $ */
+/* $OpenBSD: scsiconf.c,v 1.192 2015/06/07 19:13:27 krw Exp $ */
/* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */
/*
int i;
switch (link->id->d_type) {
- case DEVID_NAA:
+ case DEVID_NAA:
printf(" naa.");
break;
case DEVID_EUI:
case SID_QUAL_LU_OK:
if ((inqbuf->device & SID_TYPE) == T_NODEVICE) {
SC_DEBUG(sc_link, SDEV_DB1,
- ("Bad LUN. SID_TYPE = T_NODEVICE\n"));
+ ("Bad LUN. SID_TYPE = T_NODEVICE\n"));
goto bad;
}
break;
sc_link->lun = 1;
scsi_inquire(sc_link, usbinqbuf, scsi_autoconf | SCSI_SILENT);
- sc_link->lun = 0;
+ sc_link->lun = 0;
dma_free(usbinqbuf, sizeof(*usbinqbuf));
}
-/* $OpenBSD: scsiconf.h,v 1.162 2014/09/09 20:30:08 dlg Exp $ */
+/* $OpenBSD: scsiconf.h,v 1.163 2015/06/07 19:13:27 krw Exp $ */
/* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */
/*
void *iocookie;
void *(*io_get)(void *);
void (*io_put)(void *, void *);
-
+
/* the runqueue */
struct scsi_runq queue;
/* runqueue semaphore */
u_int16_t adapter_target; /* what are we on the scsi bus */
u_int16_t adapter_buswidth; /* 8 (regular) or 16 (wide). (0 becomes 8) */
u_int16_t flags; /* flags that all devices have */
-#define SDEV_REMOVABLE 0x0001 /* media is removable */
-#define SDEV_MEDIA_LOADED 0x0002 /* device figures are still valid */
+#define SDEV_REMOVABLE 0x0001 /* media is removable */
+#define SDEV_MEDIA_LOADED 0x0002 /* device figures are still valid */
#define SDEV_READONLY 0x0004 /* device is read-only */
-#define SDEV_OPEN 0x0008 /* at least 1 open session */
+#define SDEV_OPEN 0x0008 /* at least 1 open session */
#define SDEV_DBX 0x00f0 /* debugging flags (scsi_debug.h) */
#define SDEV_EJECTING 0x0100 /* eject on device close */
#define SDEV_ATAPI 0x0200 /* device is ATAPI */
-/* $OpenBSD: sd.c,v 1.260 2015/04/02 14:24:02 jasper Exp $ */
+/* $OpenBSD: sd.c,v 1.261 2015/06/07 19:13:27 krw Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
* Stop the disk. Stopping the disk should flush the
* cache, but we are paranoid so we flush the cache
* first. We're cold at this point, so we poll for
- * completion.
+ * completion.
*/
if ((sc->flags & SDF_DIRTY) != 0)
sd_flush(sc, SCSI_AUTOCONF);
/*
* Ask for page 0 (vendor specific) mode sense data to find
- * READONLY info. The only thing USB devices will ask for.
+ * READONLY info. The only thing USB devices will ask for.
*/
err = scsi_do_mode_sense(sc->sc_link, 0, buf, (void **)&page0,
NULL, NULL, NULL, 1, flags | SCSI_SILENT, &big);
default:
/*
- * NOTE: Some devices leave off the last four bytes of
+ * NOTE: Some devices leave off the last four bytes of
* PAGE_RIGID_GEOMETRY and PAGE_FLEX_GEOMETRY mode sense pages.
* The only information in those four bytes is RPM information
* so accept the page. The extra bytes will be zero and RPM will
-/* $OpenBSD: st.c,v 1.128 2014/12/16 18:30:04 tedu Exp $ */
+/* $OpenBSD: st.c,v 1.129 2015/06/07 19:13:27 krw Exp $ */
/* $NetBSD: st.c,v 1.71 1997/02/21 23:03:49 thorpej Exp $ */
/*
scsi_xsh_set(&st->sc_xsh, sc_link, ststart);
timeout_set(&st->sc_timeout, (void (*)(void *))scsi_xsh_set,
&st->sc_xsh);
-
+
/* Set up the buf queue for this device. */
bufq_init(&st->sc_bufq, BUFQ_FIFO);
g->mt_type = 0x7; /* Ultrix compat *//*? */
g->mt_blksiz = st->blksize;
g->mt_density = st->density;
- g->mt_mblksiz = st->modes.blksize;
- g->mt_mdensity = st->modes.density;
+ g->mt_mblksiz = st->modes.blksize;
+ g->mt_mdensity = st->modes.density;
if (st->sc_link->flags & SDEV_READONLY)
g->mt_dsreg |= MT_DS_RDONLY;
if (st->flags & ST_MOUNTED)
*/
if (sense->error_code & SSD_ERRCODE_VALID) {
if (st->flags & ST_FIXEDBLOCKS)
- resid = info * st->blksize; /* XXXX overflow? */
+ resid = info * st->blksize; /* XXXX overflow? */
else
resid = info;
} else {