summaryrefslogtreecommitdiff
path: root/sys/scsi
diff options
context:
space:
mode:
authorConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>2001-04-30 21:21:55 +0000
committerConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>2001-04-30 21:21:55 +0000
commitf9ed35d7cecd8ac771ff60d925bec985ab42d92b (patch)
treee4061e5f02d0f16a7ce67dc9e780787f7c50a648 /sys/scsi
parent2bee84eccbec0b56b008a589554b07cd3303a446 (diff)
Pass IOCTL to adapter device if not understood by SCSI layer.
Diffstat (limited to 'sys/scsi')
-rw-r--r--sys/scsi/scsi_ioctl.c8
-rw-r--r--sys/scsi/scsiconf.h5
2 files changed, 10 insertions, 3 deletions
diff --git a/sys/scsi/scsi_ioctl.c b/sys/scsi/scsi_ioctl.c
index 254a9d4c24a..4c464645dee 100644
--- a/sys/scsi/scsi_ioctl.c
+++ b/sys/scsi/scsi_ioctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi_ioctl.c,v 1.11 2001/01/25 03:50:53 todd Exp $ */
+/* $OpenBSD: scsi_ioctl.c,v 1.12 2001/04/30 21:21:54 csapuntz Exp $ */
/* $NetBSD: scsi_ioctl.c,v 1.23 1996/10/12 23:23:17 christos Exp $ */
/*
@@ -416,6 +416,10 @@ scsi_do_safeioctl(sc_link, dev, cmd, addr, flag, p)
case SCIOCDECONFIG:
return EINVAL;
default:
- return ENOTTY;
+ if (sc_link->adapter->ioctl)
+ return (sc_link->adapter->ioctl)(sc_link, cmd, addr,
+ flag);
+ else
+ return ENOTTY;
}
}
diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h
index 6d0b04d669e..d5779e26558 100644
--- a/sys/scsi/scsiconf.h
+++ b/sys/scsi/scsiconf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsiconf.h,v 1.25 2000/11/23 08:55:35 deraadt Exp $ */
+/* $OpenBSD: scsiconf.h,v 1.26 2001/04/30 21:21:54 csapuntz Exp $ */
/* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */
/*
@@ -88,6 +88,7 @@ typedef int boolean;
struct buf;
struct scsi_xfer;
+struct scsi_link;
/*
* Temporary hack
@@ -104,6 +105,8 @@ struct scsi_adapter {
void (*scsi_minphys) __P((struct buf *));
int (*open_target_lu) __P((void));
int (*close_target_lu) __P((void));
+ int (*ioctl) __P((struct scsi_link *, u_long cmd,
+ caddr_t addrp, int flag));
};
/*