diff options
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/ciss.c | 82 | ||||
-rw-r--r-- | sys/dev/ic/cissvar.h | 9 |
2 files changed, 2 insertions, 89 deletions
diff --git a/sys/dev/ic/ciss.c b/sys/dev/ic/ciss.c index 96c23f96e71..5a9ca724fe3 100644 --- a/sys/dev/ic/ciss.c +++ b/sys/dev/ic/ciss.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ciss.c,v 1.44 2010/06/02 01:16:12 dlg Exp $ */ +/* $OpenBSD: ciss.c,v 1.45 2010/06/02 01:18:36 dlg Exp $ */ /* * Copyright (c) 2005,2006 Michael Shalayeff @@ -82,16 +82,6 @@ struct scsi_device ciss_dev = { NULL, NULL, NULL, NULL }; -void ciss_scsi_raw_cmd(struct scsi_xfer *xs); - -struct scsi_adapter ciss_raw_switch = { - ciss_scsi_raw_cmd, cissminphys, NULL, NULL, -}; - -struct scsi_device ciss_raw_dev = { - NULL, NULL, NULL, NULL -}; - #if NBIO > 0 int ciss_ioctl(struct device *, u_long, caddr_t); #endif @@ -397,19 +387,6 @@ ciss_attach(struct ciss_softc *sc) scsibus = (struct scsibus_softc *)config_found_sm(&sc->sc_dev, &saa, scsiprint, NULL); -#if 0 - sc->sc_link_raw.device = &ciss_raw_dev; - sc->sc_link_raw.adapter_softc = sc; - sc->sc_link.openings = sc->maxcmd / (sc->maxunits? sc->maxunits : 1); - sc->sc_link_raw.adapter = &ciss_raw_switch; - sc->sc_link_raw.adapter_target = sc->ndrives; - sc->sc_link_raw.adapter_buswidth = sc->ndrives; - bzero(&saa, sizeof(saa)); - saa.saa_sc_link = &sc->sc_link_raw; - rawbus = (struct scsibus_softc *)config_found_sm(&sc->sc_dev, - &saa, scsiprint, NULL); -#endif - #if NBIO > 0 /* XXX for now we can only deal w/ one volume. */ if (!scsibus || sc->maxunits > 1) @@ -865,63 +842,6 @@ ciss_sync(struct ciss_softc *sc) } void -ciss_scsi_raw_cmd(struct scsi_xfer *xs) /* TODO */ -{ - struct scsi_link *link = xs->sc_link; - struct ciss_rawsoftc *rsc = link->adapter_softc; - struct ciss_softc *sc = rsc->sc_softc; - struct ciss_ccb *ccb; - struct ciss_cmd *cmd; - ciss_lock_t lock; - - CISS_DPRINTF(CISS_D_CMD, ("ciss_scsi_raw_cmd ")); - - lock = CISS_LOCK(sc); - if (xs->cmdlen > CISS_MAX_CDB) { - CISS_DPRINTF(CISS_D_CMD, ("CDB too big %p ", xs)); - bzero(&xs->sense, sizeof(xs->sense)); - xs->sense.error_code = SSD_ERRCODE_VALID | 0x70; - xs->sense.flags = SKEY_ILLEGAL_REQUEST; - xs->sense.add_sense_code = 0x20; /* illcmd, 0x24 illfield */ - xs->error = XS_SENSE; - scsi_done(xs); - CISS_UNLOCK(sc, lock); - return; - } - - xs->error = XS_NOERROR; - - /* TODO check this target has not yet employed w/ any volume */ - - ccb = ciss_get_ccb(sc); - if (ccb == NULL) { - xs->error = XS_NO_CCB; - scsi_done(xs); - CISS_UNLOCK(sc, lock); - return; - } - - cmd = &ccb->ccb_cmd; - ccb->ccb_len = xs->datalen; - ccb->ccb_data = xs->data; - ccb->ccb_xs = xs; - - cmd->cdblen = xs->cmdlen; - cmd->flags = CISS_CDB_CMD | CISS_CDB_SIMPL; - if (xs->flags & SCSI_DATA_IN) - cmd->flags |= CISS_CDB_IN; - else if (xs->flags & SCSI_DATA_OUT) - cmd->flags |= CISS_CDB_OUT; - cmd->tmo = htole16(xs->timeout < 1000? 1 : xs->timeout / 1000); - bzero(&cmd->cdb[0], sizeof(cmd->cdb)); - bcopy(xs->cmd, &cmd->cdb[0], CISS_MAX_CDB); - - ciss_cmd(ccb, BUS_DMA_WAITOK, xs->flags & (SCSI_POLL|SCSI_NOSLEEP)); - - CISS_UNLOCK(sc, lock); -} - -void ciss_scsi_cmd(struct scsi_xfer *xs) { struct scsi_link *link = xs->sc_link; diff --git a/sys/dev/ic/cissvar.h b/sys/dev/ic/cissvar.h index 5dc7a415806..05d138d4096 100644 --- a/sys/dev/ic/cissvar.h +++ b/sys/dev/ic/cissvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cissvar.h,v 1.8 2010/05/31 19:35:03 halex Exp $ */ +/* $OpenBSD: cissvar.h,v 1.9 2010/06/02 01:18:36 dlg Exp $ */ /* * Copyright (c) 2005,2006 Michael Shalayeff @@ -29,7 +29,6 @@ struct ciss_ld { struct ciss_softc { struct device sc_dev; struct scsi_link sc_link; - struct scsi_link *sc_link_raw; struct timeout sc_hb; void *sc_ih; void *sc_sh; @@ -59,12 +58,6 @@ struct ciss_softc { struct ciss_ld **sc_lds; }; -struct ciss_rawsoftc { - struct scsi_link sc_link; - struct ciss_softc *sc_softc; - u_int8_t sc_channel; -}; - /* XXX These have to become spinlocks in case of fine SMP */ #define CISS_LOCK(sc) splbio() #define CISS_UNLOCK(sc, lock) splx(lock) |