cam_ccb.h (27dcd3d90b41d3c89eac3c2b50b9a6f515e5c89d) cam_ccb.h (883649681528398dc227778882830fc9da0ce58c)
1/*-
2 * Data structures and definitions for CAM Control Blocks (CCBs).
3 *
4 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
5 *
6 * Copyright (c) 1997, 1998 Justin T. Gibbs.
7 * All rights reserved.
8 *

--- 744 unchanged lines hidden (view full) ---

753 u_int16_t msg_len; /* Number of bytes for the Message */
754 u_int8_t tag_action; /* What to do for tag queueing */
755 /*
756 * The tag action should be either the define below (to send a
757 * non-tagged transaction) or one of the defined scsi tag messages
758 * from scsi_message.h.
759 */
760#define CAM_TAG_ACTION_NONE 0x00
1/*-
2 * Data structures and definitions for CAM Control Blocks (CCBs).
3 *
4 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
5 *
6 * Copyright (c) 1997, 1998 Justin T. Gibbs.
7 * All rights reserved.
8 *

--- 744 unchanged lines hidden (view full) ---

753 u_int16_t msg_len; /* Number of bytes for the Message */
754 u_int8_t tag_action; /* What to do for tag queueing */
755 /*
756 * The tag action should be either the define below (to send a
757 * non-tagged transaction) or one of the defined scsi tag messages
758 * from scsi_message.h.
759 */
760#define CAM_TAG_ACTION_NONE 0x00
761 uint8_t priority; /* Command priority for SIMPLE tag */
761 u_int tag_id; /* tag id from initator (target mode) */
762 u_int init_id; /* initiator id of who selected */
763#if defined(BUF_TRACKING) || defined(FULL_BUF_TRACKING)
764 struct bio *bio; /* Associated bio */
765#endif
766};
767
768static __inline uint8_t *

--- 31 unchanged lines hidden (view full) ---

800};
801
802struct ccb_accept_tio {
803 struct ccb_hdr ccb_h;
804 cdb_t cdb_io; /* Union for CDB bytes/pointer */
805 u_int8_t cdb_len; /* Number of bytes for the CDB */
806 u_int8_t tag_action; /* What to do for tag queueing */
807 u_int8_t sense_len; /* Number of bytes of Sense Data */
762 u_int tag_id; /* tag id from initator (target mode) */
763 u_int init_id; /* initiator id of who selected */
764#if defined(BUF_TRACKING) || defined(FULL_BUF_TRACKING)
765 struct bio *bio; /* Associated bio */
766#endif
767};
768
769static __inline uint8_t *

--- 31 unchanged lines hidden (view full) ---

801};
802
803struct ccb_accept_tio {
804 struct ccb_hdr ccb_h;
805 cdb_t cdb_io; /* Union for CDB bytes/pointer */
806 u_int8_t cdb_len; /* Number of bytes for the CDB */
807 u_int8_t tag_action; /* What to do for tag queueing */
808 u_int8_t sense_len; /* Number of bytes of Sense Data */
809 uint8_t priority; /* Command priority for SIMPLE tag */
808 u_int tag_id; /* tag id from initator (target mode) */
809 u_int init_id; /* initiator id of who selected */
810 struct scsi_sense_data sense_data;
811};
812
813static __inline uint8_t *
814atio_cdb_ptr(struct ccb_accept_tio *ccb)
815{

--- 571 unchanged lines hidden (view full) ---

1387 csio->ccb_h.retry_count = retries;
1388 csio->ccb_h.cbfcnp = cbfcnp;
1389 csio->ccb_h.timeout = timeout;
1390 csio->data_ptr = data_ptr;
1391 csio->dxfer_len = dxfer_len;
1392 csio->sense_len = sense_len;
1393 csio->cdb_len = cdb_len;
1394 csio->tag_action = tag_action;
810 u_int tag_id; /* tag id from initator (target mode) */
811 u_int init_id; /* initiator id of who selected */
812 struct scsi_sense_data sense_data;
813};
814
815static __inline uint8_t *
816atio_cdb_ptr(struct ccb_accept_tio *ccb)
817{

--- 571 unchanged lines hidden (view full) ---

1389 csio->ccb_h.retry_count = retries;
1390 csio->ccb_h.cbfcnp = cbfcnp;
1391 csio->ccb_h.timeout = timeout;
1392 csio->data_ptr = data_ptr;
1393 csio->dxfer_len = dxfer_len;
1394 csio->sense_len = sense_len;
1395 csio->cdb_len = cdb_len;
1396 csio->tag_action = tag_action;
1397 csio->priority = 0;
1395#if defined(BUF_TRACKING) || defined(FULL_BUF_TRACKING)
1396 csio->bio = NULL;
1397#endif
1398}
1399
1400static __inline void
1401cam_fill_ctio(struct ccb_scsiio *csio, u_int32_t retries,
1402 void (*cbfcnp)(struct cam_periph *, union ccb *),

--- 6 unchanged lines hidden (view full) ---

1409 csio->ccb_h.xflags = 0;
1410 csio->ccb_h.retry_count = retries;
1411 csio->ccb_h.cbfcnp = cbfcnp;
1412 csio->ccb_h.timeout = timeout;
1413 csio->data_ptr = data_ptr;
1414 csio->dxfer_len = dxfer_len;
1415 csio->scsi_status = scsi_status;
1416 csio->tag_action = tag_action;
1398#if defined(BUF_TRACKING) || defined(FULL_BUF_TRACKING)
1399 csio->bio = NULL;
1400#endif
1401}
1402
1403static __inline void
1404cam_fill_ctio(struct ccb_scsiio *csio, u_int32_t retries,
1405 void (*cbfcnp)(struct cam_periph *, union ccb *),

--- 6 unchanged lines hidden (view full) ---

1412 csio->ccb_h.xflags = 0;
1413 csio->ccb_h.retry_count = retries;
1414 csio->ccb_h.cbfcnp = cbfcnp;
1415 csio->ccb_h.timeout = timeout;
1416 csio->data_ptr = data_ptr;
1417 csio->dxfer_len = dxfer_len;
1418 csio->scsi_status = scsi_status;
1419 csio->tag_action = tag_action;
1420 csio->priority = 0;
1417 csio->tag_id = tag_id;
1418 csio->init_id = init_id;
1419}
1420
1421static __inline void
1422cam_fill_ataio(struct ccb_ataio *ataio, u_int32_t retries,
1423 void (*cbfcnp)(struct cam_periph *, union ccb *),
1424 u_int32_t flags, u_int tag_action __unused,

--- 114 unchanged lines hidden ---
1421 csio->tag_id = tag_id;
1422 csio->init_id = init_id;
1423}
1424
1425static __inline void
1426cam_fill_ataio(struct ccb_ataio *ataio, u_int32_t retries,
1427 void (*cbfcnp)(struct cam_periph *, union ccb *),
1428 u_int32_t flags, u_int tag_action __unused,

--- 114 unchanged lines hidden ---