Deleted Added
full compact
scsi_all.h (278584) scsi_all.h (279219)
1/*-
2 * Largely written by Julian Elischer (julian@tfs.com)
3 * for TRW Financial Systems.
4 *
5 * TRW Financial Systems, in accordance with their agreement with Carnegie
6 * Mellon University, makes this software available to CMU to distribute
7 * or use in any manner that they see fit as long as this message is kept with
8 * the software. For this reason TFS also grants any other persons or
9 * organisations permission to use or modify this software.
10 *
11 * TFS supplies this software to be publicly redistributed
12 * on the understanding that TFS is not responsible for the correct
13 * functioning of this software in any circumstances.
14 *
15 * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
16 *
1/*-
2 * Largely written by Julian Elischer (julian@tfs.com)
3 * for TRW Financial Systems.
4 *
5 * TRW Financial Systems, in accordance with their agreement with Carnegie
6 * Mellon University, makes this software available to CMU to distribute
7 * or use in any manner that they see fit as long as this message is kept with
8 * the software. For this reason TFS also grants any other persons or
9 * organisations permission to use or modify this software.
10 *
11 * TFS supplies this software to be publicly redistributed
12 * on the understanding that TFS is not responsible for the correct
13 * functioning of this software in any circumstances.
14 *
15 * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
16 *
17 * $FreeBSD: head/sys/cam/scsi/scsi_all.h 278584 2015-02-11 16:10:31Z mav $
17 * $FreeBSD: head/sys/cam/scsi/scsi_all.h 279219 2015-02-23 21:59:30Z ken $
18 */
19
20/*
21 * SCSI general interface description
22 */
23
24#ifndef _SCSI_SCSI_ALL_H
25#define _SCSI_SCSI_ALL_H 1

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

1753#define WRITE_VERIFY_16 0x8E
1754#define VERIFY_16 0x8F
1755#define SYNCHRONIZE_CACHE_16 0x91
1756#define WRITE_SAME_16 0x93
1757#define WRITE_ATOMIC_16 0x9C
1758#define SERVICE_ACTION_IN 0x9E
1759#define REPORT_LUNS 0xA0
1760#define ATA_PASS_12 0xA1
18 */
19
20/*
21 * SCSI general interface description
22 */
23
24#ifndef _SCSI_SCSI_ALL_H
25#define _SCSI_SCSI_ALL_H 1

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

1753#define WRITE_VERIFY_16 0x8E
1754#define VERIFY_16 0x8F
1755#define SYNCHRONIZE_CACHE_16 0x91
1756#define WRITE_SAME_16 0x93
1757#define WRITE_ATOMIC_16 0x9C
1758#define SERVICE_ACTION_IN 0x9E
1759#define REPORT_LUNS 0xA0
1760#define ATA_PASS_12 0xA1
1761#define SECURITY_PROTOCOL_IN 0xA2
1761#define MAINTENANCE_IN 0xA3
1762#define MAINTENANCE_OUT 0xA4
1763#define MOVE_MEDIUM 0xA5
1764#define READ_12 0xA8
1765#define WRITE_12 0xAA
1766#define WRITE_VERIFY_12 0xAE
1767#define VERIFY_12 0xAF
1762#define MAINTENANCE_IN 0xA3
1763#define MAINTENANCE_OUT 0xA4
1764#define MOVE_MEDIUM 0xA5
1765#define READ_12 0xA8
1766#define WRITE_12 0xAA
1767#define WRITE_VERIFY_12 0xAE
1768#define VERIFY_12 0xAF
1769#define SECURITY_PROTOCOL_OUT 0xB5
1768#define READ_ELEMENT_STATUS 0xB8
1769#define READ_CD 0xBE
1770
1771/* Maintenance In Service Action Codes */
1772#define REPORT_IDENTIFYING_INFRMATION 0x05
1773#define REPORT_TARGET_PORT_GROUPS 0x0A
1774#define REPORT_ALIASES 0x0B
1775#define REPORT_SUPPORTED_OPERATION_CODES 0x0C

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

2697struct scsi_target_group_data_extended {
2698 uint8_t length[4]; /* length of returned data, in bytes */
2699 uint8_t format_type; /* STG_PDF_LENGTH or STG_PDF_EXTENDED */
2700 uint8_t implicit_transition_time;
2701 uint8_t reserved[2];
2702 struct scsi_target_port_group_descriptor groups[];
2703};
2704
1770#define READ_ELEMENT_STATUS 0xB8
1771#define READ_CD 0xBE
1772
1773/* Maintenance In Service Action Codes */
1774#define REPORT_IDENTIFYING_INFRMATION 0x05
1775#define REPORT_TARGET_PORT_GROUPS 0x0A
1776#define REPORT_ALIASES 0x0B
1777#define REPORT_SUPPORTED_OPERATION_CODES 0x0C

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

