sh_eth: fix EESIPR values for SH77{34|63}
[linux/fpc-iii.git] / drivers / target / iscsi / iscsi_target_seq_pdu_list.h
blobbe1234362271b0b3f672c33a83b26f0407b630c8
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 {
48 int data_direction;
49 int randomize;
50 int type;
51 int immediate_data_length;
54 struct iscsi_pdu {
55 int status;
56 int type;
57 u8 flags;
58 u32 data_sn;
59 u32 length;
60 u32 offset;
61 u32 pdu_send_order;
62 u32 seq_no;
63 } ____cacheline_aligned;
65 struct iscsi_seq {
66 int sent;
67 int status;
68 int type;
69 u32 data_sn;
70 u32 first_datasn;
71 u32 last_datasn;
72 u32 next_burst_len;
73 u32 pdu_start;
74 u32 pdu_count;
75 u32 offset;
76 u32 orig_offset;
77 u32 pdu_send_order;
78 u32 r2t_sn;
79 u32 seq_send_order;
80 u32 seq_no;
81 u32 xfer_len;
82 } ____cacheline_aligned;
84 struct iscsi_cmd;
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 */