summaryrefslogtreecommitdiff
path: root/sys/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'sys/scsi')
-rw-r--r--sys/scsi/cd.c3
-rw-r--r--sys/scsi/ch.c27
-rw-r--r--sys/scsi/scsi_base.c5
-rw-r--r--sys/scsi/scsiconf.c5
-rw-r--r--sys/scsi/sd.c5
5 files changed, 23 insertions, 22 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c
index c75805af618..fa9d4d8faa0 100644
--- a/sys/scsi/cd.c
+++ b/sys/scsi/cd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cd.c,v 1.90 1996/03/30 21:44:50 christos Exp $ */
+/* $NetBSD: cd.c,v 1.91 1996/04/22 01:46:00 christos Exp $ */
/*
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
@@ -62,7 +62,6 @@
#include <sys/disk.h>
#include <sys/cdio.h>
#include <sys/proc.h>
-#include <sys/cpu.h>
#include <sys/conf.h>
#include <scsi/scsi_all.h>
diff --git a/sys/scsi/ch.c b/sys/scsi/ch.c
index 811bb057fb2..d9c107adf31 100644
--- a/sys/scsi/ch.c
+++ b/sys/scsi/ch.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: ch.c,v 1.4 1996/04/21 22:30:45 deraadt Exp $ */
-/* $NetBSD: ch.c,v 1.20 1996/04/03 00:25:39 thorpej Exp $ */
+/* $OpenBSD: ch.c,v 1.5 1996/05/02 13:17:50 deraadt Exp $ */
+/* $NetBSD: ch.c,v 1.21 1996/04/19 00:02:29 christos Exp $ */
/*
* Copyright (c) 1996 Jason R. Thorpe <thorpej@and.com>
@@ -47,6 +47,7 @@
#include <sys/chio.h>
#include <sys/device.h>
#include <sys/malloc.h>
+#include <sys/conf.h>
#include <scsi/scsi_all.h>
#include <scsi/scsi_changer.h>
@@ -208,14 +209,15 @@ chopen(dev, flags, fmt, p)
* since this might occur if e.g. a tape isn't actually
* loaded in the drive.
*/
- if (error = scsi_test_unit_ready(sc->sc_link,
- SCSI_IGNORE_NOT_READY|SCSI_IGNORE_MEDIA_CHANGE))
+ error = scsi_test_unit_ready(sc->sc_link,
+ SCSI_IGNORE_NOT_READY|SCSI_IGNORE_MEDIA_CHANGE);
+ if (error)
goto bad;
/*
* Make sure our parameters are up to date.
*/
- if (error = ch_get_params(sc, 0))
+ if ((error = ch_get_params(sc, 0)) != 0)
goto bad;
return (0);
@@ -246,7 +248,6 @@ chioctl(dev, cmd, data, flags, p)
struct proc *p;
{
struct ch_softc *sc = ch_cd.cd_devs[CHUNIT(dev)];
- caddr_t elemdata;
int error = 0;
switch (cmd) {
@@ -475,7 +476,8 @@ ch_usergetelemstatus(sc, chet, uptr)
* that the first one can fit into 1k.
*/
data = (caddr_t)malloc(1024, M_DEVBUF, M_WAITOK);
- if (error = ch_getelemstatus(sc, sc->sc_firsts[chet], 1, data, 1024))
+ error = ch_getelemstatus(sc, sc->sc_firsts[chet], 1, data, 1024);
+ if (error)
goto done;
st_hdr = (struct read_element_status_header *)data;
@@ -493,8 +495,9 @@ ch_usergetelemstatus(sc, chet, uptr)
*/
free(data, M_DEVBUF);
data = (caddr_t)malloc(size, M_DEVBUF, M_WAITOK);
- if (error = ch_getelemstatus(sc, sc->sc_firsts[chet],
- sc->sc_counts[chet], data, size))
+ error = ch_getelemstatus(sc, sc->sc_firsts[chet],
+ sc->sc_counts[chet], data, size);
+ if (error)
goto done;
/*
@@ -587,7 +590,8 @@ ch_get_params(sc, scsiflags)
sizeof(cmd), (u_char *)&sense_data, sizeof(sense_data), CHRETRIES,
6000, NULL, scsiflags | SCSI_DATA_IN);
if (error) {
- printf("%s: could not sense element address page\n");
+ printf("%s: could not sense element address page\n",
+ sc->sc_dev.dv_xname);
return (error);
}
@@ -615,7 +619,8 @@ ch_get_params(sc, scsiflags)
sizeof(cmd), (u_char *)&sense_data, sizeof(sense_data), CHRETRIES,
6000, NULL, scsiflags | SCSI_DATA_IN);
if (error) {
- printf("%s: could not sense capabilities page\n");
+ printf("%s: could not sense capabilities page\n",
+ sc->sc_dev.dv_xname);
return (error);
}
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c
index 99d310233e9..8d187c99f58 100644
--- a/sys/scsi/scsi_base.c
+++ b/sys/scsi/scsi_base.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: scsi_base.c,v 1.7 1996/04/21 22:30:50 deraadt Exp $ */
-/* $NetBSD: scsi_base.c,v 1.34 1996/03/19 03:06:28 mycroft Exp $ */
+/* $OpenBSD: scsi_base.c,v 1.8 1996/05/02 13:17:52 deraadt Exp $ */
+/* $NetBSD: scsi_base.c,v 1.35 1996/04/22 01:46:05 christos Exp $ */
/*
* Copyright (c) 1994, 1995 Charles Hannum. All rights reserved.
@@ -44,7 +44,6 @@
#include <sys/errno.h>
#include <sys/device.h>
#include <sys/proc.h>
-#include <sys/cpu.h>
#include <scsi/scsi_all.h>
#include <scsi/scsi_disk.h>
diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c
index 7f6475474ac..bdefa84f034 100644
--- a/sys/scsi/scsiconf.c
+++ b/sys/scsi/scsiconf.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: scsiconf.c,v 1.8 1996/04/21 22:31:04 deraadt Exp $ */
-/* $NetBSD: scsiconf.c,v 1.55 1996/03/21 03:29:40 scottr Exp $ */
+/* $OpenBSD: scsiconf.c,v 1.9 1996/05/02 13:17:54 deraadt Exp $ */
+/* $NetBSD: scsiconf.c,v 1.56 1996/04/22 01:46:09 christos Exp $ */
/*
* Copyright (c) 1994 Charles Hannum. All rights reserved.
@@ -52,7 +52,6 @@
#include <sys/systm.h>
#include <sys/malloc.h>
#include <sys/device.h>
-#include <sys/cpu.h>
#include <scsi/scsi_all.h>
#include <scsi/scsiconf.h>
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index 3e7f348f3b7..4a9def2c5c2 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: sd.c,v 1.7 1996/04/21 22:31:10 deraadt Exp $ */
-/* $NetBSD: sd.c,v 1.95 1996/03/30 21:45:14 christos Exp $ */
+/* $OpenBSD: sd.c,v 1.8 1996/05/02 13:17:55 deraadt Exp $ */
+/* $NetBSD: sd.c,v 1.96 1996/04/22 01:46:14 christos Exp $ */
/*
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
@@ -62,7 +62,6 @@
#include <sys/disklabel.h>
#include <sys/disk.h>
#include <sys/proc.h>
-#include <sys/cpu.h>
#include <sys/conf.h>
#include <scsi/scsi_all.h>