summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2005-11-06 01:42:24 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2005-11-06 01:42:24 +0000
commit2e6a5d870ca669d419595686991b34754a9a2fb1 (patch)
treefe9328ffa04fd74b7cb7f22bb55fe9bbe5c47848 /sys/dev
parentbf67c09f7633175f5bf1cf346eff5e890c170a3b (diff)
clean up some early but unused work on bio support.
ok marco@ krw@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/mpt_ioctl.h53
-rw-r--r--sys/dev/ic/mpt_openbsd.c78
-rw-r--r--sys/dev/ic/mpt_openbsd.h6
3 files changed, 2 insertions, 135 deletions
diff --git a/sys/dev/ic/mpt_ioctl.h b/sys/dev/ic/mpt_ioctl.h
deleted file mode 100644
index a6c92e693f8..00000000000
--- a/sys/dev/ic/mpt_ioctl.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* $OpenBSD: mpt_ioctl.h,v 1.3 2004/10/22 05:03:40 marco Exp $ */
-/*
- * Copyright (c) 2004 Marco Peereboom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-#ifndef _DEV_IC_MPT_IOCTL_H_
-#define _DEV_IC_MPT_IOCTL_H_
-
-#include <dev/ic/mpt_mpilib.h>
-
-/* ioctl tunnel defines */
-#define MPT_IOCTL_DUMMY _IOWR('B', 32, struct mpt_dummy)
-struct mpt_dummy {
- void *cookie;
- int x;
-};
-
-/* structures are inside mpt_mpilib.h */
-#define MPT_IOCTL_MFG0 _IOWR('B', 33, struct mpt_mfg0)
-struct mpt_mfg0 {
- void *cookie;
- fCONFIG_PAGE_MANUFACTURING_0 cpm0;
-};
-
-#define MPT_IOCTL_MFG1 _IOWR('B', 34, struct _CONFIG_PAGE_MANUFACTURING_1)
-#define MPT_IOCTL_MFG2 _IOWR('B', 35, struct _CONFIG_PAGE_MANUFACTURING_2)
-#define MPT_IOCTL_MFG3 _IOWR('B', 36, struct _CONFIG_PAGE_MANUFACTURING_3)
-#define MPT_IOCTL_MFG4 _IOWR('B', 37, struct _CONFIG_PAGE_MANUFACTURING_4)
-
-#endif /* _DEV_IC_MPT_IOCTL_H_ */
diff --git a/sys/dev/ic/mpt_openbsd.c b/sys/dev/ic/mpt_openbsd.c
index 5d66decd8a5..dc7726dee5c 100644
--- a/sys/dev/ic/mpt_openbsd.c
+++ b/sys/dev/ic/mpt_openbsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpt_openbsd.c,v 1.25 2005/11/02 03:27:39 krw Exp $ */
+/* $OpenBSD: mpt_openbsd.c,v 1.26 2005/11/06 01:42:23 dlg Exp $ */
/* $NetBSD: mpt_netbsd.c,v 1.7 2003/07/14 15:47:11 lukem Exp $ */
/*
@@ -119,9 +119,6 @@ void mpt_event_notify_reply(mpt_softc_t *, MSG_EVENT_NOTIFY_REPLY *);
int mpt_action(struct scsi_xfer *);
void mpt_minphys(struct buf *);
-#if NBIO > 0
-int mpt_ioctl(struct device *, u_long, caddr_t);
-#endif
struct cfdriver mpt_cd = {
NULL, "mpt", DV_DULL
};
@@ -444,12 +441,6 @@ mpt_attach(mpt_softc_t *mpt)
mpt->verbose = 2;
#endif
-#if NBIO > 0
- if (bio_register(&mpt->mpt_dev, mpt_ioctl) != 0)
- panic("%s: controller registration failed",
- mpt->mpt_dev.dv_xname);
-#endif
-
mpt_prt(mpt, "IM support: %x", mpt->im_support);
(void) config_found(&mpt->mpt_dev, lptr, scsiprint);
@@ -1577,70 +1568,3 @@ mpt_free_fw_mem(mpt_softc_t *mpt)
bus_dmamem_unmap(mpt->sc_dmat, (caddr_t)mpt->fw, mpt->fw_image_size);
bus_dmamem_free(mpt->sc_dmat, &mpt->fw_seg, mpt->fw_rseg);
}
-
-#if NBIO > 0
-int
-mpt_ioctl(dev, cmd, addr)
- struct device *dev;
- u_long cmd;
- caddr_t addr;
-{
- int error = 0;
- int rv;
- struct mpt_dummy *dummy;
- struct mpt_mfg0 *pmfg0;
- fCONFIG_PAGE_MANUFACTURING_0 mfgp0;
- mpt_softc_t *mpt = (mpt_softc_t *)dev;
-
- switch (cmd) {
- case MPT_IOCTL_DUMMY:
- dummy = (struct mpt_dummy *)addr;
- if (mpt->verbose > 2) {
- printf("%s: MPT_IOCTL_DUMMY %d\n",
- dev->dv_xname, dummy->x++);
- }
- break;
- case MPT_IOCTL_MFG0:
- /* Retrieve Manufacturing Page 0 */
- mfgp0.Header.PageNumber = 0;
- mfgp0.Header.PageType = MPI_CONFIG_PAGETYPE_MANUFACTURING;
- rv = mpt_read_cfg_page(mpt, 0, &mfgp0.Header);
- if (rv) {
- mpt_prt(mpt, "Could not retrieve MFG PAGE 0.");
- error = EINVAL;
- } else {
- if (mpt->verbose > 2) {
- printf("Chip name: %s\n",
- mfgp0.ChipName);
- printf("Chip Revision: %s\n",
- mfgp0.ChipRevision);
- printf("Board name: %s\n",
- mfgp0.BoardName);
- printf("Board assembly: %s\n",
- mfgp0.BoardAssembly);
- printf("Board tracer number: %s\n",
- mfgp0.BoardTracerNumber);
- }
- pmfg0 = (struct mpt_mfg0 *)addr;
- memcpy(&pmfg0->cpm0, &mfgp0,
- sizeof(fCONFIG_PAGE_MANUFACTURING_0));
- }
- break;
- case MPT_IOCTL_MFG1:
- /* Retrieve Manufacturing Page 1 */
- break;
- case MPT_IOCTL_MFG2:
- /* Retrieve Manufacturing Page 2 */
- break;
- case MPT_IOCTL_MFG3:
- /* Retrieve Manufacturing Page 3 */
- break;
- case MPT_IOCTL_MFG4:
- /* Retrieve Manufacturing Page 4 */
- break;
- default:
- error = EINVAL;
- }
- return (error);
-}
-#endif
diff --git a/sys/dev/ic/mpt_openbsd.h b/sys/dev/ic/mpt_openbsd.h
index dbbbcfbdb40..b9af0cf2c73 100644
--- a/sys/dev/ic/mpt_openbsd.h
+++ b/sys/dev/ic/mpt_openbsd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpt_openbsd.h,v 1.15 2004/12/29 06:57:11 deraadt Exp $ */
+/* $OpenBSD: mpt_openbsd.h,v 1.16 2005/11/06 01:42:23 dlg Exp $ */
/* $NetBSD: mpt_netbsd.h,v 1.2 2003/04/16 23:02:14 thorpej Exp $ */
/*
@@ -121,12 +121,8 @@
#include <scsi/scsi_all.h>
#include <scsi/scsiconf.h>
-#include <dev/biovar.h>
-#include <dev/ic/mpt_ioctl.h>
#include <dev/ic/mpt_mpilib.h>
-#include "bio.h"
-
/*
* macro to convert from milliseconds to hz without integer overflow
* Default version using only 32bits arithmetics.