summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2011-04-19 21:17:08 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2011-04-19 21:17:08 +0000
commitb67f23392fac69178e17ac1e17b170bfc2061a1f (patch)
tree7e664d8563c4a1d32be563bf4685d30e95d1fd91
parent37d14446486e1d383e94bcf44787d54e5bb0af92 (diff)
Cease to pretend RAW SCSI mode exists. Eradicate all traces.
-rw-r--r--share/man/man4/gdt.46
-rw-r--r--sys/dev/ic/gdt_common.c64
-rw-r--r--sys/dev/ic/gdtvar.h3
3 files changed, 5 insertions, 68 deletions
diff --git a/share/man/man4/gdt.4 b/share/man/man4/gdt.4
index 076f1c9fd19..635e4ed50ab 100644
--- a/share/man/man4/gdt.4
+++ b/share/man/man4/gdt.4
@@ -1,4 +1,4 @@
-.\" $OpenBSD: gdt.4,v 1.30 2011/04/01 19:13:58 jmc Exp $
+.\" $OpenBSD: gdt.4,v 1.31 2011/04/19 21:17:07 krw Exp $
.\"
.\" Copyright (c) 2000 Niklas Hallqvist <niklas@openbsd.org>
.\"
@@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: April 1 2011 $
+.Dd $Mdocdate: April 19 2011 $
.Dt GDT 4
.Os
.Sh NAME
@@ -145,7 +145,7 @@ inspired by the Linux driver by
.Sh BUGS
An ISA & EISA front-end is needed.
.Pp
-The driver does not yet support transparent raw SCSI mode.
+The driver does not support transparent raw SCSI mode.
.Pp
It would be nice to configure the RAID units after boot
but the information on how to do that is not public.
diff --git a/sys/dev/ic/gdt_common.c b/sys/dev/ic/gdt_common.c
index 47eeccad850..292fa122958 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.55 2010/10/12 00:53:32 krw Exp $ */
+/* $OpenBSD: gdt_common.c,v 1.56 2011/04/19 21:17:07 krw Exp $ */
/*
* Copyright (c) 1999, 2000, 2003 Niklas Hallqvist. All rights reserved.
@@ -82,7 +82,6 @@ int gdt_ioctl_disk(struct gdt_softc *, struct bioc_disk *);
int gdt_ioctl_alarm(struct gdt_softc *, struct bioc_alarm *);
int gdt_ioctl_setstate(struct gdt_softc *, struct bioc_setstate *);
#endif /* NBIO > 0 */
-void gdt_raw_scsi_cmd(struct scsi_xfer *);
void gdt_scsi_cmd(struct scsi_xfer *);
void gdt_start_ccbs(struct gdt_softc *);
int gdt_sync_event(struct gdt_softc *, int, u_int8_t,
@@ -99,10 +98,6 @@ struct scsi_adapter gdt_switch = {
gdt_scsi_cmd, gdtminphys, 0, 0,
};
-struct scsi_adapter gdt_raw_switch = {
- gdt_raw_scsi_cmd, gdtminphys, 0, 0,
-};
-
int gdt_cnt = 0;
u_int8_t gdt_polling;
u_int8_t gdt_from_wait;
@@ -484,26 +479,6 @@ gdt_attach(struct gdt_softc *sc)
config_found(&sc->sc_dev, &saa, scsiprint);
- sc->sc_raw_link = malloc(sc->sc_bus_cnt * sizeof (struct scsi_link),
- M_DEVBUF, M_NOWAIT | M_ZERO);
- if (sc->sc_raw_link == NULL)
- panic("gdt_attach");
-
- for (i = 0; i < sc->sc_bus_cnt; i++) {
- /* Fill in the prototype scsi_link. */
- sc->sc_raw_link[i].adapter_softc = sc;
- sc->sc_raw_link[i].adapter = &gdt_raw_switch;
- sc->sc_raw_link[i].adapter_target = 7;
- sc->sc_raw_link[i].openings = 4; /* XXX a guess */
- sc->sc_raw_link[i].adapter_buswidth =
- (sc->sc_class & GDT_FC) ? GDT_MAXID : 16; /* XXX */
-
- bzero(&saa, sizeof(saa));
- saa.saa_sc_link = &sc->sc_raw_link[i];
-
- config_found(&sc->sc_dev, &saa, scsiprint);
- }
-
gdt_polling = 0;
return (0);
}
@@ -989,43 +964,6 @@ gdt_internal_cache_cmd(struct scsi_xfer *xs)
xs->error = XS_NOERROR;
}
-/* Start a raw SCSI operation */
-void
-gdt_raw_scsi_cmd(struct scsi_xfer *xs)
-{
- struct scsi_link *link = xs->sc_link;
- struct gdt_softc *sc = link->adapter_softc;
- struct gdt_ccb *ccb;
- int s;
-
- GDT_DPRINTF(GDT_D_CMD, ("gdt_raw_scsi_cmd "));
-
- if (xs->cmdlen > 12 /* XXX create #define */) {
- GDT_DPRINTF(GDT_D_CMD, ("CDB too big %p ", xs));
- bzero(&xs->sense, sizeof(xs->sense));
- xs->sense.error_code = SSD_ERRCODE_VALID | SSD_ERRCODE_CURRENT;
- xs->sense.flags = SKEY_ILLEGAL_REQUEST;
- xs->sense.add_sense_code = 0x20; /* illcmd, 0x24 illfield */
- xs->error = XS_SENSE;
- scsi_done(xs);
- return;
- }
-
- if ((ccb = gdt_get_ccb(sc, xs->flags)) == NULL) {
- GDT_DPRINTF(GDT_D_CMD, ("no ccb available for %p ", xs));
- xs->error = XS_DRIVER_STUFFUP;
- scsi_done(xs);
- return;
- }
-
- xs->error = XS_DRIVER_STUFFUP;
- s = splbio();
- scsi_done(xs);
- gdt_free_ccb(sc, ccb);
-
- splx(s);
-}
-
void
gdt_clear_events(struct gdt_softc *sc)
{
diff --git a/sys/dev/ic/gdtvar.h b/sys/dev/ic/gdtvar.h
index ec9b09537ac..ede129d8353 100644
--- a/sys/dev/ic/gdtvar.h
+++ b/sys/dev/ic/gdtvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: gdtvar.h,v 1.17 2009/08/12 17:51:33 jsg Exp $ */
+/* $OpenBSD: gdtvar.h,v 1.18 2011/04/19 21:17:07 krw Exp $ */
/*
* Copyright (c) 1999, 2000 Niklas Hallqvist. All rights reserved.
@@ -268,7 +268,6 @@ struct gdt_softc {
struct device sc_dev;
void *sc_ih;
struct scsi_link sc_link; /* Virtual SCSI bus for cache devs */
- struct scsi_link *sc_raw_link; /* Raw SCSI busses */
int sc_class; /* Controller class */
#define GDT_ISA 0x01