summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2004-07-31 11:31:31 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2004-07-31 11:31:31 +0000
commit1feaf09695ab40818251752c8ef519703c44f6c7 (patch)
treef5c0c2685bd39f1caa800337880139e06e9cfcb0
parentc46066733583cea787f0bcda85d72c2a6ed37c03 (diff)
Remove scsi_change_def() and related command structure. Its only use
in the tree is #ifdef'd out and is fundamentally wrong anyway - it tries to force *all* devices to SCSI-2. Also recent SCSI specs seem to have marked the command as obsolete. Bonus - eliminates another undocumented option (SCSI_2_DEF). Found in a list of unused kernel functions posted to tech-kern@netbsd by Krister Walfridsson in 2002. ok marco@ tdeval@
-rw-r--r--sys/scsi/scsi_all.h14
-rw-r--r--sys/scsi/scsi_base.c20
-rw-r--r--sys/scsi/scsiconf.c8
-rw-r--r--sys/scsi/scsiconf.h3
4 files changed, 4 insertions, 41 deletions
diff --git a/sys/scsi/scsi_all.h b/sys/scsi/scsi_all.h
index d45ec1dcc07..30c83a5e69b 100644
--- a/sys/scsi/scsi_all.h
+++ b/sys/scsi/scsi_all.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi_all.h,v 1.16 2004/02/21 00:47:42 krw Exp $ */
+/* $OpenBSD: scsi_all.h,v 1.17 2004/07/31 11:31:29 krw Exp $ */
/* $NetBSD: scsi_all.h,v 1.10 1996/09/12 01:57:17 thorpej Exp $ */
/*
@@ -154,18 +154,6 @@ struct scsi_prevent {
#define PR_PREVENT 0x01
#define PR_ALLOW 0x00
-struct scsi_changedef {
- u_int8_t opcode;
- u_int8_t byte2;
- u_int8_t unused1;
- u_int8_t how;
- u_int8_t unused[4];
- u_int8_t datalen;
- u_int8_t control;
-};
-#define SC_SCSI_1 0x01
-#define SC_SCSI_2 0x03
-
/*
* Opcodes
*/
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c
index 9c9cd9165e6..ebefabd3d45 100644
--- a/sys/scsi/scsi_base.c
+++ b/sys/scsi/scsi_base.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi_base.c,v 1.61 2004/05/28 23:50:14 krw Exp $ */
+/* $OpenBSD: scsi_base.c,v 1.62 2004/07/31 11:31:30 krw Exp $ */
/* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */
/*
@@ -270,24 +270,6 @@ scsi_test_unit_ready(sc_link, retries, flags)
}
/*
- * Do a scsi operation, asking a device to run as SCSI-II if it can.
- */
-int
-scsi_change_def(sc_link, flags)
- struct scsi_link *sc_link;
- int flags;
-{
- struct scsi_changedef scsi_cmd;
-
- bzero(&scsi_cmd, sizeof(scsi_cmd));
- scsi_cmd.opcode = CHANGE_DEFINITION;
- scsi_cmd.how = SC_SCSI_2;
-
- return scsi_scsi_cmd(sc_link, (struct scsi_generic *) &scsi_cmd,
- sizeof(scsi_cmd), 0, 0, 2, 100000, NULL, flags);
-}
-
-/*
* Do a scsi operation asking a device what it is.
* Use the scsi_cmd routine in the switch table.
*/
diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c
index 2c8cb75494c..3d39c8b7455 100644
--- a/sys/scsi/scsiconf.c
+++ b/sys/scsi/scsiconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsiconf.c,v 1.91 2004/05/09 14:08:11 krw Exp $ */
+/* $OpenBSD: scsiconf.c,v 1.92 2004/07/31 11:31:30 krw Exp $ */
/* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */
/*
@@ -655,12 +655,6 @@ scsi_probedev(scsi, inqbuflun0, target, lun)
}
#endif
-#ifdef SCSI_2_DEF
- /* Some devices need to be told to go to SCSI2. */
- /* However some just explode if you tell them this... leave it out. */
- scsi_change_def(sc_link, scsi_autoconf | SCSI_SILENT);
-#endif /* SCSI_2_DEF */
-
/* Now go ask the device all about itself. */
rslt = scsi_inquire(sc_link, &inqbuf, scsi_autoconf | SCSI_SILENT);
if (rslt != 0) {
diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h
index 9bb123397e7..790da1d212a 100644
--- a/sys/scsi/scsiconf.h
+++ b/sys/scsi/scsiconf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsiconf.h,v 1.46 2004/06/22 00:50:57 marco Exp $ */
+/* $OpenBSD: scsiconf.h,v 1.47 2004/07/31 11:31:30 krw Exp $ */
/* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */
/*
@@ -327,7 +327,6 @@ void scsi_free_xs(struct scsi_xfer *);
int scsi_execute_xs(struct scsi_xfer *);
u_long scsi_size(struct scsi_link *, int);
int scsi_test_unit_ready(struct scsi_link *, int, int);
-int scsi_change_def(struct scsi_link *, int);
int scsi_inquire(struct scsi_link *, struct scsi_inquiry_data *, int);
int scsi_prevent(struct scsi_link *, int, int);
int scsi_start(struct scsi_link *, int, int);