summaryrefslogtreecommitdiff
path: root/sys/dev/softraid.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2010-06-15 10:59:53 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2010-06-15 10:59:53 +0000
commit3d704e2bf3afb439438b757addbb18ab6d7f131b (patch)
tree9aff5eb371c32ec0671a6ada140a6eac50c55f17 /sys/dev/softraid.c
parentbfb81df74dd2ca5e81b9f42a6f846bf0d18bb188 (diff)
softraid doesnt provide disk cache settings to tweak, mark those ioctls as
not supported. this prevents a panic caused by recursively entering the ioctl handler that now happens on boot when sd tries to enable write cache on all disks. found by ckeuthe@ tested by todd@
Diffstat (limited to 'sys/dev/softraid.c')
-rw-r--r--sys/dev/softraid.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index c679eb27ce0..44ac757c6c0 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.205 2010/06/15 04:11:34 dlg Exp $ */
+/* $OpenBSD: softraid.c,v 1.206 2010/06/15 10:59:52 dlg Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
@@ -1967,7 +1967,13 @@ sr_scsi_ioctl(struct scsi_link *link, u_long cmd, caddr_t addr, int flag)
DNPRINTF(SR_D_IOCTL, "%s: sr_scsi_ioctl cmd: %#x\n",
DEVNAME((struct sr_softc *)link->adapter_softc), cmd);
- return (sr_ioctl(link->adapter_softc, cmd, addr));
+ switch (cmd) {
+ case DIOCGCACHE:
+ case DIOCSCACHE:
+ return (EOPNOTSUPP);
+ default:
+ return (sr_ioctl(link->adapter_softc, cmd, addr));
+ }
}
int