Lines Matching defs:scb
77 struct sc_scb *scb;
118 scb = sc->sc_scb;
120 TAILQ_INSERT_TAIL(&sc->free_list, scb, chain);
121 scb++;
144 free_scb(struct sc_softc *sc, struct sc_scb *scb)
150 TAILQ_INSERT_HEAD(&sc->free_list, scb, chain);
156 if (scb->chain.tqe_next == 0)
166 struct sc_scb *scb;
170 while ((scb = sc->free_list.tqh_first) == NULL &&
173 if (scb) {
174 TAILQ_REMOVE(&sc->free_list, scb, chain);
178 return scb;
188 struct sc_scb *scb;
198 if ((scb = get_scb(sc, flags)) == NULL)
199 panic("%s: no scb", __func__);
201 scb->xs = xs;
202 scb->flags = 0;
203 scb->sc_ctag = 0;
204 scb->sc_coffset = 0;
205 scb->istatus = 0;
206 scb->tstatus = 0;
207 scb->message = 0;
208 memset(scb->msgbuf, 0, sizeof(scb->msgbuf));
212 TAILQ_INSERT_TAIL(&sc->ready_list, scb, chain);
275 struct sc_scb *scb, *nextscb;
277 scb = sc->ready_list.tqh_first;
279 if (scb == NULL)
282 xs = scb->xs;
288 scb = scb->chain.tqe_next;
298 scb->identify = MSG_IDENT | sc_disconnect | (lun & IDT_DRMASK);
299 scb->sc_ctrnscnt = xs->datalen;
326 scb->sc_map = &sc->sc_map[chan];
333 scb->sc_cpoint = (void *)xs->data;
335 scb->sc_cpoint = scb->msgbuf;
336 scb->scb_softc = sc;
338 callout_reset(&scb->xs->xs_callout, hz * 10, cxd1185_timeout, scb);
339 sc_send(scb, chan, ie);
340 callout_stop(&scb->xs->xs_callout);
342 nextscb = scb->chain.tqe_next;
344 TAILQ_REMOVE(&sc->ready_list, scb, chain);
346 scb = nextscb;
352 sc_done(struct sc_scb *scb)
354 struct scsipi_xfer *xs = scb->xs;
362 if (scb->istatus != INST_EP) {
363 if (scb->istatus == (INST_EP|INST_TO))
367 scb->istatus, scb->tstatus);
372 switch (scb->tstatus) {
385 scb->istatus, scb->tstatus);
390 free_scb(sc, scb);
453 struct sc_scb *scb = arg;
454 struct scsipi_xfer *xs = scb->xs;