summaryrefslogtreecommitdiffstats
path: root/sys/dev/softraid.c
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2010-06-15 10:59:52 +0000
committerdlg <dlg@openbsd.org>2010-06-15 10:59:52 +0000
commit96c770c76cf4f6b72af49d833f3985b620215503 (patch)
tree1e90fb799d6d6379d5f0496f130d13dad27f4920 /sys/dev/softraid.c
parentvarious Huawei 3g devices share a usb id, some of them need DEV_UMASS5 for proper (diff)
downloadwireguard-openbsd-96c770c76cf4f6b72af49d833f3985b620215503.tar.xz
wireguard-openbsd-96c770c76cf4f6b72af49d833f3985b620215503.zip
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