--- zzzz-none-000/linux-3.10.107/include/scsi/libiscsi.h 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/include/scsi/libiscsi.h 2021-02-04 17:41:59.000000000 +0000 @@ -62,6 +62,8 @@ TMF_NOT_FOUND, }; +#define ISID_SIZE 6 + /* Connection suspend "bit" */ #define ISCSI_SUSPEND_BIT 1 @@ -131,6 +133,10 @@ unsigned long last_xfer; unsigned long last_timeout; bool have_checked_conn; + + /* T10 protection information */ + bool protected; + /* state set/tested under session->lock */ int state; atomic_t refcount; @@ -173,6 +179,7 @@ /* iSCSI connection-wide sequencing */ uint32_t exp_statsn; + uint32_t statsn; /* control data */ int id; /* CID */ @@ -189,6 +196,7 @@ struct iscsi_task *task; /* xmit task in progress */ /* xmit */ + spinlock_t taskqueuelock; /* protects the next three lists */ struct list_head mgmtqueue; /* mgmt (control) xmit queue */ struct list_head cmdqueue; /* data-path cmd queue */ struct list_head requeue; /* tasks needing another run */ @@ -213,6 +221,23 @@ int persistent_port; char *persistent_address; + unsigned max_segment_size; + unsigned tcp_xmit_wsf; + unsigned tcp_recv_wsf; + uint16_t keepalive_tmo; + uint16_t local_port; + uint8_t tcp_timestamp_stat; + uint8_t tcp_nagle_disable; + uint8_t tcp_wsf_disable; + uint8_t tcp_timer_scale; + uint8_t tcp_timestamp_en; + uint8_t fragment_disable; + uint8_t ipv4_tos; + uint8_t ipv6_traffic_class; + uint8_t ipv6_flow_label; + uint8_t is_fw_assigned_ipv6; + char *local_ipaddr; + /* MIB-statistics */ uint64_t txdata_octets; uint64_t rxdata_octets; @@ -287,16 +312,39 @@ char *targetalias; char *ifacename; char *initiatorname; + char *boot_root; + char *boot_nic; + char *boot_target; + char *portal_type; + char *discovery_parent_type; + uint16_t discovery_parent_idx; + uint16_t def_taskmgmt_tmo; + uint16_t tsid; + uint8_t auto_snd_tgt_disable; + uint8_t discovery_sess; + uint8_t chap_auth_en; + uint8_t discovery_logout_en; + uint8_t bidi_chap_en; + uint8_t discovery_auth_optional; + uint8_t isid[ISID_SIZE]; + /* control data */ struct iscsi_transport *tt; struct Scsi_Host *host; struct iscsi_conn *leadconn; /* leading connection */ - spinlock_t lock; /* protects session state, * - * sequence numbers, * + /* Between the forward and the backward locks exists a strict locking + * hierarchy. The mutual exclusion zone protected by the forward lock + * can enclose the mutual exclusion zone protected by the backward lock + * but not vice versa. + */ + spinlock_t frwd_lock; /* protects session state, * + * cmdsn, queued_cmdsn * * session resources: * - * - cmdpool, * - * - mgmtpool, * - * - r2tpool */ + * - cmdpool kfifo_out , * + * - mgmtpool, */ + spinlock_t back_lock; /* protects cmdsn_exp * + * cmdsn_max, * + * cmdpool kfifo_in */ int state; /* session state */ int age; /* counts session re-opens */ @@ -331,8 +379,6 @@ /* * scsi host template */ -extern int iscsi_change_queue_depth(struct scsi_device *sdev, int depth, - int reason); extern int iscsi_eh_abort(struct scsi_cmnd *sc); extern int iscsi_eh_recover_target(struct scsi_cmnd *sc); extern int iscsi_eh_session_reset(struct scsi_cmnd *sc);