diff options
| author | jdolecek <jdolecek@NetBSD.org> | 2016-09-19 23:32:30 +0000 |
|---|---|---|
| committer | jdolecek <jdolecek@NetBSD.org> | 2016-09-19 23:32:30 +0000 |
| commit | 4e341fdf72641d06b1199f89da9a098ad22c759a (patch) | |
| tree | bfe220b3ee7b3a5eba3d954c153e7179c2d975e5 /sys/dev/raidframe | |
| parent | c02068e3773fc4e9735cf9e5adaf8830f41a50e0 (diff) | |
fix DIOCCACHESYNC ioctl on ld(4) and raid(4) to work again; it got broken
when the code was switched over to dk_ioctl() - countrary to disk_ioctl(),
dk_ioctl() returns ENOTTY for ioctls it doesn't support, so must be called
as last resort, not first
bug was introduced in rev 1.83 (2015-05-02) for ld(4), and 1.335 (2016-01-03)
for raid(4)
Diffstat (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_netbsdkintf.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c index 57a0d52d595..75dd937c1a7 100644 --- a/sys/dev/raidframe/rf_netbsdkintf.c +++ b/sys/dev/raidframe/rf_netbsdkintf.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.345 2016/04/27 02:47:39 christos Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.346 2016/09/19 23:32:30 jdolecek Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***********************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.345 2016/04/27 02:47:39 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.346 2016/09/19 23:32:30 jdolecek Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -1786,17 +1786,14 @@ raidioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) * Add support for "regular" device ioctls here. */ - error = dk_ioctl(dksc, dev, cmd, data, flag, l); - if (error != EPASSTHROUGH) - return (error); - switch (cmd) { case DIOCCACHESYNC: - return rf_sync_component_caches(raidPtr); + retcode = rf_sync_component_caches(raidPtr); default: - retcode = ENOTTY; + retcode = dk_ioctl(dksc, dev, cmd, data, flag, l); } + return (retcode); } |
