Symbol: scb
sys/arch/acorn32/podulebus/if_ie.c
1287
struct ie_sys_ctl_block scb;
sys/arch/acorn32/podulebus/if_ie.c
1307
ie2host ( sc, IE_IBASE + IE_SCB_OFF, &scb, sizeof scb );
sys/arch/acorn32/podulebus/if_ie.c
1308
sc->sc_ethercom.ec_if.if_ierrors += scb.ie_err_crc +
sys/arch/acorn32/podulebus/if_ie.c
1309
scb.ie_err_align +
sys/arch/acorn32/podulebus/if_ie.c
1310
scb.ie_err_resource +
sys/arch/acorn32/podulebus/if_ie.c
1311
scb.ie_err_overrun;
sys/arch/acorn32/podulebus/if_ie.c
1312
scb.ie_err_crc = scb.ie_err_align = 0;
sys/arch/acorn32/podulebus/if_ie.c
1313
scb.ie_err_resource = scb.ie_err_overrun = 0;
sys/arch/acorn32/podulebus/if_ie.c
1314
host2ie(sc, &scb, IE_SCP_ADDR, sizeof (scb) );
sys/arch/acorn32/podulebus/if_ie.c
1318
ie2host ( sc, IE_IBASE + IE_SCB_OFF, &scb, sizeof scb );
sys/arch/acorn32/podulebus/if_ie.c
1320
if ( ((status&IE_FD_RNR)!=0) && ((scb.ie_status&IE_RU_READY)==0) )
sys/arch/acorn32/podulebus/if_ie.c
1325
scb.ie_recv_list = sc->rframes[0];
sys/arch/acorn32/podulebus/if_ie.c
1326
host2ie(sc, (char *)&scb, IE_IBASE + IE_SCB_OFF, sizeof (scb) );
sys/arch/acorn32/podulebus/if_ie.c
1327
command_and_wait(sc, IE_RU_START, &scb, 0, 0, 0, 0);
sys/arch/acorn32/podulebus/if_ie.c
1412
struct ie_sys_ctl_block scb;
sys/arch/acorn32/podulebus/if_ie.c
1430
ie2host ( sc, IE_IBASE + IE_SCB_OFF, &scb, sizeof scb );
sys/arch/acorn32/podulebus/if_ie.c
1431
scb.ie_command_list = sc->xmit_cmds[sc->xctail];
sys/arch/acorn32/podulebus/if_ie.c
1432
host2ie(sc, (char *)&scb, (IE_IBASE + IE_SCB_OFF), sizeof scb );
sys/arch/acorn32/podulebus/if_ie.c
1434
command_and_wait(sc, IE_CU_START, &scb, &xc, sc->xmit_cmds[sc->xctail]
sys/arch/acorn32/podulebus/if_ie.c
653
struct ie_sys_ctl_block scb;
sys/arch/acorn32/podulebus/if_ie.c
658
ie2host(sc, IE_IBASE + IE_SCB_OFF, &scb, sizeof scb);
sys/arch/acorn32/podulebus/if_ie.c
692
struct ie_sys_ctl_block scb;
sys/arch/acorn32/podulebus/if_ie.c
693
u_long ptr = IE_IBASE + IE_SCB_OFF + sizeof scb;
sys/arch/acorn32/podulebus/if_ie.c
697
bzero ( &scb, sizeof(scb) );
sys/arch/acorn32/podulebus/if_ie.c
705
scb.ie_command_list = (u_short)ptr;
sys/arch/acorn32/podulebus/if_ie.c
708
if ( command_and_wait(sc, IE_CU_START, &scb, &cmd, ptr, sizeof cmd,
sys/arch/acorn32/podulebus/if_ie.c
805
struct ie_sys_ctl_block scb;
sys/arch/acorn32/podulebus/if_ie.c
806
bzero ( &scb, sizeof scb );
sys/arch/acorn32/podulebus/if_ie.c
807
scb.ie_recv_list = (u_short)sc->rframes[0];
sys/arch/acorn32/podulebus/if_ie.c
808
host2ie(sc, (char *)&scb, (IE_IBASE + IE_SCB_OFF), sizeof scb );
sys/arch/acorn32/podulebus/if_ie.c
816
struct ie_sys_ctl_block scb;
sys/arch/acorn32/podulebus/if_ie.c
817
ie2host ( sc, IE_IBASE + IE_SCB_OFF, &scb, sizeof scb );
sys/arch/acorn32/podulebus/if_ie.c
818
scb.ie_recv_list = (u_short)sc->rframes[0];
sys/arch/acorn32/podulebus/if_ie.c
819
command_and_wait(sc, IE_RU_START, &scb, 0, 0, 0, 0);
sys/arch/acorn32/podulebus/if_ie.c
834
struct ie_sys_ctl_block scb;
sys/arch/acorn32/podulebus/if_ie.c
837
u_long ptr = IE_IBASE + IE_SCB_OFF + sizeof scb;
sys/arch/acorn32/podulebus/if_ie.c
842
bzero ( &scb, sizeof(scb) );
sys/arch/acorn32/podulebus/if_ie.c
863
scb.ie_command_list = (u_short)ptr;
sys/arch/acorn32/podulebus/if_ie.c
865
if ( command_and_wait(sc, IE_CU_START, &scb, &cmd, ptr, sizeof cmd,
sys/arch/acorn32/podulebus/if_ie.c
887
if ( command_and_wait(sc, IE_CU_START, &scb, &iasetup_cmd, ptr, sizeof cmd,
sys/arch/acorn32/podulebus/if_ie.c
947
struct ie_sys_ctl_block scb;
sys/arch/acorn32/podulebus/if_ie.c
950
ie2host ( sc, IE_IBASE + IE_SCB_OFF, &scb, sizeof scb );
sys/arch/acorn32/podulebus/if_ie.c
952
if ( command_and_wait(sc, IE_RU_DISABLE, &scb, 0, 0, 0, 0) )
sys/arch/alpha/alpha/interrupt.c
278
struct scbvec * const scb = &scb_iovectab[idx];
sys/arch/alpha/alpha/interrupt.c
279
(*scb->scb_func)(scb->scb_arg, a1);
sys/arch/alpha/pci/pci_kn8ae.c
196
struct scbvec *scb;
sys/arch/alpha/pci/pci_kn8ae.c
209
scb = &scb_iovectab[SCB_VECTOIDX(vec - SCB_IOVECBASE)];
sys/arch/alpha/pci/pci_kn8ae.c
211
if (scb->scb_func != kn8ae_spurious) {
sys/arch/hppa/gsc/if_ie_gsc.c
321
sc->ie_bus_write16(sc, IE_ISCP_SCB(sc->iscp), sc->scb);
sys/arch/hppa/gsc/if_ie_gsc.c
489
sc->scb = IE_GSC_ALIGN(sc->iscp + IE_ISCP_SZ);
sys/arch/hppa/gsc/if_ie_gsc.c
492
sc->buf_area = IE_GSC_ALIGN(sc->scb + IE_SCB_SZ);
sys/arch/hppa/gsc/if_ie_gsc.c
515
sc->ie_bus_write16(sc, IE_ISCP_SCB(sc->iscp), sc->scb);
sys/arch/macppc/dev/mesh.c
1002
scb->flags &= ~MESH_READ;
sys/arch/macppc/dev/mesh.c
1005
scb->flags |= MESH_READ;
sys/arch/macppc/dev/mesh.c
1009
TAILQ_INSERT_TAIL(&sc->ready_scb, scb, chain);
sys/arch/macppc/dev/mesh.c
1041
struct mesh_scb *scb;
sys/arch/macppc/dev/mesh.c
1043
scb = sc->ready_scb.tqh_first;
sys/arch/macppc/dev/mesh.c
1045
if (scb == NULL)
sys/arch/macppc/dev/mesh.c
1049
TAILQ_REMOVE(&sc->ready_scb, scb, chain);
sys/arch/macppc/dev/mesh.c
1050
sc->sc_nexus = scb;
sys/arch/macppc/dev/mesh.c
1051
mesh_select(sc, scb);
sys/arch/macppc/dev/mesh.c
1055
scb = scb->chain.tqe_next;
sys/arch/macppc/dev/mesh.c
1077
mesh_done(struct mesh_softc *sc, struct mesh_scb *scb)
sys/arch/macppc/dev/mesh.c
1079
struct scsipi_xfer *xs = scb->xs;
sys/arch/macppc/dev/mesh.c
1086
callout_stop(&scb->xs->xs_callout);
sys/arch/macppc/dev/mesh.c
1088
if (scb->status == SCSI_BUSY) {
sys/arch/macppc/dev/mesh.c
1093
xs->status = scb->status;
sys/arch/macppc/dev/mesh.c
1094
xs->resid = scb->resid;
sys/arch/macppc/dev/mesh.c
1095
if (scb->status == SCSI_CHECK) {
sys/arch/macppc/dev/mesh.c
1105
mesh_free_scb(sc, scb);
sys/arch/macppc/dev/mesh.c
1111
struct mesh_scb *scb = arg;
sys/arch/macppc/dev/mesh.c
1113
device_private(scb->xs->xs_periph->periph_channel->chan_adapter->adapt_dev);
sys/arch/macppc/dev/mesh.c
1137
scb->xs->error = XS_TIMEOUT;
sys/arch/macppc/dev/mesh.c
322
struct mesh_scb *scb;
sys/arch/macppc/dev/mesh.c
351
scb = sc->sc_nexus;
sys/arch/macppc/dev/mesh.c
352
if (scb == NULL) {
sys/arch/macppc/dev/mesh.c
362
scb->resid = MESH_GET_XFER(sc);
sys/arch/macppc/dev/mesh.c
366
if (scb->flags & MESH_READ) {
sys/arch/macppc/dev/mesh.c
369
cp = (char *)scb->daddr + scb->dlen
sys/arch/macppc/dev/mesh.c
372
fifocnt, scb->resid);
sys/arch/macppc/dev/mesh.c
392
mesh_error(sc, scb, error, 0);
sys/arch/macppc/dev/mesh.c
399
mesh_error(sc, scb, 0, exception);
sys/arch/macppc/dev/mesh.c
410
sc->sc_nextstate, scb->resid);
sys/arch/macppc/dev/mesh.c
420
mesh_identify(sc, scb);
sys/arch/macppc/dev/mesh.c
423
mesh_command(sc, scb);
sys/arch/macppc/dev/mesh.c
427
mesh_dataio(sc, scb);
sys/arch/macppc/dev/mesh.c
430
mesh_status(sc, scb);
sys/arch/macppc/dev/mesh.c
433
mesh_msgin(sc, scb);
sys/arch/macppc/dev/mesh.c
436
mesh_done(sc, scb);
sys/arch/macppc/dev/mesh.c
442
scb->xs->error = XS_DRIVER_STUFFUP;
sys/arch/macppc/dev/mesh.c
443
mesh_done(sc, scb);
sys/arch/macppc/dev/mesh.c
450
mesh_error(struct mesh_softc *sc, struct mesh_scb *scb, int error, int exception)
sys/arch/macppc/dev/mesh.c
463
scb->xs->error = XS_DRIVER_STUFFUP;
sys/arch/macppc/dev/mesh.c
469
scb->xs->error = XS_DRIVER_STUFFUP;
sys/arch/macppc/dev/mesh.c
474
scb->xs->error = XS_SELTIMEOUT;
sys/arch/macppc/dev/mesh.c
477
mesh_done(sc, scb);
sys/arch/macppc/dev/mesh.c
481
mesh_select(struct mesh_softc *sc, struct mesh_scb *scb)
sys/arch/macppc/dev/mesh.c
483
struct mesh_tinfo *ti = &sc->sc_tinfo[scb->target];
sys/arch/macppc/dev/mesh.c
507
mesh_set_reg(sc, MESH_DEST_ID, scb->target);
sys/arch/macppc/dev/mesh.c
513
timeout = mstohz(scb->xs->timeout);
sys/arch/macppc/dev/mesh.c
517
callout_reset(&scb->xs->xs_callout, timeout, mesh_timeout, scb);
sys/arch/macppc/dev/mesh.c
521
mesh_identify(struct mesh_softc *sc, struct mesh_scb *scb)
sys/arch/macppc/dev/mesh.c
523
struct mesh_tinfo *ti = &sc->sc_tinfo[scb->target];
sys/arch/macppc/dev/mesh.c
540
mesh_command(struct mesh_softc *sc, struct mesh_scb *scb)
sys/arch/macppc/dev/mesh.c
546
printf("mesh_command cdb = %02x", scb->cmd.opcode);
sys/arch/macppc/dev/mesh.c
548
printf(" %02x", scb->cmd.bytes[i]);
sys/arch/macppc/dev/mesh.c
554
MESH_SET_XFER(sc, scb->cmdlen);
sys/arch/macppc/dev/mesh.c
557
cmdp = (char *)&scb->cmd;
sys/arch/macppc/dev/mesh.c
558
for (i = 0; i < scb->cmdlen; i++)
sys/arch/macppc/dev/mesh.c
561
if (scb->resid == 0)
sys/arch/macppc/dev/mesh.c
568
mesh_dma_setup(struct mesh_softc *sc, struct mesh_scb *scb)
sys/arch/macppc/dev/mesh.c
570
int datain = scb->flags & MESH_READ;
sys/arch/macppc/dev/mesh.c
579
count = scb->dlen;
sys/arch/macppc/dev/mesh.c
584
va = scb->daddr;
sys/arch/macppc/dev/mesh.c
621
mesh_dataio(struct mesh_softc *sc, struct mesh_scb *scb)
sys/arch/macppc/dev/mesh.c
623
DPRINTF("mesh_dataio len = %ld (%s)\n", scb->dlen,
sys/arch/macppc/dev/mesh.c
624
scb->flags & MESH_READ ? "read" : "write");
sys/arch/macppc/dev/mesh.c
626
mesh_dma_setup(sc, scb);
sys/arch/macppc/dev/mesh.c
628
if (scb->dlen == 65536)
sys/arch/macppc/dev/mesh.c
631
MESH_SET_XFER(sc, scb->dlen);
sys/arch/macppc/dev/mesh.c
633
if (scb->flags & MESH_READ)
sys/arch/macppc/dev/mesh.c
643
mesh_status(struct mesh_softc *sc, struct mesh_scb *scb)
sys/arch/macppc/dev/mesh.c
653
scb->status = mesh_read_reg(sc, MESH_FIFO);
sys/arch/macppc/dev/mesh.c
654
DPRINTF("mesh_status(1): status = 0x%x\n", scb->status);
sys/arch/macppc/dev/mesh.c
666
mesh_msgin(struct mesh_softc *sc, struct mesh_scb *scb)
sys/arch/macppc/dev/mesh.c
712
sc->sc_tinfo[scb->target].period = 0;
sys/arch/macppc/dev/mesh.c
713
sc->sc_tinfo[scb->target].offset = 0;
sys/arch/macppc/dev/mesh.c
714
mesh_setsync(sc, &sc->sc_tinfo[scb->target]);
sys/arch/macppc/dev/mesh.c
726
scsipi_printaddr(scb->xs->xs_periph);
sys/arch/macppc/dev/mesh.c
741
struct mesh_tinfo *ti = &sc->sc_tinfo[scb->target];
sys/arch/macppc/dev/mesh.c
753
scsipi_printaddr(scb->xs->xs_periph);
sys/arch/macppc/dev/mesh.c
765
device_xname(sc->sc_dev), scb->target, sc->sc_imsg[0]);
sys/arch/macppc/dev/mesh.c
779
struct mesh_scb *scb = sc->sc_nexus;
sys/arch/macppc/dev/mesh.c
794
lun = scb->xs->xs_periph->periph_lun;
sys/arch/macppc/dev/mesh.c
799
ti = &sc->sc_tinfo[scb->target];
sys/arch/macppc/dev/mesh.c
933
struct mesh_scb *scb;
sys/arch/macppc/dev/mesh.c
937
if ((scb = sc->free_scb.tqh_first) != NULL)
sys/arch/macppc/dev/mesh.c
938
TAILQ_REMOVE(&sc->free_scb, scb, chain);
sys/arch/macppc/dev/mesh.c
941
return scb;
sys/arch/macppc/dev/mesh.c
945
mesh_free_scb(struct mesh_softc *sc, struct mesh_scb *scb)
sys/arch/macppc/dev/mesh.c
950
TAILQ_INSERT_HEAD(&sc->free_scb, scb, chain);
sys/arch/macppc/dev/mesh.c
960
struct mesh_scb *scb;
sys/arch/macppc/dev/mesh.c
971
if ((scb = mesh_get_scb(sc)) == NULL) {
sys/arch/macppc/dev/mesh.c
976
scb->xs = xs;
sys/arch/macppc/dev/mesh.c
977
scb->flags = 0;
sys/arch/macppc/dev/mesh.c
978
scb->status = 0;
sys/arch/macppc/dev/mesh.c
979
scb->daddr = (vaddr_t)xs->data;
sys/arch/macppc/dev/mesh.c
980
scb->dlen = xs->datalen;
sys/arch/macppc/dev/mesh.c
981
scb->resid = xs->datalen;
sys/arch/macppc/dev/mesh.c
982
memcpy(&scb->cmd, xs->cmd, xs->cmdlen);
sys/arch/macppc/dev/mesh.c
983
scb->cmdlen = xs->cmdlen;
sys/arch/macppc/dev/mesh.c
984
scb->target = periph->periph_target;
sys/arch/macppc/dev/mesh.c
991
scb->target, scb->cmd.opcode);
sys/arch/macppc/dev/mesh.c
993
printf(" %02x", scb->cmd.bytes[i]);
sys/arch/macppc/dev/mesh.c
999
scb->flags |= MESH_POLL;
sys/arch/newsmips/apbus/spifi.c
222
struct spifi_scb *scb;
sys/arch/newsmips/apbus/spifi.c
235
scb = spifi_get_scb(sc);
sys/arch/newsmips/apbus/spifi.c
236
if (scb == NULL) {
sys/arch/newsmips/apbus/spifi.c
240
scb->xs = xs;
sys/arch/newsmips/apbus/spifi.c
241
scb->flags = 0;
sys/arch/newsmips/apbus/spifi.c
242
scb->status = 0;
sys/arch/newsmips/apbus/spifi.c
243
scb->daddr = (vaddr_t)xs->data;
sys/arch/newsmips/apbus/spifi.c
244
scb->resid = xs->datalen;
sys/arch/newsmips/apbus/spifi.c
245
memcpy(&scb->cmd, xs->cmd, xs->cmdlen);
sys/arch/newsmips/apbus/spifi.c
246
scb->cmdlen = xs->cmdlen;
sys/arch/newsmips/apbus/spifi.c
248
scb->target = periph->periph_target;
sys/arch/newsmips/apbus/spifi.c
249
scb->lun = periph->periph_lun;
sys/arch/newsmips/apbus/spifi.c
250
scb->lun_targ = scb->target | (scb->lun << 3);
sys/arch/newsmips/apbus/spifi.c
253
scb->flags |= SPIFI_READ;
sys/arch/newsmips/apbus/spifi.c
257
TAILQ_INSERT_TAIL(&sc->ready_scb, scb, chain);
sys/arch/newsmips/apbus/spifi.c
284
struct spifi_scb *scb;
sys/arch/newsmips/apbus/spifi.c
288
scb = TAILQ_FIRST(&sc->free_scb);
sys/arch/newsmips/apbus/spifi.c
289
if (scb)
sys/arch/newsmips/apbus/spifi.c
290
TAILQ_REMOVE(&sc->free_scb, scb, chain);
sys/arch/newsmips/apbus/spifi.c
293
return scb;
sys/arch/newsmips/apbus/spifi.c
297
spifi_free_scb(struct spifi_softc *sc, struct spifi_scb *scb)
sys/arch/newsmips/apbus/spifi.c
302
TAILQ_INSERT_HEAD(&sc->free_scb, scb, chain);
sys/arch/newsmips/apbus/spifi.c
309
struct spifi_scb *scb = sc->sc_nexus;
sys/arch/newsmips/apbus/spifi.c
315
scb->status = SCSI_OK;
sys/arch/newsmips/apbus/spifi.c
316
scb->resid = 0;
sys/arch/newsmips/apbus/spifi.c
323
xs = scb->xs;
sys/arch/newsmips/apbus/spifi.c
351
struct spifi_scb *scb;
sys/arch/newsmips/apbus/spifi.c
353
scb = TAILQ_FIRST(&sc->ready_scb);
sys/arch/newsmips/apbus/spifi.c
355
if (scb == NULL || sc->sc_nexus != NULL)
sys/arch/newsmips/apbus/spifi.c
358
if (sc->sc_targets[scb->target] & (1 << scb->lun))
sys/arch/newsmips/apbus/spifi.c
361
TAILQ_REMOVE(&sc->ready_scb, scb, chain);
sys/arch/newsmips/apbus/spifi.c
367
printf("spifi_sched: ID:LUN = %d:%d, ", scb->target, scb->lun);
sys/arch/newsmips/apbus/spifi.c
368
printf("cmd = 0x%x", scb->cmd.opcode);
sys/arch/newsmips/apbus/spifi.c
370
printf(" 0x%x", scb->cmd.bytes[i]);
sys/arch/newsmips/apbus/spifi.c
376
sc->sc_nexus = scb;
sys/arch/newsmips/apbus/spifi.c
380
scb = scb->chain.tqe_next;
sys/arch/newsmips/apbus/spifi.c
418
struct spifi_scb *scb;
sys/arch/newsmips/apbus/spifi.c
448
scb = sc->sc_nexus;
sys/arch/newsmips/apbus/spifi.c
449
xs = scb->xs;
sys/arch/newsmips/apbus/spifi.c
465
scb->status = reg->cmbuf[scb->target].status;
sys/arch/newsmips/apbus/spifi.c
466
scb->resid = spifi_read_count(reg);
sys/arch/newsmips/apbus/spifi.c
469
xs->datalen, scb->resid, scb->status);
sys/arch/newsmips/apbus/spifi.c
486
if (scb == NULL)
sys/arch/newsmips/apbus/spifi.c
492
scb->target, scb->lun);
sys/arch/newsmips/apbus/spifi.c
575
struct spifi_scb *scb = sc->sc_nexus;
sys/arch/newsmips/apbus/spifi.c
583
if (scb == NULL) {
sys/arch/newsmips/apbus/spifi.c
592
sel = scb->target << 4 | SEL_ISTART | SEL_IRESELEN | SEL_WATN;
sys/arch/newsmips/apbus/spifi.c
600
struct spifi_scb *scb = sc->sc_nexus;
sys/arch/newsmips/apbus/spifi.c
617
lun = scb->xs->xs_periph->periph_lun;
sys/arch/newsmips/apbus/spifi.c
623
ti = &sc->sc_tinfo[scb->target];
sys/arch/newsmips/apbus/spifi.c
641
struct spifi_scb *scb = sc->sc_nexus;
sys/arch/newsmips/apbus/spifi.c
643
int len = scb->cmdlen;
sys/arch/newsmips/apbus/spifi.c
644
uint8_t *cmdp = (uint8_t *)&scb->cmd;
sys/arch/newsmips/apbus/spifi.c
649
reg->cmdpage = scb->lun_targ;
sys/arch/newsmips/apbus/spifi.c
668
struct spifi_scb *scb = sc->sc_nexus;
sys/arch/newsmips/apbus/spifi.c
677
spifi_write_count(reg, scb->resid);
sys/arch/newsmips/apbus/spifi.c
681
scb->flags |= SPIFI_DMA;
sys/arch/newsmips/apbus/spifi.c
691
reg->autodata = ADATA_IN | scb->lun_targ;
sys/arch/newsmips/apbus/spifi.c
692
dmac3_start(sc->sc_dma, scb->daddr, scb->resid, DMAC3_CSR_RECV);
sys/arch/newsmips/apbus/spifi.c
696
reg->autodata = scb->lun_targ;
sys/arch/newsmips/apbus/spifi.c
697
dmac3_start(sc->sc_dma, scb->daddr, scb->resid, DMAC3_CSR_SEND);
sys/arch/newsmips/apbus/spifi.c
716
struct spifi_scb *scb = sc->sc_nexus;
sys/arch/newsmips/apbus/spifi.c
717
struct scsipi_xfer *xs = scb->xs;
sys/arch/newsmips/apbus/spifi.c
721
xs->status = scb->status;
sys/arch/newsmips/apbus/spifi.c
728
xs->resid = scb->resid;
sys/arch/newsmips/apbus/spifi.c
731
spifi_free_scb(sc, scb);
sys/arch/newsmips/apbus/spifi.c
742
struct spifi_scb *scb = sc->sc_nexus;
sys/arch/newsmips/apbus/spifi.c
748
if ((scb->flags & SPIFI_READ) == 0)
sys/arch/newsmips/apbus/spifi.c
756
if (fifo_count > 0 && (scb->flags & SPIFI_DMA)) {
sys/arch/newsmips/dev/sc_wrap.c
118
scb = sc->sc_scb;
sys/arch/newsmips/dev/sc_wrap.c
120
TAILQ_INSERT_TAIL(&sc->free_list, scb, chain);
sys/arch/newsmips/dev/sc_wrap.c
121
scb++;
sys/arch/newsmips/dev/sc_wrap.c
144
free_scb(struct sc_softc *sc, struct sc_scb *scb)
sys/arch/newsmips/dev/sc_wrap.c
150
TAILQ_INSERT_HEAD(&sc->free_list, scb, chain);
sys/arch/newsmips/dev/sc_wrap.c
156
if (scb->chain.tqe_next == 0)
sys/arch/newsmips/dev/sc_wrap.c
166
struct sc_scb *scb;
sys/arch/newsmips/dev/sc_wrap.c
170
while ((scb = sc->free_list.tqh_first) == NULL &&
sys/arch/newsmips/dev/sc_wrap.c
173
if (scb) {
sys/arch/newsmips/dev/sc_wrap.c
174
TAILQ_REMOVE(&sc->free_list, scb, chain);
sys/arch/newsmips/dev/sc_wrap.c
178
return scb;
sys/arch/newsmips/dev/sc_wrap.c
188
struct sc_scb *scb;
sys/arch/newsmips/dev/sc_wrap.c
198
if ((scb = get_scb(sc, flags)) == NULL)
sys/arch/newsmips/dev/sc_wrap.c
201
scb->xs = xs;
sys/arch/newsmips/dev/sc_wrap.c
202
scb->flags = 0;
sys/arch/newsmips/dev/sc_wrap.c
203
scb->sc_ctag = 0;
sys/arch/newsmips/dev/sc_wrap.c
204
scb->sc_coffset = 0;
sys/arch/newsmips/dev/sc_wrap.c
205
scb->istatus = 0;
sys/arch/newsmips/dev/sc_wrap.c
206
scb->tstatus = 0;
sys/arch/newsmips/dev/sc_wrap.c
207
scb->message = 0;
sys/arch/newsmips/dev/sc_wrap.c
208
memset(scb->msgbuf, 0, sizeof(scb->msgbuf));
sys/arch/newsmips/dev/sc_wrap.c
212
TAILQ_INSERT_TAIL(&sc->ready_list, scb, chain);
sys/arch/newsmips/dev/sc_wrap.c
275
struct sc_scb *scb, *nextscb;
sys/arch/newsmips/dev/sc_wrap.c
277
scb = sc->ready_list.tqh_first;
sys/arch/newsmips/dev/sc_wrap.c
279
if (scb == NULL)
sys/arch/newsmips/dev/sc_wrap.c
282
xs = scb->xs;
sys/arch/newsmips/dev/sc_wrap.c
288
scb = scb->chain.tqe_next;
sys/arch/newsmips/dev/sc_wrap.c
298
scb->identify = MSG_IDENT | sc_disconnect | (lun & IDT_DRMASK);
sys/arch/newsmips/dev/sc_wrap.c
299
scb->sc_ctrnscnt = xs->datalen;
sys/arch/newsmips/dev/sc_wrap.c
326
scb->sc_map = &sc->sc_map[chan];
sys/arch/newsmips/dev/sc_wrap.c
333
scb->sc_cpoint = (void *)xs->data;
sys/arch/newsmips/dev/sc_wrap.c
335
scb->sc_cpoint = scb->msgbuf;
sys/arch/newsmips/dev/sc_wrap.c
336
scb->scb_softc = sc;
sys/arch/newsmips/dev/sc_wrap.c
338
callout_reset(&scb->xs->xs_callout, hz * 10, cxd1185_timeout, scb);
sys/arch/newsmips/dev/sc_wrap.c
339
sc_send(scb, chan, ie);
sys/arch/newsmips/dev/sc_wrap.c
340
callout_stop(&scb->xs->xs_callout);
sys/arch/newsmips/dev/sc_wrap.c
342
nextscb = scb->chain.tqe_next;
sys/arch/newsmips/dev/sc_wrap.c
344
TAILQ_REMOVE(&sc->ready_list, scb, chain);
sys/arch/newsmips/dev/sc_wrap.c
346
scb = nextscb;
sys/arch/newsmips/dev/sc_wrap.c
352
sc_done(struct sc_scb *scb)
sys/arch/newsmips/dev/sc_wrap.c
354
struct scsipi_xfer *xs = scb->xs;
sys/arch/newsmips/dev/sc_wrap.c
362
if (scb->istatus != INST_EP) {
sys/arch/newsmips/dev/sc_wrap.c
363
if (scb->istatus == (INST_EP|INST_TO))
sys/arch/newsmips/dev/sc_wrap.c
367
scb->istatus, scb->tstatus);
sys/arch/newsmips/dev/sc_wrap.c
372
switch (scb->tstatus) {
sys/arch/newsmips/dev/sc_wrap.c
385
scb->istatus, scb->tstatus);
sys/arch/newsmips/dev/sc_wrap.c
390
free_scb(sc, scb);
sys/arch/newsmips/dev/sc_wrap.c
453
struct sc_scb *scb = arg;
sys/arch/newsmips/dev/sc_wrap.c
454
struct scsipi_xfer *xs = scb->xs;
sys/arch/newsmips/dev/sc_wrap.c
77
struct sc_scb *scb;
sys/arch/newsmips/dev/scsi_1185.c
1094
struct sc_scb *scb = cs->scb;
sys/arch/newsmips/dev/scsi_1185.c
1100
xs = scb->xs;
sys/arch/newsmips/dev/scsi_1185.c
1119
cs->act_trcnt = scb->sc_ctrnscnt;
sys/arch/newsmips/dev/scsi_1185.c
1120
cs->act_point = scb->sc_cpoint;
sys/arch/newsmips/dev/scsi_1185.c
1121
cs->act_tag = scb->sc_ctag;
sys/arch/newsmips/dev/scsi_1185.c
1122
cs->act_offset = scb->sc_coffset;
sys/arch/newsmips/dev/scsi_1185.c
1174
struct sc_scb *scb = cs->scb;
sys/arch/newsmips/dev/scsi_1185.c
1175
struct scsipi_xfer *xs = scb->xs;
sys/arch/newsmips/dev/scsi_1185.c
1226
scb->message = scb->identify;
sys/arch/newsmips/dev/scsi_1185.c
1230
sc->min_point[cs->chan_num] = scb->msgbuf;
sys/arch/newsmips/dev/scsi_1185.c
1231
memset(scb->msgbuf, 0, 8);
sys/arch/newsmips/dev/scsi_1185.c
1237
scb->istatus |= INST_EP;
sys/arch/newsmips/dev/scsi_1185.c
1257
cs->act_trcnt = scb->sc_ctrnscnt;
sys/arch/newsmips/dev/scsi_1185.c
1258
cs->act_point = scb->sc_cpoint;
sys/arch/newsmips/dev/scsi_1185.c
1259
cs->act_tag = scb->sc_ctag;
sys/arch/newsmips/dev/scsi_1185.c
1260
cs->act_offset = scb->sc_coffset;
sys/arch/newsmips/dev/scsi_1185.c
1267
scb->sc_ctrnscnt = cs->act_trcnt;
sys/arch/newsmips/dev/scsi_1185.c
1268
scb->sc_ctag = cs->act_tag;
sys/arch/newsmips/dev/scsi_1185.c
1269
scb->sc_coffset = cs->act_offset;
sys/arch/newsmips/dev/scsi_1185.c
1270
scb->sc_cpoint = cs->act_point;
sys/arch/newsmips/dev/scsi_1185.c
1274
scb->istatus |= INST_WR;
sys/arch/newsmips/dev/scsi_1185.c
1279
scb->message = MSG_MREJ;
sys/arch/newsmips/dev/scsi_1185.c
1293
if ((scb->msgbuf[2] == 0x01) &&
sys/arch/newsmips/dev/scsi_1185.c
1296
if (scb->msgbuf[2] == 0x01) {
sys/arch/newsmips/dev/scsi_1185.c
1306
i = scb->msgbuf[3]; /* get tpm */
sys/arch/newsmips/dev/scsi_1185.c
1308
if (scb->msgbuf[4] == 0)
sys/arch/newsmips/dev/scsi_1185.c
1312
i | scb->msgbuf[4];
sys/arch/newsmips/dev/scsi_1185.c
1315
scb->message = MSG_MREJ;
sys/arch/newsmips/dev/scsi_1185.c
1329
struct sc_scb *scb = cs->scb;
sys/arch/newsmips/dev/scsi_1185.c
1341
if (scb->message != 0) {
sys/arch/newsmips/dev/scsi_1185.c
1344
if ((scb->message == MSG_EXTND)
sys/arch/newsmips/dev/scsi_1185.c
1345
&& (scb->msgbuf[2] == 0x01)) {
sys/arch/newsmips/dev/scsi_1185.c
1347
mp = scb->msgbuf;
sys/arch/newsmips/dev/scsi_1185.c
1348
scb->msgbuf[3] = MIN_TP;
sys/arch/newsmips/dev/scsi_1185.c
1349
if (scb->msgbuf[4] > MAX_OFFSET_BYTES)
sys/arch/newsmips/dev/scsi_1185.c
1350
scb->msgbuf[4] = MAX_OFFSET_BYTES;
sys/arch/newsmips/dev/scsi_1185.c
1354
mp = &scb->message;
sys/arch/newsmips/dev/scsi_1185.c
1359
sc_datr = scb->identify;
sys/arch/newsmips/dev/scsi_1185.c
1420
sc_datr = scb->identify;
sys/arch/newsmips/dev/scsi_1185.c
1442
sc_datr = scb->message;
sys/arch/newsmips/dev/scsi_1185.c
1483
cs->scb->tstatus = sc_datr; /* get status byte */
sys/arch/newsmips/dev/scsi_1185.c
1493
struct sc_scb *scb;
sys/arch/newsmips/dev/scsi_1185.c
1501
scb = cs->scb;
sys/arch/newsmips/dev/scsi_1185.c
1502
xs = scb->xs;
sys/arch/newsmips/dev/scsi_1185.c
1553
if (scb->sc_map && (scb->sc_map->mp_pages > 0)) {
sys/arch/newsmips/dev/scsi_1185.c
1557
pages = scb->sc_map->mp_pages;
sys/arch/newsmips/dev/scsi_1185.c
1559
if ((pfn = scb->sc_map->mp_addr[i]) == 0)
sys/arch/newsmips/dev/scsi_1185.c
1654
return (int)sc->chan_stat[chan].scb;
sys/arch/newsmips/dev/scsi_1185.c
1672
cs->scb->istatus = INST_WAIT;
sys/arch/newsmips/dev/scsi_1185.c
1713
cs->scb->istatus &= ~INST_WAIT;
sys/arch/newsmips/dev/scsi_1185.c
1723
struct sc_scb *scb = cs->scb;
sys/arch/newsmips/dev/scsi_1185.c
1742
sent_byte = scb->sc_ctrnscnt - remain_cnt;
sys/arch/newsmips/dev/scsi_1185.c
1745
offset = scb->sc_coffset + sent_byte;
sys/arch/newsmips/dev/scsi_1185.c
1748
if ((scb->sc_map == NULL) || (scb->sc_map->mp_pages <= 0))
sys/arch/newsmips/dev/scsi_1185.c
1754
clean_k2dcache(struct sc_scb *scb)
sys/arch/newsmips/dev/scsi_1185.c
1756
struct sc_map *sc_map = scb->sc_map;
sys/arch/newsmips/dev/scsi_1185.c
1760
pa = kvtophys((vaddr_t)scb->msgbuf);
sys/arch/newsmips/dev/scsi_1185.c
1762
sizeof(scb->msgbuf));
sys/arch/newsmips/dev/scsi_1185.c
1764
if (MACH_IS_USPACE(scb->sc_cpoint))
sys/arch/newsmips/dev/scsi_1185.c
1767
if (MACH_IS_CACHED(scb->sc_cpoint)) {
sys/arch/newsmips/dev/scsi_1185.c
1768
mips_dcache_wbinv_range_index((vaddr_t)scb->sc_cpoint,
sys/arch/newsmips/dev/scsi_1185.c
1769
scb->sc_ctrnscnt);
sys/arch/newsmips/dev/scsi_1185.c
264
sc_send(struct sc_scb *scb, int chan, int ie)
sys/arch/newsmips/dev/scsi_1185.c
266
struct sc_softc *sc = scb->scb_softc;
sys/arch/newsmips/dev/scsi_1185.c
273
xs = scb->xs;
sys/arch/newsmips/dev/scsi_1185.c
276
if (cs->scb != NULL) {
sys/arch/newsmips/dev/scsi_1185.c
278
printf("ie=0x%x scb=%p cs->sc=%p\n", ie, scb, cs->scb);
sys/arch/newsmips/dev/scsi_1185.c
298
cs->scb = scb;
sys/arch/newsmips/dev/scsi_1185.c
300
scb->istatus = INST_EP;
sys/arch/newsmips/dev/scsi_1185.c
301
cs->scb = NULL;
sys/arch/newsmips/dev/scsi_1185.c
302
sc_done(scb);
sys/arch/newsmips/dev/scsi_1185.c
306
if (scb->sc_map && (scb->sc_map->mp_pages > 0)) {
sys/arch/newsmips/dev/scsi_1185.c
310
scb->sc_coffset = scb->sc_map->mp_offset & PGOFSET;
sys/arch/newsmips/dev/scsi_1185.c
311
if (scb->sc_map->mp_pages > NSCMAP) {
sys/arch/newsmips/dev/scsi_1185.c
313
scb->istatus = INST_EP|INST_LB|INST_PRE;
sys/arch/newsmips/dev/scsi_1185.c
320
scb->sc_coffset = (u_int)scb->sc_cpoint & PGOFSET;
sys/arch/newsmips/dev/scsi_1185.c
322
scb->sc_ctag = 0;
sys/arch/newsmips/dev/scsi_1185.c
324
cs->scb = scb;
sys/arch/newsmips/dev/scsi_1185.c
505
sc->chan_stat[chan].scb->istatus
sys/arch/newsmips/dev/scsi_1185.c
525
sc->ip->scb->istatus |= INST_IP;
sys/arch/newsmips/dev/scsi_1185.c
790
if (cs->scb != NULL) {
sys/arch/newsmips/dev/scsi_1185.c
791
struct sc_scb *scb = cs->scb;
sys/arch/newsmips/dev/scsi_1185.c
793
if ((cs->scb->istatus & INST_EP) == 0)
sys/arch/newsmips/dev/scsi_1185.c
794
cs->scb->istatus = (INST_EP|INST_HE);
sys/arch/newsmips/dev/scsi_1185.c
795
cs->scb = NULL;
sys/arch/newsmips/dev/scsi_1185.c
797
clean_k2dcache(scb);
sys/arch/newsmips/dev/scsi_1185.c
807
sc_done(scb);
sys/arch/newsmips/dev/scsi_1185.c
850
if (cs->scb == NULL) {
sys/arch/newsmips/dev/scsi_1185.c
854
if ((cs->scb->istatus & INST_WR) == 0) {
sys/arch/newsmips/dev/scsi_1185.c
888
cs->scb->istatus |= INST_IP;
sys/arch/newsmips/dev/scsi_1185.c
889
cs->scb->istatus &= ~INST_WR;
sys/arch/newsmips/dev/scsi_1185.c
946
if ((cs->scb->istatus & (INST_EP|INST_WR)) == 0)
sys/arch/newsmips/dev/scsi_1185.c
947
cs->scb->istatus |= (INST_EP|INST_PRE|INST_LB);
sys/arch/newsmips/dev/scsi_1185.c
949
cs->scb->istatus &= ~INST_IP;
sys/arch/newsmips/dev/scsi_1185.c
955
if ((cs->scb->istatus & INST_WR) == 0) {
sys/arch/newsmips/dev/scsi_1185.c
956
struct sc_scb *scb = cs->scb;
sys/arch/newsmips/dev/scsi_1185.c
959
cs->scb->istatus |= INST_EP|INST_PRE;
sys/arch/newsmips/dev/scsi_1185.c
960
cs->scb = NULL;
sys/arch/newsmips/dev/scsi_1185.c
962
clean_k2dcache(scb);
sys/arch/newsmips/dev/scsi_1185.c
972
sc_done(scb);
sys/arch/newsmips/dev/scsireg.h
213
struct sc_scb *scb; /* scsi struct address */
sys/arch/sparc/dev/if_ie_obio.c
358
sc->scb = IE_ISCP_SZ;
sys/arch/sparc/dev/if_ie_obio.c
366
ie_obio_write16(sc, IE_ISCP_SCB(sc->iscp), sc->scb);
sys/arch/sun2/dev/if_ie_mbmem.c
473
sc->scb = IE_ISCP_SZ;
sys/arch/sun2/dev/if_ie_mbmem.c
475
ie_mbmem_write16(sc, IE_ISCP_SCB((long)sc->iscp), sc->scb);
sys/arch/sun2/dev/if_ie_obio.c
366
sc->scb = IE_ISCP_SZ;
sys/arch/sun2/dev/if_ie_obio.c
374
ie_obio_write16(sc, IE_ISCP_SCB(sc->iscp), sc->scb);
sys/arch/sun3/dev/if_ie.c
1045
volatile struct ie_sys_ctl_block *scb = sc->scb;
sys/arch/sun3/dev/if_ie.c
1048
scb->ie_command = (uint16_t)cmd;
sys/arch/sun3/dev/if_ie.c
1053
while (scb->ie_command && --tmo)
sys/arch/sun3/dev/if_ie.c
1055
if (scb->ie_command) {
sys/arch/sun3/dev/if_ie.c
1107
sc->scb->ie_command_list = vtop16sw(sc, cmd);
sys/arch/sun3/dev/if_ie.c
1244
sc->scb->ie_recv_list =
sys/arch/sun3/dev/if_ie.c
1277
sc->scb->ie_command_list = vtop16sw(sc, cmd);
sys/arch/sun3/dev/if_ie.c
1318
volatile struct ie_sys_ctl_block *scb = sc->scb;
sys/arch/sun3/dev/if_ie.c
1331
scb->ie_command_list = vtop16sw(sc, cmd);
sys/arch/sun3/dev/if_ie.c
1352
scb->ie_command_list = vtop16sw(sc, cmd);
sys/arch/sun3/dev/if_ie.c
1387
sc->scb->ie_recv_list =
sys/arch/sun3/dev/if_ie.c
273
volatile struct ie_sys_ctl_block *scb = sc->scb;
sys/arch/sun3/dev/if_ie.c
275
cmd_and_wait(sc, scb->ie_status & mask, 0, 0);
sys/arch/sun3/dev/if_ie.c
362
volatile struct ie_sys_ctl_block *scb;
sys/arch/sun3/dev/if_ie.c
383
off -= sizeof(*scb);
sys/arch/sun3/dev/if_ie.c
384
scb = (volatile void *)(sc->buf_area + off);
sys/arch/sun3/dev/if_ie.c
385
(sc->sc_memset)(__UNVOLATILE(scb), 0, sizeof(*scb));
sys/arch/sun3/dev/if_ie.c
386
sc->scb = scb;
sys/arch/sun3/dev/if_ie.c
401
iscp->ie_scb_offset = vtop16sw(sc, __UNVOLATILE(scb));
sys/arch/sun3/dev/if_ie.c
405
scb->ie_command_list = SWAP(0xffff);
sys/arch/sun3/dev/if_ie.c
406
scb->ie_recv_list = SWAP(0xffff);
sys/arch/sun3/dev/if_ie.c
464
status = sc->scb->ie_status;
sys/arch/sun3/dev/if_ie.c
516
status = sc->scb->ie_status;
sys/arch/sun3/dev/if_ie.c
535
volatile struct ie_sys_ctl_block *scb = sc->scb;
sys/arch/sun3/dev/if_ie.c
546
SWAP(scb->ie_err_crc) +
sys/arch/sun3/dev/if_ie.c
547
SWAP(scb->ie_err_align) +
sys/arch/sun3/dev/if_ie.c
548
SWAP(scb->ie_err_resource) +
sys/arch/sun3/dev/if_ie.c
549
SWAP(scb->ie_err_overrun));
sys/arch/sun3/dev/if_ie.c
550
scb->ie_err_crc = 0;
sys/arch/sun3/dev/if_ie.c
551
scb->ie_err_align = 0;
sys/arch/sun3/dev/if_ie.c
552
scb->ie_err_resource = 0;
sys/arch/sun3/dev/if_ie.c
553
scb->ie_err_overrun = 0;
sys/arch/sun3/dev/if_ie.c
559
(scb->ie_status & IE_RU_READY) == 0) {
sys/arch/sun3/dev/if_ie.c
562
scb->ie_recv_list = vtop16sw(sc,
sys/arch/sun3/dev/if_ie.c
738
sc->scb->ie_command_list =
sys/arch/sun3/dev/if_ievar.h
94
volatile struct ie_sys_ctl_block *scb;
sys/arch/vax/boot/boot/autoconf.c
130
struct ivec_dsp **scb;
sys/arch/vax/boot/boot/autoconf.c
162
scb = (void *)i;
sys/arch/vax/boot/boot/autoconf.c
166
scb[i] = &scb_vec[i];
sys/arch/vax/boot/boot/autoconf.c
167
addr = (int)scb[i];
sys/arch/vax/boot/boot/autoconf.c
169
scb[i] = (struct ivec_dsp*)addr;
sys/arch/vax/include/scb.h
128
extern struct scb *scb;
sys/arch/vax/vax/ctu.c
133
scb->scb_csrint = (void *)&tu_recv;
sys/arch/vax/vax/ctu.c
137
scb->scb_cstint = (void *)&tu_xmit;
sys/arch/vax/vax/scb.c
155
((intptr_t *) scb)[vecno/4] = (intptr_t)(dsp) | stack;
sys/arch/vax/vax/scb.c
44
struct scb *scb;
sys/arch/vax/vax/scb.c
62
scb = (struct scb *)vavail;
sys/dev/bi/uba_bi.c
161
scb->scb_nexvec[1][ba->ba_nodenr] = &sc->sc_ivec;
sys/dev/ic/aic79xx.c
1027
struct scb *scb;
sys/dev/ic/aic79xx.c
1046
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
1047
if (scb == NULL) {
sys/dev/ic/aic79xx.c
1054
ahd_compile_devinfo(&devinfo, SCB_GET_OUR_ID(scb),
sys/dev/ic/aic79xx.c
1055
SCB_GET_TARGET(ahd, scb),
sys/dev/ic/aic79xx.c
1056
SCB_GET_LUN(scb),
sys/dev/ic/aic79xx.c
1057
SCB_GET_CHANNEL(ahd, scb),
sys/dev/ic/aic79xx.c
1078
scb->hscb->control &= ~(TAG_ENB|SCB_TAG_TYPE);
sys/dev/ic/aic79xx.c
1079
scb->hscb->control |= MK_MESSAGE;
sys/dev/ic/aic79xx.c
1080
ahd_outb(ahd, SCB_CONTROL, scb->hscb->control);
sys/dev/ic/aic79xx.c
1082
ahd_outb(ahd, SAVED_SCSIID, scb->hscb->scsiid);
sys/dev/ic/aic79xx.c
1090
scb->flags &= ~(SCB_PACKETIZED);
sys/dev/ic/aic79xx.c
1091
scb->flags |= SCB_ABORT|SCB_CMDPHASE_ABORT;
sys/dev/ic/aic79xx.c
1092
ahd_freeze_devq(ahd, scb);
sys/dev/ic/aic79xx.c
1093
ahd_set_transaction_status(scb, CAM_REQUEUE_REQ);
sys/dev/ic/aic79xx.c
1094
ahd_freeze_scb(scb);
sys/dev/ic/aic79xx.c
1107
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
1119
struct scb *scb;
sys/dev/ic/aic79xx.c
1129
scb = ahd_lookup_scb(ahd, scb_index);
sys/dev/ic/aic79xx.c
1130
if (scb == NULL) {
sys/dev/ic/aic79xx.c
1186
struct scb *scb;
sys/dev/ic/aic79xx.c
1206
scb = ahd_lookup_scb(ahd, scb_index);
sys/dev/ic/aic79xx.c
1211
scb);
sys/dev/ic/aic79xx.c
1228
scb);
sys/dev/ic/aic79xx.c
1322
struct scb *scb;
sys/dev/ic/aic79xx.c
1329
scb = ahd_lookup_scb(ahd, scbindex);
sys/dev/ic/aic79xx.c
1333
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
1336
SCB_GET_TAG(scb));
sys/dev/ic/aic79xx.c
1337
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
1342
ahd_get_transfer_length(scb), scb->sg_count);
sys/dev/ic/aic79xx.c
1343
ahd_dump_sglist(scb);
sys/dev/ic/aic79xx.c
1351
ahd_freeze_devq(ahd, scb);
sys/dev/ic/aic79xx.c
1352
ahd_set_transaction_status(scb, CAM_DATA_RUN_ERR);
sys/dev/ic/aic79xx.c
1353
ahd_freeze_scb(scb);
sys/dev/ic/aic79xx.c
1359
struct scb *scb;
sys/dev/ic/aic79xx.c
1367
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
1368
if (scb != NULL
sys/dev/ic/aic79xx.c
1369
&& (scb->flags & SCB_RECOVERY_SCB) != 0)
sys/dev/ic/aic79xx.c
1374
ahd_search_qinfifo(ahd, SCB_GET_TARGET(ahd, scb),
sys/dev/ic/aic79xx.c
1375
SCB_GET_CHANNEL(ahd, scb),
sys/dev/ic/aic79xx.c
1376
SCB_GET_LUN(scb), SCB_GET_TAG(scb),
sys/dev/ic/aic79xx.c
1386
struct scb *scb;
sys/dev/ic/aic79xx.c
1389
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
1390
if (scb != NULL) {
sys/dev/ic/aic79xx.c
1395
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
1397
scb->hscb->task_management);
sys/dev/ic/aic79xx.c
1401
switch (scb->hscb->task_management) {
sys/dev/ic/aic79xx.c
1403
tag = SCB_GET_TAG(scb);
sys/dev/ic/aic79xx.c
1407
lun = scb->hscb->lun;
sys/dev/ic/aic79xx.c
1409
ahd_abort_scbs(ahd, SCB_GET_TARGET(ahd, scb),
sys/dev/ic/aic79xx.c
1414
lun = scb->hscb->lun;
sys/dev/ic/aic79xx.c
1420
ahd_scb_devinfo(ahd, &devinfo, scb);
sys/dev/ic/aic79xx.c
1440
struct scb *scb;
sys/dev/ic/aic79xx.c
1447
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
1448
if (scb != NULL) {
sys/dev/ic/aic79xx.c
1453
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
146
struct scb *scb);
sys/dev/ic/aic79xx.c
1467
ahd_search_qinfifo(ahd, SCB_GET_TARGET(ahd, scb),
sys/dev/ic/aic79xx.c
1468
SCB_GET_CHANNEL(ahd, scb),
sys/dev/ic/aic79xx.c
1469
SCB_GET_LUN(scb), SCB_GET_TAG(scb),
sys/dev/ic/aic79xx.c
149
struct scb *scb);
sys/dev/ic/aic79xx.c
1503
struct scb *scb;
sys/dev/ic/aic79xx.c
1530
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
1531
if (scb != NULL
sys/dev/ic/aic79xx.c
1533
scb = NULL;
sys/dev/ic/aic79xx.c
1590
scb = ahd_lookup_scb(ahd, scbid1);
sys/dev/ic/aic79xx.c
1591
if (scb == NULL) {
sys/dev/ic/aic79xx.c
1600
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
1614
ahd_scb_devinfo(ahd, &devinfo, scb);
sys/dev/ic/aic79xx.c
1616
ahd_set_transaction_status(scb, CAM_SEL_TIMEOUT);
sys/dev/ic/aic79xx.c
1617
ahd_freeze_devq(ahd, scb);
sys/dev/ic/aic79xx.c
1666
struct scb *scb1;
sys/dev/ic/aic79xx.c
1751
struct scb *scb;
sys/dev/ic/aic79xx.c
1761
scb = NULL;
sys/dev/ic/aic79xx.c
1800
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
1801
if (scb != NULL && SCB_IS_SILENT(scb))
sys/dev/ic/aic79xx.c
186
struct scb *scb);
sys/dev/ic/aic79xx.c
1896
if (scb == NULL) {
sys/dev/ic/aic79xx.c
1927
if (scb != NULL && msg_out == MSG_INITIATOR_DET_ERR)
sys/dev/ic/aic79xx.c
1928
scb->flags |= SCB_TRANSMISSION_ERROR;
sys/dev/ic/aic79xx.c
197
struct scb *scb, u_int col_idx);
sys/dev/ic/aic79xx.c
1985
struct scb *scb;
sys/dev/ic/aic79xx.c
199
struct scb *scb);
sys/dev/ic/aic79xx.c
2013
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
2014
if (scb == NULL)
sys/dev/ic/aic79xx.c
202
struct scb *prev_scb,
sys/dev/ic/aic79xx.c
203
struct scb *scb);
sys/dev/ic/aic79xx.c
2055
if (scb->crc_retry_count < AHD_MAX_LQ_CRC_ERRORS) {
sys/dev/ic/aic79xx.c
2056
if (SCB_IS_SILENT(scb) == FALSE) {
sys/dev/ic/aic79xx.c
2057
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
2061
scb->crc_retry_count++;
sys/dev/ic/aic79xx.c
2063
ahd_set_transaction_status(scb, CAM_UNCOR_PARITY);
sys/dev/ic/aic79xx.c
2064
ahd_freeze_scb(scb);
sys/dev/ic/aic79xx.c
2065
ahd_freeze_devq(ahd, scb);
sys/dev/ic/aic79xx.c
2089
struct scb *scb;
sys/dev/ic/aic79xx.c
2092
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
2093
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
2096
ahd_abort_scbs(ahd, SCB_GET_TARGET(ahd, scb), 'A',
sys/dev/ic/aic79xx.c
2097
SCB_GET_LUN(scb), SCB_GET_TAG(scb),
sys/dev/ic/aic79xx.c
2116
struct scb *scb;
sys/dev/ic/aic79xx.c
2141
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
2142
if (scb != NULL
sys/dev/ic/aic79xx.c
2144
scb = NULL;
sys/dev/ic/aic79xx.c
2156
if (scb == NULL) {
sys/dev/ic/aic79xx.c
2164
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
2166
SCB_GET_TAG(scb),
sys/dev/ic/aic79xx.c
2170
tag = SCB_GET_TAG(scb);
sys/dev/ic/aic79xx.c
2172
if ((scb->flags & SCB_CMDPHASE_ABORT) != 0) {
sys/dev/ic/aic79xx.c
2185
tag = SCB_GET_TAG(scb);
sys/dev/ic/aic79xx.c
2186
saved_lun = scb->hscb->lun;
sys/dev/ic/aic79xx.c
2201
if (scb != NULL
sys/dev/ic/aic79xx.c
2202
&& scb->io_ctx->ccb_h.func_code== XPT_RESET_DEV
sys/dev/ic/aic79xx.c
2203
&& ahd_match_scb(ahd, scb, target, 'A',
sys/dev/ic/aic79xx.c
2206
ahd_set_transaction_status(scb, CAM_REQ_CMP);
sys/dev/ic/aic79xx.c
2231
ahd_qinfifo_requeue_tail(ahd, scb);
sys/dev/ic/aic79xx.c
2247
ahd_qinfifo_requeue_tail(ahd, scb);
sys/dev/ic/aic79xx.c
2264
ahd_qinfifo_requeue_tail(ahd, scb);
sys/dev/ic/aic79xx.c
2296
ahd_freeze_devq(ahd, scb);
sys/dev/ic/aic79xx.c
2297
ahd_set_transaction_status(scb, CAM_REQUEUE_REQ);
sys/dev/ic/aic79xx.c
2298
ahd_freeze_scb(scb);
sys/dev/ic/aic79xx.c
2300
ahd_abort_scbs(ahd, SCB_GET_TARGET(ahd, scb),
sys/dev/ic/aic79xx.c
2301
SCB_GET_CHANNEL(ahd, scb),
sys/dev/ic/aic79xx.c
2302
SCB_GET_LUN(scb), SCB_LIST_NULL,
sys/dev/ic/aic79xx.c
2309
ahd_done(ahd, scb);
sys/dev/ic/aic79xx.c
2317
if (scb != NULL) {
sys/dev/ic/aic79xx.c
2320
if ((scb->hscb->control & TAG_ENB) != 0)
sys/dev/ic/aic79xx.c
2321
tag = SCB_GET_TAG(scb);
sys/dev/ic/aic79xx.c
2324
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
2326
SCB_GET_LUN(scb), tag,
sys/dev/ic/aic79xx.c
233
struct scb *scb);
sys/dev/ic/aic79xx.c
235
struct scb *scb);
sys/dev/ic/aic79xx.c
2354
struct scb *scb;
sys/dev/ic/aic79xx.c
2363
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
2377
scb = NULL;
sys/dev/ic/aic79xx.c
2378
} else if (scb == NULL) {
sys/dev/ic/aic79xx.c
2387
ahd_set_transaction_status(scb, CAM_SEQUENCE_FAIL);
sys/dev/ic/aic79xx.c
2389
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
2400
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
2403
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
2430
if (scb == NULL) {
sys/dev/ic/aic79xx.c
2437
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
2438
scb->flags |= SCB_ABORT;
sys/dev/ic/aic79xx.c
2627
ahd_print_scb(struct scb *scb)
sys/dev/ic/aic79xx.c
2632
hscb = scb->hscb;
sys/dev/ic/aic79xx.c
2634
(void *)scb,
sys/dev/ic/aic79xx.c
2647
SCB_GET_TAG(scb));
sys/dev/ic/aic79xx.c
2648
ahd_dump_sglist(scb);
sys/dev/ic/aic79xx.c
2652
ahd_dump_sglist(struct scb *scb)
sys/dev/ic/aic79xx.c
2656
if (scb->sg_count > 0) {
sys/dev/ic/aic79xx.c
2657
if ((scb->ahd_softc->flags & AHD_64BIT_ADDRESSING) != 0) {
sys/dev/ic/aic79xx.c
2660
sg_list = (struct ahd_dma64_seg*)scb->sg_list;
sys/dev/ic/aic79xx.c
2661
for (i = 0; i < scb->sg_count; i++) {
sys/dev/ic/aic79xx.c
2676
sg_list = (struct ahd_dma_seg*)scb->sg_list;
sys/dev/ic/aic79xx.c
2677
for (i = 0; i < scb->sg_count; i++) {
sys/dev/ic/aic79xx.c
3269
struct scb *pending_scb;
sys/dev/ic/aic79xx.c
3427
struct scb *scb)
sys/dev/ic/aic79xx.c
3432
our_id = SCSIID_OUR_ID(scb->hscb->scsiid);
sys/dev/ic/aic79xx.c
3434
if ((scb->hscb->control & TARGET_SCB) != 0)
sys/dev/ic/aic79xx.c
3436
ahd_compile_devinfo(devinfo, our_id, SCB_GET_TARGET(ahd, scb),
sys/dev/ic/aic79xx.c
3437
SCB_GET_LUN(scb), SCB_GET_CHANNEL(ahd, scb), role);
sys/dev/ic/aic79xx.c
3450
struct scb *scb)
sys/dev/ic/aic79xx.c
3473
} else if (scb == NULL) {
sys/dev/ic/aic79xx.c
3482
if ((scb->flags & SCB_DEVICE_RESET) == 0
sys/dev/ic/aic79xx.c
3483
&& (scb->flags & SCB_PACKETIZED) == 0
sys/dev/ic/aic79xx.c
3487
identify_msg = MSG_IDENTIFYFLAG | SCB_GET_LUN(scb);
sys/dev/ic/aic79xx.c
3488
if ((scb->hscb->control & DISCENB) != 0)
sys/dev/ic/aic79xx.c
3493
if ((scb->hscb->control & TAG_ENB) != 0) {
sys/dev/ic/aic79xx.c
3495
scb->hscb->control & (TAG_ENB|SCB_TAG_TYPE);
sys/dev/ic/aic79xx.c
3496
ahd->msgout_buf[ahd->msgout_index++] = SCB_GET_TAG(scb);
sys/dev/ic/aic79xx.c
3501
if (scb->flags & SCB_DEVICE_RESET) {
sys/dev/ic/aic79xx.c
3504
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
3514
} else if ((scb->flags & SCB_ABORT) != 0) {
sys/dev/ic/aic79xx.c
3516
if ((scb->hscb->control & TAG_ENB) != 0) {
sys/dev/ic/aic79xx.c
3522
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
3524
(scb->hscb->control & TAG_ENB) != 0 ? " Tag" : "");
sys/dev/ic/aic79xx.c
3533
} else if ((scb->flags & (SCB_AUTO_NEGOTIATE|SCB_NEGOTIATE)) != 0) {
sys/dev/ic/aic79xx.c
3546
printf("SCSIID = %x, target_mask = %x\n", scb->hscb->scsiid,
sys/dev/ic/aic79xx.c
3549
"SCB flags = %x", SCB_GET_TAG(scb), scb->hscb->control,
sys/dev/ic/aic79xx.c
3551
scb->flags);
sys/dev/ic/aic79xx.c
3560
scb->hscb->control &= ~MK_MESSAGE;
sys/dev/ic/aic79xx.c
391
struct scb *scb;
sys/dev/ic/aic79xx.c
417
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
418
if (scb == NULL) {
sys/dev/ic/aic79xx.c
433
if (ahd_scb_active_in_fifo(ahd, scb) == 0)
sys/dev/ic/aic79xx.c
436
ahd_run_data_fifo(ahd, scb);
sys/dev/ic/aic79xx.c
4586
struct scb *scb;
sys/dev/ic/aic79xx.c
4594
scb = ahd_lookup_scb(ahd, scb_index);
sys/dev/ic/aic79xx.c
464
ahd_outw(ahd, SCB_TAG, SCB_GET_TAG(scb));
sys/dev/ic/aic79xx.c
4674
} else if ((scb->hscb->control & MSG_SIMPLE_TASK) != 0) {
sys/dev/ic/aic79xx.c
4678
tag_type = (scb->hscb->control & MSG_SIMPLE_TASK);
sys/dev/ic/aic79xx.c
469
SCB_GET_TAG(scb));
sys/dev/ic/aic79xx.c
4702
scb->hscb->control &= mask;
sys/dev/ic/aic79xx.c
4703
ahd_set_transaction_tag(scb, /*enabled*/FALSE,
sys/dev/ic/aic79xx.c
4707
ahd_busy_tcl(ahd, BUILD_TCL(scb->hscb->scsiid, devinfo->lun),
sys/dev/ic/aic79xx.c
4708
SCB_GET_TAG(scb));
sys/dev/ic/aic79xx.c
471
ahd_complete_scb(ahd, scb);
sys/dev/ic/aic79xx.c
4715
ahd_search_qinfifo(ahd, SCB_GET_TARGET(ahd, scb),
sys/dev/ic/aic79xx.c
4716
SCB_GET_CHANNEL(ahd, scb),
sys/dev/ic/aic79xx.c
4717
SCB_GET_LUN(scb), /*tag*/SCB_LIST_NULL,
sys/dev/ic/aic79xx.c
4753
struct scb *scb;
sys/dev/ic/aic79xx.c
4758
scb = ahd_lookup_scb(ahd, scb_index);
sys/dev/ic/aic79xx.c
4764
|| ahd_get_transfer_dir(scb) != CAM_DIR_IN) {
sys/dev/ic/aic79xx.c
4812
sg = ahd_sg_bus_to_virt(ahd, scb, sgptr);
sys/dev/ic/aic79xx.c
4820
if (sg != scb->sg_list
sys/dev/ic/aic79xx.c
4839
sgptr = ahd_sg_virt_to_bus(ahd, scb,
sys/dev/ic/aic79xx.c
4845
sg = ahd_sg_bus_to_virt(ahd, scb, sgptr);
sys/dev/ic/aic79xx.c
4853
if (sg != scb->sg_list
sys/dev/ic/aic79xx.c
4872
sgptr = ahd_sg_virt_to_bus(ahd, scb,
sys/dev/ic/aic79xx.c
4904
struct scb *scb;
sys/dev/ic/aic79xx.c
4916
scb = ahd_lookup_scb(ahd, scb_index);
sys/dev/ic/aic79xx.c
4927
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
4954
sg = ahd_sg_bus_to_virt(ahd, scb, sgptr);
sys/dev/ic/aic79xx.c
4969
sg = ahd_sg_bus_to_virt(ahd, scb, sgptr);
sys/dev/ic/aic79xx.c
5057
struct scb *scb)
sys/dev/ic/aic79xx.c
5068
if (scb != NULL && (scb->flags & SCB_AUTO_NEGOTIATE) != 0)
sys/dev/ic/aic79xx.c
508
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
509
if (scb == NULL) {
sys/dev/ic/aic79xx.c
514
hscb_ptr = (uint8_t *)scb->hscb;
sys/dev/ic/aic79xx.c
518
ahd_complete_scb(ahd, scb);
sys/dev/ic/aic79xx.c
528
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
529
if (scb == NULL) {
sys/dev/ic/aic79xx.c
535
ahd_complete_scb(ahd, scb);
sys/dev/ic/aic79xx.c
5458
static struct scb *
sys/dev/ic/aic79xx.c
5461
struct scb *scb;
sys/dev/ic/aic79xx.c
5466
LIST_FOREACH(scb, &ahd->pending_scbs, pending_links) {
sys/dev/ic/aic79xx.c
5467
if (SCB_GET_TAG(scb) == tag)
sys/dev/ic/aic79xx.c
5468
return (scb);
sys/dev/ic/aic79xx.c
5474
TAILQ_FOREACH(scb, &ahd->scb_data.free_scbs, links.tqe) {
sys/dev/ic/aic79xx.c
5475
struct scb *list_scb;
sys/dev/ic/aic79xx.c
5477
list_scb = scb;
sys/dev/ic/aic79xx.c
5488
LIST_FOREACH(scb, &ahd->scb_data.any_dev_free_scb_list, links.le) {
sys/dev/ic/aic79xx.c
5489
if (SCB_GET_TAG(scb) == tag)
sys/dev/ic/aic79xx.c
5490
return (scb);
sys/dev/ic/aic79xx.c
553
ahd_scb_active_in_fifo(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx.c
5607
ahd_add_col_list(struct ahd_softc *ahd, struct scb *scb, u_int col_idx)
sys/dev/ic/aic79xx.c
5611
struct scb *first_scb;
sys/dev/ic/aic79xx.c
5613
scb->flags |= SCB_ON_COL_LIST;
sys/dev/ic/aic79xx.c
5614
AHD_SET_SCB_COL_IDX(scb, col_idx);
sys/dev/ic/aic79xx.c
5619
LIST_INSERT_AFTER(first_scb, scb, collision_links);
sys/dev/ic/aic79xx.c
562
if (ahd_get_scbptr(ahd) != SCB_GET_TAG(scb)
sys/dev/ic/aic79xx.c
5621
LIST_INSERT_HEAD(free_list, scb, collision_links);
sys/dev/ic/aic79xx.c
5622
TAILQ_INSERT_TAIL(free_tailq, scb, links.tqe);
sys/dev/ic/aic79xx.c
5627
ahd_rem_col_list(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx.c
5631
struct scb *first_scb;
sys/dev/ic/aic79xx.c
5634
scb->flags &= ~SCB_ON_COL_LIST;
sys/dev/ic/aic79xx.c
5635
col_idx = AHD_GET_SCB_COL_IDX(ahd, scb);
sys/dev/ic/aic79xx.c
5639
if (first_scb == scb) {
sys/dev/ic/aic79xx.c
5640
struct scb *next_scb;
sys/dev/ic/aic79xx.c
5647
next_scb = LIST_NEXT(scb, collision_links);
sys/dev/ic/aic79xx.c
5649
TAILQ_INSERT_AFTER(free_tailq, scb,
sys/dev/ic/aic79xx.c
5652
TAILQ_REMOVE(free_tailq, scb, links.tqe);
sys/dev/ic/aic79xx.c
5654
LIST_REMOVE(scb, collision_links);
sys/dev/ic/aic79xx.c
5660
struct scb *
sys/dev/ic/aic79xx.c
5663
struct scb *scb;
sys/dev/ic/aic79xx.c
5664
TAILQ_FOREACH(scb, &ahd->scb_data.free_scbs, links.tqe) {
sys/dev/ic/aic79xx.c
5665
if (AHD_GET_SCB_COL_IDX(ahd, scb) != col_idx) {
sys/dev/ic/aic79xx.c
5666
ahd_rem_col_list(ahd, scb);
sys/dev/ic/aic79xx.c
5670
if ((scb = LIST_FIRST(&ahd->scb_data.any_dev_free_scb_list)) == NULL)
sys/dev/ic/aic79xx.c
5672
LIST_REMOVE(scb, links.le);
sys/dev/ic/aic79xx.c
5674
&& (scb->col_scb != NULL)
sys/dev/ic/aic79xx.c
5675
&& (scb->col_scb->flags & SCB_ACTIVE) == 0) {
sys/dev/ic/aic79xx.c
5676
LIST_REMOVE(scb->col_scb, links.le);
sys/dev/ic/aic79xx.c
5677
ahd_add_col_list(ahd, scb->col_scb, col_idx);
sys/dev/ic/aic79xx.c
5680
scb->flags |= SCB_ACTIVE;
sys/dev/ic/aic79xx.c
5681
return (scb);
sys/dev/ic/aic79xx.c
5688
ahd_free_scb(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx.c
5692
scb->flags = SCB_FLAG_NONE;
sys/dev/ic/aic79xx.c
5693
scb->hscb->control = 0;
sys/dev/ic/aic79xx.c
5694
ahd->scb_data.scbindex[SCB_GET_TAG(scb)] = NULL;
sys/dev/ic/aic79xx.c
5696
if (scb->col_scb == NULL) {
sys/dev/ic/aic79xx.c
5702
scb, links.le);
sys/dev/ic/aic79xx.c
5703
} else if ((scb->col_scb->flags & SCB_ON_COL_LIST) != 0) {
sys/dev/ic/aic79xx.c
5710
ahd_rem_col_list(ahd, scb->col_scb);
sys/dev/ic/aic79xx.c
5712
scb, links.le);
sys/dev/ic/aic79xx.c
5714
scb->col_scb, links.le);
sys/dev/ic/aic79xx.c
5715
} else if ((scb->col_scb->flags
sys/dev/ic/aic79xx.c
5717
&& (scb->col_scb->hscb->control & TAG_ENB) != 0) {
sys/dev/ic/aic79xx.c
5724
ahd_add_col_list(ahd, scb,
sys/dev/ic/aic79xx.c
5725
AHD_GET_SCB_COL_IDX(ahd, scb->col_scb));
sys/dev/ic/aic79xx.c
5734
scb, links.le);
sys/dev/ic/aic79xx.c
5737
ahd_platform_scb_free(ahd, scb);
sys/dev/ic/aic79xx.c
5744
struct scb *next_scb;
sys/dev/ic/aic79xx.c
582
ahd_run_data_fifo(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx.c
6831
struct scb *waiting_scb;
sys/dev/ic/aic79xx.c
6962
ahd_match_scb(struct ahd_softc *ahd, struct scb *scb, int target,
sys/dev/ic/aic79xx.c
6965
int targ = SCB_GET_TARGET(ahd, scb);
sys/dev/ic/aic79xx.c
6966
char chan = SCB_GET_CHANNEL(ahd, scb);
sys/dev/ic/aic79xx.c
6967
int slun = SCB_GET_LUN(scb);
sys/dev/ic/aic79xx.c
6979
group = XPT_FC_GROUP(scb->io_ctx->ccb_h.func_code);
sys/dev/ic/aic79xx.c
6982
&& ((tag == SCB_GET_TAG(scb))
sys/dev/ic/aic79xx.c
6986
&& ((tag == scb->io_ctx->csio.tag_id)
sys/dev/ic/aic79xx.c
6990
match = ((tag == SCB_GET_TAG(scb)) || (tag == SCB_LIST_NULL));
sys/dev/ic/aic79xx.c
6998
ahd_freeze_devq(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx.c
7004
target = SCB_GET_TARGET(ahd, scb);
sys/dev/ic/aic79xx.c
7005
lun = SCB_GET_LUN(scb);
sys/dev/ic/aic79xx.c
7006
channel = SCB_GET_CHANNEL(ahd, scb);
sys/dev/ic/aic79xx.c
7012
ahd_platform_freeze_devq(ahd, scb);
sys/dev/ic/aic79xx.c
7016
ahd_qinfifo_requeue_tail(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx.c
7018
struct scb *prev_scb;
sys/dev/ic/aic79xx.c
7032
ahd_qinfifo_requeue(ahd, prev_scb, scb);
sys/dev/ic/aic79xx.c
7038
ahd_qinfifo_requeue(struct ahd_softc *ahd, struct scb *prev_scb,
sys/dev/ic/aic79xx.c
7039
struct scb *scb)
sys/dev/ic/aic79xx.c
7044
busaddr = ahd_le32toh(scb->hscb->hscb_busaddr);
sys/dev/ic/aic79xx.c
7050
prev_scb->hscb->next_hscb_busaddr = scb->hscb->hscb_busaddr;
sys/dev/ic/aic79xx.c
7054
ahd->qinfifo[AHD_QIN_WRAP(ahd->qinfifonext)] = SCB_GET_TAG(scb);
sys/dev/ic/aic79xx.c
7056
scb->hscb->next_hscb_busaddr = ahd->next_queued_hscb->hscb_busaddr;
sys/dev/ic/aic79xx.c
7057
ahd_sync_scb(ahd, scb, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
sys/dev/ic/aic79xx.c
7081
struct scb *scb;
sys/dev/ic/aic79xx.c
7095
LIST_FOREACH(scb, &ahd->pending_scbs, pending_links) {
sys/dev/ic/aic79xx.c
7108
struct scb *scb;
sys/dev/ic/aic79xx.c
7109
struct scb *prev_scb;
sys/dev/ic/aic79xx.c
7146
LIST_FOREACH(scb, &ahd->pending_scbs, pending_links) {
sys/dev/ic/aic79xx.c
7168
scb = ahd_lookup_scb(ahd, ahd->qinfifo[qinpos]);
sys/dev/ic/aic79xx.c
7169
if (scb == NULL) {
sys/dev/ic/aic79xx.c
7173
if (ahd_match_scb(ahd, scb, target, channel, lun, tag, role)) {
sys/dev/ic/aic79xx.c
7184
ostat = ahd_get_scsi_status(scb);
sys/dev/ic/aic79xx.c
7186
ahd_set_scsi_status(scb, status);
sys/dev/ic/aic79xx.c
7187
cstat = ahd_get_transaction_status(scb);
sys/dev/ic/aic79xx.c
7189
ahd_freeze_scb(scb);
sys/dev/ic/aic79xx.c
7190
if ((scb->flags & SCB_ACTIVE) == 0)
sys/dev/ic/aic79xx.c
7192
if ((cam_status)scb->xs->error != CAM_REQ_CMP)
sys/dev/ic/aic79xx.c
7196
SCB_GET_TAG(scb), ostat, cstat,
sys/dev/ic/aic79xx.c
7197
scb->xs->error);
sys/dev/ic/aic79xx.c
7198
ahd_done(ahd, scb);
sys/dev/ic/aic79xx.c
7208
ahd_qinfifo_requeue(ahd, prev_scb, scb);
sys/dev/ic/aic79xx.c
7209
prev_scb = scb;
sys/dev/ic/aic79xx.c
7213
ahd_qinfifo_requeue(ahd, prev_scb, scb);
sys/dev/ic/aic79xx.c
7214
prev_scb = scb;
sys/dev/ic/aic79xx.c
7252
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
7253
if (scb == NULL) {
sys/dev/ic/aic79xx.c
7261
if (ahd_match_scb(ahd, scb, target, channel, CAM_LUN_WILDCARD,
sys/dev/ic/aic79xx.c
7271
printf(" %d ( ", SCB_GET_TARGET(ahd, scb));
sys/dev/ic/aic79xx.c
7276
SCB_GET_TARGET(ahd, scb));
sys/dev/ic/aic79xx.c
7294
struct scb *scb;
sys/dev/ic/aic79xx.c
7312
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
7313
if (scb == NULL) {
sys/dev/ic/aic79xx.c
7320
if (ahd_match_scb(ahd, scb, target, channel,
sys/dev/ic/aic79xx.c
7332
ostat = ahd_get_scsi_status(scb);
sys/dev/ic/aic79xx.c
7334
ahd_set_scsi_status(scb, status);
sys/dev/ic/aic79xx.c
7335
cstat = ahd_get_transaction_status(scb);
sys/dev/ic/aic79xx.c
7337
ahd_freeze_scb(scb);
sys/dev/ic/aic79xx.c
7338
if ((scb->flags & SCB_ACTIVE) == 0)
sys/dev/ic/aic79xx.c
7340
ahd_done(ahd, scb);
sys/dev/ic/aic79xx.c
740
sg = ahd_sg_bus_to_virt(ahd, scb, sgptr);
sys/dev/ic/aic79xx.c
7456
struct scb *scbp;
sys/dev/ic/aic79xx.c
7457
struct scb *scbp_next;
sys/dev/ic/aic79xx.c
747
sg = ahd_sg_bus_to_virt(ahd, scb, sgptr);
sys/dev/ic/aic79xx.c
7823
ahd_handle_scb_status(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx.c
7825
if (scb->hscb->shared_data.istatus.scsi_status != 0) {
sys/dev/ic/aic79xx.c
7826
ahd_handle_scsi_status(ahd, scb);
sys/dev/ic/aic79xx.c
7828
ahd_calc_residual(ahd, scb);
sys/dev/ic/aic79xx.c
7829
ahd_done(ahd, scb);
sys/dev/ic/aic79xx.c
7834
ahd_handle_scsi_status(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx.c
7845
hscb = scb->hscb;
sys/dev/ic/aic79xx.c
7848
ahd_freeze_devq(ahd, scb);
sys/dev/ic/aic79xx.c
7849
ahd_freeze_scb(scb);
sys/dev/ic/aic79xx.c
7862
if ((scb->flags & SCB_SENSE) != 0) {
sys/dev/ic/aic79xx.c
7867
scb->flags &= ~SCB_SENSE;
sys/dev/ic/aic79xx.c
7868
ahd_set_transaction_status(scb, CAM_AUTOSENSE_FAIL);
sys/dev/ic/aic79xx.c
7869
ahd_done(ahd, scb);
sys/dev/ic/aic79xx.c
7872
ahd_set_scsi_status(scb, hscb->shared_data.istatus.scsi_status);
sys/dev/ic/aic79xx.c
7873
ahd_set_xfer_status(scb, hscb->shared_data.istatus.scsi_status);
sys/dev/ic/aic79xx.c
7879
ahd_sync_sense(ahd, scb, BUS_DMASYNC_POSTREAD);
sys/dev/ic/aic79xx.c
7880
siu = (struct scsi_status_iu_header *)scb->sense_data;
sys/dev/ic/aic79xx.c
7881
ahd_set_scsi_status(scb, siu->status);
sys/dev/ic/aic79xx.c
7884
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
7886
SCB_GET_TAG(scb), siu->status);
sys/dev/ic/aic79xx.c
7890
scsipi_printaddr(scb->xs->xs_periph);
sys/dev/ic/aic79xx.c
7918
ahd_set_transaction_status(scb,
sys/dev/ic/aic79xx.c
7922
scb->flags |= SCB_PKT_SENSE;
sys/dev/ic/aic79xx.c
7928
((uint8_t)scb->sense_data[
sys/dev/ic/aic79xx.c
7930
((uint8_t)scb->sense_data[
sys/dev/ic/aic79xx.c
7932
((uint8_t)scb->sense_data[
sys/dev/ic/aic79xx.c
7937
ahd_done(ahd, scb);
sys/dev/ic/aic79xx.c
7950
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
7952
SCB_GET_TAG(scb));
sys/dev/ic/aic79xx.c
7956
if (ahd_perform_autosense(scb) == 0)
sys/dev/ic/aic79xx.c
7959
ahd_compile_devinfo(&devinfo, SCB_GET_OUR_ID(scb),
sys/dev/ic/aic79xx.c
7960
SCB_GET_TARGET(ahd, scb),
sys/dev/ic/aic79xx.c
7961
SCB_GET_LUN(scb),
sys/dev/ic/aic79xx.c
7962
SCB_GET_CHANNEL(ahd, scb),
sys/dev/ic/aic79xx.c
7969
sg = scb->sg_list;
sys/dev/ic/aic79xx.c
7974
ahd_update_residual(ahd, scb);
sys/dev/ic/aic79xx.c
7977
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
7981
scb->sg_count = 0;
sys/dev/ic/aic79xx.c
7982
sg = ahd_sg_setup(ahd, scb, sg, ahd_get_sense_bufaddr(ahd, scb),
sys/dev/ic/aic79xx.c
7983
ahd_get_sense_bufsize(ahd, scb),
sys/dev/ic/aic79xx.c
7987
sc->length = ahd_get_sense_bufsize(ahd, scb);
sys/dev/ic/aic79xx.c
8006
if (ahd_get_residual(scb) == ahd_get_transfer_length(scb)) {
sys/dev/ic/aic79xx.c
8013
scb->flags &=
sys/dev/ic/aic79xx.c
8015
scb->flags |= SCB_AUTO_NEGOTIATE;
sys/dev/ic/aic79xx.c
8018
ahd_setup_data_scb(ahd, scb);
sys/dev/ic/aic79xx.c
8019
scb->flags |= SCB_SENSE;
sys/dev/ic/aic79xx.c
8020
ahd_queue_scb(ahd, scb);
sys/dev/ic/aic79xx.c
8025
ahd_scb_timer_reset(scb, 5 * 1000000);
sys/dev/ic/aic79xx.c
8030
ahd_name(ahd), SCB_GET_TAG(scb));
sys/dev/ic/aic79xx.c
8033
ahd_done(ahd, scb);
sys/dev/ic/aic79xx.c
8042
ahd_calc_residual(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx.c
8066
hscb = scb->hscb;
sys/dev/ic/aic79xx.c
8087
resid = ahd_get_transfer_length(scb);
sys/dev/ic/aic79xx.c
8092
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
8094
SCB_GET_TAG(scb));
sys/dev/ic/aic79xx.c
8095
ahd_freeze_devq(ahd, scb);
sys/dev/ic/aic79xx.c
8096
ahd_set_transaction_status(scb, CAM_DATA_RUN_ERR);
sys/dev/ic/aic79xx.c
8097
ahd_freeze_scb(scb);
sys/dev/ic/aic79xx.c
8110
sg = ahd_sg_bus_to_virt(ahd, scb, resid_sgptr & SG_PTR_MASK);
sys/dev/ic/aic79xx.c
8126
if ((scb->flags & SCB_SENSE) == 0)
sys/dev/ic/aic79xx.c
8127
ahd_set_residual(scb, resid);
sys/dev/ic/aic79xx.c
8133
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
8135
(scb->flags & SCB_SENSE) ? "Sense " : "", resid);
sys/dev/ic/aic79xx.c
814
struct scb *scb;
sys/dev/ic/aic79xx.c
826
scb = ahd_lookup_scb(ahd, scb_index);
sys/dev/ic/aic79xx.c
827
if (scb == NULL) {
sys/dev/ic/aic79xx.c
834
ahd_complete_scb(ahd, scb);
sys/dev/ic/aic79xx.c
8656
struct scb *scb;
sys/dev/ic/aic79xx.c
8729
LIST_FOREACH(scb, &ahd->pending_scbs, pending_links) {
sys/dev/ic/aic79xx.c
8732
/*cur_col =*/ printf("\n%3d FIFO_USE[0x%x] ", SCB_GET_TAG(scb),
sys/dev/ic/aic79xx.c
8734
ahd_set_scbptr(ahd, SCB_GET_TAG(scb));
sys/dev/ic/aic79xx.c
8744
TAILQ_FOREACH(scb, &ahd->scb_data.free_scbs, links.tqe) {
sys/dev/ic/aic79xx.c
8745
struct scb *list_scb;
sys/dev/ic/aic79xx.c
8747
list_scb = scb;
sys/dev/ic/aic79xx.c
8754
LIST_FOREACH(scb, &ahd->scb_data.any_dev_free_scb_list, links.le) {
sys/dev/ic/aic79xx.c
8757
printf("%d ", SCB_GET_TAG(scb));
sys/dev/ic/aic79xx.c
8795
struct scb *fifo_scb;
sys/dev/ic/aic79xx.c
906
struct scb *scb;
sys/dev/ic/aic79xx.c
911
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
912
if (scb != NULL) {
sys/dev/ic/aic79xx.c
913
ahd_complete_scb(ahd, scb);
sys/dev/ic/aic79xx.c
926
struct scb *scb;
sys/dev/ic/aic79xx.c
932
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
933
if (scb == NULL) {
sys/dev/ic/aic79xx.c
941
ahd_outb(ahd, SAVED_SCSIID, scb->hscb->scsiid);
sys/dev/ic/aic79xx.c
942
ahd_outb(ahd, SAVED_LUN, scb->hscb->lun);
sys/dev/ic/aic79xx.c
9429
struct scb *scb;
sys/dev/ic/aic79xx.c
9440
LIST_FOREACH(scb, &ahd->pending_scbs, pending_links) {
sys/dev/ic/aic79xx.c
9443
ccbh = &scb->io_ctx->ccb_h;
sys/dev/ic/aic79xx.c
972
struct scb *scb;
sys/dev/ic/aic79xx.c
976
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
977
if (scb != NULL)
sys/dev/ic/aic79xx.c
978
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx.c
988
struct scb *scb;
sys/dev/ic/aic79xx.c
992
scb = ahd_lookup_scb(ahd, scbid);
sys/dev/ic/aic79xx.c
993
if (scb == NULL) {
sys/dev/ic/aic79xx.c
998
ahd_outq(ahd, HADDR, scb->sense_busaddr);
sys/dev/ic/aic79xx_inline.h
232
static __inline void *ahd_sg_setup(struct ahd_softc *, struct scb *,
sys/dev/ic/aic79xx_inline.h
234
static __inline void ahd_setup_scb_common(struct ahd_softc *, struct scb *);
sys/dev/ic/aic79xx_inline.h
235
static __inline void ahd_setup_data_scb(struct ahd_softc *, struct scb *);
sys/dev/ic/aic79xx_inline.h
236
static __inline void ahd_setup_noxfer_scb(struct ahd_softc *, struct scb *);
sys/dev/ic/aic79xx_inline.h
239
ahd_sg_setup(struct ahd_softc *ahd, struct scb *scb,
sys/dev/ic/aic79xx_inline.h
242
scb->sg_count++;
sys/dev/ic/aic79xx_inline.h
263
ahd_setup_scb_common(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx_inline.h
266
scb->crc_retry_count = 0;
sys/dev/ic/aic79xx_inline.h
267
if ((scb->flags & SCB_PACKETIZED) != 0) {
sys/dev/ic/aic79xx_inline.h
269
scb->hscb->task_attribute = scb->hscb->control & SCB_TAG_TYPE;
sys/dev/ic/aic79xx_inline.h
271
if (ahd_get_transfer_length(scb) & 0x01)
sys/dev/ic/aic79xx_inline.h
272
scb->hscb->task_attribute = SCB_XFERLEN_ODD;
sys/dev/ic/aic79xx_inline.h
274
scb->hscb->task_attribute = 0;
sys/dev/ic/aic79xx_inline.h
277
if (scb->hscb->cdb_len <= MAX_CDB_LEN_WITH_SENSE_ADDR
sys/dev/ic/aic79xx_inline.h
278
|| (scb->hscb->cdb_len & SCB_CDB_LEN_PTR) != 0)
sys/dev/ic/aic79xx_inline.h
279
scb->hscb->shared_data.idata.cdb_plus_saddr.sense_addr =
sys/dev/ic/aic79xx_inline.h
280
ahd_htole32(scb->sense_busaddr);
sys/dev/ic/aic79xx_inline.h
284
ahd_setup_data_scb(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx_inline.h
292
sg = (struct ahd_dma64_seg *)scb->sg_list;
sys/dev/ic/aic79xx_inline.h
293
scb->hscb->dataptr = sg->addr;
sys/dev/ic/aic79xx_inline.h
294
scb->hscb->datacnt = sg->len;
sys/dev/ic/aic79xx_inline.h
299
sg = (struct ahd_dma_seg *)scb->sg_list;
sys/dev/ic/aic79xx_inline.h
300
dataptr_words = (uint32_t*)&scb->hscb->dataptr;
sys/dev/ic/aic79xx_inline.h
307
scb->hscb->dataptr |= ahd_htole64(high_addr << 8);
sys/dev/ic/aic79xx_inline.h
309
scb->hscb->datacnt = sg->len;
sys/dev/ic/aic79xx_inline.h
317
scb->hscb->sgptr = ahd_htole32(scb->sg_list_busaddr|SG_FULL_RESID);
sys/dev/ic/aic79xx_inline.h
321
ahd_setup_noxfer_scb(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx_inline.h
323
scb->hscb->sgptr = ahd_htole32(SG_LIST_NULL);
sys/dev/ic/aic79xx_inline.h
324
scb->hscb->dataptr = 0;
sys/dev/ic/aic79xx_inline.h
325
scb->hscb->datacnt = 0;
sys/dev/ic/aic79xx_inline.h
331
ahd_sg_bus_to_virt(struct ahd_softc *, struct scb *,
sys/dev/ic/aic79xx_inline.h
334
ahd_sg_virt_to_bus(struct ahd_softc *, struct scb *,
sys/dev/ic/aic79xx_inline.h
336
static __inline void ahd_sync_scb(struct ahd_softc *, struct scb *, int);
sys/dev/ic/aic79xx_inline.h
337
static __inline void ahd_sync_sglist(struct ahd_softc *, struct scb *, int);
sys/dev/ic/aic79xx_inline.h
338
static __inline void ahd_sync_sense(struct ahd_softc *, struct scb *, int);
sys/dev/ic/aic79xx_inline.h
351
ahd_sg_bus_to_virt(struct ahd_softc *ahd, struct scb *scb, uint32_t sg_busaddr)
sys/dev/ic/aic79xx_inline.h
356
sg_offset = sg_busaddr - (scb->sg_list_busaddr - ahd_sg_size(ahd));
sys/dev/ic/aic79xx_inline.h
357
return ((uint8_t *)scb->sg_list + sg_offset);
sys/dev/ic/aic79xx_inline.h
361
ahd_sg_virt_to_bus(struct ahd_softc *ahd, struct scb *scb, void *sg)
sys/dev/ic/aic79xx_inline.h
366
sg_offset = ((uint8_t *)sg - (uint8_t *)scb->sg_list)
sys/dev/ic/aic79xx_inline.h
369
return (scb->sg_list_busaddr + sg_offset);
sys/dev/ic/aic79xx_inline.h
373
ahd_sync_scb(struct ahd_softc *ahd, struct scb *scb, int op)
sys/dev/ic/aic79xx_inline.h
375
ahd_dmamap_sync(ahd, ahd->parent_dmat, scb->hscb_map->dmamap,
sys/dev/ic/aic79xx_inline.h
376
/*offset*/(uint8_t*)scb->hscb - scb->hscb_map->vaddr,
sys/dev/ic/aic79xx_inline.h
377
/*len*/sizeof(*scb->hscb), op);
sys/dev/ic/aic79xx_inline.h
381
ahd_sync_sglist(struct ahd_softc *ahd, struct scb *scb, int op)
sys/dev/ic/aic79xx_inline.h
383
if (scb->sg_count == 0)
sys/dev/ic/aic79xx_inline.h
386
ahd_dmamap_sync(ahd, ahd->parent_dmat, scb->sg_map->dmamap,
sys/dev/ic/aic79xx_inline.h
387
/*offset*/scb->sg_list_busaddr - ahd_sg_size(ahd),
sys/dev/ic/aic79xx_inline.h
388
/*len*/ahd_sg_size(ahd) * scb->sg_count, op);
sys/dev/ic/aic79xx_inline.h
392
ahd_sync_sense(struct ahd_softc *ahd, struct scb *scb, int op)
sys/dev/ic/aic79xx_inline.h
395
scb->sense_map->dmamap,
sys/dev/ic/aic79xx_inline.h
396
/*offset*/scb->sense_busaddr - scb->sense_map->physaddr,
sys/dev/ic/aic79xx_inline.h
408
static __inline void ahd_complete_scb(struct ahd_softc *, struct scb *);
sys/dev/ic/aic79xx_inline.h
409
static __inline void ahd_update_residual(struct ahd_softc *, struct scb *);
sys/dev/ic/aic79xx_inline.h
441
struct scb *);
sys/dev/ic/aic79xx_inline.h
442
static __inline void ahd_queue_scb(struct ahd_softc *, struct scb *);
sys/dev/ic/aic79xx_inline.h
444
ahd_get_sense_buf(struct ahd_softc *, struct scb *);
sys/dev/ic/aic79xx_inline.h
446
ahd_get_sense_bufaddr(struct ahd_softc *, struct scb *);
sys/dev/ic/aic79xx_inline.h
447
static __inline void ahd_post_scb(struct ahd_softc *, struct scb *);
sys/dev/ic/aic79xx_inline.h
451
ahd_post_scb(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx_inline.h
455
sgptr = ahd_le32toh(scb->hscb->sgptr);
sys/dev/ic/aic79xx_inline.h
457
ahd_handle_scb_status(ahd, scb);
sys/dev/ic/aic79xx_inline.h
459
ahd_done(ahd, scb);
sys/dev/ic/aic79xx_inline.h
463
ahd_complete_scb(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx_inline.h
467
sgptr = ahd_le32toh(scb->hscb->sgptr);
sys/dev/ic/aic79xx_inline.h
469
ahd_handle_scb_status(ahd, scb);
sys/dev/ic/aic79xx_inline.h
471
ahd_done(ahd, scb);
sys/dev/ic/aic79xx_inline.h
479
ahd_update_residual(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx_inline.h
483
sgptr = ahd_le32toh(scb->hscb->sgptr);
sys/dev/ic/aic79xx_inline.h
485
ahd_calc_residual(ahd, scb);
sys/dev/ic/aic79xx_inline.h
705
static __inline struct scb *
sys/dev/ic/aic79xx_inline.h
708
struct scb* scb;
sys/dev/ic/aic79xx_inline.h
712
scb = ahd->scb_data.scbindex[tag];
sys/dev/ic/aic79xx_inline.h
713
if (scb != NULL)
sys/dev/ic/aic79xx_inline.h
714
ahd_sync_scb(ahd, scb,
sys/dev/ic/aic79xx_inline.h
716
return (scb);
sys/dev/ic/aic79xx_inline.h
720
ahd_swap_with_next_hscb(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx_inline.h
741
memcpy(q_hscb, scb->hscb, sizeof(*scb->hscb));
sys/dev/ic/aic79xx_inline.h
743
q_hscb->next_hscb_busaddr = scb->hscb->hscb_busaddr;
sys/dev/ic/aic79xx_inline.h
746
ahd->next_queued_hscb = scb->hscb;
sys/dev/ic/aic79xx_inline.h
747
ahd->next_queued_hscb_map = scb->hscb_map;
sys/dev/ic/aic79xx_inline.h
748
scb->hscb = q_hscb;
sys/dev/ic/aic79xx_inline.h
749
scb->hscb_map = q_hscb_map;
sys/dev/ic/aic79xx_inline.h
751
KASSERT((vaddr_t)scb->hscb >= (vaddr_t)scb->hscb_map->vaddr &&
sys/dev/ic/aic79xx_inline.h
752
(vaddr_t)scb->hscb < (vaddr_t)scb->hscb_map->vaddr + PAGE_SIZE);
sys/dev/ic/aic79xx_inline.h
755
ahd->scb_data.scbindex[SCB_GET_TAG(scb)] = scb;
sys/dev/ic/aic79xx_inline.h
762
ahd_queue_scb(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx_inline.h
764
ahd_swap_with_next_hscb(ahd, scb);
sys/dev/ic/aic79xx_inline.h
766
if (SCBID_IS_NULL(SCB_GET_TAG(scb)))
sys/dev/ic/aic79xx_inline.h
768
SCB_GET_TAG(scb));
sys/dev/ic/aic79xx_inline.h
773
ahd->qinfifo[AHD_QIN_WRAP(ahd->qinfifonext)] = SCB_GET_TAG(scb);
sys/dev/ic/aic79xx_inline.h
776
if (scb->sg_count != 0)
sys/dev/ic/aic79xx_inline.h
777
ahd_setup_data_scb(ahd, scb);
sys/dev/ic/aic79xx_inline.h
779
ahd_setup_noxfer_scb(ahd, scb);
sys/dev/ic/aic79xx_inline.h
780
ahd_setup_scb_common(ahd, scb);
sys/dev/ic/aic79xx_inline.h
786
ahd_sync_scb(ahd, scb, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
sys/dev/ic/aic79xx_inline.h
792
host_dataptr = ahd_le64toh(scb->hscb->dataptr);
sys/dev/ic/aic79xx_inline.h
795
SCB_GET_TAG(scb), ahd_le32toh(scb->hscb->hscb_busaddr),
sys/dev/ic/aic79xx_inline.h
798
ahd_le32toh(scb->hscb->datacnt));
sys/dev/ic/aic79xx_inline.h
806
ahd_get_sense_buf(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx_inline.h
808
return (scb->sense_data);
sys/dev/ic/aic79xx_inline.h
812
ahd_get_sense_bufaddr(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx_inline.h
814
return (scb->sense_busaddr);
sys/dev/ic/aic79xx_osm.c
199
ahd_done(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx_osm.c
205
LIST_REMOVE(scb, pending_links);
sys/dev/ic/aic79xx_osm.c
207
xs = scb->xs;
sys/dev/ic/aic79xx_osm.c
210
callout_stop(&scb->xs->xs_callout);
sys/dev/ic/aic79xx_osm.c
220
bus_dmamap_sync(ahd->parent_dmat, scb->dmamap, 0,
sys/dev/ic/aic79xx_osm.c
221
scb->dmamap->dm_mapsize, op);
sys/dev/ic/aic79xx_osm.c
222
bus_dmamap_unload(ahd->parent_dmat, scb->dmamap);
sys/dev/ic/aic79xx_osm.c
229
if ((scb->flags & SCB_RECOVERY_SCB) != 0) {
sys/dev/ic/aic79xx_osm.c
230
struct scb *list_scb;
sys/dev/ic/aic79xx_osm.c
249
if (ahd_get_transaction_status(scb) != XS_NOERROR)
sys/dev/ic/aic79xx_osm.c
250
ahd_set_transaction_status(scb, XS_TIMEOUT);
sys/dev/ic/aic79xx_osm.c
260
ahd_set_transaction_status(scb, XS_BUSY);
sys/dev/ic/aic79xx_osm.c
262
ahd_name(ahd), SCB_GET_TARGET(ahd,scb), SCB_GET_LUN(scb), SCB_GET_TAG(scb));
sys/dev/ic/aic79xx_osm.c
263
} else if ((scb->flags & SCB_SENSE) != 0) {
sys/dev/ic/aic79xx_osm.c
276
memcpy(&xs->sense.scsi_sense, ahd_get_sense_buf(ahd, scb),
sys/dev/ic/aic79xx_osm.c
279
ahd_set_transaction_status(scb, XS_SENSE);
sys/dev/ic/aic79xx_osm.c
280
} else if ((scb->flags & SCB_PKT_SENSE) != 0) {
sys/dev/ic/aic79xx_osm.c
289
siu = (struct scsi_status_iu_header *)scb->sense_data;
sys/dev/ic/aic79xx_osm.c
294
scb->sense_data + SIU_SENSE_OFFSET(siu), sense_len);
sys/dev/ic/aic79xx_osm.c
302
ahd_set_transaction_status(scb, XS_SENSE);
sys/dev/ic/aic79xx_osm.c
305
if (scb->flags & SCB_FREEZE_QUEUE) {
sys/dev/ic/aic79xx_osm.c
307
scb->flags &= ~SCB_FREEZE_QUEUE;
sys/dev/ic/aic79xx_osm.c
310
if (scb->flags & SCB_REQUEUE)
sys/dev/ic/aic79xx_osm.c
311
ahd_set_transaction_status(scb, XS_REQUEUE);
sys/dev/ic/aic79xx_osm.c
314
ahd_free_scb(ahd, scb);
sys/dev/ic/aic79xx_osm.c
335
struct scb *scb;
sys/dev/ic/aic79xx_osm.c
366
if ((scb = ahd_get_scb(ahd, col_idx)) == NULL) {
sys/dev/ic/aic79xx_osm.c
374
hscb = scb->hscb;
sys/dev/ic/aic79xx_osm.c
376
SC_DEBUG(periph, SCSIPI_DB3, ("start scb(%p)\n", scb));
sys/dev/ic/aic79xx_osm.c
377
scb->xs = xs;
sys/dev/ic/aic79xx_osm.c
387
scb->flags |= SCB_DEVICE_RESET;
sys/dev/ic/aic79xx_osm.c
390
ahd_execute_scb(scb, NULL, 0);
sys/dev/ic/aic79xx_osm.c
395
ahd_setup_data(ahd, xs, scb);
sys/dev/ic/aic79xx_osm.c
530
struct scb *scb;
sys/dev/ic/aic79xx_osm.c
538
scb = arg;
sys/dev/ic/aic79xx_osm.c
539
xs = scb->xs;
sys/dev/ic/aic79xx_osm.c
546
scb->sg_count = 0;
sys/dev/ic/aic79xx_osm.c
552
ahd_setup_data_scb(ahd, scb);
sys/dev/ic/aic79xx_osm.c
555
for (i = nsegments, sg = scb->sg_list; i > 0; i--) {
sys/dev/ic/aic79xx_osm.c
557
sg = ahd_sg_setup(ahd, scb, sg, dm_segs->ds_addr,
sys/dev/ic/aic79xx_osm.c
568
bus_dmamap_sync(ahd->parent_dmat, scb->dmamap, 0,
sys/dev/ic/aic79xx_osm.c
569
scb->dmamap->dm_mapsize, op);
sys/dev/ic/aic79xx_osm.c
578
if (ahd_get_scsi_status(scb) == XS_STS_DONE) {
sys/dev/ic/aic79xx_osm.c
581
scb->dmamap);
sys/dev/ic/aic79xx_osm.c
582
ahd_free_scb(ahd, scb);
sys/dev/ic/aic79xx_osm.c
587
tinfo = ahd_fetch_transinfo(ahd, SCSIID_CHANNEL(ahd, scb->hscb->scsiid),
sys/dev/ic/aic79xx_osm.c
588
SCSIID_OUR_ID(scb->hscb->scsiid),
sys/dev/ic/aic79xx_osm.c
589
SCSIID_TARGET(ahd, scb->hscb->scsiid),
sys/dev/ic/aic79xx_osm.c
592
mask = SCB_GET_TARGET_MASK(ahd, scb);
sys/dev/ic/aic79xx_osm.c
595
scb->hscb->control |= DISCENB;
sys/dev/ic/aic79xx_osm.c
598
scb->hscb->control |= xs->xs_tag_type|TAG_ENB;
sys/dev/ic/aic79xx_osm.c
601
scb->flags |= SCB_PACKETIZED;
sys/dev/ic/aic79xx_osm.c
602
if (scb->hscb->task_management != 0)
sys/dev/ic/aic79xx_osm.c
603
scb->hscb->control &= ~MK_MESSAGE;
sys/dev/ic/aic79xx_osm.c
61
struct scb *scb);
sys/dev/ic/aic79xx_osm.c
611
scb->flags |= SCB_NEGOTIATE;
sys/dev/ic/aic79xx_osm.c
612
scb->hscb->control |= MK_MESSAGE;
sys/dev/ic/aic79xx_osm.c
616
scb->flags |= SCB_AUTO_NEGOTIATE;
sys/dev/ic/aic79xx_osm.c
617
scb->hscb->control |= MK_MESSAGE;
sys/dev/ic/aic79xx_osm.c
620
LIST_INSERT_HEAD(&ahd->pending_scbs, scb, pending_links);
sys/dev/ic/aic79xx_osm.c
622
scb->flags |= SCB_ACTIVE;
sys/dev/ic/aic79xx_osm.c
625
callout_reset(&scb->xs->xs_callout, xs->timeout > 1000000 ?
sys/dev/ic/aic79xx_osm.c
627
ahd_timeout, scb);
sys/dev/ic/aic79xx_osm.c
630
if ((scb->flags & SCB_TARGET_IMMEDIATE) != 0) {
sys/dev/ic/aic79xx_osm.c
632
ahd->scb_data.scbindex[SCB_GET_TAG(scb)] = scb;
sys/dev/ic/aic79xx_osm.c
634
ahd_set_scbptr(ahd, SCB_GET_TAG(scb));
sys/dev/ic/aic79xx_osm.c
638
ahd_queue_scb(ahd, scb);
sys/dev/ic/aic79xx_osm.c
64
static void ahd_set_recoveryscb(struct ahd_softc *ahd, struct scb *scb);
sys/dev/ic/aic79xx_osm.c
653
ahd_timeout(scb);
sys/dev/ic/aic79xx_osm.c
683
struct scb *scb)
sys/dev/ic/aic79xx_osm.c
687
hscb = scb->hscb;
sys/dev/ic/aic79xx_osm.c
698
ahd_set_transaction_status(scb,
sys/dev/ic/aic79xx_osm.c
702
ahd_free_scb(ahd, scb);
sys/dev/ic/aic79xx_osm.c
713
scb->dmamap, xs->data,
sys/dev/ic/aic79xx_osm.c
730
ahd_execute_scb(scb,
sys/dev/ic/aic79xx_osm.c
731
scb->dmamap->dm_segs,
sys/dev/ic/aic79xx_osm.c
732
scb->dmamap->dm_nsegs);
sys/dev/ic/aic79xx_osm.c
734
ahd_execute_scb(scb, NULL, 0);
sys/dev/ic/aic79xx_osm.c
741
struct scb *scb;
sys/dev/ic/aic79xx_osm.c
745
scb = arg;
sys/dev/ic/aic79xx_osm.c
746
ahd = scb->ahd_softc;
sys/dev/ic/aic79xx_osm.c
762
if ((scb->flags & SCB_ACTIVE) == 0) {
sys/dev/ic/aic79xx_osm.c
771
ahd_print_path(ahd, scb);
sys/dev/ic/aic79xx_osm.c
772
printf("SCB 0x%x - timed out\n", SCB_GET_TAG(scb));
sys/dev/ic/aic79xx_osm.h
200
ahd_scb_timer_reset(struct scb *scb, u_int usec)
sys/dev/ic/aic79xx_osm.h
202
if (!(scb->xs->xs_control & XS_CTL_POLL)) {
sys/dev/ic/aic79xx_osm.h
203
callout_reset(&scb->xs->xs_callout,
sys/dev/ic/aic79xx_osm.h
204
(usec * hz)/1000000, ahd_timeout, scb);
sys/dev/ic/aic79xx_osm.h
313
static __inline void ahd_set_transaction_status(struct scb *, uint32_t);
sys/dev/ic/aic79xx_osm.h
314
static __inline void ahd_set_scsi_status(struct scb *, uint32_t);
sys/dev/ic/aic79xx_osm.h
315
static __inline void ahd_set_xfer_status(struct scb *, uint32_t);
sys/dev/ic/aic79xx_osm.h
316
static __inline uint32_t ahd_get_transaction_status(struct scb *);
sys/dev/ic/aic79xx_osm.h
317
static __inline uint32_t ahd_get_scsi_status(struct scb *);
sys/dev/ic/aic79xx_osm.h
318
static __inline void ahd_set_transaction_tag(struct scb *, int, u_int);
sys/dev/ic/aic79xx_osm.h
319
static __inline u_long ahd_get_transfer_length(struct scb *);
sys/dev/ic/aic79xx_osm.h
320
static __inline int ahd_get_transfer_dir(struct scb *);
sys/dev/ic/aic79xx_osm.h
321
static __inline void ahd_set_residual(struct scb *, u_long);
sys/dev/ic/aic79xx_osm.h
322
static __inline void ahd_set_sense_residual(struct scb *, u_long);
sys/dev/ic/aic79xx_osm.h
323
static __inline u_long ahd_get_residual(struct scb *);
sys/dev/ic/aic79xx_osm.h
324
static __inline int ahd_perform_autosense(struct scb *);
sys/dev/ic/aic79xx_osm.h
325
static __inline uint32_t ahd_get_sense_bufsize(struct ahd_softc*, struct scb*);
sys/dev/ic/aic79xx_osm.h
328
static __inline void ahd_freeze_scb(struct scb *);
sys/dev/ic/aic79xx_osm.h
329
static __inline void ahd_platform_freeze_devq(struct ahd_softc *, struct scb *);
sys/dev/ic/aic79xx_osm.h
334
void ahd_set_transaction_status(struct scb *scb, uint32_t status)
sys/dev/ic/aic79xx_osm.h
336
scb->xs->error = status;
sys/dev/ic/aic79xx_osm.h
340
void ahd_set_scsi_status(struct scb *scb, uint32_t status)
sys/dev/ic/aic79xx_osm.h
342
scb->xs->xs_status = status;
sys/dev/ic/aic79xx_osm.h
346
void ahd_set_xfer_status(struct scb *scb, uint32_t status)
sys/dev/ic/aic79xx_osm.h
348
scb->xs->status = status;
sys/dev/ic/aic79xx_osm.h
352
uint32_t ahd_get_transaction_status(struct scb *scb)
sys/dev/ic/aic79xx_osm.h
354
return (scb->xs->error);
sys/dev/ic/aic79xx_osm.h
358
uint32_t ahd_get_scsi_status(struct scb *scb)
sys/dev/ic/aic79xx_osm.h
360
return (scb->xs->xs_status);
sys/dev/ic/aic79xx_osm.h
364
void ahd_set_transaction_tag(struct scb *scb, int enabled, u_int type)
sys/dev/ic/aic79xx_osm.h
366
scb->xs->xs_tag_type = type;
sys/dev/ic/aic79xx_osm.h
370
u_long ahd_get_transfer_length(struct scb *scb)
sys/dev/ic/aic79xx_osm.h
372
return (scb->xs->datalen);
sys/dev/ic/aic79xx_osm.h
376
int ahd_get_transfer_dir(struct scb *scb)
sys/dev/ic/aic79xx_osm.h
378
return (scb->xs->xs_control & (XS_CTL_DATA_IN|XS_CTL_DATA_OUT));
sys/dev/ic/aic79xx_osm.h
382
void ahd_set_residual(struct scb *scb, u_long resid)
sys/dev/ic/aic79xx_osm.h
384
scb->xs->resid = resid;
sys/dev/ic/aic79xx_osm.h
389
void ahd_set_sense_residual(struct scb *scb, u_long resid)
sys/dev/ic/aic79xx_osm.h
396
u_long ahd_get_residual(struct scb *scb)
sys/dev/ic/aic79xx_osm.h
398
return (scb->xs->resid);
sys/dev/ic/aic79xx_osm.h
402
int ahd_perform_autosense(struct scb *scb)
sys/dev/ic/aic79xx_osm.h
404
return (!(scb->flags & SCB_SENSE));
sys/dev/ic/aic79xx_osm.h
408
ahd_get_sense_bufsize(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx_osm.h
426
ahd_freeze_scb(struct scb *scb)
sys/dev/ic/aic79xx_osm.h
428
struct scsipi_xfer *xs = scb->xs;
sys/dev/ic/aic79xx_osm.h
430
if (!(scb->flags & SCB_FREEZE_QUEUE)) {
sys/dev/ic/aic79xx_osm.h
432
scb->flags |= SCB_FREEZE_QUEUE;
sys/dev/ic/aic79xx_osm.h
437
ahd_platform_freeze_devq(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx_osm.h
452
ahd_platform_scb_free(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx_osm.h
457
&& scb->io_ctx != NULL
sys/dev/ic/aic79xx_osm.h
458
&& (scb->io_ctx->ccb_h.status & CAM_RELEASE_SIMQ) == 0) {
sys/dev/ic/aic79xx_osm.h
459
scb->io_ctx->ccb_h.status |= CAM_RELEASE_SIMQ;
sys/dev/ic/aic79xx_osm.h
462
scb->io_ctx = NULL;
sys/dev/ic/aic79xx_osm.h
525
static __inline void ahd_print_path(struct ahd_softc *, struct scb *);
sys/dev/ic/aic79xx_osm.h
528
ahd_print_path(struct ahd_softc *ahd, struct scb *scb)
sys/dev/ic/aic79xx_osm.h
564
void ahd_done(struct ahd_softc *, struct scb *);
sys/dev/ic/aic79xx_osm.h
90
#define SCB_GET_SIM(ahd, scb) \
sys/dev/ic/aic79xxvar.h
100
((scb)->hscb->lun)
sys/dev/ic/aic79xxvar.h
101
#define SCB_GET_TARGET_OFFSET(ahd, scb) \
sys/dev/ic/aic79xxvar.h
102
SCB_GET_TARGET(ahd, scb)
sys/dev/ic/aic79xxvar.h
103
#define SCB_GET_TARGET_MASK(ahd, scb) \
sys/dev/ic/aic79xxvar.h
104
(0x01 << (SCB_GET_TARGET_OFFSET(ahd, scb)))
sys/dev/ic/aic79xxvar.h
106
#define SCB_IS_SILENT(scb) \
sys/dev/ic/aic79xxvar.h
108
&& (((scb)->flags & SCB_SILENT) != 0))
sys/dev/ic/aic79xxvar.h
1084
LIST_HEAD(, scb) pending_scbs;
sys/dev/ic/aic79xxvar.h
110
#define SCB_IS_SILENT(scb) \
sys/dev/ic/aic79xxvar.h
111
(((scb)->flags & SCB_SILENT) != 0)
sys/dev/ic/aic79xxvar.h
125
#define SCB_GET_TAG(scb) \
sys/dev/ic/aic79xxvar.h
126
ahd_le16toh(scb->hscb->tag)
sys/dev/ic/aic79xxvar.h
136
#define AHD_GET_SCB_COL_IDX(ahd, scb) \
sys/dev/ic/aic79xxvar.h
1360
struct scb *);
sys/dev/ic/aic79xxvar.h
1361
int ahd_match_scb(struct ahd_softc *, struct scb *,
sys/dev/ic/aic79xxvar.h
137
((SCB_GET_LUN(scb) << 4) | SCB_GET_TARGET(ahd, scb))
sys/dev/ic/aic79xxvar.h
1383
struct scb *ahd_get_scb(struct ahd_softc *, u_int);
sys/dev/ic/aic79xxvar.h
1384
void ahd_free_scb(struct ahd_softc *, struct scb *);
sys/dev/ic/aic79xxvar.h
139
#define AHD_SET_SCB_COL_IDX(scb, col_idx) \
sys/dev/ic/aic79xxvar.h
141
(scb)->hscb->scsiid = ((col_idx) << TID_SHIFT) & TID; \
sys/dev/ic/aic79xxvar.h
1419
void ahd_freeze_devq(struct ahd_softc *, struct scb *);
sys/dev/ic/aic79xxvar.h
142
(scb)->hscb->lun = ((col_idx) >> 4) & (AHD_NUM_LUNS_NONPKT-1); \
sys/dev/ic/aic79xxvar.h
1425
void ahd_handle_scb_status(struct ahd_softc *, struct scb *);
sys/dev/ic/aic79xxvar.h
1427
struct scb *);
sys/dev/ic/aic79xxvar.h
1428
void ahd_calc_residual(struct ahd_softc *, struct scb *);
sys/dev/ic/aic79xxvar.h
1503
void ahd_print_scb(struct scb *);
sys/dev/ic/aic79xxvar.h
1506
void ahd_dump_sglist(struct scb *);
sys/dev/ic/aic79xxvar.h
622
SLIST_ENTRY(scb) sle;
sys/dev/ic/aic79xxvar.h
623
LIST_ENTRY(scb) le;
sys/dev/ic/aic79xxvar.h
624
TAILQ_ENTRY(scb) tqe;
sys/dev/ic/aic79xxvar.h
627
SLIST_ENTRY(scb) sle;
sys/dev/ic/aic79xxvar.h
628
LIST_ENTRY(scb) le;
sys/dev/ic/aic79xxvar.h
629
TAILQ_ENTRY(scb) tqe;
sys/dev/ic/aic79xxvar.h
633
struct scb *col_scb;
sys/dev/ic/aic79xxvar.h
652
TAILQ_HEAD(scb_tailq, scb);
sys/dev/ic/aic79xxvar.h
653
LIST_HEAD(scb_list, scb);
sys/dev/ic/aic79xxvar.h
676
struct scb *scbindex[AHD_SCB_MAX];
sys/dev/ic/aic79xxvar.h
92
#define SCB_IS_SCSIBUS_B(ahd, scb) (0)
sys/dev/ic/aic79xxvar.h
93
#define SCB_GET_OUR_ID(scb) \
sys/dev/ic/aic79xxvar.h
94
SCSIID_OUR_ID((scb)->hscb->scsiid)
sys/dev/ic/aic79xxvar.h
95
#define SCB_GET_TARGET(ahd, scb) \
sys/dev/ic/aic79xxvar.h
96
SCSIID_TARGET((ahd), (scb)->hscb->scsiid)
sys/dev/ic/aic79xxvar.h
97
#define SCB_GET_CHANNEL(ahd, scb) \
sys/dev/ic/aic79xxvar.h
98
SCSIID_CHANNEL(ahd, (scb)->hscb->scsiid)
sys/dev/ic/aic79xxvar.h
99
#define SCB_GET_LUN(scb) \
sys/dev/ic/aic7xxx.c
1011
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/ic/aic7xxx.c
1012
if (scb != NULL
sys/dev/ic/aic7xxx.c
1014
scb = NULL;
sys/dev/ic/aic7xxx.c
1089
if (scb != NULL) {
sys/dev/ic/aic7xxx.c
1090
if (SCB_IS_SILENT(scb))
sys/dev/ic/aic7xxx.c
1093
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
1094
scb->flags |= SCB_TRANSMISSION_ERROR;
sys/dev/ic/aic7xxx.c
1179
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/ic/aic7xxx.c
1180
if (scb == NULL) {
sys/dev/ic/aic7xxx.c
1188
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
1203
ahc_set_transaction_status(scb, CAM_SEL_TIMEOUT);
sys/dev/ic/aic7xxx.c
1204
ahc_freeze_devq(ahc, scb);
sys/dev/ic/aic7xxx.c
1260
tag = scb->hscb->tag;
sys/dev/ic/aic7xxx.c
1261
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
1263
scb->hscb->tag, tag == SCB_LIST_NULL ?
sys/dev/ic/aic7xxx.c
1278
if (scb != NULL
sys/dev/ic/aic7xxx.c
1279
&& scb->io_ctx->ccb_h.func_code== XPT_RESET_DEV
sys/dev/ic/aic7xxx.c
1280
&& ahc_match_scb(ahc, scb, target, channel,
sys/dev/ic/aic7xxx.c
1284
ahc_set_transaction_status(scb,
sys/dev/ic/aic7xxx.c
1316
ahc_qinfifo_requeue_tail(ahc, scb);
sys/dev/ic/aic7xxx.c
1336
ahc_qinfifo_requeue_tail(ahc, scb);
sys/dev/ic/aic7xxx.c
1343
if (scb != NULL) {
sys/dev/ic/aic7xxx.c
1346
if ((scb->hscb->control & TAG_ENB) != 0)
sys/dev/ic/aic7xxx.c
1347
tag = scb->hscb->tag;
sys/dev/ic/aic7xxx.c
1350
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
1352
SCB_GET_LUN(scb), tag,
sys/dev/ic/aic7xxx.c
1523
ahc_print_scb(struct scb *scb)
sys/dev/ic/aic7xxx.c
1527
struct hardware_scb *hscb = scb->hscb;
sys/dev/ic/aic7xxx.c
1530
(void *)scb,
sys/dev/ic/aic7xxx.c
1543
if (scb->sg_count > 0) {
sys/dev/ic/aic7xxx.c
1544
for (i = 0; i < scb->sg_count; i++) {
sys/dev/ic/aic7xxx.c
1547
(ahc_le32toh(scb->sg_list[i].len) >> 24
sys/dev/ic/aic7xxx.c
1549
ahc_le32toh(scb->sg_list[i].addr),
sys/dev/ic/aic7xxx.c
1550
ahc_le32toh(scb->sg_list[i].len));
sys/dev/ic/aic7xxx.c
169
struct scb *scb);
sys/dev/ic/aic7xxx.c
173
struct scb *scb);
sys/dev/ic/aic7xxx.c
2089
struct scb *pending_scb;
sys/dev/ic/aic7xxx.c
211
struct scb *scb);
sys/dev/ic/aic7xxx.c
221
struct scb *prev_scb,
sys/dev/ic/aic7xxx.c
222
struct scb *scb);
sys/dev/ic/aic7xxx.c
2238
struct scb *scb)
sys/dev/ic/aic7xxx.c
2243
our_id = SCSIID_OUR_ID(scb->hscb->scsiid);
sys/dev/ic/aic7xxx.c
2245
if ((scb->flags & SCB_TARGET_SCB) != 0)
sys/dev/ic/aic7xxx.c
2247
ahc_compile_devinfo(devinfo, our_id, SCB_GET_TARGET(ahc, scb),
sys/dev/ic/aic7xxx.c
2248
SCB_GET_LUN(scb), SCB_GET_CHANNEL(ahc, scb), role);
sys/dev/ic/aic7xxx.c
2272
struct scb *scb)
sys/dev/ic/aic7xxx.c
2282
if ((scb->flags & SCB_DEVICE_RESET) == 0
sys/dev/ic/aic7xxx.c
2286
identify_msg = MSG_IDENTIFYFLAG | SCB_GET_LUN(scb);
sys/dev/ic/aic7xxx.c
2287
if ((scb->hscb->control & DISCENB) != 0)
sys/dev/ic/aic7xxx.c
2292
if ((scb->hscb->control & TAG_ENB) != 0) {
sys/dev/ic/aic7xxx.c
2294
scb->hscb->control & (TAG_ENB|SCB_TAG_TYPE);
sys/dev/ic/aic7xxx.c
2295
ahc->msgout_buf[ahc->msgout_index++] = scb->hscb->tag;
sys/dev/ic/aic7xxx.c
2300
if (scb->flags & SCB_DEVICE_RESET) {
sys/dev/ic/aic7xxx.c
2303
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
2313
} else if ((scb->flags & SCB_ABORT) != 0) {
sys/dev/ic/aic7xxx.c
2314
if ((scb->hscb->control & TAG_ENB) != 0)
sys/dev/ic/aic7xxx.c
2319
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
2321
(scb->hscb->control & TAG_ENB) != 0 ? " Tag" : "");
sys/dev/ic/aic7xxx.c
2330
} else if ((scb->flags & (SCB_AUTO_NEGOTIATE|SCB_NEGOTIATE)) != 0) {
sys/dev/ic/aic7xxx.c
2335
printf("SCSIID = %x, target_mask = %x\n", scb->hscb->scsiid,
sys/dev/ic/aic7xxx.c
2338
"SCB flags = %x", scb->hscb->tag, scb->hscb->control,
sys/dev/ic/aic7xxx.c
2339
ahc_inb(ahc, MSG_OUT), scb->flags);
sys/dev/ic/aic7xxx.c
2347
scb->hscb->control &= ~MK_MESSAGE;
sys/dev/ic/aic7xxx.c
2545
struct scb *scb;
sys/dev/ic/aic7xxx.c
2554
scb = ahc_lookup_scb(ahc, scbid);
sys/dev/ic/aic7xxx.c
2568
scb = NULL;
sys/dev/ic/aic7xxx.c
2569
} else if (scb == NULL) {
sys/dev/ic/aic7xxx.c
2578
ahc_set_transaction_status(scb, CAM_SEQUENCE_FAIL);
sys/dev/ic/aic7xxx.c
2580
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
2590
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
2593
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
2620
if (scb == NULL) {
sys/dev/ic/aic7xxx.c
2627
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
2628
scb->flags |= SCB_ABORT;
sys/dev/ic/aic7xxx.c
327
struct scb *scb;
sys/dev/ic/aic7xxx.c
3411
struct scb *scb;
sys/dev/ic/aic7xxx.c
3419
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/ic/aic7xxx.c
3482
} else if ((scb->hscb->control & MSG_SIMPLE_TASK) != 0) {
sys/dev/ic/aic7xxx.c
3486
tag_type = (scb->hscb->control & MSG_SIMPLE_TASK);
sys/dev/ic/aic7xxx.c
3515
scb->hscb->control &= mask;
sys/dev/ic/aic7xxx.c
3516
ahc_set_transaction_tag(scb, /*enabled*/FALSE,
sys/dev/ic/aic7xxx.c
3530
TAILQ_INSERT_HEAD(untagged_q, scb, links.tqe);
sys/dev/ic/aic7xxx.c
3531
scb->flags |= SCB_UNTAGGEDQ;
sys/dev/ic/aic7xxx.c
3533
ahc_busy_tcl(ahc, BUILD_TCL(scb->hscb->scsiid, devinfo->lun),
sys/dev/ic/aic7xxx.c
3534
scb->hscb->tag);
sys/dev/ic/aic7xxx.c
354
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/ic/aic7xxx.c
3541
ahc_search_qinfifo(ahc, SCB_GET_TARGET(ahc, scb),
sys/dev/ic/aic7xxx.c
3542
SCB_GET_CHANNEL(ahc, scb),
sys/dev/ic/aic7xxx.c
3543
SCB_GET_LUN(scb), /*tag*/SCB_LIST_NULL,
sys/dev/ic/aic7xxx.c
355
if (scb == NULL) {
sys/dev/ic/aic7xxx.c
3566
struct scb *scb;
sys/dev/ic/aic7xxx.c
3569
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/ic/aic7xxx.c
3575
|| ahc_get_transfer_dir(scb) != CAM_DIR_IN) {
sys/dev/ic/aic7xxx.c
3623
sg = ahc_sg_bus_to_virt(scb, sgptr);
sys/dev/ic/aic7xxx.c
3630
if (sg != scb->sg_list
sys/dev/ic/aic7xxx.c
3648
sgptr = ahc_sg_virt_to_bus(scb, sg);
sys/dev/ic/aic7xxx.c
367
ahc_update_residual(ahc, scb);
sys/dev/ic/aic7xxx.c
3674
struct scb *scb;
sys/dev/ic/aic7xxx.c
368
ahc_done(ahc, scb);
sys/dev/ic/aic7xxx.c
3682
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/ic/aic7xxx.c
3689
sg = ahc_sg_bus_to_virt(scb, sgptr);
sys/dev/ic/aic7xxx.c
3783
struct scb *scb)
sys/dev/ic/aic7xxx.c
3794
if (scb != NULL && (scb->flags & SCB_AUTO_NEGOTIATE) != 0)
sys/dev/ic/aic7xxx.c
384
struct scb *scb;
sys/dev/ic/aic7xxx.c
389
if ((scb = TAILQ_FIRST(queue)) != NULL
sys/dev/ic/aic7xxx.c
390
&& (scb->flags & SCB_ACTIVE) == 0) {
sys/dev/ic/aic7xxx.c
391
scb->flags |= SCB_ACTIVE;
sys/dev/ic/aic7xxx.c
392
ahc_queue_scb(ahc, scb);
sys/dev/ic/aic7xxx.c
4178
scb_data->scbarray = malloc(sizeof(struct scb) * AHC_SCB_MAX_ALLOC,
sys/dev/ic/aic7xxx.c
429
struct scb *scb;
sys/dev/ic/aic7xxx.c
4305
struct scb *next_scb;
sys/dev/ic/aic7xxx.c
4576
(u_long)sizeof(struct scb),
sys/dev/ic/aic7xxx.c
464
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/ic/aic7xxx.c
465
if (scb == NULL) {
sys/dev/ic/aic7xxx.c
475
hscb = scb->hscb;
sys/dev/ic/aic7xxx.c
478
if ((scb->flags & SCB_SENSE) != 0) {
sys/dev/ic/aic7xxx.c
484
scb->flags &= ~SCB_SENSE;
sys/dev/ic/aic7xxx.c
488
ahc_freeze_devq(ahc, scb);
sys/dev/ic/aic7xxx.c
489
ahc_freeze_scb(scb);
sys/dev/ic/aic7xxx.c
490
ahc_set_scsi_status(scb, hscb->shared_data.status.scsi_status);
sys/dev/ic/aic7xxx.c
507
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
509
scb->hscb->tag);
sys/dev/ic/aic7xxx.c
513
if (ahc_perform_autosense(scb) == 0)
sys/dev/ic/aic7xxx.c
5179
ahc_match_scb(struct ahc_softc *ahc, struct scb *scb, int target,
sys/dev/ic/aic7xxx.c
5182
int targ = SCB_GET_TARGET(ahc, scb);
sys/dev/ic/aic7xxx.c
5183
char chan = SCB_GET_CHANNEL(ahc, scb);
sys/dev/ic/aic7xxx.c
5184
int slun = SCB_GET_LUN(scb);
sys/dev/ic/aic7xxx.c
5197
group = XPT_FC_GROUP(scb->io_ctx->ccb_h.func_code);
sys/dev/ic/aic7xxx.c
5200
&& ((tag == scb->hscb->tag)
sys/dev/ic/aic7xxx.c
5204
&& ((tag == scb->io_ctx->csio.tag_id)
sys/dev/ic/aic7xxx.c
5208
match = ((tag == scb->hscb->tag) || (tag == SCB_LIST_NULL));
sys/dev/ic/aic7xxx.c
5217
ahc_freeze_devq(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx.c
522
sg = scb->sg_list;
sys/dev/ic/aic7xxx.c
5223
target = SCB_GET_TARGET(ahc, scb);
sys/dev/ic/aic7xxx.c
5224
lun = SCB_GET_LUN(scb);
sys/dev/ic/aic7xxx.c
5225
channel = SCB_GET_CHANNEL(ahc, scb);
sys/dev/ic/aic7xxx.c
5231
ahc_platform_freeze_devq(ahc, scb);
sys/dev/ic/aic7xxx.c
5235
ahc_qinfifo_requeue_tail(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx.c
5237
struct scb *prev_scb;
sys/dev/ic/aic7xxx.c
5248
ahc_qinfifo_requeue(ahc, prev_scb, scb);
sys/dev/ic/aic7xxx.c
5257
ahc_qinfifo_requeue(struct ahc_softc *ahc, struct scb *prev_scb,
sys/dev/ic/aic7xxx.c
5258
struct scb *scb)
sys/dev/ic/aic7xxx.c
5261
ahc_outb(ahc, NEXT_QUEUED_SCB, scb->hscb->tag);
sys/dev/ic/aic7xxx.c
5263
prev_scb->hscb->next = scb->hscb->tag;
sys/dev/ic/aic7xxx.c
5267
ahc->qinfifo[ahc->qinfifonext++] = scb->hscb->tag;
sys/dev/ic/aic7xxx.c
5268
scb->hscb->next = ahc->next_queued_scb->hscb->tag;
sys/dev/ic/aic7xxx.c
5269
ahc_sync_scb(ahc, scb, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
sys/dev/ic/aic7xxx.c
528
ahc_update_residual(ahc, scb);
sys/dev/ic/aic7xxx.c
5292
struct scb *scb;
sys/dev/ic/aic7xxx.c
5293
struct scb *prev_scb;
sys/dev/ic/aic7xxx.c
531
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
5330
scb = ahc_lookup_scb(ahc, ahc->qinfifo[qinpos]);
sys/dev/ic/aic7xxx.c
5331
if (scb == NULL) {
sys/dev/ic/aic7xxx.c
5337
if (ahc_match_scb(ahc, scb, target, channel, lun, tag, role)) {
sys/dev/ic/aic7xxx.c
5348
ostat = ahc_get_transaction_status(scb);
sys/dev/ic/aic7xxx.c
535
sg->addr = ahc_htole32(ahc_get_sense_bufaddr(ahc, scb));
sys/dev/ic/aic7xxx.c
5350
ahc_set_transaction_status(scb, status);
sys/dev/ic/aic7xxx.c
5351
cstat = ahc_get_transaction_status(scb);
sys/dev/ic/aic7xxx.c
5353
ahc_freeze_scb(scb);
sys/dev/ic/aic7xxx.c
5354
if ((scb->flags & SCB_ACTIVE) == 0)
sys/dev/ic/aic7xxx.c
5356
ahc_done(ahc, scb);
sys/dev/ic/aic7xxx.c
536
len = ahc_get_sense_bufsize(ahc, scb);
sys/dev/ic/aic7xxx.c
5363
ahc_qinfifo_requeue(ahc, prev_scb, scb);
sys/dev/ic/aic7xxx.c
5364
prev_scb = scb;
sys/dev/ic/aic7xxx.c
5368
ahc_qinfifo_requeue(ahc, prev_scb, scb);
sys/dev/ic/aic7xxx.c
5369
prev_scb = scb;
sys/dev/ic/aic7xxx.c
5395
scb = ahc_lookup_scb(ahc, ahc->qinfifo[qinstart]);
sys/dev/ic/aic7xxx.c
5397
if (scb == NULL) {
sys/dev/ic/aic7xxx.c
5408
next = scb->hscb->next;
sys/dev/ic/aic7xxx.c
5409
ahc->scb_data->scbindex[scb->hscb->tag] = NULL;
sys/dev/ic/aic7xxx.c
5410
ahc_swap_with_next_hscb(ahc, scb);
sys/dev/ic/aic7xxx.c
5411
scb->hscb->next = next;
sys/dev/ic/aic7xxx.c
5412
ahc->qinfifo[qinstart] = scb->hscb->tag;
sys/dev/ic/aic7xxx.c
5415
ahc_outb(ahc, NEXT_QUEUED_SCB, scb->hscb->tag);
sys/dev/ic/aic7xxx.c
5419
scb = ahc_lookup_scb(ahc, ahc->qinfifo[qintail]);
sys/dev/ic/aic7xxx.c
542
&& SCB_GET_LUN(scb) < 8)
sys/dev/ic/aic7xxx.c
5420
scb->hscb->next = ahc->next_queued_scb->hscb->tag;
sys/dev/ic/aic7xxx.c
543
sc->byte2 = SCB_GET_LUN(scb) << 5;
sys/dev/ic/aic7xxx.c
5442
scb = ahc_lookup_scb(ahc, scb_index);
sys/dev/ic/aic7xxx.c
5443
if (scb == NULL) {
sys/dev/ic/aic7xxx.c
5448
if (ahc_match_scb(ahc, scb, target, channel,
sys/dev/ic/aic7xxx.c
5460
ostat = ahc_get_transaction_status(scb);
sys/dev/ic/aic7xxx.c
5462
ahc_set_transaction_status(scb, status);
sys/dev/ic/aic7xxx.c
5463
cstat = ahc_get_transaction_status(scb);
sys/dev/ic/aic7xxx.c
5465
ahc_freeze_scb(scb);
sys/dev/ic/aic7xxx.c
5466
if ((scb->flags & SCB_ACTIVE) == 0)
sys/dev/ic/aic7xxx.c
5469
ahc_done(ahc, scb);
sys/dev/ic/aic7xxx.c
5501
struct scb *scb;
sys/dev/ic/aic7xxx.c
5532
struct scb *next_scb;
sys/dev/ic/aic7xxx.c
5538
scb = next_scb;
sys/dev/ic/aic7xxx.c
5539
next_scb = TAILQ_NEXT(scb, links.tqe);
sys/dev/ic/aic7xxx.c
5550
if ((scb->flags & SCB_ACTIVE) != 0)
sys/dev/ic/aic7xxx.c
5553
if (ahc_match_scb(ahc, scb, target, channel, lun,
sys/dev/ic/aic7xxx.c
5568
ostat = ahc_get_transaction_status(scb);
sys/dev/ic/aic7xxx.c
5570
ahc_set_transaction_status(scb, status);
sys/dev/ic/aic7xxx.c
5571
cstat = ahc_get_transaction_status(scb);
sys/dev/ic/aic7xxx.c
5573
ahc_freeze_scb(scb);
sys/dev/ic/aic7xxx.c
5574
if ((scb->flags & SCB_ACTIVE) == 0)
sys/dev/ic/aic7xxx.c
5576
ahc_done(ahc, scb);
sys/dev/ic/aic7xxx.c
5580
scb->flags &= ~SCB_UNTAGGEDQ;
sys/dev/ic/aic7xxx.c
5581
TAILQ_REMOVE(untagged_q, scb, links.tqe);
sys/dev/ic/aic7xxx.c
5599
struct scb *scbp;
sys/dev/ic/aic7xxx.c
563
if (ahc_get_residual(scb)
sys/dev/ic/aic7xxx.c
564
== ahc_get_transfer_length(scb)) {
sys/dev/ic/aic7xxx.c
571
scb->flags &= ~SCB_NEGOTIATE;
sys/dev/ic/aic7xxx.c
572
scb->flags |= SCB_AUTO_NEGOTIATE;
sys/dev/ic/aic7xxx.c
5761
struct scb *scbp;
sys/dev/ic/aic7xxx.c
5762
struct scb *scbp_next;
sys/dev/ic/aic7xxx.c
578
ahc_htole32(scb->sg_list_phys | SG_FULL_RESID);
sys/dev/ic/aic7xxx.c
579
scb->sg_count = 1;
sys/dev/ic/aic7xxx.c
580
scb->flags |= SCB_SENSE;
sys/dev/ic/aic7xxx.c
581
ahc_qinfifo_requeue_tail(ahc, scb);
sys/dev/ic/aic7xxx.c
587
ahc_scb_timer_reset(scb, 5 * 1000000);
sys/dev/ic/aic7xxx.c
6076
ahc_calc_residual(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx.c
6100
hscb = scb->hscb;
sys/dev/ic/aic7xxx.c
6115
resid = ahc_get_transfer_length(scb);
sys/dev/ic/aic7xxx.c
6129
sg = ahc_sg_bus_to_virt(scb, resid_sgptr & SG_PTR_MASK);
sys/dev/ic/aic7xxx.c
6144
if ((scb->flags & SCB_SENSE) == 0)
sys/dev/ic/aic7xxx.c
6145
ahc_set_residual(scb, resid);
sys/dev/ic/aic7xxx.c
6147
ahc_set_sense_residual(scb, resid);
sys/dev/ic/aic7xxx.c
6151
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
6153
(scb->flags & SCB_SENSE) ? "Sense " : "", resid);
sys/dev/ic/aic7xxx.c
6601
struct scb *scb;
sys/dev/ic/aic7xxx.c
6732
LIST_FOREACH(scb, &ahc->pending_scbs, pending_links) {
sys/dev/ic/aic7xxx.c
6735
/*cur_col =*/ printf("\n%3d ", scb->hscb->tag);
sys/dev/ic/aic7xxx.c
6736
ahc_scb_control_print(scb->hscb->control, &cur_col, 60);
sys/dev/ic/aic7xxx.c
6737
ahc_scb_scsiid_print(scb->hscb->scsiid, &cur_col, 60);
sys/dev/ic/aic7xxx.c
6738
ahc_scb_lun_print(scb->hscb->lun, &cur_col, 60);
sys/dev/ic/aic7xxx.c
6740
ahc_outb(ahc, SCBPTR, scb->hscb->tag);
sys/dev/ic/aic7xxx.c
6752
SLIST_FOREACH(scb, &ahc->scb_data->free_scbs, links.sle) {
sys/dev/ic/aic7xxx.c
6755
printf("%d ", scb->hscb->tag);
sys/dev/ic/aic7xxx.c
6766
TAILQ_FOREACH(scb, untagged_q, links.tqe) {
sys/dev/ic/aic7xxx.c
6769
printf("%d ", scb->hscb->tag);
sys/dev/ic/aic7xxx.c
689
struct scb *scb1;
sys/dev/ic/aic7xxx.c
7063
struct scb *scb;
sys/dev/ic/aic7xxx.c
7074
LIST_FOREACH(scb, &ahc->pending_scbs, pending_links) {
sys/dev/ic/aic7xxx.c
7077
ccbh = &scb->io_ctx->ccb_h;
sys/dev/ic/aic7xxx.c
793
struct scb *scb1;
sys/dev/ic/aic7xxx.c
827
scb = ahc_lookup_scb(ahc, scbindex);
sys/dev/ic/aic7xxx.c
832
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
836
scb->hscb->tag);
sys/dev/ic/aic7xxx.c
837
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx.c
840
ahc_get_transfer_length(scb), scb->sg_count);
sys/dev/ic/aic7xxx.c
841
if (scb->sg_count > 0) {
sys/dev/ic/aic7xxx.c
842
for (i = 0; i < scb->sg_count; i++) {
sys/dev/ic/aic7xxx.c
846
(ahc_le32toh(scb->sg_list[i].len) >> 24
sys/dev/ic/aic7xxx.c
848
ahc_le32toh(scb->sg_list[i].addr),
sys/dev/ic/aic7xxx.c
849
ahc_le32toh(scb->sg_list[i].len)
sys/dev/ic/aic7xxx.c
857
ahc_freeze_devq(ahc, scb);
sys/dev/ic/aic7xxx.c
858
if ((scb->flags & SCB_SENSE) == 0) {
sys/dev/ic/aic7xxx.c
859
ahc_set_transaction_status(scb, CAM_DATA_RUN_ERR);
sys/dev/ic/aic7xxx.c
861
scb->flags &= ~SCB_SENSE;
sys/dev/ic/aic7xxx.c
862
ahc_set_transaction_status(scb, CAM_AUTOSENSE_FAIL);
sys/dev/ic/aic7xxx.c
864
ahc_freeze_scb(scb);
sys/dev/ic/aic7xxx.c
895
scb = ahc_lookup_scb(ahc, scbindex);
sys/dev/ic/aic7xxx.c
896
if (scb != NULL
sys/dev/ic/aic7xxx.c
897
&& (scb->flags & SCB_RECOVERY_SCB) != 0)
sys/dev/ic/aic7xxx.c
902
ahc_search_qinfifo(ahc, SCB_GET_TARGET(ahc, scb),
sys/dev/ic/aic7xxx.c
903
SCB_GET_CHANNEL(ahc, scb),
sys/dev/ic/aic7xxx.c
904
SCB_GET_LUN(scb), scb->hscb->tag,
sys/dev/ic/aic7xxx.c
975
struct scb *scb;
sys/dev/ic/aic7xxx_inline.h
156
ahc_sg_bus_to_virt(struct scb *scb,
sys/dev/ic/aic7xxx_inline.h
159
ahc_sg_virt_to_bus(struct scb *scb,
sys/dev/ic/aic7xxx_inline.h
164
struct scb *scb, int op);
sys/dev/ic/aic7xxx_inline.h
166
struct scb *scb, int op);
sys/dev/ic/aic7xxx_inline.h
172
ahc_sg_bus_to_virt(struct scb *scb, uint32_t sg_busaddr)
sys/dev/ic/aic7xxx_inline.h
176
sg_index = (sg_busaddr - scb->sg_list_phys)/sizeof(struct ahc_dma_seg);
sys/dev/ic/aic7xxx_inline.h
180
return (&scb->sg_list[sg_index]);
sys/dev/ic/aic7xxx_inline.h
184
ahc_sg_virt_to_bus(struct scb *scb, struct ahc_dma_seg *sg)
sys/dev/ic/aic7xxx_inline.h
189
sg_index = sg - &scb->sg_list[1];
sys/dev/ic/aic7xxx_inline.h
191
return (scb->sg_list_phys + (sg_index * sizeof(*scb->sg_list)));
sys/dev/ic/aic7xxx_inline.h
202
ahc_sync_scb(struct ahc_softc *ahc, struct scb *scb, int op)
sys/dev/ic/aic7xxx_inline.h
206
/*offset*/(scb->hscb - ahc->scb_data->hscbs) * sizeof(*scb->hscb),
sys/dev/ic/aic7xxx_inline.h
207
/*len*/sizeof(*scb->hscb), op);
sys/dev/ic/aic7xxx_inline.h
211
ahc_sync_sglist(struct ahc_softc *ahc, struct scb *scb, int op)
sys/dev/ic/aic7xxx_inline.h
213
if (scb->sg_count == 0)
sys/dev/ic/aic7xxx_inline.h
216
ahc_dmamap_sync(ahc, ahc->parent_dmat, scb->sg_map->sg_dmamap,
sys/dev/ic/aic7xxx_inline.h
217
/*offset*/(scb->sg_list - scb->sg_map->sg_vaddr)
sys/dev/ic/aic7xxx_inline.h
219
/*len*/sizeof(struct ahc_dma_seg) * scb->sg_count, op);
sys/dev/ic/aic7xxx_inline.h
240
struct scb *scb);
sys/dev/ic/aic7xxx_inline.h
258
static __inline struct scb*
sys/dev/ic/aic7xxx_inline.h
260
static __inline void ahc_free_scb(struct ahc_softc *ahc, struct scb *scb);
sys/dev/ic/aic7xxx_inline.h
262
struct scb *scb);
sys/dev/ic/aic7xxx_inline.h
263
static __inline void ahc_queue_scb(struct ahc_softc *ahc, struct scb *scb);
sys/dev/ic/aic7xxx_inline.h
266
struct scb *scb);
sys/dev/ic/aic7xxx_inline.h
269
struct scb *scb);
sys/dev/ic/aic7xxx_inline.h
276
ahc_update_residual(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx_inline.h
280
sgptr = ahc_le32toh(scb->hscb->sgptr);
sys/dev/ic/aic7xxx_inline.h
282
ahc_calc_residual(ahc, scb);
sys/dev/ic/aic7xxx_inline.h
367
static __inline struct scb *
sys/dev/ic/aic7xxx_inline.h
370
struct scb *scb;
sys/dev/ic/aic7xxx_inline.h
372
if ((scb = SLIST_FIRST(&ahc->scb_data->free_scbs)) == NULL)
sys/dev/ic/aic7xxx_inline.h
375
return (scb);
sys/dev/ic/aic7xxx_inline.h
382
ahc_free_scb(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx_inline.h
386
hscb = scb->hscb;
sys/dev/ic/aic7xxx_inline.h
389
scb->flags = SCB_FREE;
sys/dev/ic/aic7xxx_inline.h
392
SLIST_INSERT_HEAD(&ahc->scb_data->free_scbs, scb, links.sle);
sys/dev/ic/aic7xxx_inline.h
395
ahc_platform_scb_free(ahc, scb);
sys/dev/ic/aic7xxx_inline.h
398
static __inline struct scb *
sys/dev/ic/aic7xxx_inline.h
401
struct scb* scb;
sys/dev/ic/aic7xxx_inline.h
403
scb = ahc->scb_data->scbindex[tag];
sys/dev/ic/aic7xxx_inline.h
404
if (scb != NULL)
sys/dev/ic/aic7xxx_inline.h
405
ahc_sync_scb(ahc, scb,
sys/dev/ic/aic7xxx_inline.h
407
return (scb);
sys/dev/ic/aic7xxx_inline.h
411
ahc_swap_with_next_hscb(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx_inline.h
430
memcpy(q_hscb, scb->hscb, sizeof(*scb->hscb));
sys/dev/ic/aic7xxx_inline.h
431
if ((scb->flags & SCB_CDB32_PTR) != 0) {
sys/dev/ic/aic7xxx_inline.h
437
q_hscb->next = scb->hscb->tag;
sys/dev/ic/aic7xxx_inline.h
440
ahc->next_queued_scb->hscb = scb->hscb;
sys/dev/ic/aic7xxx_inline.h
441
scb->hscb = q_hscb;
sys/dev/ic/aic7xxx_inline.h
444
ahc->scb_data->scbindex[scb->hscb->tag] = scb;
sys/dev/ic/aic7xxx_inline.h
451
ahc_queue_scb(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx_inline.h
453
ahc_swap_with_next_hscb(ahc, scb);
sys/dev/ic/aic7xxx_inline.h
455
if (scb->hscb->tag == SCB_LIST_NULL
sys/dev/ic/aic7xxx_inline.h
456
|| scb->hscb->next == SCB_LIST_NULL)
sys/dev/ic/aic7xxx_inline.h
458
scb->hscb->tag, scb->hscb->next);
sys/dev/ic/aic7xxx_inline.h
462
ahc->qinfifo[ahc->qinfifonext++] = scb->hscb->tag;
sys/dev/ic/aic7xxx_inline.h
468
ahc_sync_scb(ahc, scb, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
sys/dev/ic/aic7xxx_inline.h
483
ahc_get_sense_buf(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx_inline.h
487
offset = scb - ahc->scb_data->scbarray;
sys/dev/ic/aic7xxx_inline.h
492
ahc_get_sense_bufaddr(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx_inline.h
496
offset = scb - ahc->scb_data->scbarray;
sys/dev/ic/aic7xxx_osm.c
1002
lun, scb->hscb->tag,
sys/dev/ic/aic7xxx_osm.c
1015
ahc_outb(ahc, SCBPTR, scb->hscb->tag);
sys/dev/ic/aic7xxx_osm.c
1027
SCB_GET_TARGET(ahc, scb),
sys/dev/ic/aic7xxx_osm.c
1028
channel, SCB_GET_LUN(scb),
sys/dev/ic/aic7xxx_osm.c
1033
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx_osm.c
1035
ahc_qinfifo_requeue_tail(ahc, scb);
sys/dev/ic/aic7xxx_osm.c
1037
callout_reset(&scb->xs->xs_callout, 2 * hz,
sys/dev/ic/aic7xxx_osm.c
1038
ahc_timeout, scb);
sys/dev/ic/aic7xxx_osm.c
1043
ahc_set_recoveryscb(ahc, scb);
sys/dev/ic/aic7xxx_osm.c
1044
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx_osm.c
1046
"Flags = 0x%x\n", scb->hscb->tag,
sys/dev/ic/aic7xxx_osm.c
1047
scb->flags);
sys/dev/ic/aic7xxx_osm.c
199
ahc_done(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx_osm.c
205
xs = scb->xs;
sys/dev/ic/aic7xxx_osm.c
207
LIST_REMOVE(scb, pending_links);
sys/dev/ic/aic7xxx_osm.c
208
if ((scb->flags & SCB_UNTAGGEDQ) != 0) {
sys/dev/ic/aic7xxx_osm.c
212
target_offset = SCB_GET_TARGET_OFFSET(ahc, scb);
sys/dev/ic/aic7xxx_osm.c
214
TAILQ_REMOVE(untagged_q, scb, links.tqe);
sys/dev/ic/aic7xxx_osm.c
215
scb->flags &= ~SCB_UNTAGGEDQ;
sys/dev/ic/aic7xxx_osm.c
219
callout_stop(&scb->xs->xs_callout);
sys/dev/ic/aic7xxx_osm.c
228
bus_dmamap_sync(ahc->parent_dmat, scb->dmamap, 0,
sys/dev/ic/aic7xxx_osm.c
229
scb->dmamap->dm_mapsize, op);
sys/dev/ic/aic7xxx_osm.c
230
bus_dmamap_unload(ahc->parent_dmat, scb->dmamap);
sys/dev/ic/aic7xxx_osm.c
237
if ((scb->flags & SCB_RECOVERY_SCB) != 0) {
sys/dev/ic/aic7xxx_osm.c
238
struct scb *list_scb;
sys/dev/ic/aic7xxx_osm.c
255
if (ahc_get_transaction_status(scb) == CAM_BDR_SENT
sys/dev/ic/aic7xxx_osm.c
256
|| ahc_get_transaction_status(scb) == CAM_REQ_ABORTED)
sys/dev/ic/aic7xxx_osm.c
257
ahc_set_transaction_status(scb, CAM_CMD_TIMEOUT);
sys/dev/ic/aic7xxx_osm.c
270
} else if ((scb->flags & SCB_SENSE) != 0) {
sys/dev/ic/aic7xxx_osm.c
283
ahc_get_sense_buf(ahc, scb),
sys/dev/ic/aic7xxx_osm.c
287
if (scb->flags & SCB_FREEZE_QUEUE) {
sys/dev/ic/aic7xxx_osm.c
289
scb->flags &= ~SCB_FREEZE_QUEUE;
sys/dev/ic/aic7xxx_osm.c
293
ahc_free_scb(ahc, scb);
sys/dev/ic/aic7xxx_osm.c
339
struct scb *scb;
sys/dev/ic/aic7xxx_osm.c
357
if ((scb = ahc_get_scb(ahc)) == NULL) {
sys/dev/ic/aic7xxx_osm.c
365
hscb = scb->hscb;
sys/dev/ic/aic7xxx_osm.c
367
SC_DEBUG(periph, SCSIPI_DB3, ("start scb(%p)\n", scb));
sys/dev/ic/aic7xxx_osm.c
368
scb->xs = xs;
sys/dev/ic/aic7xxx_osm.c
378
scb->flags |= SCB_DEVICE_RESET;
sys/dev/ic/aic7xxx_osm.c
380
ahc_execute_scb(scb, NULL, 0);
sys/dev/ic/aic7xxx_osm.c
383
ahc_setup_data(ahc, xs, scb);
sys/dev/ic/aic7xxx_osm.c
520
struct scb *scb;
sys/dev/ic/aic7xxx_osm.c
529
scb = (struct scb *)arg;
sys/dev/ic/aic7xxx_osm.c
530
xs = scb->xs;
sys/dev/ic/aic7xxx_osm.c
545
sg = scb->sg_list;
sys/dev/ic/aic7xxx_osm.c
563
scb->hscb->sgptr = ahc_htole32(scb->sg_list_phys|SG_FULL_RESID);
sys/dev/ic/aic7xxx_osm.c
570
bus_dmamap_sync(ahc->parent_dmat, scb->dmamap, 0,
sys/dev/ic/aic7xxx_osm.c
571
scb->dmamap->dm_mapsize, op);
sys/dev/ic/aic7xxx_osm.c
577
scb->hscb->dataptr = scb->sg_list->addr;
sys/dev/ic/aic7xxx_osm.c
578
scb->hscb->datacnt = scb->sg_list->len;
sys/dev/ic/aic7xxx_osm.c
58
struct scsipi_xfer *xs, struct scb *scb);
sys/dev/ic/aic7xxx_osm.c
580
scb->hscb->sgptr = ahc_htole32(SG_LIST_NULL);
sys/dev/ic/aic7xxx_osm.c
581
scb->hscb->dataptr = 0;
sys/dev/ic/aic7xxx_osm.c
582
scb->hscb->datacnt = 0;
sys/dev/ic/aic7xxx_osm.c
585
scb->sg_count = nsegments;
sys/dev/ic/aic7xxx_osm.c
59
static void ahc_set_recoveryscb(struct ahc_softc *ahc, struct scb *scb);
sys/dev/ic/aic7xxx_osm.c
595
bus_dmamap_unload(ahc->buffer_dmat, scb->dmamap);
sys/dev/ic/aic7xxx_osm.c
596
ahc_free_scb(ahc, scb);
sys/dev/ic/aic7xxx_osm.c
603
SCSIID_OUR_ID(scb->hscb->scsiid),
sys/dev/ic/aic7xxx_osm.c
604
SCSIID_TARGET(ahc, scb->hscb->scsiid),
sys/dev/ic/aic7xxx_osm.c
607
mask = SCB_GET_TARGET_MASK(ahc, scb);
sys/dev/ic/aic7xxx_osm.c
608
scb->hscb->scsirate = tinfo->scsirate;
sys/dev/ic/aic7xxx_osm.c
609
scb->hscb->scsioffset = tinfo->curr.offset;
sys/dev/ic/aic7xxx_osm.c
612
scb->hscb->control |= ULTRAENB;
sys/dev/ic/aic7xxx_osm.c
615
scb->hscb->control |= DISCENB;
sys/dev/ic/aic7xxx_osm.c
618
scb->hscb->control |= xs->xs_tag_type;
sys/dev/ic/aic7xxx_osm.c
624
scb->flags |= SCB_NEGOTIATE;
sys/dev/ic/aic7xxx_osm.c
625
scb->hscb->control |= MK_MESSAGE;
sys/dev/ic/aic7xxx_osm.c
629
scb->flags |= SCB_AUTO_NEGOTIATE;
sys/dev/ic/aic7xxx_osm.c
630
scb->hscb->control |= MK_MESSAGE;
sys/dev/ic/aic7xxx_osm.c
633
LIST_INSERT_HEAD(&ahc->pending_scbs, scb, pending_links);
sys/dev/ic/aic7xxx_osm.c
636
callout_reset(&scb->xs->xs_callout, xs->timeout > 1000000 ?
sys/dev/ic/aic7xxx_osm.c
638
ahc_timeout, scb);
sys/dev/ic/aic7xxx_osm.c
647
if ((scb->hscb->control & (TARGET_SCB|TAG_ENB)) == 0
sys/dev/ic/aic7xxx_osm.c
652
target_offset = SCB_GET_TARGET_OFFSET(ahc, scb);
sys/dev/ic/aic7xxx_osm.c
654
TAILQ_INSERT_TAIL(untagged_q, scb, links.tqe);
sys/dev/ic/aic7xxx_osm.c
655
scb->flags |= SCB_UNTAGGEDQ;
sys/dev/ic/aic7xxx_osm.c
656
if (TAILQ_FIRST(untagged_q) != scb) {
sys/dev/ic/aic7xxx_osm.c
661
scb->flags |= SCB_ACTIVE;
sys/dev/ic/aic7xxx_osm.c
663
if ((scb->flags & SCB_TARGET_IMMEDIATE) != 0) {
sys/dev/ic/aic7xxx_osm.c
665
ahc->scb_data->scbindex[scb->hscb->tag] = scb;
sys/dev/ic/aic7xxx_osm.c
668
ahc_outb(ahc, SCBPTR, scb->hscb->tag);
sys/dev/ic/aic7xxx_osm.c
669
ahc_outb(ahc, TARG_IMMEDIATE_SCB, scb->hscb->tag);
sys/dev/ic/aic7xxx_osm.c
672
ahc_queue_scb(ahc, scb);
sys/dev/ic/aic7xxx_osm.c
689
ahc_timeout(scb);
sys/dev/ic/aic7xxx_osm.c
718
struct scb *scb)
sys/dev/ic/aic7xxx_osm.c
722
hscb = scb->hscb;
sys/dev/ic/aic7xxx_osm.c
729
ahc_set_transaction_status(scb, CAM_REQ_INVALID);
sys/dev/ic/aic7xxx_osm.c
731
ahc_free_scb(ahc, scb);
sys/dev/ic/aic7xxx_osm.c
739
scb->flags |= SCB_CDB32_PTR;
sys/dev/ic/aic7xxx_osm.c
749
scb->dmamap, xs->data,
sys/dev/ic/aic7xxx_osm.c
766
ahc_execute_scb(scb,
sys/dev/ic/aic7xxx_osm.c
767
scb->dmamap->dm_segs,
sys/dev/ic/aic7xxx_osm.c
768
scb->dmamap->dm_nsegs);
sys/dev/ic/aic7xxx_osm.c
770
ahc_execute_scb(scb, NULL, 0);
sys/dev/ic/aic7xxx_osm.c
775
ahc_set_recoveryscb(struct ahc_softc *ahc, struct scb *scb) {
sys/dev/ic/aic7xxx_osm.c
777
if ((scb->flags & SCB_RECOVERY_SCB) == 0) {
sys/dev/ic/aic7xxx_osm.c
778
struct scb *list_scb;
sys/dev/ic/aic7xxx_osm.c
780
scb->flags |= SCB_RECOVERY_SCB;
sys/dev/ic/aic7xxx_osm.c
805
struct scb *scb;
sys/dev/ic/aic7xxx_osm.c
815
scb = arg;
sys/dev/ic/aic7xxx_osm.c
816
ahc = scb->ahc_softc;
sys/dev/ic/aic7xxx_osm.c
822
if ((scb->flags & SCB_ACTIVE) == 0) {
sys/dev/ic/aic7xxx_osm.c
831
target = SCB_GET_TARGET(ahc, scb);
sys/dev/ic/aic7xxx_osm.c
832
channel = SCB_GET_CHANNEL(ahc, scb);
sys/dev/ic/aic7xxx_osm.c
833
lun = SCB_GET_LUN(scb);
sys/dev/ic/aic7xxx_osm.c
835
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx_osm.c
836
printf("SCB 0x%x - timed out\n", scb->hscb->tag);
sys/dev/ic/aic7xxx_osm.c
839
if (scb->sg_count > 0) {
sys/dev/ic/aic7xxx_osm.c
840
for (i = 0; i < scb->sg_count; i++) {
sys/dev/ic/aic7xxx_osm.c
843
scb->sg_list[i].addr,
sys/dev/ic/aic7xxx_osm.c
844
scb->sg_list[i].len & AHC_SG_LEN_MASK);
sys/dev/ic/aic7xxx_osm.c
847
if (scb->flags & (SCB_DEVICE_RESET|SCB_ABORT)) {
sys/dev/ic/aic7xxx_osm.c
853
ahc_set_transaction_status(scb, CAM_CMD_TIMEOUT);
sys/dev/ic/aic7xxx_osm.c
888
struct scb *active_scb;
sys/dev/ic/aic7xxx_osm.c
897
if (active_scb != scb) {
sys/dev/ic/aic7xxx_osm.c
900
ahc_print_path(ahc, scb);
sys/dev/ic/aic7xxx_osm.c
902
(scb->flags & SCB_OTHERTCL_TIMEOUT) != 0
sys/dev/ic/aic7xxx_osm.c
904
scb->flags |= SCB_OTHERTCL_TIMEOUT;
sys/dev/ic/aic7xxx_osm.c
906
scb->xs->timeout);
sys/dev/ic/aic7xxx_osm.c
907
callout_reset(&scb->xs->xs_callout,
sys/dev/ic/aic7xxx_osm.c
911
ahc_timeout, scb);
sys/dev/ic/aic7xxx_osm.c
918
if ((scb->flags & SCB_TARGET_SCB) != 0) {
sys/dev/ic/aic7xxx_osm.c
924
ahc_abort_scbs(ahc, SCB_GET_TARGET(ahc, scb),
sys/dev/ic/aic7xxx_osm.c
925
SCB_GET_CHANNEL(ahc, scb),
sys/dev/ic/aic7xxx_osm.c
926
SCB_GET_LUN(scb),
sys/dev/ic/aic7xxx_osm.c
927
scb->hscb->tag,
sys/dev/ic/aic7xxx_osm.c
950
if ((scb->flags & SCB_TARGET_SCB) != 0)
sys/dev/ic/aic7xxx_osm.c
965
scb->hscb->tag, ROLE_INITIATOR,
sys/dev/ic/aic7xxx_osm.c
974
ahc_set_recoveryscb(ahc, scb);
sys/dev/ic/aic7xxx_osm.c
991
scb->hscb->control |= MK_MESSAGE|DISCONNECTED;
sys/dev/ic/aic7xxx_osm.c
992
scb->flags |= SCB_DEVICE_RESET;
sys/dev/ic/aic7xxx_osm.h
217
ahc_scb_timer_reset(struct scb *scb, u_int usec)
sys/dev/ic/aic7xxx_osm.h
219
if (!(scb->xs->xs_control & XS_CTL_POLL)) {
sys/dev/ic/aic7xxx_osm.h
220
callout_reset(&scb->xs->xs_callout,
sys/dev/ic/aic7xxx_osm.h
221
(usec * hz)/1000000, ahc_timeout, scb);
sys/dev/ic/aic7xxx_osm.h
315
static __inline void ahc_set_transaction_status(struct scb *, uint32_t);
sys/dev/ic/aic7xxx_osm.h
316
static __inline void ahc_set_scsi_status(struct scb *, uint32_t);
sys/dev/ic/aic7xxx_osm.h
317
static __inline uint32_t ahc_get_transaction_status(struct scb *);
sys/dev/ic/aic7xxx_osm.h
318
static __inline uint32_t ahc_get_scsi_status(struct scb *);
sys/dev/ic/aic7xxx_osm.h
319
static __inline void ahc_set_transaction_tag(struct scb *, int, u_int);
sys/dev/ic/aic7xxx_osm.h
320
static __inline u_long ahc_get_transfer_length(struct scb *);
sys/dev/ic/aic7xxx_osm.h
321
static __inline int ahc_get_transfer_dir(struct scb *);
sys/dev/ic/aic7xxx_osm.h
322
static __inline void ahc_set_residual(struct scb *, u_long);
sys/dev/ic/aic7xxx_osm.h
323
static __inline void ahc_set_sense_residual(struct scb *, u_long);
sys/dev/ic/aic7xxx_osm.h
324
static __inline u_long ahc_get_residual(struct scb *);
sys/dev/ic/aic7xxx_osm.h
325
static __inline int ahc_perform_autosense(struct scb *);
sys/dev/ic/aic7xxx_osm.h
327
struct scb *);
sys/dev/ic/aic7xxx_osm.h
328
static __inline void ahc_freeze_scb(struct scb *);
sys/dev/ic/aic7xxx_osm.h
329
static __inline void ahc_platform_freeze_devq(struct ahc_softc *, struct scb *);
sys/dev/ic/aic7xxx_osm.h
334
void ahc_set_transaction_status(struct scb *scb, uint32_t status)
sys/dev/ic/aic7xxx_osm.h
336
scb->xs->error = status;
sys/dev/ic/aic7xxx_osm.h
340
void ahc_set_scsi_status(struct scb *scb, uint32_t status)
sys/dev/ic/aic7xxx_osm.h
342
scb->xs->xs_status = status;
sys/dev/ic/aic7xxx_osm.h
346
uint32_t ahc_get_transaction_status(struct scb *scb)
sys/dev/ic/aic7xxx_osm.h
348
return (scb->xs->error);
sys/dev/ic/aic7xxx_osm.h
352
uint32_t ahc_get_scsi_status(struct scb *scb)
sys/dev/ic/aic7xxx_osm.h
354
return (scb->xs->xs_status);
sys/dev/ic/aic7xxx_osm.h
358
void ahc_set_transaction_tag(struct scb *scb, int enabled, u_int type)
sys/dev/ic/aic7xxx_osm.h
360
scb->xs->xs_tag_type = type;
sys/dev/ic/aic7xxx_osm.h
364
u_long ahc_get_transfer_length(struct scb *scb)
sys/dev/ic/aic7xxx_osm.h
366
return (scb->xs->datalen);
sys/dev/ic/aic7xxx_osm.h
370
int ahc_get_transfer_dir(struct scb *scb)
sys/dev/ic/aic7xxx_osm.h
372
return (scb->xs->xs_control & (XS_CTL_DATA_IN|XS_CTL_DATA_OUT));
sys/dev/ic/aic7xxx_osm.h
376
void ahc_set_residual(struct scb *scb, u_long resid)
sys/dev/ic/aic7xxx_osm.h
378
scb->xs->resid = resid;
sys/dev/ic/aic7xxx_osm.h
382
void ahc_set_sense_residual(struct scb *scb, u_long resid)
sys/dev/ic/aic7xxx_osm.h
385
scb->io_ctx->csio.sense_resid = resid;
sys/dev/ic/aic7xxx_osm.h
390
u_long ahc_get_residual(struct scb *scb)
sys/dev/ic/aic7xxx_osm.h
392
return (scb->xs->resid);
sys/dev/ic/aic7xxx_osm.h
396
int ahc_perform_autosense(struct scb *scb)
sys/dev/ic/aic7xxx_osm.h
398
return (!(scb->flags & SCB_SENSE));
sys/dev/ic/aic7xxx_osm.h
402
ahc_get_sense_bufsize(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx_osm.h
408
ahc_freeze_scb(struct scb *scb)
sys/dev/ic/aic7xxx_osm.h
410
struct scsipi_xfer *xs = scb->xs;
sys/dev/ic/aic7xxx_osm.h
412
if (!(scb->flags & SCB_FREEZE_QUEUE)) {
sys/dev/ic/aic7xxx_osm.h
414
scb->flags |= SCB_FREEZE_QUEUE;
sys/dev/ic/aic7xxx_osm.h
419
ahc_platform_freeze_devq(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx_osm.h
432
ahc_platform_scb_free(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx_osm.h
437
&& scb->io_ctx != NULL
sys/dev/ic/aic7xxx_osm.h
438
&& (scb->io_ctx->ccb_h.status & CAM_RELEASE_SIMQ) == 0) {
sys/dev/ic/aic7xxx_osm.h
439
scb->io_ctx->ccb_h.status |= CAM_RELEASE_SIMQ;
sys/dev/ic/aic7xxx_osm.h
442
scb->io_ctx = NULL;
sys/dev/ic/aic7xxx_osm.h
503
static __inline void ahc_print_path(struct ahc_softc *, struct scb *);
sys/dev/ic/aic7xxx_osm.h
507
ahc_print_path(struct ahc_softc *ahc, struct scb *scb)
sys/dev/ic/aic7xxx_osm.h
538
void ahc_done(struct ahc_softc *, struct scb *);
sys/dev/ic/aic7xxx_osm.h
89
#define SCB_GET_SIM(ahc, scb) \
sys/dev/ic/aic7xxx_osm.h
90
(SCB_GET_CHANNEL(ahc, scb) == 'A' ? (ahc)->platform_data->sim \
sys/dev/ic/aic7xxxvar.h
1041
struct scb *next_queued_scb;
sys/dev/ic/aic7xxxvar.h
1046
LIST_HEAD(, scb) pending_scbs;
sys/dev/ic/aic7xxxvar.h
1270
void ahc_qinfifo_requeue_tail(struct ahc_softc *, struct scb *);
sys/dev/ic/aic7xxxvar.h
1271
int ahc_match_scb(struct ahc_softc *, struct scb *,
sys/dev/ic/aic7xxxvar.h
1315
void ahc_freeze_devq(struct ahc_softc *, struct scb *);
sys/dev/ic/aic7xxxvar.h
1320
void ahc_calc_residual(struct ahc_softc *, struct scb *);
sys/dev/ic/aic7xxxvar.h
1390
void ahc_print_scb(struct scb *);
sys/dev/ic/aic7xxxvar.h
178
#define SCB_IS_SCSIBUS_B(ahc, scb) \
sys/dev/ic/aic7xxxvar.h
179
(SCSIID_CHANNEL(ahc, (scb)->hscb->scsiid) == 'B')
sys/dev/ic/aic7xxxvar.h
180
#define SCB_GET_OUR_ID(scb) \
sys/dev/ic/aic7xxxvar.h
181
SCSIID_OUR_ID((scb)->hscb->scsiid)
sys/dev/ic/aic7xxxvar.h
182
#define SCB_GET_TARGET(ahc, scb) \
sys/dev/ic/aic7xxxvar.h
183
SCSIID_TARGET((ahc), (scb)->hscb->scsiid)
sys/dev/ic/aic7xxxvar.h
184
#define SCB_GET_CHANNEL(ahc, scb) \
sys/dev/ic/aic7xxxvar.h
185
SCSIID_CHANNEL(ahc, (scb)->hscb->scsiid)
sys/dev/ic/aic7xxxvar.h
186
#define SCB_GET_LUN(scb) \
sys/dev/ic/aic7xxxvar.h
187
((scb)->hscb->lun)
sys/dev/ic/aic7xxxvar.h
188
#define SCB_GET_TARGET_OFFSET(ahc, scb) \
sys/dev/ic/aic7xxxvar.h
189
(SCB_GET_TARGET(ahc, scb))
sys/dev/ic/aic7xxxvar.h
190
#define SCB_GET_TARGET_MASK(ahc, scb) \
sys/dev/ic/aic7xxxvar.h
191
(0x01 << (SCB_GET_TARGET_OFFSET(ahc, scb)))
sys/dev/ic/aic7xxxvar.h
193
#define SCB_IS_SILENT(scb) \
sys/dev/ic/aic7xxxvar.h
195
&& (((scb)->flags & SCB_SILENT) != 0))
sys/dev/ic/aic7xxxvar.h
197
#define SCB_IS_SILENT(scb) \
sys/dev/ic/aic7xxxvar.h
198
(((scb)->flags & SCB_SILENT) != 0)
sys/dev/ic/aic7xxxvar.h
682
SLIST_ENTRY(scb) sle;
sys/dev/ic/aic7xxxvar.h
683
TAILQ_ENTRY(scb) tqe;
sys/dev/ic/aic7xxxvar.h
685
LIST_ENTRY(scb) pending_links;
sys/dev/ic/aic7xxxvar.h
701
SLIST_HEAD(, scb) free_scbs; /*
sys/dev/ic/aic7xxxvar.h
705
struct scb *scbindex[256]; /*
sys/dev/ic/aic7xxxvar.h
715
struct scb *scbarray; /* Array of kernel SCBs */
sys/dev/ic/aic7xxxvar.h
995
TAILQ_HEAD(scb_tailq, scb);
sys/dev/ic/i82586.c
1092
off = IE_SCB_STATUS(sc->scb);
sys/dev/ic/i82586.c
1105
off = IE_SCB_CMDLST(sc->scb);
sys/dev/ic/i82586.c
1280
sc->ie_bus_write16(sc, IE_SCB_CMDLST(sc->scb), cmdbuf);
sys/dev/ic/i82586.c
1673
sc->ie_bus_write16(sc, IE_SCB_RCVLST(sc->scb),
sys/dev/ic/i82586.c
1686
sc->ie_bus_write16(sc, IE_SCB_CMDLST(sc->scb),
sys/dev/ic/i82586.c
298
off = IE_SCB_CMD(sc->scb);
sys/dev/ic/i82586.c
306
off = IE_SCB_STATUS(sc->scb);
sys/dev/ic/i82586.c
341
off = IE_SCB_CMD(sc->scb);
sys/dev/ic/i82586.c
390
status = sc->ie_bus_read16(sc, IE_SCB_STATUS(sc->scb));
sys/dev/ic/i82586.c
402
int scb = sc->scb;
sys/dev/ic/i82586.c
405
sc->ie_bus_read16(sc, IE_SCB_ERRCRC(scb)) +
sys/dev/ic/i82586.c
406
sc->ie_bus_read16(sc, IE_SCB_ERRALN(scb)) +
sys/dev/ic/i82586.c
407
sc->ie_bus_read16(sc, IE_SCB_ERRRES(scb)) +
sys/dev/ic/i82586.c
408
sc->ie_bus_read16(sc, IE_SCB_ERROVR(scb)));
sys/dev/ic/i82586.c
411
sc->ie_bus_write16(sc, IE_SCB_ERRCRC(scb), 0);
sys/dev/ic/i82586.c
412
sc->ie_bus_write16(sc, IE_SCB_ERRALN(scb), 0);
sys/dev/ic/i82586.c
413
sc->ie_bus_write16(sc, IE_SCB_ERRRES(scb), 0);
sys/dev/ic/i82586.c
414
sc->ie_bus_write16(sc, IE_SCB_ERROVR(scb), 0);
sys/dev/ic/i82586.c
442
off = IE_SCB_STATUS(sc->scb);
sys/dev/ic/i82586var.h
210
int scb; /* Offset to SCB (set by front-end) */
sys/dev/ic/iha.c
1001
iha_select(sc, scb, SELATNSTOP);
sys/dev/ic/iha.c
1002
scb->nextstat = 8;
sys/dev/ic/iha.c
1005
if ((scb->xs->xs_control & XS_CTL_POLL) != 0) {
sys/dev/ic/iha.c
1007
for (timeout = scb->xs->timeout; timeout > 0; timeout--) {
sys/dev/ic/iha.c
1023
iha_timeout(scb);
sys/dev/ic/iha.c
1028
iha_select(struct iha_softc *sc, struct iha_scb *scb, uint8_t select_type)
sys/dev/ic/iha.c
1035
bus_space_write_1(iot, ioh, TUL_SFIFO, scb->scb_id);
sys/dev/ic/iha.c
1037
scb->cmd, scb->cmdlen);
sys/dev/ic/iha.c
1039
scb->nextstat = 2;
sys/dev/ic/iha.c
1043
scb->nextstat = 1;
sys/dev/ic/iha.c
1047
bus_space_write_1(iot, ioh, TUL_SFIFO, scb->scb_id);
sys/dev/ic/iha.c
1048
bus_space_write_1(iot, ioh, TUL_SFIFO, scb->scb_tagmsg);
sys/dev/ic/iha.c
1049
bus_space_write_1(iot, ioh, TUL_SFIFO, scb->scb_tagid);
sys/dev/ic/iha.c
1051
bus_space_write_multi_1(iot, ioh, TUL_SFIFO, scb->cmd,
sys/dev/ic/iha.c
1052
scb->cmdlen);
sys/dev/ic/iha.c
1054
scb->nextstat = 2;
sys/dev/ic/iha.c
1063
iha_del_pend_scb(sc, scb);
sys/dev/ic/iha.c
1064
scb->status = STATUS_SELECT;
sys/dev/ic/iha.c
1066
sc->sc_actscb = scb;
sys/dev/ic/iha.c
1142
iha_exec_scb(struct iha_softc *sc, struct iha_scb *scb)
sys/dev/ic/iha.c
1147
struct scsipi_xfer *xs = scb->xs;
sys/dev/ic/iha.c
1150
dm = scb->dmap;
sys/dev/ic/iha.c
1154
struct iha_sg_element *sg = scb->sglist;
sys/dev/ic/iha.c
1162
scb->sgoffset, IHA_SG_SIZE,
sys/dev/ic/iha.c
1165
scb->flags |= FLAG_SG;
sys/dev/ic/iha.c
1166
scb->sg_size = scb->sg_max = nseg;
sys/dev/ic/iha.c
1167
scb->sg_index = 0;
sys/dev/ic/iha.c
1169
scb->bufaddr = scb->sg_addr;
sys/dev/ic/iha.c
1171
scb->bufaddr = dm->dm_segs[0].ds_addr;
sys/dev/ic/iha.c
1177
callout_reset(&xs->xs_callout, timeout, iha_timeout, scb);
sys/dev/ic/iha.c
1182
if (((scb->xs->xs_control & XS_RESET) != 0) ||
sys/dev/ic/iha.c
1183
(scb->cmd[0] == SCSI_REQUEST_SENSE))
sys/dev/ic/iha.c
1184
iha_push_pend_scb(sc, scb); /* Insert SCB at head of Pend */
sys/dev/ic/iha.c
1186
iha_append_pend_scb(sc, scb); /* Append SCB to tail of Pend */
sys/dev/ic/iha.c
1215
iha_done_scb(struct iha_softc *sc, struct iha_scb *scb)
sys/dev/ic/iha.c
1217
struct scsipi_xfer *xs = scb->xs;
sys/dev/ic/iha.c
1223
if (scb->flags & (FLAG_DATAIN | FLAG_DATAOUT)) {
sys/dev/ic/iha.c
1224
bus_dmamap_sync(sc->sc_dmat, scb->dmap,
sys/dev/ic/iha.c
1225
0, scb->dmap->dm_mapsize,
sys/dev/ic/iha.c
1226
(scb->flags & FLAG_DATAIN) ?
sys/dev/ic/iha.c
1228
bus_dmamap_unload(sc->sc_dmat, scb->dmap);
sys/dev/ic/iha.c
1231
xs->status = scb->ta_stat;
sys/dev/ic/iha.c
1233
switch (scb->ha_stat) {
sys/dev/ic/iha.c
1235
switch (scb->ta_stat) {
sys/dev/ic/iha.c
1240
xs->resid = scb->buflen;
sys/dev/ic/iha.c
1242
if ((scb->flags & FLAG_RSENS) != 0)
sys/dev/ic/iha.c
1255
scb->tcs->flags &=
sys/dev/ic/iha.c
1258
if ((scb->flags & FLAG_RSENS) != 0 ||
sys/dev/ic/iha.c
1259
iha_push_sense_request(sc, scb) != 0) {
sys/dev/ic/iha.c
1260
scb->flags &= ~FLAG_RSENS;
sys/dev/ic/iha.c
1305
iha_append_free_scb(sc, scb);
sys/dev/ic/iha.c
1314
iha_push_sense_request(struct iha_softc *sc, struct iha_scb *scb)
sys/dev/ic/iha.c
1316
struct scsipi_xfer *xs = scb->xs;
sys/dev/ic/iha.c
1318
struct scsi_request_sense *ss = (struct scsi_request_sense *)scb->cmd;
sys/dev/ic/iha.c
1327
scb->flags = FLAG_RSENS | FLAG_DATAIN;
sys/dev/ic/iha.c
1329
scb->scb_id &= ~MSG_IDENTIFY_DISCFLAG;
sys/dev/ic/iha.c
1331
scb->scb_tagmsg = 0;
sys/dev/ic/iha.c
1332
scb->ta_stat = SCSI_OK;
sys/dev/ic/iha.c
1334
scb->cmdlen = sizeof(struct scsi_request_sense);
sys/dev/ic/iha.c
1335
scb->buflen = ss->length;
sys/dev/ic/iha.c
1337
err = bus_dmamap_load(sc->sc_dmat, scb->dmap,
sys/dev/ic/iha.c
1338
&xs->sense.scsi_sense, scb->buflen, NULL,
sys/dev/ic/iha.c
1345
bus_dmamap_sync(sc->sc_dmat, scb->dmap,
sys/dev/ic/iha.c
1346
0, scb->buflen, BUS_DMASYNC_PREREAD);
sys/dev/ic/iha.c
1349
iha_exec_scb(sc, scb);
sys/dev/ic/iha.c
1357
struct iha_scb *scb = (struct iha_scb *)arg;
sys/dev/ic/iha.c
1358
struct scsipi_xfer *xs = scb->xs;
sys/dev/ic/iha.c
1384
struct iha_scb *scb;
sys/dev/ic/iha.c
1391
TAILQ_FOREACH(scb, &sc->sc_pendscb, chain)
sys/dev/ic/iha.c
1392
if (scb->xs == xs) {
sys/dev/ic/iha.c
1393
iha_del_pend_scb(sc, scb);
sys/dev/ic/iha.c
1394
iha_append_done_scb(sc, scb, hastat);
sys/dev/ic/iha.c
1404
for (i = 0, scb = sc->sc_scb; i < IHA_MAX_SCB; i++, scb++)
sys/dev/ic/iha.c
1405
switch (scb->status) {
sys/dev/ic/iha.c
1408
if (scb->xs == xs) {
sys/dev/ic/iha.c
1409
iha_append_done_scb(sc, scb, hastat);
sys/dev/ic/iha.c
1432
iha_data_over_run(struct iha_scb *scb)
sys/dev/ic/iha.c
1434
switch (scb->cmd[0]) {
sys/dev/ic/iha.c
1568
struct iha_scb *scb = sc->sc_actscb;
sys/dev/ic/iha.c
1572
iha_mark_busy_scb(scb);
sys/dev/ic/iha.c
1574
tcs = scb->tcs;
sys/dev/ic/iha.c
1591
bus_space_write_1(iot, ioh, TUL_SFIFO, scb->scb_id);
sys/dev/ic/iha.c
1593
if (scb->scb_tagmsg != 0) {
sys/dev/ic/iha.c
1595
scb->scb_tagmsg);
sys/dev/ic/iha.c
1597
scb->scb_tagid);
sys/dev/ic/iha.c
1628
struct iha_scb *scb = sc->sc_actscb;
sys/dev/ic/iha.c
1630
iha_mark_busy_scb(scb);
sys/dev/ic/iha.c
1632
bus_space_write_1(iot, ioh, TUL_SCONFIG0, scb->tcs->sconfig0);
sys/dev/ic/iha.c
1654
struct iha_scb *scb = sc->sc_actscb;
sys/dev/ic/iha.c
1661
scb->cmd, scb->cmdlen);
sys/dev/ic/iha.c
1671
scb->nextstat = 3;
sys/dev/ic/iha.c
1682
flags = scb->tcs->flags;
sys/dev/ic/iha.c
1708
struct iha_scb *scb = sc->sc_actscb;
sys/dev/ic/iha.c
1710
if ((scb->flags & (FLAG_DATAIN | FLAG_DATAOUT)) ==
sys/dev/ic/iha.c
1715
if (scb->buflen == 0)
sys/dev/ic/iha.c
1720
if ((scb->flags & (FLAG_DATAIN | FLAG_DATAOUT)) != 0)
sys/dev/ic/iha.c
1721
scb->ha_stat = iha_data_over_run(scb);
sys/dev/ic/iha.c
1727
scb->nextstat = 4;
sys/dev/ic/iha.c
1734
scb->buflen = 0;
sys/dev/ic/iha.c
1735
scb->ha_stat = HOST_SPERR;
sys/dev/ic/iha.c
1747
return (iha_xfer_data(sc, scb, FLAG_DATAIN));
sys/dev/ic/iha.c
1750
return (iha_xfer_data(sc, scb, FLAG_DATAOUT));
sys/dev/ic/iha.c
1770
struct iha_scb *scb = sc->sc_actscb;
sys/dev/ic/iha.c
1786
scb->ha_stat = HOST_SPERR;
sys/dev/ic/iha.c
1798
period = scb->tcs->syncm;
sys/dev/ic/iha.c
1824
scb->buflen = 0;
sys/dev/ic/iha.c
1830
xcnt = scb->buflen - cnt; /* xcnt == bytes xferred */
sys/dev/ic/iha.c
1831
scb->buflen = cnt; /* cnt == bytes left */
sys/dev/ic/iha.c
1833
if ((scb->flags & FLAG_SG) != 0) {
sys/dev/ic/iha.c
1834
sg = &scb->sglist[scb->sg_index];
sys/dev/ic/iha.c
1835
for (i = scb->sg_index; i < scb->sg_max; sg++, i++) {
sys/dev/ic/iha.c
1845
scb->sgoffset, IHA_SG_SIZE,
sys/dev/ic/iha.c
1848
scb->bufaddr += (i - scb->sg_index) *
sys/dev/ic/iha.c
1850
scb->sg_size = scb->sg_max - i;
sys/dev/ic/iha.c
1851
scb->sg_index = i;
sys/dev/ic/iha.c
1859
scb->bufaddr += xcnt;
sys/dev/ic/iha.c
1916
struct iha_scb *scb;
sys/dev/ic/iha.c
1923
scb = sc->sc_actscb;
sys/dev/ic/iha.c
1926
iha_append_done_scb(sc, scb, HOST_OK);
sys/dev/ic/iha.c
1928
iha_reset_tcs(scb->tcs, sc->sc_sconf1);
sys/dev/ic/iha.c
1930
tar = scb->target;
sys/dev/ic/iha.c
1931
for (i = 0, scb = sc->sc_scb; i < IHA_MAX_SCB; i++, scb++)
sys/dev/ic/iha.c
1932
if (scb->target == tar)
sys/dev/ic/iha.c
1933
switch (scb->status) {
sys/dev/ic/iha.c
1936
scb, HOST_DEV_RST);
sys/dev/ic/iha.c
1940
iha_push_pend_scb(sc, scb);
sys/dev/ic/iha.c
1961
iha_xfer_data(struct iha_softc *sc, struct iha_scb *scb, int direction)
sys/dev/ic/iha.c
1968
if ((scb->flags & (FLAG_DATAIN | FLAG_DATAOUT)) != direction)
sys/dev/ic/iha.c
1971
bus_space_write_4(iot, ioh, TUL_STCNT0, scb->buflen);
sys/dev/ic/iha.c
1977
if (scb->flags & FLAG_SG) {
sys/dev/ic/iha.c
1978
xferlen = scb->sg_size * sizeof(struct iha_sg_element);
sys/dev/ic/iha.c
1981
xferlen = scb->buflen;
sys/dev/ic/iha.c
1984
bus_space_write_4(iot, ioh, TUL_DXPA, scb->bufaddr);
sys/dev/ic/iha.c
1990
scb->nextstat = 5;
sys/dev/ic/iha.c
2000
struct iha_scb *scb = sc->sc_actscb;
sys/dev/ic/iha.c
2002
if ((scb->flags & (FLAG_DATAIN | FLAG_DATAOUT)) != 0)
sys/dev/ic/iha.c
2003
scb->ha_stat = HOST_DO_DU;
sys/dev/ic/iha.c
2006
if ((scb->tcs->syncm & PERIOD_WIDE_SCSI) != 0)
sys/dev/ic/iha.c
2031
struct iha_scb *scb = sc->sc_actscb;
sys/dev/ic/iha.c
2033
if ((scb->flags & (FLAG_DATAIN | FLAG_DATAOUT)) != 0)
sys/dev/ic/iha.c
2034
scb->ha_stat = HOST_DO_DU;
sys/dev/ic/iha.c
2037
if ((scb->tcs->syncm & PERIOD_WIDE_SCSI) != 0)
sys/dev/ic/iha.c
2065
struct iha_scb *scb;
sys/dev/ic/iha.c
2072
scb = sc->sc_actscb;
sys/dev/ic/iha.c
2074
scb->ta_stat = bus_space_read_1(iot, ioh, TUL_SFIFO);
sys/dev/ic/iha.c
2102
if ((scb->ta_stat &
sys/dev/ic/iha.c
2114
if ((scb->ta_stat &
sys/dev/ic/iha.c
2136
struct iha_scb *scb;
sys/dev/ic/iha.c
2142
scb = sc->sc_actscb;
sys/dev/ic/iha.c
2144
if (scb != NULL) {
sys/dev/ic/iha.c
2145
if (scb->status == STATUS_SELECT)
sys/dev/ic/iha.c
2147
iha_append_done_scb(sc, scb, HOST_SEL_TOUT);
sys/dev/ic/iha.c
2150
iha_append_done_scb(sc, scb, HOST_BAD_PHAS);
sys/dev/ic/iha.c
2162
struct iha_scb *scb;
sys/dev/ic/iha.c
2184
scb = tcs->ntagscb;
sys/dev/ic/iha.c
2224
scb = &sc->sc_scb[tag];
sys/dev/ic/iha.c
2229
if ((scb->target != target)
sys/dev/ic/iha.c
2230
|| (scb->lun != lun)
sys/dev/ic/iha.c
2231
|| (scb->status != STATUS_BUSY)) {
sys/dev/ic/iha.c
2237
sc->sc_actscb = scb;
sys/dev/ic/iha.c
242
iha_append_free_scb(struct iha_softc *sc, struct iha_scb *scb)
sys/dev/ic/iha.c
248
if (scb == sc->sc_actscb)
sys/dev/ic/iha.c
251
scb->status = STATUS_QUEUED;
sys/dev/ic/iha.c
252
scb->ha_stat = HOST_OK;
sys/dev/ic/iha.c
253
scb->ta_stat = SCSI_OK;
sys/dev/ic/iha.c
255
scb->nextstat = 0;
sys/dev/ic/iha.c
256
scb->scb_tagmsg = 0;
sys/dev/ic/iha.c
258
scb->xs = NULL;
sys/dev/ic/iha.c
259
scb->tcs = NULL;
sys/dev/ic/iha.c
2615
struct iha_scb *scb = sc->sc_actscb;
sys/dev/ic/iha.c
2617
if (scb != NULL)
sys/dev/ic/iha.c
2618
iha_append_done_scb(sc, scb, HOST_BAD_PHAS);
sys/dev/ic/iha.c
267
TAILQ_INSERT_TAIL(&sc->sc_freescb, scb, chain);
sys/dev/ic/iha.c
273
iha_append_done_scb(struct iha_softc *sc, struct iha_scb *scb, uint8_t hastat)
sys/dev/ic/iha.c
280
if (scb->xs != NULL)
sys/dev/ic/iha.c
281
callout_stop(&scb->xs->xs_callout);
sys/dev/ic/iha.c
283
if (scb == sc->sc_actscb)
sys/dev/ic/iha.c
286
tcs = scb->tcs;
sys/dev/ic/iha.c
288
if (scb->scb_tagmsg != 0) {
sys/dev/ic/iha.c
291
} else if (tcs->ntagscb == scb)
sys/dev/ic/iha.c
294
scb->status = STATUS_QUEUED;
sys/dev/ic/iha.c
295
scb->ha_stat = hastat;
sys/dev/ic/iha.c
297
TAILQ_INSERT_TAIL(&sc->sc_donescb, scb, chain);
sys/dev/ic/iha.c
305
struct iha_scb *scb;
sys/dev/ic/iha.c
310
scb = TAILQ_FIRST(&sc->sc_donescb);
sys/dev/ic/iha.c
312
if (scb != NULL) {
sys/dev/ic/iha.c
313
scb->status = STATUS_RENT;
sys/dev/ic/iha.c
314
TAILQ_REMOVE(&sc->sc_donescb, scb, chain);
sys/dev/ic/iha.c
319
return (scb);
sys/dev/ic/iha.c
331
struct iha_scb *scb;
sys/dev/ic/iha.c
338
scb = NULL;
sys/dev/ic/iha.c
341
TAILQ_FOREACH(scb, &sc->sc_pendscb, chain) {
sys/dev/ic/iha.c
342
if ((scb->xs->xs_control & XS_CTL_RESET) != 0)
sys/dev/ic/iha.c
346
tcs = scb->tcs;
sys/dev/ic/iha.c
348
if ((scb->scb_tagmsg) != 0) {
sys/dev/ic/iha.c
357
} else if (scb->cmd[0] == SCSI_REQUEST_SENSE) {
sys/dev/ic/iha.c
379
return (scb);
sys/dev/ic/iha.c
383
iha_append_pend_scb(struct iha_softc *sc, struct iha_scb *scb)
sys/dev/ic/iha.c
387
if (scb == sc->sc_actscb)
sys/dev/ic/iha.c
390
scb->status = STATUS_QUEUED;
sys/dev/ic/iha.c
392
TAILQ_INSERT_TAIL(&sc->sc_pendscb, scb, chain);
sys/dev/ic/iha.c
396
iha_push_pend_scb(struct iha_softc *sc, struct iha_scb *scb)
sys/dev/ic/iha.c
402
if (scb == sc->sc_actscb)
sys/dev/ic/iha.c
405
scb->status = STATUS_QUEUED;
sys/dev/ic/iha.c
407
TAILQ_INSERT_HEAD(&sc->sc_pendscb, scb, chain);
sys/dev/ic/iha.c
416
iha_del_pend_scb(struct iha_softc *sc, struct iha_scb *scb)
sys/dev/ic/iha.c
422
TAILQ_REMOVE(&sc->sc_pendscb, scb, chain);
sys/dev/ic/iha.c
428
iha_mark_busy_scb(struct iha_scb *scb)
sys/dev/ic/iha.c
434
scb->status = STATUS_BUSY;
sys/dev/ic/iha.c
436
if (scb->scb_tagmsg == 0)
sys/dev/ic/iha.c
437
scb->tcs->ntagscb = scb;
sys/dev/ic/iha.c
439
scb->tcs->tagcnt++;
sys/dev/ic/iha.c
500
struct iha_scb *scb;
sys/dev/ic/iha.c
528
for (i = 0, scb = sc->sc_scb; i < IHA_MAX_SCB; i++, scb++) {
sys/dev/ic/iha.c
529
scb->scb_tagid = i;
sys/dev/ic/iha.c
530
scb->sgoffset = IHA_SG_SIZE * i;
sys/dev/ic/iha.c
531
scb->sglist = sc->sc_sglist + IHA_MAX_SG_ENTRIES * i;
sys/dev/ic/iha.c
532
scb->sg_addr =
sys/dev/ic/iha.c
533
sc->sc_dmamap->dm_segs[0].ds_addr + scb->sgoffset;
sys/dev/ic/iha.c
537
BUS_DMA_NOWAIT, &scb->dmap);
sys/dev/ic/iha.c
545
TAILQ_INSERT_TAIL(&sc->sc_freescb, scb, chain);
sys/dev/ic/iha.c
674
struct iha_scb *scb;
sys/dev/ic/iha.c
686
if (xs->cmdlen > sizeof(scb->cmd) ||
sys/dev/ic/iha.c
694
scb = TAILQ_FIRST(&sc->sc_freescb);
sys/dev/ic/iha.c
695
if (scb != NULL) {
sys/dev/ic/iha.c
696
scb->status = STATUS_RENT;
sys/dev/ic/iha.c
697
TAILQ_REMOVE(&sc->sc_freescb, scb, chain);
sys/dev/ic/iha.c
711
scb->target = periph->periph_target;
sys/dev/ic/iha.c
712
scb->lun = periph->periph_lun;
sys/dev/ic/iha.c
713
scb->tcs = &sc->sc_tcs[scb->target];
sys/dev/ic/iha.c
714
scb->scb_id = MSG_IDENTIFY(periph->periph_lun,
sys/dev/ic/iha.c
717
scb->xs = xs;
sys/dev/ic/iha.c
718
scb->cmdlen = xs->cmdlen;
sys/dev/ic/iha.c
719
memcpy(&scb->cmd, xs->cmd, xs->cmdlen);
sys/dev/ic/iha.c
720
scb->buflen = xs->datalen;
sys/dev/ic/iha.c
721
scb->flags = 0;
sys/dev/ic/iha.c
723
scb->flags |= FLAG_DATAOUT;
sys/dev/ic/iha.c
725
scb->flags |= FLAG_DATAIN;
sys/dev/ic/iha.c
727
if (scb->flags & (FLAG_DATAIN | FLAG_DATAOUT)) {
sys/dev/ic/iha.c
728
error = bus_dmamap_load(sc->sc_dmat, scb->dmap,
sys/dev/ic/iha.c
729
xs->data, scb->buflen, NULL,
sys/dev/ic/iha.c
733
((scb->flags & FLAG_DATAIN) ?
sys/dev/ic/iha.c
739
iha_append_free_scb(sc, scb);
sys/dev/ic/iha.c
744
bus_dmamap_sync(sc->sc_dmat, scb->dmap,
sys/dev/ic/iha.c
745
0, scb->dmap->dm_mapsize,
sys/dev/ic/iha.c
746
(scb->flags & FLAG_DATAIN) ?
sys/dev/ic/iha.c
750
iha_exec_scb(sc, scb);
sys/dev/ic/iha.c
810
struct iha_scb *scb;
sys/dev/ic/iha.c
818
for (i = 0, scb = sc->sc_scb; i < IHA_MAX_SCB; i++, scb++)
sys/dev/ic/iha.c
819
switch (scb->status) {
sys/dev/ic/iha.c
821
iha_append_done_scb(sc, scb, HOST_SCSI_RST);
sys/dev/ic/iha.c
825
iha_push_pend_scb(sc, scb);
sys/dev/ic/iha.c
908
struct iha_scb *scb;
sys/dev/ic/iha.c
913
while ((scb = iha_pop_done_scb(sc)) != NULL)
sys/dev/ic/iha.c
914
iha_done_scb(sc, scb);
sys/dev/ic/iha.c
937
struct iha_scb *scb;
sys/dev/ic/iha.c
979
if ((scb = iha_find_pend_scb(sc)) == NULL)
sys/dev/ic/iha.c
982
tcs = scb->tcs;
sys/dev/ic/iha.c
985
bus_space_write_1(iot, ioh, TUL_SID, (sc->sc_id << 4) | scb->target);
sys/dev/ic/iha.c
987
if ((scb->xs->xs_control & XS_CTL_RESET) == 0) {
sys/dev/ic/iha.c
992
iha_select(sc, scb, SELATNSTOP);
sys/dev/ic/iha.c
994
else if (scb->scb_tagmsg != 0)
sys/dev/ic/iha.c
995
iha_select(sc, scb, SEL_ATN3);
sys/dev/ic/iha.c
998
iha_select(sc, scb, SEL_ATN);
sys/dev/isa/if_ai.c
360
sc->scb = IE_ISCP_SZ;
sys/dev/isa/if_ai.c
363
sc->buf_area = sc->scb + IE_SCB_SZ;
sys/dev/isa/if_ai.c
375
ai_write_16(sc, IE_ISCP_SCB((u_long)sc->iscp), (u_long)sc->scb);
sys/dev/isa/if_ai.c
450
sc->scb = IE_ISCP_SZ;
sys/dev/isa/if_ai.c
451
bus_space_set_region_1(memt, memh, sc->scb, 0, IE_SCB_SZ);
sys/dev/isa/if_ai.c
459
ai_write_16(sc, IE_ISCP_SCB((u_long)sc->iscp), (u_long)sc->scb);
sys/dev/isa/if_ef.c
549
sc->scb = IE_ISCP_SZ;
sys/dev/isa/if_ef.c
552
sc->buf_area = sc->scb + IE_SCB_SZ;
sys/dev/isa/if_ef.c
564
ef_write_16(sc, IE_ISCP_SCB((u_long)sc->iscp), (u_long)sc->scb);
sys/dev/isa/if_ix.c
795
sc->scb = IE_ISCP_SZ;
sys/dev/isa/if_ix.c
798
sc->buf_area = sc->scb + IE_SCB_SZ;
sys/dev/isa/if_ix.c
818
ix_write_16(sc, IE_ISCP_SCB((u_long)sc->iscp), (u_long)sc->scb);
sys/dev/isa/seagate.c
1049
sea_select(struct sea_softc *sea, struct sea_scb *scb)
sys/dev/isa/seagate.c
1067
scb->flags |= SCB_ERROR;
sys/dev/isa/seagate.c
1071
scb->flags |= SCB_TIMEOUT;
sys/dev/isa/seagate.c
1078
DATA = (u_char)((1 << scb->xs->xs_periph->periph_target) |
sys/dev/isa/seagate.c
1095
scb->flags |= SCB_TIMEOUT;
sys/dev/isa/seagate.c
1121
msg[0] = MSG_IDENTIFY(scb->xs->xs_periph->periph_lun, 1);
sys/dev/isa/seagate.c
1132
sea->nexus = scb;
sys/dev/isa/seagate.c
1133
sea->busy[scb->xs->xs_periph->periph_target] |=
sys/dev/isa/seagate.c
1134
1 << scb->xs->xs_periph->periph_lun;
sys/dev/isa/seagate.c
1145
sea_abort(struct sea_softc *sea, struct sea_scb *scb)
sys/dev/isa/seagate.c
1157
if (scb == tmp) {
sys/dev/isa/seagate.c
1158
TAILQ_REMOVE(&sea->ready_list, scb, chain);
sys/dev/isa/seagate.c
1177
if (scb == tmp) {
sys/dev/isa/seagate.c
1178
if (sea_select(sea, scb))
sys/dev/isa/seagate.c
1190
if (scb == tmp) {
sys/dev/isa/seagate.c
1192
scb, chain);
sys/dev/isa/seagate.c
1204
sea_done(struct sea_softc *sea, struct sea_scb *scb)
sys/dev/isa/seagate.c
1206
struct scsipi_xfer *xs = scb->xs;
sys/dev/isa/seagate.c
1208
callout_stop(&scb->xs->xs_callout);
sys/dev/isa/seagate.c
1210
xs->resid = scb->datalen;
sys/dev/isa/seagate.c
1213
if (scb->flags == SCB_ACTIVE) {
sys/dev/isa/seagate.c
1216
if (scb->flags & (SCB_TIMEOUT | SCB_ABORTED))
sys/dev/isa/seagate.c
1218
if (scb->flags & SCB_ERROR)
sys/dev/isa/seagate.c
1221
sea_free_scb(sea, scb, xs->xs_control);
sys/dev/isa/seagate.c
1260
struct sea_scb *scb = sea->nexus;
sys/dev/isa/seagate.c
1277
scb->flags = SCB_ERROR;
sys/dev/isa/seagate.c
1279
sea_done(sea, scb);
sys/dev/isa/seagate.c
1306
if (!scb->data)
sys/dev/isa/seagate.c
1309
if (scb->datalen && !(scb->datalen % BLOCK_SIZE)) {
sys/dev/isa/seagate.c
1310
while (scb->datalen) {
sys/dev/isa/seagate.c
1331
"=S" (scb->data),
sys/dev/isa/seagate.c
1334
"0" (scb->data),
sys/dev/isa/seagate.c
1340
DATA = *(scb->data++);
sys/dev/isa/seagate.c
1348
"=D" (scb->data),
sys/dev/isa/seagate.c
1351
"0" (scb->data),
sys/dev/isa/seagate.c
1357
*(scb->data++) = DATA;
sys/dev/isa/seagate.c
1360
scb->datalen -= BLOCK_SIZE;
sys/dev/isa/seagate.c
1364
if (scb->datalen)
sys/dev/isa/seagate.c
1365
sea_transfer_pio(sea, &phase, &scb->datalen,
sys/dev/isa/seagate.c
1366
&scb->data);
sys/dev/isa/seagate.c
1377
scb->flags = SCB_ABORTED;
sys/dev/isa/seagate.c
1380
sea_done(sea, scb);
sys/dev/isa/seagate.c
1386
sea->busy[scb->xs->xs_periph->periph_target] &=
sys/dev/isa/seagate.c
1387
~(1 << scb->xs->xs_periph->periph_lun);
sys/dev/isa/seagate.c
1389
sea_done(sea, scb);
sys/dev/isa/seagate.c
1398
scb, chain);
sys/dev/isa/seagate.c
1428
sea->busy[scb->xs->xs_periph->periph_target] &=
sys/dev/isa/seagate.c
1429
~(1 << scb->xs->xs_periph->periph_lun);
sys/dev/isa/seagate.c
1431
scb->flags = SCB_ABORTED;
sys/dev/isa/seagate.c
1434
sea_done(sea, scb);
sys/dev/isa/seagate.c
1440
len = scb->xs->cmdlen;
sys/dev/isa/seagate.c
1441
data = (char *) scb->xs->cmd;
sys/dev/isa/seagate.c
1448
scb->xs->status = tmp;
sys/dev/isa/seagate.c
1457
scb->flags = SCB_TIMEOUT;
sys/dev/isa/seagate.c
1459
sea_done(sea, scb);
sys/dev/isa/seagate.c
206
struct sea_scb scb[SCB_TABLE_SIZE];
sys/dev/isa/seagate.c
287
void sea_send_scb(struct sea_softc *sea, struct sea_scb *scb);
sys/dev/isa/seagate.c
289
int sea_select(struct sea_softc *sea, struct sea_scb *scb);
sys/dev/isa/seagate.c
292
int sea_abort(struct sea_softc *, struct sea_scb *scb);
sys/dev/isa/seagate.c
308
struct sea_scb *scb;
sys/dev/isa/seagate.c
312
for (scb = sea->ready_list.tqh_first, issued = 0; scb;
sys/dev/isa/seagate.c
313
scb = scb->chain.tqe_next, issued++);
sys/dev/isa/seagate.c
314
for (scb = sea->nexus_list.tqh_first, disconnected = 0; scb;
sys/dev/isa/seagate.c
315
scb = scb->chain.tqe_next, disconnected++);
sys/dev/isa/seagate.c
549
TAILQ_INSERT_TAIL(&sea->free_list, &sea->scb[i], chain);
sys/dev/isa/seagate.c
564
struct sea_scb *scb;
sys/dev/isa/seagate.c
585
scb = sea_get_scb(sea, flags);
sys/dev/isa/seagate.c
591
if (scb == NULL) {
sys/dev/isa/seagate.c
598
scb->flags = SCB_ACTIVE;
sys/dev/isa/seagate.c
599
scb->xs = xs;
sys/dev/isa/seagate.c
604
scb->datalen = xs->datalen;
sys/dev/isa/seagate.c
605
scb->data = xs->data;
sys/dev/isa/seagate.c
613
sea_send_scb(sea, scb);
sys/dev/isa/seagate.c
616
callout_reset(&scb->xs->xs_callout,
sys/dev/isa/seagate.c
617
mstohz(xs->timeout), sea_timeout, scb);
sys/dev/isa/seagate.c
628
sea_timeout(scb);
sys/dev/isa/seagate.c
630
sea_timeout(scb);
sys/dev/isa/seagate.c
663
struct sea_scb *scb;
sys/dev/isa/seagate.c
666
if ((scb = TAILQ_FIRST(&sea->free_list)) != NULL)
sys/dev/isa/seagate.c
667
TAILQ_REMOVE(&sea->free_list, scb, chain);
sys/dev/isa/seagate.c
670
return (scb);
sys/dev/isa/seagate.c
682
sea_send_scb(struct sea_softc *sea, struct sea_scb *scb)
sys/dev/isa/seagate.c
685
TAILQ_INSERT_TAIL(&sea->ready_list, scb, chain);
sys/dev/isa/seagate.c
701
struct sea_scb *scb;
sys/dev/isa/seagate.c
724
for (scb = sea->ready_list.tqh_first; scb;
sys/dev/isa/seagate.c
725
scb = scb->chain.tqe_next) {
sys/dev/isa/seagate.c
726
if ((sea->busy[scb->xs->xs_periph->periph_target] &
sys/dev/isa/seagate.c
727
(1 << scb->xs->xs_periph->periph_lun)))
sys/dev/isa/seagate.c
731
TAILQ_REMOVE(&sea->ready_list, scb, chain);
sys/dev/isa/seagate.c
765
if (sea_select(sea, scb)) {
sys/dev/isa/seagate.c
768
scb, chain);
sys/dev/isa/seagate.c
804
struct sea_scb *scb;
sys/dev/isa/seagate.c
811
scb = kmem_zalloc(sizeof(*scb), KM_NOSLEEP);
sys/dev/isa/seagate.c
812
if (scb == NULL)
sys/dev/isa/seagate.c
815
TAILQ_INSERT_TAIL(&sea->free_list, scb, chain);
sys/dev/isa/seagate.c
820
sea_free_scb(struct sea_softc *sea, struct sea_scb *scb, int flags)
sys/dev/isa/seagate.c
825
scb->flags = SCB_FREE;
sys/dev/isa/seagate.c
826
TAILQ_INSERT_HEAD(&sea->free_list, scb, chain);
sys/dev/isa/seagate.c
833
struct sea_scb *scb = arg;
sys/dev/isa/seagate.c
834
struct scsipi_xfer *xs = scb->xs;
sys/dev/isa/seagate.c
850
if (scb->flags & SCB_ABORTED) {
sys/dev/isa/seagate.c
853
scb->xs->xs_retries = 0;
sys/dev/isa/seagate.c
854
scb->flags |= SCB_ABORTED;
sys/dev/isa/seagate.c
855
sea_done(sea, scb);
sys/dev/isa/seagate.c
859
scb->flags |= SCB_ABORTED;
sys/dev/isa/seagate.c
860
sea_abort(sea, scb);
sys/dev/isa/seagate.c
863
callout_reset(&scb->xs->xs_callout, 2 * hz,
sys/dev/isa/seagate.c
864
sea_timeout, scb);
sys/dev/isa/seagate.c
879
struct sea_scb *scb;
sys/dev/isa/seagate.c
922
scb = NULL;
sys/dev/isa/seagate.c
931
for (scb = sea->nexus_list.tqh_first; scb;
sys/dev/isa/seagate.c
932
scb = scb->chain.tqe_next)
sys/dev/isa/seagate.c
933
if (target_mask == (1 << scb->xs->xs_periph->periph_target) &&
sys/dev/isa/seagate.c
934
lun == scb->xs->xs_periph->periph_lun) {
sys/dev/isa/seagate.c
935
TAILQ_REMOVE(&sea->nexus_list, scb,
sys/dev/isa/seagate.c
939
if (!scb) {
sys/dev/isa/seagate.c
958
sea->nexus = scb;
sys/dev/isa/wds.c
1000
struct wds_scb *scb;
sys/dev/isa/wds.c
1006
scb = wds_get_scb(sc);
sys/dev/isa/wds.c
1007
if (scb == 0)
sys/dev/isa/wds.c
1010
scb->xs = NULL;
sys/dev/isa/wds.c
1011
scb->timeout = 40;
sys/dev/isa/wds.c
1013
memset(&scb->cmd, 0, sizeof scb->cmd);
sys/dev/isa/wds.c
1014
scb->cmd.write = 0x80;
sys/dev/isa/wds.c
1015
scb->cmd.opcode = WDSX_GETFIRMREV;
sys/dev/isa/wds.c
1019
scb->flags |= SCB_POLLED;
sys/dev/isa/wds.c
1022
wds_queue_scb(sc, scb);
sys/dev/isa/wds.c
1025
if (wds_ipoll(sc, scb, scb->timeout))
sys/dev/isa/wds.c
1030
scb->cmd.targ, scb->cmd.scb[0]);
sys/dev/isa/wds.c
1031
sc->sc_revision = (scb->cmd.targ << 8) | scb->cmd.scb[0];
sys/dev/isa/wds.c
1033
j = 2 + &(scb->cmd.targ);
sys/dev/isa/wds.c
1051
wds_free_scb(sc, scb);
sys/dev/isa/wds.c
1074
struct wds_scb *scb;
sys/dev/isa/wds.c
1106
scb = wds_get_scb(sc);
sys/dev/isa/wds.c
1112
if (scb == NULL) {
sys/dev/isa/wds.c
1119
scb->xs = xs;
sys/dev/isa/wds.c
1120
scb->timeout = xs->timeout;
sys/dev/isa/wds.c
1123
if (xs->cmdlen > sizeof(scb->cmd.scb)) {
sys/dev/isa/wds.c
1129
memset(&scb->cmd, 0, sizeof scb->cmd);
sys/dev/isa/wds.c
1130
memcpy(&scb->cmd.scb, xs->cmd, xs->cmdlen);
sys/dev/isa/wds.c
1133
scb->cmd.targ = (periph->periph_target << 5) |
sys/dev/isa/wds.c
1141
scb->cmd.write = (xs->xs_control & XS_CTL_DATA_IN) ?
sys/dev/isa/wds.c
1149
scb->dmamap_xfer, (struct uio *)xs->data,
sys/dev/isa/wds.c
1157
scb->dmamap_xfer, xs->data, xs->datalen,
sys/dev/isa/wds.c
1177
wds_free_scb(sc, scb);
sys/dev/isa/wds.c
1182
bus_dmamap_sync(dmat, scb->dmamap_xfer, 0,
sys/dev/isa/wds.c
1183
scb->dmamap_xfer->dm_mapsize,
sys/dev/isa/wds.c
1193
seg < scb->dmamap_xfer->dm_nsegs; seg++) {
sys/dev/isa/wds.c
1194
ltophys(scb->dmamap_xfer->dm_segs[seg].ds_addr,
sys/dev/isa/wds.c
1195
scb->scat_gath[seg].seg_addr);
sys/dev/isa/wds.c
1196
ltophys(scb->dmamap_xfer->dm_segs[seg].ds_len,
sys/dev/isa/wds.c
1197
scb->scat_gath[seg].seg_len);
sys/dev/isa/wds.c
1203
scb->cmd.opcode = WDSX_SCSISG;
sys/dev/isa/wds.c
1204
ltophys(scb->dmamap_self->dm_segs[0].ds_addr +
sys/dev/isa/wds.c
1206
scb->cmd.data);
sys/dev/isa/wds.c
1207
ltophys(scb->dmamap_self->dm_nsegs *
sys/dev/isa/wds.c
1208
sizeof(struct wds_scat_gath), scb->cmd.len);
sys/dev/isa/wds.c
1214
scb->cmd.opcode = WDSX_SCSICMD;
sys/dev/isa/wds.c
1215
ltophys(scb->dmamap_xfer->dm_segs[0].ds_addr,
sys/dev/isa/wds.c
1216
scb->cmd.data);
sys/dev/isa/wds.c
1217
ltophys(scb->dmamap_xfer->dm_segs[0].ds_len,
sys/dev/isa/wds.c
1218
scb->cmd.len);
sys/dev/isa/wds.c
1221
scb->cmd.opcode = WDSX_SCSICMD;
sys/dev/isa/wds.c
1222
ltophys(0, scb->cmd.data);
sys/dev/isa/wds.c
1223
ltophys(0, scb->cmd.len);
sys/dev/isa/wds.c
1226
scb->cmd.stat = 0x00;
sys/dev/isa/wds.c
1227
scb->cmd.venderr = 0x00;
sys/dev/isa/wds.c
1228
ltophys(0, scb->cmd.link);
sys/dev/isa/wds.c
1235
scb->flags |= SCB_POLLED;
sys/dev/isa/wds.c
1246
wds_queue_scb(sc, scb);
sys/dev/isa/wds.c
1252
if (wds_poll(sc, xs, scb->timeout)) {
sys/dev/isa/wds.c
1253
wds_timeout(scb);
sys/dev/isa/wds.c
1254
if (wds_poll(sc, xs, scb->timeout))
sys/dev/isa/wds.c
1255
wds_timeout(scb);
sys/dev/isa/wds.c
1298
wds_ipoll(struct wds_softc *sc, struct wds_scb *scb, int count)
sys/dev/isa/wds.c
1311
if (scb->flags & SCB_DONE)
sys/dev/isa/wds.c
1322
struct wds_scb *scb = arg;
sys/dev/isa/wds.c
1323
struct scsipi_xfer *xs = scb->xs;
sys/dev/isa/wds.c
1339
if (scb->flags & SCB_SENDING) {
sys/dev/isa/wds.c
1350
if (scb->flags & SCB_ABORT) {
sys/dev/isa/wds.c
1357
scb->xs->error = XS_TIMEOUT;
sys/dev/isa/wds.c
1358
scb->timeout = WDS_ABORT_TIMEOUT;
sys/dev/isa/wds.c
1359
scb->flags |= SCB_ABORT;
sys/dev/isa/wds.c
1360
wds_queue_scb(sc, scb);
sys/dev/isa/wds.c
412
struct wds_scb *scb;
sys/dev/isa/wds.c
435
scb = wds_scb_phys_kv(sc, phystol(wmbi->scb_addr));
sys/dev/isa/wds.c
436
if (!scb) {
sys/dev/isa/wds.c
444
u_char *cp = scb->cmd.xx;
sys/dev/isa/wds.c
449
printf("scb addr = %p\n", scb);
sys/dev/isa/wds.c
453
callout_stop(&scb->xs->xs_callout);
sys/dev/isa/wds.c
454
wds_done(sc, scb, wmbi->stat);
sys/dev/isa/wds.c
504
wds_reset_scb(struct wds_softc *sc, struct wds_scb *scb)
sys/dev/isa/wds.c
507
scb->flags = 0;
sys/dev/isa/wds.c
514
wds_free_scb(struct wds_softc *sc, struct wds_scb *scb)
sys/dev/isa/wds.c
519
wds_reset_scb(sc, scb);
sys/dev/isa/wds.c
520
TAILQ_INSERT_HEAD(&sc->sc_free_scb, scb, chain);
sys/dev/isa/wds.c
525
wds_init_scb(struct wds_softc *sc, struct wds_scb *scb)
sys/dev/isa/wds.c
535
memset(scb, 0, sizeof(struct wds_scb));
sys/dev/isa/wds.c
541
sizeof(struct wds_scb), 0, BUS_DMA_NOWAIT, &scb->dmamap_self);
sys/dev/isa/wds.c
548
0, BUS_DMA_NOWAIT|BUS_DMA_ALLOCNOW, &scb->dmamap_xfer);
sys/dev/isa/wds.c
551
bus_dmamap_destroy(dmat, scb->dmamap_self);
sys/dev/isa/wds.c
558
error = bus_dmamap_load(dmat, scb->dmamap_self, scb,
sys/dev/isa/wds.c
562
bus_dmamap_destroy(dmat, scb->dmamap_self);
sys/dev/isa/wds.c
563
bus_dmamap_destroy(dmat, scb->dmamap_xfer);
sys/dev/isa/wds.c
571
scb->hashkey = scb->dmamap_self->dm_segs[0].ds_addr;
sys/dev/isa/wds.c
572
hashnum = SCB_HASH(scb->hashkey);
sys/dev/isa/wds.c
573
scb->nexthash = sc->sc_scbhash[hashnum];
sys/dev/isa/wds.c
574
sc->sc_scbhash[hashnum] = scb;
sys/dev/isa/wds.c
575
wds_reset_scb(sc, scb);
sys/dev/isa/wds.c
586
struct wds_scb *scb;
sys/dev/isa/wds.c
592
if ((scb = mem) != NULL)
sys/dev/isa/wds.c
605
(void *)&scb, BUS_DMA_NOWAIT|BUS_DMA_COHERENT);
sys/dev/isa/wds.c
613
memset(scb, 0, size);
sys/dev/isa/wds.c
615
error = wds_init_scb(sc, scb);
sys/dev/isa/wds.c
620
TAILQ_INSERT_TAIL(&sc->sc_free_scb, scb, chain);
sys/dev/isa/wds.c
621
scb = (struct wds_scb *)((char *)scb +
sys/dev/isa/wds.c
639
struct wds_scb *scb;
sys/dev/isa/wds.c
643
scb = TAILQ_FIRST(&sc->sc_free_scb);
sys/dev/isa/wds.c
644
if (scb != NULL) {
sys/dev/isa/wds.c
645
TAILQ_REMOVE(&sc->sc_free_scb, scb, chain);
sys/dev/isa/wds.c
646
scb->flags |= SCB_ALLOC;
sys/dev/isa/wds.c
649
return (scb);
sys/dev/isa/wds.c
656
struct wds_scb *scb = sc->sc_scbhash[hashnum];
sys/dev/isa/wds.c
658
while (scb) {
sys/dev/isa/wds.c
659
if (scb->hashkey == scb_phys)
sys/dev/isa/wds.c
662
if (scb->hashkey == (scb_phys - sizeof(struct wds_cmd)))
sys/dev/isa/wds.c
664
scb = scb->nexthash;
sys/dev/isa/wds.c
666
return (scb);
sys/dev/isa/wds.c
673
wds_queue_scb(struct wds_softc *sc, struct wds_scb *scb)
sys/dev/isa/wds.c
676
TAILQ_INSERT_TAIL(&sc->sc_waiting_scb, scb, chain);
sys/dev/isa/wds.c
688
struct wds_scb *scb;
sys/dev/isa/wds.c
698
scb = wds_scb_phys_kv(sc, phystol(wmbo->scb_addr));
sys/dev/isa/wds.c
699
scb->flags &= ~SCB_SENDING;
sys/dev/isa/wds.c
718
struct wds_scb *scb;
sys/dev/isa/wds.c
723
while ((scb = sc->sc_waiting_scb.tqh_first) != NULL) {
sys/dev/isa/wds.c
733
TAILQ_REMOVE(&sc->sc_waiting_scb, scb, chain);
sys/dev/isa/wds.c
735
scb->flags |= SCB_SENDING;
sys/dev/isa/wds.c
739
ltophys(scb->dmamap_self->dm_segs[0].ds_addr +
sys/dev/isa/wds.c
748
if ((scb->flags & SCB_POLLED) == 0)
sys/dev/isa/wds.c
749
callout_reset(&scb->xs->xs_callout,
sys/dev/isa/wds.c
750
mstohz(scb->timeout), wds_timeout, scb);
sys/dev/isa/wds.c
763
wds_done(struct wds_softc *sc, struct wds_scb *scb, u_char stat)
sys/dev/isa/wds.c
766
struct scsipi_xfer *xs = scb->xs;
sys/dev/isa/wds.c
772
scb->flags |= SCB_DONE;
sys/dev/isa/wds.c
781
bus_dmamap_sync(dmat, scb->dmamap_xfer, 0,
sys/dev/isa/wds.c
782
scb->dmamap_xfer->dm_mapsize,
sys/dev/isa/wds.c
785
bus_dmamap_unload(dmat, scb->dmamap_xfer);
sys/dev/isa/wds.c
800
switch (scb->cmd.venderr) {
sys/dev/isa/wds.c
812
if (scb->cmd.stat == SCSI_CHECK ||
sys/dev/isa/wds.c
813
scb->cmd.stat == SCSI_BUSY) {
sys/dev/isa/wds.c
814
xs->status = scb->cmd.stat;
sys/dev/isa/wds.c
837
scb->cmd.venderr,
sys/dev/isa/wds.c
838
scb->cmd.stat);
sys/dev/isa/wds.c
866
wds_free_scb(sc, scb);
sys/dev/isa/wdsreg.h
55
u_char scb[12];
sys/dev/mca/if_elmc_mca.c
206
sc->scb = IE_ISCP_SZ;
sys/dev/mca/if_elmc_mca.c
209
sc->buf_area = sc->scb + IE_SCB_SZ;
sys/dev/mca/if_elmc_mca.c
232
elmc_mca_write_16(sc, IE_ISCP_SCB((u_long)sc->iscp), (u_long) sc->scb);
sys/dev/microcode/aic7xxx/aicasm_gram.y
239
| scb
sys/dev/microcode/aic7xxx/aicasm_gram.y
240
| program scb
sys/dev/microcode/aic7xxx/aicasm_gram.y
812
scb:
sys/dev/mvme/if_ie_mvme.c
286
sc->scb = sc->iscp + IE_ISCP_SZ;
sys/dev/mvme/if_ie_mvme.c
287
sc->buf_area = sc->scb + IE_SCB_SZ;
sys/dev/mvme/if_ie_mvme.c
298
ie_write_16(sc, IE_ISCP_SCB(sc->iscp), sc->scb);
sys/dev/podulebus/if_ei.c
162
sc->sc_ie.scb = IE_ISCP_SZ;
sys/dev/podulebus/if_ei.c
165
sc->sc_ie.buf_area = sc->sc_ie.scb + IE_SCB_SZ;
sys/dev/podulebus/if_ei.c
180
(u_long) sc->sc_ie.scb);
sys/dev/usb/ugen.c
196
const struct ugen_softc *scb = vscb;
sys/dev/usb/ugen.c
198
if (sca->sc_unit < scb->sc_unit)
sys/dev/usb/ugen.c
200
if (sca->sc_unit > scb->sc_unit)
sys/dev/vme/if_ie_vme.c
536
sc->scb = IE_ISCP_SZ;
sys/dev/vme/if_ie_vme.c
538
ie_vme_write16(sc, IE_ISCP_SCB((long)sc->iscp), sc->scb);