1 #ifndef ISCSI_SEQ_AND_PDU_LIST_H
2 #define ISCSI_SEQ_AND_PDU_LIST_H
4 #include <linux/types.h>
5 #include <linux/cache.h>
7 /* struct iscsi_pdu->status */
8 #define DATAOUT_PDU_SENT 1
10 /* struct iscsi_seq->type */
11 #define SEQTYPE_IMMEDIATE 1
12 #define SEQTYPE_UNSOLICITED 2
13 #define SEQTYPE_NORMAL 3
15 /* struct iscsi_seq->status */
16 #define DATAOUT_SEQUENCE_GOT_R2T 1
17 #define DATAOUT_SEQUENCE_WITHIN_COMMAND_RECOVERY 2
18 #define DATAOUT_SEQUENCE_COMPLETE 3
20 /* iscsi_determine_counts_for_list() type */
21 #define PDULIST_NORMAL 1
22 #define PDULIST_IMMEDIATE 2
23 #define PDULIST_UNSOLICITED 3
24 #define PDULIST_IMMEDIATE_AND_UNSOLICITED 4
26 /* struct iscsi_pdu->type */
27 #define PDUTYPE_IMMEDIATE 1
28 #define PDUTYPE_UNSOLICITED 2
29 #define PDUTYPE_NORMAL 3
31 /* struct iscsi_pdu->status */
32 #define ISCSI_PDU_NOT_RECEIVED 0
33 #define ISCSI_PDU_RECEIVED_OK 1
34 #define ISCSI_PDU_CRC_FAILED 2
35 #define ISCSI_PDU_TIMED_OUT 3
37 /* struct iscsi_build_list->randomize */
38 #define RANDOM_DATAIN_PDU_OFFSETS 0x01
39 #define RANDOM_DATAIN_SEQ_OFFSETS 0x02
40 #define RANDOM_DATAOUT_PDU_OFFSETS 0x04
41 #define RANDOM_R2T_OFFSETS 0x08
43 /* struct iscsi_build_list->data_direction */
44 #define ISCSI_PDU_READ 0x01
45 #define ISCSI_PDU_WRITE 0x02
47 struct iscsi_build_list
{
51 int immediate_data_length
;
63 } ____cacheline_aligned
;
82 } ____cacheline_aligned
;
86 extern int iscsit_build_pdu_and_seq_lists(struct iscsi_cmd
*, u32
);
87 extern struct iscsi_pdu
*iscsit_get_pdu_holder(struct iscsi_cmd
*, u32
, u32
);
88 extern struct iscsi_pdu
*iscsit_get_pdu_holder_for_seq(struct iscsi_cmd
*, struct iscsi_seq
*);
89 extern struct iscsi_seq
*iscsit_get_seq_holder(struct iscsi_cmd
*, u32
, u32
);
91 #endif /* ISCSI_SEQ_AND_PDU_LIST_H */