summaryrefslogtreecommitdiff
path: root/sys/dev/ic/mfi.c
diff options
context:
space:
mode:
authorMarco Peereboom <marco@cvs.openbsd.org>2006-05-23 00:43:58 +0000
committerMarco Peereboom <marco@cvs.openbsd.org>2006-05-23 00:43:58 +0000
commitc7de24905ed2a26377fa458f5f1314deea6b4ad8 (patch)
tree69719930562481c47e7e338678ce1691b1d04fa8 /sys/dev/ic/mfi.c
parent732c1e2ae60e5ba408b96a3e9a541cbe5c5b3610 (diff)
Add first half of physical disk data for bio.
Diffstat (limited to 'sys/dev/ic/mfi.c')
-rw-r--r--sys/dev/ic/mfi.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c
index c2356b16ffc..2777305c4e6 100644
--- a/sys/dev/ic/mfi.c
+++ b/sys/dev/ic/mfi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfi.c,v 1.50 2006/05/22 19:50:43 marco Exp $ */
+/* $OpenBSD: mfi.c,v 1.51 2006/05/23 00:43:57 marco Exp $ */
/*
* Copyright (c) 2006 Marco Peereboom <marco@peereboom.us>
*
@@ -671,6 +671,9 @@ mfi_attach(struct mfi_softc *sc)
/* enable interrupts */
mfi_write(sc, MFI_OMSK, MFI_ENABLE_INTR);
+ /* memory for physical disk map */
+ sc->sc_pd_list = malloc(MFI_PD_LIST_SIZE, M_DEVBUF, M_WAITOK);
+
return (0);
noinit:
mfi_freemem(sc, sc->sc_sense);
@@ -1338,7 +1341,17 @@ done:
int
mfi_ioctl_disk(struct mfi_softc *sc, struct bioc_disk *bd)
{
- return (ENOTTY); /* XXX not yet */
+ int i, rv = EINVAL;
+
+ DNPRINTF(MFI_D_IOCTL, "%s: mfi_ioctl_disk %#x\n",
+ DEVNAME(sc), bd->bd_diskid);
+
+ if (mfi_mgmt(sc, MR_DCMD_PD_GET_LIST, MFI_DATA_IN,
+ MFI_PD_LIST_SIZE, sc->sc_pd_list, NULL))
+ goto done;
+ rv = 0;
+done:
+ return (rv);
}
int