• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/sys/cam/scsi/

Lines Matching defs:cb

112 	struct CCBTYPE *cb;						\
117 cb = TAILQ_FIRST(&(CCBTYPE##que.CCBTYPE##tab)); \
118 if (cb != NULL) { \
119 TAILQ_REMOVE(&CCBTYPE##que.CCBTYPE##tab, cb, CHAIN);\
122 cb = malloc(sizeof(*cb), M_DEVBUF, M_NOWAIT | M_ZERO); \
123 if (cb != NULL) \
129 cb = NULL; \
132 return cb; \
136 DEV##_free_ccb(struct CCBTYPE *cb) \
139 TAILQ_INSERT_TAIL(&CCBTYPE##que.CCBTYPE##tab, cb, CHAIN); \
280 scsi_low_activate_qtag(cb)
281 struct slccb *cb;
283 struct lun_info *li = cb->li;
285 if (cb->ccb_tag != SCSI_LOW_UNKTAG)
289 cb->ccb_tag = cb->ccb_otag;
293 scsi_low_deactivate_qtag(cb)
294 struct slccb *cb;
296 struct lun_info *li = cb->li;
298 if (cb->ccb_tag == SCSI_LOW_UNKTAG)
302 cb->ccb_tag = SCSI_LOW_UNKTAG;
306 scsi_low_ccb_message_exec(slp, cb)
308 struct slccb *cb;
311 scsi_low_assert_msg(slp, cb->ti, cb->ccb_msgoutflag, 0);
312 cb->ccb_msgoutflag = 0;
316 scsi_low_ccb_message_assert(cb, msg)
317 struct slccb *cb;
321 cb->ccb_msgoutflag = cb->ccb_omsgoutflag = msg;
325 scsi_low_ccb_message_retry(cb)
326 struct slccb *cb;
328 cb->ccb_msgoutflag = cb->ccb_omsgoutflag;
332 scsi_low_ccb_message_clear(cb)
333 struct slccb *cb;
335 cb->ccb_msgoutflag = 0;
382 struct slccb *cb;
389 if ((cb = slp->sl_Qnexus) != NULL && cb->osdep == osdep)
390 return cb;
392 TAILQ_FOREACH(cb, &slp->sl_start, ccb_chain)
394 if (cb->osdep == osdep)
395 return cb;
398 TAILQ_FOREACH(cb, &li->li_discq, ccb_chain)
400 if (cb->osdep == osdep)
401 return cb;
407 scsi_low_translate_error_code(cb, tp)
408 struct slccb *cb;
412 if (cb->ccb_error == 0)
415 for (tp ++; (cb->ccb_error & tp->error_bits) == 0; tp ++)
483 struct slccb *cb;
512 if (((cb = SCSI_LOW_ALLOC_CCB(1)) == NULL)) {
519 cb->osdep = ccb;
520 cb->bp = NULL;
533 scsi_low_enqueue(slp, ti, li, cb, flags, 0);
554 cb = scsi_low_find_ccb(slp, target, lun, ccb->cab.abort_ccb);
555 rv = scsi_low_abort_ccb(slp, cb);
732 if (((cb = SCSI_LOW_ALLOC_CCB(1)) == NULL))
742 cb->osdep = ccb;
743 cb->bp = NULL;
750 scsi_low_enqueue(slp, ti, li, cb, flags, msg);
855 scsi_low_ccb_setup_cam(slp, cb)
857 struct slccb *cb;
859 union ccb *ccb = (union ccb *) cb->osdep;
861 if ((cb->ccb_flags & CCB_SCSIIO) != 0)
863 cb->ccb_scp.scp_cmd = ccb->csio.cdb_io.cdb_bytes;
864 cb->ccb_scp.scp_cmdlen = (int) ccb->csio.cdb_len;
865 cb->ccb_scp.scp_data = ccb->csio.data_ptr;
866 cb->ccb_scp.scp_datalen = (int) ccb->csio.dxfer_len;
868 cb->ccb_scp.scp_direction = SCSI_LOW_WRITE;
870 cb->ccb_scp.scp_direction = SCSI_LOW_READ;
871 cb->ccb_tcmax = ccb->ccb_h.timeout / 1000;
875 scsi_low_unit_ready_cmd(cb);
881 scsi_low_done_cam(slp, cb)
883 struct slccb *cb;
887 ccb = (union ccb *) cb->osdep;
888 if (cb->ccb_error == 0)
895 if (cb->ccb_rcnt >= slp->sl_max_retry)
896 cb->ccb_error |= ABORTIO;
898 if ((cb->ccb_flags & CCB_NORETRY) == 0 &&
899 (cb->ccb_error & ABORTIO) == 0)
902 if ((cb->ccb_error & SENSEIO) != 0)
905 &cb->ccb_sense,
909 ccb->ccb_h.status = scsi_low_translate_error_code(cb,
913 if ((cb->ccb_flags & CCB_SILENT) == 0 &&
914 cb->ccb_scp.scp_cmdlen > 0 &&
915 (scsi_low_cmd_flags[cb->ccb_scp.scp_cmd[0]] &
928 if (cb->ccb_scp.scp_status == ST_UNKNOWN)
931 ccb->csio.scsi_status = cb->ccb_scp.scp_status;
933 if ((cb->ccb_flags & CCB_NOSDONE) == 0)
1265 struct slccb *cb = NULL; /* XXX */
1274 cb = TAILQ_FIRST(&slp->sl_start);
1275 if (cb == NULL)
1278 if (cb->ccb_selrcnt >= SCSI_LOW_MAX_SELECTION_RETRY)
1280 cb->ccb_flags |= CCB_NORETRY;
1281 cb->ccb_error |= SELTIMEOUTIO;
1282 if (scsi_low_revoke_ccb(slp, cb, 1) != NULL)
1305 if ((cb = slp->sl_Qnexus) != NULL)
1307 cb->ccb_tc -= SCSI_LOW_TIMEOUT_CHECK_INTERVAL;
1308 if (cb->ccb_tc < 0)
1313 if ((cb = TAILQ_FIRST(&slp->sl_start)) == NULL)
1316 cb->ccb_tc -= SCSI_LOW_TIMEOUT_CHECK_INTERVAL;
1317 if (cb->ccb_tc < 0)
1329 for (cb = TAILQ_FIRST(&li->li_discq);
1330 cb != NULL;
1331 cb = TAILQ_NEXT(cb, ccb_chain))
1333 cb->ccb_tc -=
1335 if (cb->ccb_tc < 0)
1366 cb->ccb_error |= TIMEOUTIO;
1367 device_printf(slp->sl_dev, "slccb (0x%lx) timeout!\n", (u_long) cb);
1376 scsi_low_abort_ccb(slp, cb)
1378 struct slccb *cb;
1384 if (cb == NULL)
1386 if ((cb->ccb_omsgoutflag &
1390 ti = cb->ti;
1391 li = cb->li;
1392 if (cb->ccb_tag == SCSI_LOW_UNKTAG)
1397 cb->ccb_error |= ABORTIO;
1398 cb->ccb_flags |= CCB_NORETRY;
1399 scsi_low_ccb_message_assert(cb, msg);
1401 if (cb == slp->sl_Qnexus)
1405 else if ((cb->ccb_flags & CCB_DISCQ) != 0)
1407 if (scsi_low_revoke_ccb(slp, cb, 0) == NULL)
1411 cb->ccb_flags |= CCB_STARTQ;
1412 TAILQ_INSERT_HEAD(&slp->sl_start, cb, ccb_chain);
1419 if (scsi_low_revoke_ccb(slp, cb, 1) != NULL)
1550 scsi_low_enqueue(slp, ti, li, cb, flags, msg)
1554 struct slccb *cb;
1558 cb->ti = ti;
1559 cb->li = li;
1561 scsi_low_ccb_message_assert(cb, msg);
1563 cb->ccb_otag = cb->ccb_tag = SCSI_LOW_UNKTAG;
1564 scsi_low_alloc_qtag(cb);
1566 cb->ccb_flags = flags | CCB_STARTQ;
1567 cb->ccb_tc = cb->ccb_tcmax = SCSI_LOW_MIN_TOUT;
1568 cb->ccb_error |= PENDINGIO;
1572 TAILQ_INSERT_HEAD(&slp->sl_start, cb, ccb_chain);
1576 TAILQ_INSERT_TAIL(&slp->sl_start, cb, ccb_chain);
1593 struct slccb *cb;
1600 if ((cb = SCSI_LOW_ALLOC_CCB(1)) == NULL)
1603 cb->osdep = NULL;
1604 cb->bp = NULL;
1605 scsi_low_enqueue(slp, ti, li, cb, flags, tmsgflags);
1624 scsi_low_unit_ready_cmd(cb)
1625 struct slccb *cb;
1628 cb->ccb_scp.scp_cmd = unit_ready_cmd;
1629 cb->ccb_scp.scp_cmdlen = sizeof(unit_ready_cmd);
1630 cb->ccb_scp.scp_datalen = 0;
1631 cb->ccb_scp.scp_direction = SCSI_LOW_READ;
1632 cb->ccb_tcmax = 15;
1636 scsi_low_sense_abort_start(slp, ti, li, cb)
1640 struct slccb *cb;
1643 cb->ccb_scp.scp_cmdlen = 6;
1644 bzero(cb->ccb_scsi_cmd, cb->ccb_scp.scp_cmdlen);
1645 cb->ccb_scsi_cmd[0] = REQUEST_SENSE;
1646 cb->ccb_scsi_cmd[4] = sizeof(cb->ccb_sense);
1647 cb->ccb_scp.scp_cmd = cb->ccb_scsi_cmd;
1648 cb->ccb_scp.scp_data = (u_int8_t *) &cb->ccb_sense;
1649 cb->ccb_scp.scp_datalen = sizeof(cb->ccb_sense);
1650 cb->ccb_scp.scp_direction = SCSI_LOW_READ;
1651 cb->ccb_tcmax = 15;
1652 scsi_low_ccb_message_clear(cb);
1653 if ((cb->ccb_flags & CCB_CLEARQ) != 0)
1659 bzero(&cb->ccb_sense, sizeof(cb->ccb_sense));
1669 scsi_low_setup_start(slp, ti, li, cb)
1673 struct slccb *cb;
1679 scsi_low_unit_ready_cmd(cb);
1683 cb->ccb_scp.scp_cmd = ss_cmd;
1684 cb->ccb_scp.scp_cmdlen = sizeof(ss_cmd);
1685 cb->ccb_scp.scp_datalen = 0;
1686 cb->ccb_scp.scp_direction = SCSI_LOW_READ;
1687 cb->ccb_tcmax = 30;
1691 cb->ccb_scp.scp_cmd = inq_cmd;
1692 cb->ccb_scp.scp_cmdlen = sizeof(inq_cmd);
1693 cb->ccb_scp.scp_data = (u_int8_t *)&li->li_inq;
1694 cb->ccb_scp.scp_datalen = sizeof(li->li_inq);
1695 cb->ccb_scp.scp_direction = SCSI_LOW_READ;
1696 cb->ccb_tcmax = 15;
1700 cb->ccb_scp.scp_cmd = sms_cmd;
1701 cb->ccb_scp.scp_cmdlen = sizeof(sms_cmd);
1702 cb->ccb_scp.scp_data = (u_int8_t *)&li->li_sms;
1703 cb->ccb_scp.scp_datalen = sizeof(li->li_sms);
1704 cb->ccb_scp.scp_direction = SCSI_LOW_READ;
1705 cb->ccb_tcmax = 15;
1741 struct slccb *cb;
1768 for (cb = TAILQ_FIRST(&slp->sl_start); cb != NULL;
1769 cb = TAILQ_NEXT(cb, ccb_chain))
1771 li = cb->li;
1780 (cb->ccb_flags & (CCB_SENSE | CCB_CLEARQ)) != 0)
1787 cb->ccb_flags &= ~CCB_STARTQ;
1788 TAILQ_REMOVE(&slp->sl_start, cb, ccb_chain);
1789 ti = cb->ti;
1792 cb->ccb_error = 0;
1793 cb->ccb_datalen = -1;
1794 cb->ccb_scp.scp_status = ST_UNKNOWN;
1797 slp->sl_Qnexus = cb;
1805 if ((cb->ccb_flags & (CCB_SENSE | CCB_CLEARQ)) != 0)
1808 rv = scsi_low_sense_abort_start(slp, ti, li, cb);
1812 cb->ccb_flags &= ~CCB_INTERNAL;
1813 rv = scsi_low_ccb_setup_cam(slp, cb);
1814 if (cb->ccb_msgoutflag != 0)
1816 scsi_low_ccb_message_exec(slp, cb);
1821 cb->ccb_flags |= CCB_INTERNAL;
1822 rv = scsi_low_setup_start(slp, ti, li, cb);
1834 scsi_low_activate_qtag(cb);
1835 if ((scsi_low_cmd_flags[cb->ccb_scp.scp_cmd[0]] &
1838 else if ((cb->ccb_flags & CCB_URGENT) != 0)
1846 if (cb->ccb_tcmax < SCSI_LOW_MIN_TOUT)
1847 cb->ccb_tcmax = SCSI_LOW_MIN_TOUT;
1848 cb->ccb_tc = cb->ccb_tcmax;
1851 cb->ccb_sscp = cb->ccb_scp;
1854 slp->sl_scp = cb->ccb_sscp;
1855 slp->sl_error = cb->ccb_error;
1867 slp->sl_selid = cb;
1868 rv = ((*slp->sl_funcs->scsi_low_start_bus) (slp, cb));
1877 scsi_low_arbit_fail(slp, cb);
1884 scsi_low_arbit_fail(slp, cb)
1886 struct slccb *cb;
1888 struct targ_info *ti = cb->ti;
1890 scsi_low_deactivate_qtag(cb);
1891 scsi_low_ccb_message_retry(cb);
1892 cb->ccb_flags |= CCB_STARTQ;
1893 TAILQ_INSERT_HEAD(&slp->sl_start, cb, ccb_chain);
1897 cb->ccb_selrcnt ++;
1938 scsi_low_setup_done(slp, cb)
1940 struct slccb *cb;
1945 ti = cb->ti;
1946 li = cb->li;
1948 if (cb->ccb_rcnt >= slp->sl_max_retry)
1950 cb->ccb_error |= ABORTIO;
1956 (cb->ccb_error & SELTIMEOUTIO) != 0)
1958 cb->ccb_error |= ABORTIO;
1965 if (cb->ccb_error != 0)
2005 if (cb->ccb_error != 0)
2007 if (cb->ccb_error & SENSEIO)
2014 scsi_extract_sense(&cb->ccb_sense,
2059 cb->ccb_rcnt --;
2064 scsi_low_done(slp, cb)
2066 struct slccb *cb;
2070 if (cb->ccb_error == 0)
2072 if ((cb->ccb_flags & (CCB_SENSE | CCB_CLEARQ)) != 0)
2084 if ((cb->ccb_flags & CCB_CLEARQ) == 0)
2086 cb->ccb_rcnt --;
2087 cb->ccb_flags |= CCB_CLEARQ;
2092 if ((cb->ccb_flags & CCB_SENSE) != 0)
2093 cb->ccb_error |= (SENSEIO | ABORTIO);
2094 cb->ccb_flags &= ~(CCB_SENSE | CCB_CLEARQ);
2096 else switch (cb->ccb_sscp.scp_status)
2102 if (cb->ccb_datalen == 0 ||
2103 cb->ccb_scp.scp_datalen == 0)
2106 if (cb->ccb_scp.scp_cmdlen > 0 &&
2107 (scsi_low_cmd_flags[cb->ccb_scp.scp_cmd[0]] &
2111 cb->ccb_error |= PDMAERR;
2116 cb->ccb_error |= (BUSYERR | STATERR);
2120 cb->ccb_error |= (STATERR | ABORTIO);
2125 if (cb->ccb_flags & (CCB_AUTOSENSE | CCB_INTERNAL))
2127 cb->ccb_rcnt --;
2128 cb->ccb_flags |= CCB_SENSE;
2131 cb->ccb_error |= (UACAERR | STATERR | ABORTIO);
2136 cb->ccb_error |= FATALIO;
2142 if (cb->ccb_flags & CCB_SENSE)
2144 cb->ccb_error |= (SENSEERR | ABORTIO);
2146 cb->ccb_flags &= ~(CCB_CLEARQ | CCB_SENSE);
2150 if ((cb->ccb_flags & CCB_INTERNAL) != 0)
2152 if (scsi_low_setup_done(slp, cb) == SCSI_LOW_DONE_RETRY)
2157 if (cb->ccb_omsgoutflag != 0)
2164 if ((cb->ccb_omsgoutflag & SCSI_LOW_MSG_ABORT_OK) != 0)
2166 cb->ccb_error |= ABORTIO;
2171 if (cb->osdep != NULL)
2173 rv = scsi_low_done_cam(slp, cb);
2177 else if (cb->ccb_error != 0)
2179 if (cb->ccb_rcnt >= slp->sl_max_retry)
2180 cb->ccb_error |= ABORTIO;
2182 if ((cb->ccb_flags & CCB_NORETRY) == 0 &&
2183 (cb->ccb_error & ABORTIO) == 0)
2189 if (SCSI_LOW_DEBUG_GO(SCSI_LOW_DEBUG_DONE, cb->ti->ti_id) != 0)
2196 scsi_low_deactivate_qtag(cb);
2197 scsi_low_dealloc_qtag(cb);
2198 scsi_low_free_ccb(cb);
2204 if (SCSI_LOW_DEBUG_GO(SCSI_LOW_DEBUG_DONE, cb->ti->ti_id) != 0)
2211 cb->ccb_rcnt ++;
2212 scsi_low_deactivate_qtag(cb);
2213 scsi_low_ccb_message_retry(cb);
2276 struct slccb *cb, *topcb;
2278 if ((cb = slp->sl_Qnexus) != NULL)
2280 topcb = scsi_low_revoke_ccb(slp, cb, fdone);
2366 struct slccb *cb;
2371 cb = TAILQ_FIRST(&li->li_discq);
2372 for ( ; cb != NULL; cb = TAILQ_NEXT(cb, ccb_chain))
2373 if (cb->ccb_tag == tag)
2375 return cb;
2385 (u_long) cb);
2386 cb->ccb_flags |= (CCB_NORETRY | CCB_SILENT);
2387 scsi_low_revoke_ccb(slp, cb, 1);
2393 if (cb->ccb_omsgoutflag == 0)
2394 scsi_low_ccb_message_assert(cb, SCSI_LOW_MSG_NOOP);
2398 TAILQ_REMOVE(&li->li_discq, cb, ccb_chain);
2399 cb->ccb_flags &= ~CCB_DISCQ;
2400 slp->sl_Qnexus = cb;
2402 slp->sl_scp = cb->ccb_sscp;
2403 slp->sl_error |= cb->ccb_error;
2413 if (cb->ccb_msgoutflag != 0)
2415 scsi_low_ccb_message_exec(slp, cb);
2418 return cb;
2427 struct slccb *cb;
2434 if ((cb = slp->sl_selid) != NULL)
2436 scsi_low_arbit_fail(slp, cb);
2501 struct slccb *cb = slp->sl_Qnexus;
2504 if (cb == NULL)
2523 scsi_low_test_cmdlnk(slp, cb);
2540 struct slccb *cb = slp->sl_Qnexus;
2542 if (cb != NULL && direction == cb->ccb_sscp.scp_direction)
2544 *bp = cb->bp;
2556 if (cb == NULL)
2725 struct slccb *cb = slp->sl_Qnexus;
2730 if (cb == NULL)
2738 if (scsi_low_is_disconnect_ok(cb) != 0)
2746 if (cb->ccb_tag == SCSI_LOW_UNKTAG)
2788 struct slccb *cb = slp->sl_Qnexus;
2791 if (cb == NULL || cb->ccb_tag == SCSI_LOW_UNKTAG)
2798 ti->ti_msgoutstr[ptr + 1] = (u_int8_t) cb->ccb_tag;
3051 struct slccb *ncb, *cb;
3055 if ((cb = slp->sl_Qnexus) == NULL)
3058 cb->ccb_sscp.scp_status = slp->sl_scp.scp_status;
3074 cb->ccb_error |= slp->sl_error;
3075 if (cb->ccb_error != 0)
3096 ncb->ccb_tag = cb->ccb_tag;
3097 ncb->ccb_otag = cb->ccb_otag;
3098 cb->ccb_tag = SCSI_LOW_UNKTAG;
3099 cb->ccb_otag = SCSI_LOW_UNKTAG;
3100 if (scsi_low_done(slp, cb) == SCSI_LOW_DONE_RETRY)
3145 struct slccb *cb = slp->sl_Qnexus;
3147 if (cb != NULL)
3149 cb->ccb_sscp.scp_datalen = slp->sl_scp.scp_datalen;
3150 cb->ccb_sscp.scp_data = slp->sl_scp.scp_data;
3225 struct slccb *cb = slp->sl_Qnexus;
3227 if (cb != NULL && (cb->ccb_flags & CCB_SENSE) != 0)
3276 struct slccb *cb = slp->sl_Qnexus;
3278 if (cb != NULL && (cb->ccb_flags & CCB_SENSE) != 0)
3323 struct slccb *cb = slp->sl_Qnexus;
3326 if (cb == NULL || res <= 0 ||
3331 if (slp->sl_scp.scp_datalen + res > cb->ccb_scp.scp_datalen)
3344 struct slccb *cb = slp->sl_Qnexus;
3359 if (cb == NULL)
3365 slp->sl_scp.scp_datalen - count > cb->ccb_scp.scp_datalen)
3600 struct slccb *cb = slp->sl_Qnexus;
3623 if (cb != NULL)
3627 li = cb->li;
3628 TAILQ_INSERT_TAIL(&li->li_discq, cb, ccb_chain);
3629 cb->ccb_flags |= CCB_DISCQ;
3630 cb->ccb_error |= slp->sl_error;
3660 if (cb == NULL)
3666 if (cb->ccb_omsgoutflag == SCSI_LOW_MSG_NOOP &&
3667 (cb->ccb_msgoutflag != 0 ||
3675 cb->ccb_error |= slp->sl_error;
3676 if (scsi_low_done(slp, cb) == SCSI_LOW_DONE_RETRY)
3678 cb->ccb_flags |= CCB_STARTQ;
3679 TAILQ_INSERT_HEAD(&slp->sl_start, cb, ccb_chain);
3693 scsi_low_alloc_qtag(cb)
3694 struct slccb *cb;
3696 struct lun_info *li = cb->li;
3699 if (cb->ccb_otag != SCSI_LOW_UNKTAG)
3708 cb->ccb_otag = etag;
3724 cb->ccb_otag = (li->li_qd ++);
3730 scsi_low_dealloc_qtag(cb)
3731 struct slccb *cb;
3733 struct lun_info *li = cb->li;
3736 if (cb->ccb_otag == SCSI_LOW_UNKTAG)
3740 etag = cb->ccb_otag - 1;
3748 etag = cb->ccb_otag;
3756 cb->ccb_otag = SCSI_LOW_UNKTAG;
3761 scsi_low_revoke_ccb(slp, cb, fdone)
3763 struct slccb *cb;
3766 struct targ_info *ti = cb->ti;
3767 struct lun_info *li = cb->li;
3770 if ((cb->ccb_flags & (CCB_STARTQ | CCB_DISCQ)) ==
3778 if ((cb->ccb_flags & CCB_STARTQ) != 0)
3780 TAILQ_REMOVE(&slp->sl_start, cb, ccb_chain);
3783 if ((cb->ccb_flags & CCB_DISCQ) != 0)
3785 TAILQ_REMOVE(&li->li_discq, cb, ccb_chain);
3791 cb->ccb_flags &= ~(CCB_STARTQ | CCB_DISCQ |
3795 (cb->ccb_rcnt ++ >= slp->sl_max_retry ||
3796 (cb->ccb_flags & CCB_NORETRY) != 0))
3798 cb->ccb_error |= FATALIO;
3799 cb->ccb_flags &= ~CCB_AUTOSENSE;
3800 if (scsi_low_done(slp, cb) != SCSI_LOW_DONE_COMPLETE)
3807 cb->ccb_error |= PENDINGIO;
3808 scsi_low_deactivate_qtag(cb);
3809 scsi_low_ccb_message_retry(cb);
3810 cb->ccb_tc = cb->ccb_tcmax = SCSI_LOW_MIN_TOUT;
3811 return cb;
3821 struct slccb *cb, *ncb, *ecb;
3827 for (cb = TAILQ_FIRST(&li->li_discq); cb != NULL; cb = ncb)
3829 ncb = TAILQ_NEXT(cb, ccb_chain);
3830 cb = scsi_low_revoke_ccb(slp, cb, fdone);
3831 if (cb != NULL)
3836 cb->ccb_flags |= CCB_STARTQ;
3840 cb, ccb_chain);
3845 ecb, cb, ccb_chain);
3847 ecb = cb;
4007 struct slccb *cb;
4034 if ((cb = SCSI_LOW_ALLOC_CCB(1)) == NULL)
4037 cb->osdep = NULL;
4038 cb->bp = NULL;
4042 scsi_low_enqueue(slp, ti, li, cb,
4045 scsi_low_poll(slp, cb);
4065 scsi_low_poll(slp, cb)
4067 struct slccb *cb;
4125 scsi_low_test_cmdlnk(slp, cb)
4127 struct slccb *cb;
4131 if ((cb->ccb_flags & SCSI_LOW_CMDLNK_NOK) != 0)
4134 memcpy(cb->ccb_scsi_cmd, slp->sl_scp.scp_cmd,
4136 cb->ccb_scsi_cmd[slp->sl_scp.scp_cmdlen - 1] |= 1;
4137 slp->sl_scp.scp_cmd = cb->ccb_scsi_cmd;
4179 struct slccb *cb;
4186 cb = slp->sl_Qnexus;
4191 cb = TAILQ_FIRST(&li->li_discq);
4197 (u_long) ti, (u_long) li, (u_long) cb, slp->sl_nio);
4219 if (cb != NULL)
4222 (u_int) cb->ccb_scp.scp_cmd[0],
4223 cb->ccb_scp.scp_cmdlen,
4224 cb->ccb_datalen,
4225 cb->ccb_scp.scp_datalen,
4226 (u_int) cb->ccb_sscp.scp_status,
4227 cb->ccb_error, SCSI_LOW_ERRORBITS);