summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2006-07-23 02:50:21 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2006-07-23 02:50:21 +0000
commitd0c7fa94e63a36ad44f7c9e8a6de9c086d79ddb9 (patch)
treece8dcf2b99533282653ffc8dc15c70132581e292 /sys
parent5f6ef55cf04bf8f949493e83d0f055b08c20fbd0 (diff)
remove some scsi ioctls, most importantly the ones that can reprobe the
bus. supporting these complicates the midlayer unnecessarily. ok krw@
Diffstat (limited to 'sys')
-rw-r--r--sys/scsi/cd.c3
-rw-r--r--sys/scsi/scsi_ioctl.c25
-rw-r--r--sys/scsi/sd.c11
-rw-r--r--sys/sys/scsiio.h12
4 files changed, 6 insertions, 45 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c
index 4e1ed9e1d33..7c6703b91c4 100644
--- a/sys/scsi/cd.c
+++ b/sys/scsi/cd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd.c,v 1.108 2006/07/19 01:21:28 krw Exp $ */
+/* $OpenBSD: cd.c,v 1.109 2006/07/23 02:50:20 dlg Exp $ */
/* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */
/*
@@ -801,7 +801,6 @@ cdioctl(dev, cmd, addr, flag, p)
case DIOCLOCK:
case DIOCEJECT:
case SCIOCIDENTIFY:
- case OSCIOCIDENTIFY:
case SCIOCCOMMAND:
case SCIOCDEBUG:
case CDIOCLOADUNLOAD:
diff --git a/sys/scsi/scsi_ioctl.c b/sys/scsi/scsi_ioctl.c
index 7c784ea02d1..ffc9a4e1127 100644
--- a/sys/scsi/scsi_ioctl.c
+++ b/sys/scsi/scsi_ioctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi_ioctl.c,v 1.25 2006/07/11 09:26:47 dlg Exp $ */
+/* $OpenBSD: scsi_ioctl.c,v 1.26 2006/07/23 02:50:20 dlg Exp $ */
/* $NetBSD: scsi_ioctl.c,v 1.23 1996/10/12 23:23:17 christos Exp $ */
/*
@@ -341,14 +341,6 @@ scsi_do_ioctl(struct scsi_link *sc_link, dev_t dev, u_long cmd, caddr_t addr,
SC_DEBUG(sc_link, SDEV_DB2, ("scsi_do_ioctl(0x%lx)\n", cmd));
switch(cmd) {
- case OSCIOCIDENTIFY: {
- struct oscsi_addr *sca = (struct oscsi_addr *)addr;
-
- sca->scbus = sc_link->scsibus;
- sca->target = sc_link->target;
- sca->lun = sc_link->lun;
- return (0);
- }
case SCIOCIDENTIFY: {
struct scsi_addr *sca = (struct scsi_addr *)addr;
@@ -359,16 +351,11 @@ scsi_do_ioctl(struct scsi_link *sc_link, dev_t dev, u_long cmd, caddr_t addr,
sca->lun = sc_link->lun;
return (0);
}
- case SCIOCRECONFIG:
- case SCIOCDECONFIG:
- return (EINVAL);
case SCIOCCOMMAND:
if (scsi_readsafe_cmd[((scsireq_t *)addr)->cmd[0]])
break;
/* FALLTHROUGH */
case SCIOCDEBUG:
- case SCIOCREPROBE:
- case OSCIOCREPROBE:
case SCIOCRESET:
if ((flag & FWRITE) == 0)
return (EPERM);
@@ -432,16 +419,6 @@ scsi_do_ioctl(struct scsi_link *sc_link, dev_t dev, u_long cmd, caddr_t addr,
sc_link->flags |= SDEV_DB4;
return (0);
}
- case OSCIOCREPROBE: {
- struct oscsi_addr *sca = (struct oscsi_addr *)addr;
-
- return (scsi_probe_busses(sca->scbus, sca->target, sca->lun));
- }
- case SCIOCREPROBE: {
- struct scsi_addr *sca = (struct scsi_addr *)addr;
-
- return (scsi_probe_busses(sca->scbus, sca->target, sca->lun));
- }
case SCIOCRESET: {
scsi_scsi_cmd(sc_link, 0, 0, 0, 0, GENRETRY, 2000, NULL,
SCSI_RESET);
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index 5c7dc68326b..5c4cb6e789d 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.108 2006/07/13 11:46:16 krw Exp $ */
+/* $OpenBSD: sd.c,v 1.109 2006/07/23 02:50:20 dlg Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
@@ -830,7 +830,6 @@ sdioctl(dev, cmd, addr, flag, p)
case DIOCLOCK:
case DIOCEJECT:
case SCIOCIDENTIFY:
- case OSCIOCIDENTIFY:
case SCIOCCOMMAND:
case SCIOCDEBUG:
if (part == RAW_PART)
@@ -925,14 +924,6 @@ sdioctl(dev, cmd, addr, flag, p)
sd->sc_link->flags |= SDEV_EJECTING;
goto exit;
- case SCIOCREASSIGN:
- if ((flag & FWRITE) == 0) {
- error = EBADF;
- goto exit;
- }
- error = sd_reassign_blocks(sd, (*(int *)addr));
- goto exit;
-
default:
if (part != RAW_PART) {
error = ENOTTY;
diff --git a/sys/sys/scsiio.h b/sys/sys/scsiio.h
index adceb238da5..5d245518c03 100644
--- a/sys/sys/scsiio.h
+++ b/sys/sys/scsiio.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsiio.h,v 1.6 2002/05/27 23:40:31 tdeval Exp $ */
+/* $OpenBSD: scsiio.h,v 1.7 2006/07/23 02:50:20 dlg Exp $ */
/* $NetBSD: scsiio.h,v 1.3 1994/06/29 06:45:09 cgd Exp $ */
#ifndef _SYS_SCSIIO_H_
@@ -57,20 +57,14 @@ struct oscsi_addr {
struct scsi_addr {
int type;
-#define TYPE_SCSI 0
-#define TYPE_ATAPI 1
+#define TYPE_SCSI 0
+#define TYPE_ATAPI 1
int scbus; /* -1 if wildcard */
int target; /* -1 if wildcard */
int lun; /* -1 if wildcard */
};
-#define OSCIOCREPROBE _IOW('Q', 3, struct oscsi_addr) /* look for new devs */
-#define OSCIOCIDENTIFY _IOR('Q', 4, struct oscsi_addr)
-#define SCIOCDECONFIG _IO('Q', 5) /* please disappear */
-#define SCIOCRECONFIG _IO('Q', 6) /* please check again */
#define SCIOCRESET _IO('Q', 7) /* reset the device */
-#define SCIOCREASSIGN _IOW('Q', 8, int) /* reassign block */
#define SCIOCIDENTIFY _IOR('Q', 9, struct scsi_addr)
-#define SCIOCREPROBE _IOW('Q', 10, struct scsi_addr)
#endif /* _SYS_SCSIIO_H_ */