2699struct scsi_target_group_data_extended {
2700 uint8_t length[4]; /* length of returned data, in bytes */
2701 uint8_t format_type; /* STG_PDF_LENGTH or STG_PDF_EXTENDED */
2702 uint8_t implicit_transition_time;
2703 uint8_t reserved[2];
2704 struct scsi_target_port_group_descriptor groups[];
2705};
2706
2707struct scsi_security_protocol_in
2708{
2709 uint8_t opcode;
2710 uint8_t security_protocol;
2711#define SPI_PROT_INFORMATION 0x00
2712#define SPI_PROT_CBCS 0x07
2713#define SPI_PROT_TAPE_DATA_ENC 0x20
2714#define SPI_PROT_DATA_ENC_CONFIG 0x21
2715#define SPI_PROT_SA_CREATE_CAP 0x40
2716#define SPI_PROT_IKEV2_SCSI 0x41
2717#define SPI_PROT_JEDEC_UFS 0xEC
2718#define SPI_PROT_SDCARD_TFSSS 0xED
2719#define SPI_PROT_AUTH_HOST_TRANSIENT 0xEE
2720#define SPI_PROT_ATA_DEVICE_PASSWORD 0xEF
2721 uint8_t security_protocol_specific[2];
2722 uint8_t byte4;
2723#define SPI_INC_512 0x80
2724 uint8_t reserved1;
2725 uint8_t length[4];
2726 uint8_t reserved2;
2727 uint8_t control;
2728};
2705
2729
2730struct scsi_security_protocol_out
2731{
2732 uint8_t opcode;
2733 uint8_t security_protocol;
2734 uint8_t security_protocol_specific[2];
2735 uint8_t byte4;
2736#define SPO_INC_512 0x80
2737 uint8_t reserved1;
2738 uint8_t length[4];
2739 uint8_t reserved2;
2740 uint8_t control;
2741};
2742
2706typedef enum {
2707 SSD_TYPE_NONE,
2708 SSD_TYPE_FIXED,
2709 SSD_TYPE_DESC
2710} scsi_sense_data_type;
2711
2712typedef enum {
2713 SSD_ELEM_NONE,

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

3618 u_int8_t *data_ptr, u_int16_t dxfer_len,
3619 u_int8_t sense_len, u_int32_t timeout);
3620
3621void scsi_start_stop(struct ccb_scsiio *csio, u_int32_t retries,
3622 void (*cbfcnp)(struct cam_periph *, union ccb *),
3623 u_int8_t tag_action, int start, int load_eject,
3624 int immediate, u_int8_t sense_len, u_int32_t timeout);
3625
2743typedef enum {
2744 SSD_TYPE_NONE,
2745 SSD_TYPE_FIXED,
2746 SSD_TYPE_DESC
2747} scsi_sense_data_type;
2748
2749typedef enum {
2750 SSD_ELEM_NONE,

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

3655 u_int8_t *data_ptr, u_int16_t dxfer_len,
3656 u_int8_t sense_len, u_int32_t timeout);
3657
3658void scsi_start_stop(struct ccb_scsiio *csio, u_int32_t retries,
3659 void (*cbfcnp)(struct cam_periph *, union ccb *),
3660 u_int8_t tag_action, int start, int load_eject,
3661 int immediate, u_int8_t sense_len, u_int32_t timeout);
3662
3663void scsi_security_protocol_in(struct ccb_scsiio *csio, uint32_t retries,
3664 void (*cbfcnp)(struct cam_periph *, union ccb *),
3665 uint8_t tag_action, uint32_t security_protocol,
3666 uint32_t security_protocol_specific, int byte4,
3667 uint8_t *data_ptr, uint32_t dxfer_len,
3668 int sense_len, int timeout);
3669
3670void scsi_security_protocol_out(struct ccb_scsiio *csio, uint32_t retries,
3671 void (*cbfcnp)(struct cam_periph *,union ccb *),
3672 uint8_t tag_action, uint32_t security_protocol,
3673 uint32_t security_protocol_specific, int byte4,
3674 uint8_t *data_ptr, uint32_t dxfer_len,
3675 int sense_len, int timeout);
3676
3626void scsi_persistent_reserve_in(struct ccb_scsiio *csio, uint32_t retries,
3627 void (*cbfcnp)(struct cam_periph *,union ccb *),
3628 uint8_t tag_action, int service_action,
3629 uint8_t *data_ptr, uint32_t dxfer_len,
3630 int sense_len, int timeout);
3631
3632void scsi_persistent_reserve_out(struct ccb_scsiio *csio, uint32_t retries,
3633 void (*cbfcnp)(struct cam_periph *,

--- 167 unchanged lines hidden ---
3677void scsi_persistent_reserve_in(struct ccb_scsiio *csio, uint32_t retries,
3678 void (*cbfcnp)(struct cam_periph *,union ccb *),
3679 uint8_t tag_action, int service_action,
3680 uint8_t *data_ptr, uint32_t dxfer_len,
3681 int sense_len, int timeout);
3682
3683void scsi_persistent_reserve_out(struct ccb_scsiio *csio, uint32_t retries,
3684 void (*cbfcnp)(struct cam_periph *,

--- 167 unchanged lines hidden ---