summaryrefslogtreecommitdiff
path: root/sys/arch/emips
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2014-12-31 19:52:04 +0000
committerchristos <christos@NetBSD.org>2014-12-31 19:52:04 +0000
commit4a331aac448bc6ebd006fa2ea80af68f57c666eb (patch)
treea61e69370e02aa55f74db2134eb4c32a0ce55868 /sys/arch/emips
parent7e0dbe4aff861a57f08f15f13b40808d8bd26a6f (diff)
make more drivers use disk_ioctl, and add a dev parameter to it so that
we can merge the "easy" disklabel ioctls to it. Ultimately all this will go do dk_ioctl once all the drivers have been converted.
Diffstat (limited to 'sys/arch/emips')
-rw-r--r--sys/arch/emips/ebus/ace_ebus.c15
-rw-r--r--sys/arch/emips/ebus/flash_ebus.c15
2 files changed, 6 insertions, 24 deletions
diff --git a/sys/arch/emips/ebus/ace_ebus.c b/sys/arch/emips/ebus/ace_ebus.c
index 1a431b4da59..0c47a948f58 100644
--- a/sys/arch/emips/ebus/ace_ebus.c
+++ b/sys/arch/emips/ebus/ace_ebus.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ace_ebus.c,v 1.15 2014/12/31 17:06:48 christos Exp $ */
+/* $NetBSD: ace_ebus.c,v 1.16 2014/12/31 19:52:04 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ace_ebus.c,v 1.15 2014/12/31 17:06:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ace_ebus.c,v 1.16 2014/12/31 19:52:04 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -2172,7 +2172,7 @@ aceioctl(dev_t dev, u_long xfer, void *addr, int flag, struct lwp *l)
if ((ace->sc_flags & ACEF_LOADED) == 0)
return EIO;
- error = disk_ioctl(&ace->sc_dk, xfer, addr, flag, l);
+ error = disk_ioctl(&ace->sc_dk, dev, xfer, addr, flag, l);
if (error != EPASSTHROUGH)
return error;
@@ -2186,15 +2186,6 @@ aceioctl(dev_t dev, u_long xfer, void *addr, int flag, struct lwp *l)
bad144intern(ace);
return 0;
#endif
- case DIOCGDINFO:
- *(struct disklabel *)addr = *(ace->sc_dk.dk_label);
- return 0;
-
- case DIOCGPART:
- ((struct partinfo *)addr)->disklab = ace->sc_dk.dk_label;
- ((struct partinfo *)addr)->part =
- &ace->sc_dk.dk_label->d_partitions[ACEPART(dev)];
- return 0;
case DIOCWDINFO:
case DIOCSDINFO:
diff --git a/sys/arch/emips/ebus/flash_ebus.c b/sys/arch/emips/ebus/flash_ebus.c
index 275e1469ab0..8aba1439251 100644
--- a/sys/arch/emips/ebus/flash_ebus.c
+++ b/sys/arch/emips/ebus/flash_ebus.c
@@ -1,4 +1,4 @@
-/* $NetBSD: flash_ebus.c,v 1.13 2014/12/31 17:06:48 christos Exp $ */
+/* $NetBSD: flash_ebus.c,v 1.14 2014/12/31 19:52:04 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: flash_ebus.c,v 1.13 2014/12/31 17:06:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: flash_ebus.c,v 1.14 2014/12/31 19:52:04 christos Exp $");
/* Driver for the Intel 28F320/640/128 (J3A150) StrataFlash memory device
* Extended to include the Intel JS28F256P30T95.
@@ -2089,7 +2089,7 @@ eflashioctl(dev_t dev, u_long xfer, void *addr, int flag, struct lwp *l)
if ((sc->sc_flags & EFLASHF_LOADED) == 0)
return EIO;
- error = disk_ioctl(&sc->sc_dk, xfer, addr, flag, l);
+ error = disk_ioctl(&sc->sc_dk, dev, xfer, addr, flag, l);
if (error != EPASSTHROUGH)
return (error);
@@ -2103,15 +2103,6 @@ eflashioctl(dev_t dev, u_long xfer, void *addr, int flag, struct lwp *l)
bad144intern(sc);
return 0;
#endif
- case DIOCGDINFO:
- *(struct disklabel *)addr = *(sc->sc_dk.dk_label);
- return 0;
-
- case DIOCGPART:
- ((struct partinfo *)addr)->disklab = sc->sc_dk.dk_label;
- ((struct partinfo *)addr)->part =
- &sc->sc_dk.dk_label->d_partitions[EFLASHPART(dev)];
- return 0;
case DIOCWDINFO:
case DIOCSDINFO: