⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aic94xx_sas.h

📁 linux 内核源代码
💻 H
📖 第 1 页 / 共 2 页
字号:
 * atapi: C bit of FIS should be 1, and command register should be 0xA0, * to indicate a packet command. */struct initiate_ata_task {	u8     proto_conn_rate;	__le32 total_xfer_len;	struct host_to_dev_fis fis;	__le32 data_offs;	u8     atapi_packet[16];	u8     _r_a[12];	__le16 sister_scb;	__le16 conn_handle;	u8     ata_flags;	  /* CSMI:6,6, DTM:4,4, QT:3,3, data dir:1,0 */#define CSMI_TASK           0x40#define DATA_XFER_MODE_DMA  0x10#define ATA_Q_TYPE_MASK     0x08#define	ATA_Q_TYPE_UNTAGGED 0x00#define ATA_Q_TYPE_NCQ      0x08	u8     _r_b;	u8     retry_count;	u8     _r_c;	u8     flags;#define STP_AFFIL_POLICY   0x20#define SET_AFFIL_POLICY   0x10#define RET_PARTIAL_SGLIST 0x02	u8     _r_d[3];	struct sg_el sg_element[3];} __attribute__ ((packed));struct initiate_smp_task {	u8     proto_conn_rate;	u8     _r_a[40];	struct sg_el smp_req;	__le16 sister_scb;	__le16 conn_handle;	u8     _r_c[8];	struct sg_el smp_resp;	u8     _r_d[32];} __attribute__ ((packed));struct control_phy {	u8     phy_id;	u8     sub_func;#define DISABLE_PHY            0x00#define ENABLE_PHY             0x01#define RELEASE_SPINUP_HOLD    0x02#define ENABLE_PHY_NO_SAS_OOB  0x03#define ENABLE_PHY_NO_SATA_OOB 0x04#define PHY_NO_OP              0x05#define EXECUTE_HARD_RESET     0x81	u8     func_mask;	u8     speed_mask;	u8     hot_plug_delay;	u8     port_type;	u8     flags;#define DEV_PRES_TIMER_OVERRIDE_ENABLE 0x01#define DISABLE_PHY_IF_OOB_FAILS       0x02	__le32 timeout_override;	u8     link_reset_retries;	u8     _r_a[47];	__le16 conn_handle;	u8     _r_b[56];} __attribute__ ((packed));struct control_ata_dev {	u8     proto_conn_rate;	__le32 _r_a;	struct host_to_dev_fis fis;	u8     _r_b[32];	__le16 sister_scb;	__le16 conn_handle;	u8     ata_flags;	  /* 0 */	u8     _r_c[55];} __attribute__ ((packed));struct empty_scb {	u8     num_valid;	__le32 _r_a;#define ASD_EDBS_PER_SCB 7/* header+data+CRC+DMA suffix data */#define ASD_EDB_SIZE (24+1024+4+16)	struct sg_el eb[ASD_EDBS_PER_SCB];#define ELEMENT_NOT_VALID  0xC0} __attribute__ ((packed));struct initiate_link_adm {	u8     phy_id;	u8     sub_func;#define GET_LINK_ERROR_COUNT      0x00#define RESET_LINK_ERROR_COUNT    0x01#define ENABLE_NOTIFY_SPINUP_INTS 0x02	u8     _r_a[57];	__le16 conn_handle;	u8     _r_b[56];} __attribute__ ((packed));struct copy_memory {	u8     _r_a;	__le16 xfer_len;	__le16 _r_b;	__le64 src_busaddr;	u8     src_ds;		  /* See definition of sg_el */	u8     _r_c[45];	__le16 conn_handle;	__le64 _r_d;	__le64 dest_busaddr;	u8     dest_ds;		  /* See definition of sg_el */	u8     _r_e[39];} __attribute__ ((packed));struct abort_task {	u8     proto_conn_rate;	__le32 _r_a;	struct ssp_frame_hdr ssp_frame;	struct ssp_task_iu ssp_task;	__le16 sister_scb;	__le16 conn_handle;	u8     flags;	  /* ovrd_itnl_timer:3,3, suspend_data_trans:2,2 */#define SUSPEND_DATA_TRANS 0x04	u8     _r_b;	u8     retry_count;	u8     _r_c[5];	__le16 index;  /* Transaction context of task to be queried */	__le16 itnl_to;	u8     _r_d[44];} __attribute__ ((packed));struct clear_nexus {	u8     nexus;#define NEXUS_ADAPTER  0x00#define NEXUS_PORT     0x01#define NEXUS_I_T      0x02#define NEXUS_I_T_L    0x03#define NEXUS_TAG      0x04#define NEXUS_TRANS_CX 0x05#define NEXUS_SATA_TAG 0x06#define NEXUS_T_L      0x07#define NEXUS_L        0x08#define NEXUS_T_TAG    0x09	__le32 _r_a;	u8     flags;#define SUSPEND_TX     0x80#define RESUME_TX      0x40#define SEND_Q         0x04#define EXEC_Q         0x02#define NOTINQ         0x01	u8     _r_b[3];	u8     conn_mask;	u8     _r_c[19];	struct ssp_task_iu ssp_task; /* LUN and TAG */	__le16 _r_d;	__le16 conn_handle;	__le64 _r_e;	__le16 index;  /* Transaction context of task to be cleared */	__le16 context;		  /* Clear nexus context */	u8     _r_f[44];} __attribute__ ((packed));struct initiate_ssp_tmf {	u8     proto_conn_rate;	__le32 _r_a;	struct ssp_frame_hdr ssp_frame;	struct ssp_task_iu ssp_task;	__le16 sister_scb;	__le16 conn_handle;	u8     flags;	  /* itnl override and suspend data tx */#define OVERRIDE_ITNL_TIMER  8	u8     _r_b;	u8     retry_count;	u8     _r_c[5];	__le16 index;  /* Transaction context of task to be queried */	__le16 itnl_to;	u8     _r_d[44];} __attribute__ ((packed));/* Transmits an arbitrary primitive on the link. * Used for NOTIFY and BROADCAST. */struct send_prim {	u8     phy_id;	u8     wait_transmit; 	  /* :0,0 */	u8     xmit_flags;#define XMTPSIZE_MASK      0xF0#define XMTPSIZE_SINGLE    0x10#define XMTPSIZE_REPEATED  0x20#define XMTPSIZE_CONT      0x20#define XMTPSIZE_TRIPLE    0x30#define XMTPSIZE_REDUNDANT 0x60#define XMTPSIZE_INF       0#define XMTCONTEN          0x04#define XMTPFRM            0x02	  /* Transmit at the next frame boundary */#define XMTPIMM            0x01	  /* Transmit immediately */	__le16 _r_a;	u8     prim[4];		  /* K, D0, D1, D2 */	u8     _r_b[50];	__le16 conn_handle;	u8     _r_c[56];} __attribute__ ((packed));/* This describes both SSP Target Get Data and SSP Target Get Data And * Send Good Response SCBs.  Used when the sequencer is operating in * target mode... */struct ssp_targ_get_data {	u8     proto_conn_rate;	__le32 total_xfer_len;	struct ssp_frame_hdr ssp_frame;	struct xfer_rdy_iu  xfer_rdy;	u8     lun[LUN_SIZE];	__le64 _r_a;	__le16 sister_scb;	__le16 conn_handle;	u8     data_dir;	  /* 01b */	u8     _r_b;	u8     retry_count;	u8     _r_c[5];	struct sg_el sg_element[3];} __attribute__ ((packed));/* ---------- The actual SCB struct ---------- */struct scb {	struct scb_header header;	union {		struct initiate_ssp_task ssp_task;		struct initiate_ata_task ata_task;		struct initiate_smp_task smp_task;		struct control_phy       control_phy;		struct control_ata_dev   control_ata_dev;		struct empty_scb         escb;		struct initiate_link_adm link_adm;		struct copy_memory       cp_mem;		struct abort_task        abort_task;		struct clear_nexus       clear_nexus;		struct initiate_ssp_tmf  ssp_tmf;	};} __attribute__ ((packed));/* ---------- Done List ---------- *//* The done list entry opcode field is defined below. * The mnemonic encoding and meaning is as follows: * TC - Task Complete, status was received and acknowledged * TF - Task Failed, indicates an error prior to receiving acknowledgment *   for the command: *   - no conn, *   - NACK or R_ERR received in response to this command, *   - credit blocked or not available, or in the case of SMP request, *   - no SMP response was received. *   In these four cases it is known that the target didn't receive the *   command. * TI - Task Interrupted, error after the command was acknowledged.  It is *   known that the command was received by the target. * TU - Task Unacked, command was transmitted but neither ACK (R_OK) nor NAK *   (R_ERR) was received due to loss of signal, broken connection, loss of *   dword sync or other reason.  The application client should send the *   appropriate task query. * TA - Task Aborted, see TF. * _RESP - The completion includes an empty buffer containing status. * TO - Timeout. */#define TC_NO_ERROR             0x00#define TC_UNDERRUN             0x01#define TC_OVERRUN              0x02#define TF_OPEN_TO              0x03#define TF_OPEN_REJECT          0x04#define TI_BREAK                0x05#define TI_PROTO_ERR            0x06#define TC_SSP_RESP             0x07#define TI_PHY_DOWN             0x08#define TF_PHY_DOWN             0x09#define TC_LINK_ADM_RESP        0x0a#define TC_CSMI                 0x0b#define TC_ATA_RESP             0x0c#define TU_PHY_DOWN             0x0d#define TU_BREAK                0x0e#define TI_SATA_TO              0x0f#define TI_NAK                  0x10#define TC_CONTROL_PHY          0x11#define TF_BREAK                0x12#define TC_RESUME               0x13#define TI_ACK_NAK_TO           0x14#define TF_SMPRSP_TO            0x15#define TF_SMP_XMIT_RCV_ERR     0x16#define TC_PARTIAL_SG_LIST      0x17#define TU_ACK_NAK_TO           0x18#define TU_SATA_TO              0x19#define TF_NAK_RECV             0x1a#define TA_I_T_NEXUS_LOSS       0x1b#define TC_ATA_R_ERR_RECV       0x1c#define TF_TMF_NO_CTX           0x1d#define TA_ON_REQ               0x1e#define TF_TMF_NO_TAG           0x1f#define TF_TMF_TAG_FREE         0x20#define TF_TMF_TASK_DONE        0x21#define TF_TMF_NO_CONN_HANDLE   0x22#define TC_TASK_CLEARED         0x23#define TI_SYNCS_RECV           0x24#define TU_SYNCS_RECV           0x25#define TF_IRTT_TO              0x26#define TF_NO_SMP_CONN          0x27#define TF_IU_SHORT             0x28#define TF_DATA_OFFS_ERR        0x29#define TF_INV_CONN_HANDLE      0x2a#define TF_REQUESTED_N_PENDING  0x2b/* 0xc1 - 0xc7: empty buffer received,   0xd1 - 0xd7: establish nexus empty buffer received*//* This is the ESCB mask */#define ESCB_RECVD              0xC0/* This struct done_list_struct defines the done list entry. * All fields are LE. */struct done_list_struct {	__le16 index;		  /* aka transaction context */	u8     opcode;	u8     status_block[4];	u8     toggle;		  /* bit 0 */#define DL_TOGGLE_MASK     0x01} __attribute__ ((packed));/* ---------- PHYS ---------- */struct asd_phy {	struct asd_sas_phy        sas_phy;	struct asd_phy_desc   *phy_desc; /* hw profile */	struct sas_identify_frame *identify_frame;	struct asd_dma_tok  *id_frm_tok;	struct asd_port     *asd_port;	u8         frame_rcvd[ASD_EDB_SIZE];};#define ASD_SCB_SIZE sizeof(struct scb)#define ASD_DDB_SIZE sizeof(struct asd_ddb_ssp_smp_target_port)/* Define this to 0 if you do not want NOTIFY (ENABLE SPINIP) sent. * Default: 0x10 (it's a mask) */#define ASD_NOTIFY_ENABLE_SPINUP  0x10/* If enabled, set this to the interval between transmission * of NOTIFY (ENABLE SPINUP). In units of 200 us. */#define ASD_NOTIFY_TIMEOUT        2500/* Initial delay after OOB, before we transmit NOTIFY (ENABLE SPINUP). * If 0, transmit immediately. In milliseconds. */#define ASD_NOTIFY_DOWN_COUNT     0/* Device present timer timeout constant, 10 ms. */#define ASD_DEV_PRESENT_TIMEOUT   0x2710#define ASD_SATA_INTERLOCK_TIMEOUT 0/* How long to wait before shutting down an STP connection, unless * an STP target sent frame(s). 50 usec. * IGNORED by the sequencer (i.e. value 0 always). */#define ASD_STP_SHUTDOWN_TIMEOUT  0x0/* ATA soft reset timer timeout. 5 usec. */#define ASD_SRST_ASSERT_TIMEOUT   0x05/* 31 sec */#define ASD_RCV_FIS_TIMEOUT       0x01D905C0#define ASD_ONE_MILLISEC_TIMEOUT  0x03e8/* COMINIT timer */#define ASD_TEN_MILLISEC_TIMEOUT  0x2710#define ASD_COMINIT_TIMEOUT ASD_TEN_MILLISEC_TIMEOUT/* 1 sec */#define ASD_SMP_RCV_TIMEOUT       0x000F4240#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -