summaryrefslogtreecommitdiff
path: root/sys/dev/ic/gdt_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ic/gdt_common.c')
-rw-r--r--sys/dev/ic/gdt_common.c129
1 files changed, 1 insertions, 128 deletions
diff --git a/sys/dev/ic/gdt_common.c b/sys/dev/ic/gdt_common.c
index 4c168be0c6b..e1bf90095bd 100644
--- a/sys/dev/ic/gdt_common.c
+++ b/sys/dev/ic/gdt_common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gdt_common.c,v 1.60 2011/07/17 22:46:48 matthew Exp $ */
+/* $OpenBSD: gdt_common.c,v 1.61 2012/08/15 02:38:14 jsg Exp $ */
/*
* Copyright (c) 1999, 2000, 2003 Niklas Hallqvist. All rights reserved.
@@ -557,9 +557,6 @@ gdt_scsi_cmd(struct scsi_xfer *xs)
struct gdt_softc *sc = link->adapter_softc;
u_int8_t target = link->target;
struct gdt_ccb *ccb;
-#if 0
- struct gdt_ucmd *ucmd;
-#endif
u_int32_t blockno, blockcnt;
struct scsi_rw *rw;
struct scsi_rw_big *rwb;
@@ -1424,128 +1421,4 @@ gdt_ioctl_setstate(struct gdt_softc *sc, struct bioc_setstate *bs)
{
return (1); /* XXX not yet */
}
-
-#if 0
-int
-gdt_ioctl(struct device *dev, u_long cmd, caddr_t addr)
-{
- int error = 0;
- struct gdt_dummy *dummy;
-
- switch (cmd) {
- case GDT_IOCTL_DUMMY:
- dummy = (struct gdt_dummy *)addr;
- printf("%s: GDT_IOCTL_DUMMY %d\n", dev->dv_xname, dummy->x++);
- break;
-
- case GDT_IOCTL_GENERAL: {
- gdt_ucmd_t *ucmd;
- struct gdt_softc *sc = (struct gdt_softc *)dev;
- int s;
-
- ucmd = (gdt_ucmd_t *)addr;
- s = splbio();
- TAILQ_INSERT_TAIL(&sc->sc_ucmdq, ucmd, links);
- ucmd->complete_flag = FALSE;
- splx(s);
- gdt_chain(sc);
- if (!ucmd->complete_flag)
- (void)tsleep((void *)ucmd, PCATCH | PRIBIO, "gdtucw",
- 0);
- break;
- }
-
- case GDT_IOCTL_DRVERS:
- ((gdt_drvers_t *)addr)->vers =
- (GDT_DRIVER_VERSION << 8) | GDT_DRIVER_SUBVERSION;
- break;
-
- case GDT_IOCTL_CTRCNT:
- ((gdt_ctrcnt_t *)addr)->cnt = gdt_cnt;
- break;
-
-#ifdef notyet
- case GDT_IOCTL_CTRTYPE: {
- gdt_ctrt_t *p;
- struct gdt_softc *sc = (struct gdt_softc *)dev;
-
- p = (gdt_ctrt_t *)addr;
- p->oem_id = 0x8000;
- p->type = 0xfd;
- p->info = (sc->sc_bus << 8) | (sc->sc_slot << 3);
- p->ext_type = 0x6000 | sc->sc_subdevice;
- p->device_id = sc->sc_device;
- p->sub_device_id = sc->sc_subdevice;
- break;
- }
-#endif
-
- case GDT_IOCTL_OSVERS: {
- gdt_osv_t *p;
-
- p = (gdt_osv_t *)addr;
- p->oscode = 10;
- p->version = osrelease[0] - '0';
- if (osrelease[1] == '.')
- p->subversion = osrelease[2] - '0';
- else
- p->subversion = 0;
- if (osrelease[3] == '.')
- p->revision = osrelease[4] - '0';
- else
- p->revision = 0;
- strlcpy(p->name, ostype, sizeof p->name);
- break;
- }
-
-#ifdef notyet
- case GDT_IOCTL_EVENT: {
- gdt_event_t *p;
- int s;
-
- p = (gdt_event_t *)addr;
- if (p->erase == 0xff) {
- if (p->dvr.event_source == GDT_ES_TEST)
- p->dvr.event_data.size =
- sizeof(p->dvr.event_data.eu.test);
- else if (p->dvr.event_source == GDT_ES_DRIVER)
- p->dvr.event_data.size =
- sizeof(p->dvr.event_data.eu.driver);
- else if (p->dvr.event_source == GDT_ES_SYNC)
- p->dvr.event_data.size =
- sizeof(p->dvr.event_data.eu.sync);
- else
- p->dvr.event_data.size =
- sizeof(p->dvr.event_data.eu.async);
- s = splbio();
- gdt_store_event(p->dvr.event_source, p->dvr.event_idx,
- &p->dvr.event_data);
- splx(s);
- } else if (p->erase == 0xfe) {
- s = splbio();
- gdt_clear_events();
- splx(s);
- } else if (p->erase == 0) {
- p->handle = gdt_read_event(p->handle, &p->dvr);
- } else {
- gdt_readapp_event((u_int8_t)p->erase, &p->dvr);
- }
- break;
- }
-#endif
-
- case GDT_IOCTL_STATIST:
-#if 0
- bcopy(&gdt_stat, (gdt_statist_t *)addr, sizeof gdt_stat);
-#else
- error = EOPNOTSUPP;
-#endif
- break;
-
- default:
- error = EINVAL;
- }
- return (error);
-}
-#endif /* 0 */
#endif /* NBIO > 0 */