Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) /* SPDX-License-Identifier: GPL-2.0-only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  * SAS structures and definitions header file
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  * Copyright (C) 2005 Adaptec, Inc.  All rights reserved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)  * Copyright (C) 2005 Luben Tuikov <luben_tuikov@adaptec.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) #ifndef _SAS_H_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) #define _SAS_H_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #include <linux/types.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) #include <asm/byteorder.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) #define SAS_ADDR_SIZE        8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) #define HASHED_SAS_ADDR_SIZE 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) #define SAS_ADDR(_sa) ((unsigned long long) be64_to_cpu(*(__be64 *)(_sa)))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) #define SMP_REQUEST             0x40
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) #define SMP_RESPONSE            0x41
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) #define SSP_DATA                0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) #define SSP_XFER_RDY            0x05
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) #define SSP_COMMAND             0x06
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) #define SSP_RESPONSE            0x07
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) #define SSP_TASK                0x16
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) #define SMP_REPORT_GENERAL       0x00
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) #define SMP_REPORT_MANUF_INFO    0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) #define SMP_READ_GPIO_REG        0x02
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) #define SMP_DISCOVER             0x10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) #define SMP_REPORT_PHY_ERR_LOG   0x11
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) #define SMP_REPORT_PHY_SATA      0x12
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) #define SMP_REPORT_ROUTE_INFO    0x13
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) #define SMP_WRITE_GPIO_REG       0x82
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) #define SMP_CONF_ROUTE_INFO      0x90
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) #define SMP_PHY_CONTROL          0x91
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) #define SMP_PHY_TEST_FUNCTION    0x92
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) #define SMP_RESP_FUNC_ACC        0x00
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) #define SMP_RESP_FUNC_UNK        0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) #define SMP_RESP_FUNC_FAILED     0x02
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) #define SMP_RESP_INV_FRM_LEN     0x03
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) #define SMP_RESP_NO_PHY          0x10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) #define SMP_RESP_NO_INDEX        0x11
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) #define SMP_RESP_PHY_NO_SATA     0x12
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) #define SMP_RESP_PHY_UNK_OP      0x13
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) #define SMP_RESP_PHY_UNK_TESTF   0x14
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) #define SMP_RESP_PHY_TEST_INPROG 0x15
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) #define SMP_RESP_PHY_VACANT      0x16
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) /* SAM TMFs */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) #define TMF_ABORT_TASK      0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) #define TMF_ABORT_TASK_SET  0x02
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) #define TMF_CLEAR_TASK_SET  0x04
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) #define TMF_LU_RESET        0x08
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) #define TMF_CLEAR_ACA       0x40
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) #define TMF_QUERY_TASK      0x80
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) /* SAS TMF responses */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) #define TMF_RESP_FUNC_COMPLETE   0x00
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) #define TMF_RESP_INVALID_FRAME   0x02
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) #define TMF_RESP_FUNC_ESUPP      0x04
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) #define TMF_RESP_FUNC_FAILED     0x05
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) #define TMF_RESP_FUNC_SUCC       0x08
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) #define TMF_RESP_NO_LUN          0x09
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) #define TMF_RESP_OVERLAPPED_TAG  0x0A
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) enum sas_oob_mode {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 	OOB_NOT_CONNECTED,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 	SATA_OOB_MODE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 	SAS_OOB_MODE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) /* See sas_discover.c if you plan on changing these */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) enum sas_device_type {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 	/* these are SAS protocol defined (attached device type field) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 	SAS_PHY_UNUSED = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 	SAS_END_DEVICE = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 	SAS_EDGE_EXPANDER_DEVICE = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 	SAS_FANOUT_EXPANDER_DEVICE = 3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 	/* these are internal to libsas */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 	SAS_HA = 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 	SAS_SATA_DEV = 5,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 	SAS_SATA_PM = 7,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 	SAS_SATA_PM_PORT = 8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 	SAS_SATA_PENDING = 9,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) enum sas_protocol {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 	SAS_PROTOCOL_NONE		= 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 	SAS_PROTOCOL_SATA		= 0x01,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 	SAS_PROTOCOL_SMP		= 0x02,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 	SAS_PROTOCOL_STP		= 0x04,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 	SAS_PROTOCOL_SSP		= 0x08,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 	SAS_PROTOCOL_ALL		= 0x0E,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	SAS_PROTOCOL_STP_ALL		= SAS_PROTOCOL_STP|SAS_PROTOCOL_SATA,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) /* From the spec; local phys only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) enum phy_func {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 	PHY_FUNC_NOP,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 	PHY_FUNC_LINK_RESET,		  /* Enables the phy */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 	PHY_FUNC_HARD_RESET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 	PHY_FUNC_DISABLE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 	PHY_FUNC_CLEAR_ERROR_LOG = 5,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 	PHY_FUNC_CLEAR_AFFIL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 	PHY_FUNC_TX_SATA_PS_SIGNAL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 	PHY_FUNC_RELEASE_SPINUP_HOLD = 0x10, /* LOCAL PORT ONLY! */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 	PHY_FUNC_SET_LINK_RATE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 	PHY_FUNC_GET_EVENTS,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) /* SAS LLDD would need to report only _very_few_ of those, like BROADCAST.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115)  * Most of those are here for completeness.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) enum sas_prim {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 	SAS_PRIM_AIP_NORMAL = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 	SAS_PRIM_AIP_R0     = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 	SAS_PRIM_AIP_R1     = 3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 	SAS_PRIM_AIP_R2     = 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 	SAS_PRIM_AIP_WC     = 5,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 	SAS_PRIM_AIP_WD     = 6,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 	SAS_PRIM_AIP_WP     = 7,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 	SAS_PRIM_AIP_RWP    = 8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 	SAS_PRIM_BC_CH      = 9,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 	SAS_PRIM_BC_RCH0    = 10,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 	SAS_PRIM_BC_RCH1    = 11,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 	SAS_PRIM_BC_R0      = 12,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 	SAS_PRIM_BC_R1      = 13,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 	SAS_PRIM_BC_R2      = 14,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 	SAS_PRIM_BC_R3      = 15,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 	SAS_PRIM_BC_R4      = 16,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 	SAS_PRIM_NOTIFY_ENSP= 17,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 	SAS_PRIM_NOTIFY_R0  = 18,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 	SAS_PRIM_NOTIFY_R1  = 19,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 	SAS_PRIM_NOTIFY_R2  = 20,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 	SAS_PRIM_CLOSE_CLAF = 21,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 	SAS_PRIM_CLOSE_NORM = 22,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 	SAS_PRIM_CLOSE_R0   = 23,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 	SAS_PRIM_CLOSE_R1   = 24,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 	SAS_PRIM_OPEN_RTRY  = 25,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 	SAS_PRIM_OPEN_RJCT  = 26,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 	SAS_PRIM_OPEN_ACPT  = 27,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 	SAS_PRIM_DONE       = 28,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 	SAS_PRIM_BREAK      = 29,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 	SATA_PRIM_DMAT      = 33,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 	SATA_PRIM_PMNAK     = 34,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 	SATA_PRIM_PMACK     = 35,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 	SATA_PRIM_PMREQ_S   = 36,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 	SATA_PRIM_PMREQ_P   = 37,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 	SATA_SATA_R_ERR     = 38,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) enum sas_open_rej_reason {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 	/* Abandon open */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 	SAS_OREJ_UNKNOWN   = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 	SAS_OREJ_BAD_DEST  = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 	SAS_OREJ_CONN_RATE = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 	SAS_OREJ_EPROTO    = 3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 	SAS_OREJ_RESV_AB0  = 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 	SAS_OREJ_RESV_AB1  = 5,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 	SAS_OREJ_RESV_AB2  = 6,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 	SAS_OREJ_RESV_AB3  = 7,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 	SAS_OREJ_WRONG_DEST= 8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 	SAS_OREJ_STP_NORES = 9,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 	/* Retry open */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 	SAS_OREJ_NO_DEST   = 10,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 	SAS_OREJ_PATH_BLOCKED = 11,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 	SAS_OREJ_RSVD_CONT0 = 12,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 	SAS_OREJ_RSVD_CONT1 = 13,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 	SAS_OREJ_RSVD_INIT0 = 14,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 	SAS_OREJ_RSVD_INIT1 = 15,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 	SAS_OREJ_RSVD_STOP0 = 16,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 	SAS_OREJ_RSVD_STOP1 = 17,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 	SAS_OREJ_RSVD_RETRY = 18,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) enum sas_gpio_reg_type {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 	SAS_GPIO_REG_CFG   = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 	SAS_GPIO_REG_RX    = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 	SAS_GPIO_REG_RX_GP = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 	SAS_GPIO_REG_TX    = 3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 	SAS_GPIO_REG_TX_GP = 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) struct  dev_to_host_fis {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 	u8     fis_type;	  /* 0x34 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 	u8     flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 	u8     status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 	u8     error;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 	u8     lbal;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 	union { u8 lbam; u8 byte_count_low; };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 	union { u8 lbah; u8 byte_count_high; };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 	u8     device;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 	u8     lbal_exp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 	u8     lbam_exp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 	u8     lbah_exp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 	u8     _r_a;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 	union { u8  sector_count; u8 interrupt_reason; };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 	u8     sector_count_exp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 	u8     _r_b;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 	u8     _r_c;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) 	u32    _r_d;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) } __attribute__ ((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) struct host_to_dev_fis {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 	u8     fis_type;	  /* 0x27 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 	u8     flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 	u8     command;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 	u8     features;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 	u8     lbal;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 	union { u8 lbam; u8 byte_count_low; };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 	union { u8 lbah; u8 byte_count_high; };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) 	u8     device;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 	u8     lbal_exp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 	u8     lbam_exp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 	u8     lbah_exp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) 	u8     features_exp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) 	union { u8  sector_count; u8 interrupt_reason; };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) 	u8     sector_count_exp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) 	u8     _r_a;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) 	u8     control;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) 	u32    _r_b;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) } __attribute__ ((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) /* Prefer to have code clarity over header file clarity.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) #ifdef __LITTLE_ENDIAN_BITFIELD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) struct sas_identify_frame {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) 	/* Byte 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) 	u8  frame_type:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) 	u8  dev_type:3;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) 	u8  _un0:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) 	/* Byte 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) 	u8  _un1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) 	/* Byte 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) 	union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) 		struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) 			u8  _un20:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) 			u8  smp_iport:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) 			u8  stp_iport:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) 			u8  ssp_iport:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) 			u8  _un247:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) 		};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) 		u8 initiator_bits;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) 	};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) 	/* Byte 3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) 	union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) 		struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) 			u8  _un30:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) 			u8 smp_tport:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) 			u8 stp_tport:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) 			u8 ssp_tport:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) 			u8 _un347:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) 		};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) 		u8 target_bits;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) 	};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) 	/* Byte 4 - 11 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) 	u8 _un4_11[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) 	/* Byte 12 - 19 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) 	u8 sas_addr[SAS_ADDR_SIZE];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) 	/* Byte 20 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) 	u8 phy_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) 	u8 _un21_27[7];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) 	__be32 crc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) } __attribute__ ((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) struct ssp_frame_hdr {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) 	u8     frame_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) 	u8     hashed_dest_addr[HASHED_SAS_ADDR_SIZE];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) 	u8     _r_a;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) 	u8     hashed_src_addr[HASHED_SAS_ADDR_SIZE];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) 	__be16 _r_b;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) 	u8     changing_data_ptr:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) 	u8     retransmit:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) 	u8     retry_data_frames:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) 	u8     _r_c:5;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) 	u8     num_fill_bytes:2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) 	u8     _r_d:6;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) 	u32    _r_e;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) 	__be16 tag;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) 	__be16 tptt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) 	__be32 data_offs;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) } __attribute__ ((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) struct ssp_response_iu {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) 	u8     _r_a[10];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) 	u8     datapres:2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) 	u8     _r_b:6;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) 	u8     status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) 	u32    _r_c;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) 	__be32 sense_data_len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) 	__be32 response_data_len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) 	u8     resp_data[0];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) 	u8     sense_data[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) } __attribute__ ((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) struct ssp_command_iu {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) 	u8     lun[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) 	u8     _r_a;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) 	union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) 		struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) 			u8  attr:3;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) 			u8  prio:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) 			u8  efb:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) 		};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) 		u8 efb_prio_attr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) 	};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) 	u8    _r_b;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) 	u8    _r_c:2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) 	u8    add_cdb_len:6;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) 	u8    cdb[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) 	u8    add_cdb[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) } __attribute__ ((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) struct xfer_rdy_iu {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) 	__be32 requested_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) 	__be32 write_data_len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) 	__be32 _r_a;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) } __attribute__ ((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) struct ssp_tmf_iu {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) 	u8     lun[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) 	u16    _r_a;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) 	u8     tmf;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) 	u8     _r_b;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) 	__be16 tag;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) 	u8     _r_c[14];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) } __attribute__ ((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) /* ---------- SMP ---------- */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) struct report_general_resp {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) 	__be16  change_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) 	__be16  route_indexes;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) 	u8      _r_a;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) 	u8      num_phys;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) 	u8      conf_route_table:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) 	u8      configuring:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) 	u8	config_others:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) 	u8	orej_retry_supp:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) 	u8	stp_cont_awt:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) 	u8	self_config:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) 	u8	zone_config:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) 	u8	t2t_supp:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) 	u8      _r_c;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386) 	u8      enclosure_logical_id[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) 	u8      _r_d[12];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) } __attribute__ ((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) struct discover_resp {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) 	u8    _r_a[5];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) 	u8    phy_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) 	__be16 _r_b;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397) 	u8    _r_c:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) 	u8    attached_dev_type:3;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) 	u8    _r_d:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401) 	u8    linkrate:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402) 	u8    _r_e:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404) 	u8    attached_sata_host:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405) 	u8    iproto:3;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406) 	u8    _r_f:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408) 	u8    attached_sata_dev:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409) 	u8    tproto:3;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410) 	u8    _r_g:3;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411) 	u8    attached_sata_ps:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413) 	u8    sas_addr[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414) 	u8    attached_sas_addr[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415) 	u8    attached_phy_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417) 	u8    _r_h[7];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419) 	u8    hmin_linkrate:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420) 	u8    pmin_linkrate:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421) 	u8    hmax_linkrate:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422) 	u8    pmax_linkrate:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424) 	u8    change_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426) 	u8    pptv:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427) 	u8    _r_i:3;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428) 	u8    virtual:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430) 	u8    routing_attr:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431) 	u8    _r_j:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433) 	u8    conn_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434) 	u8    conn_el_index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435) 	u8    conn_phy_link;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437) 	u8    _r_k[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438) } __attribute__ ((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440) struct report_phy_sata_resp {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441) 	u8    _r_a[5];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 443) 	u8    phy_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 444) 	u8    _r_b;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 445) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 446) 	u8    affil_valid:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 447) 	u8    affil_supp:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 448) 	u8    _r_c:6;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 449) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 450) 	u32    _r_d;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 451) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 452) 	u8    stp_sas_addr[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 453) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 454) 	struct dev_to_host_fis fis;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 455) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 456) 	u32   _r_e;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 457) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 458) 	u8    affil_stp_ini_addr[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 459) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 460) 	__be32 crc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 461) } __attribute__ ((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 462) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 463) struct smp_resp {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 464) 	u8    frame_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 465) 	u8    function;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 466) 	u8    result;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 467) 	u8    reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 468) 	union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 469) 		struct report_general_resp  rg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 470) 		struct discover_resp        disc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 471) 		struct report_phy_sata_resp rps;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 472) 	};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 473) } __attribute__ ((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 474) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 475) #elif defined(__BIG_ENDIAN_BITFIELD)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 476) struct sas_identify_frame {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 477) 	/* Byte 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 478) 	u8  _un0:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 479) 	u8  dev_type:3;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 480) 	u8  frame_type:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 481) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 482) 	/* Byte 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 483) 	u8  _un1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 484) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 485) 	/* Byte 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 486) 	union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 487) 		struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 488) 			u8  _un247:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 489) 			u8  ssp_iport:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 490) 			u8  stp_iport:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 491) 			u8  smp_iport:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 492) 			u8  _un20:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 493) 		};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 494) 		u8 initiator_bits;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 495) 	};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 496) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 497) 	/* Byte 3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 498) 	union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 499) 		struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 500) 			u8 _un347:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 501) 			u8 ssp_tport:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 502) 			u8 stp_tport:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 503) 			u8 smp_tport:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 504) 			u8 _un30:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 505) 		};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 506) 		u8 target_bits;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 507) 	};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 508) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 509) 	/* Byte 4 - 11 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 510) 	u8 _un4_11[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 511) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 512) 	/* Byte 12 - 19 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 513) 	u8 sas_addr[SAS_ADDR_SIZE];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 514) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 515) 	/* Byte 20 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 516) 	u8 phy_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 517) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 518) 	u8 _un21_27[7];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 519) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 520) 	__be32 crc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 521) } __attribute__ ((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 522) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 523) struct ssp_frame_hdr {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 524) 	u8     frame_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 525) 	u8     hashed_dest_addr[HASHED_SAS_ADDR_SIZE];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 526) 	u8     _r_a;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 527) 	u8     hashed_src_addr[HASHED_SAS_ADDR_SIZE];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 528) 	__be16 _r_b;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 529) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 530) 	u8     _r_c:5;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 531) 	u8     retry_data_frames:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 532) 	u8     retransmit:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 533) 	u8     changing_data_ptr:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 534) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 535) 	u8     _r_d:6;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 536) 	u8     num_fill_bytes:2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 537) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 538) 	u32    _r_e;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 539) 	__be16 tag;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 540) 	__be16 tptt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 541) 	__be32 data_offs;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 542) } __attribute__ ((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 543) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 544) struct ssp_response_iu {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 545) 	u8     _r_a[10];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 546) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 547) 	u8     _r_b:6;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 548) 	u8     datapres:2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 549) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 550) 	u8     status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 551) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 552) 	u32    _r_c;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 553) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 554) 	__be32 sense_data_len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 555) 	__be32 response_data_len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 556) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 557) 	u8     resp_data[0];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 558) 	u8     sense_data[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 559) } __attribute__ ((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 560) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 561) struct ssp_command_iu {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 562) 	u8     lun[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 563) 	u8     _r_a;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 564) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 565) 	union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 566) 		struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 567) 			u8  efb:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 568) 			u8  prio:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 569) 			u8  attr:3;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 570) 		};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 571) 		u8 efb_prio_attr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 572) 	};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 573) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 574) 	u8    _r_b;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 575) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 576) 	u8    add_cdb_len:6;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 577) 	u8    _r_c:2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 578) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 579) 	u8    cdb[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 580) 	u8    add_cdb[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 581) } __attribute__ ((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 582) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 583) struct xfer_rdy_iu {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 584) 	__be32 requested_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 585) 	__be32 write_data_len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 586) 	__be32 _r_a;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 587) } __attribute__ ((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 588) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 589) struct ssp_tmf_iu {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 590) 	u8     lun[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 591) 	u16    _r_a;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 592) 	u8     tmf;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 593) 	u8     _r_b;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 594) 	__be16 tag;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 595) 	u8     _r_c[14];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 596) } __attribute__ ((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 597) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 598) /* ---------- SMP ---------- */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 599) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 600) struct report_general_resp {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 601) 	__be16  change_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 602) 	__be16  route_indexes;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 603) 	u8      _r_a;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 604) 	u8      num_phys;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 605) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 606) 	u8	t2t_supp:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 607) 	u8	zone_config:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 608) 	u8	self_config:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 609) 	u8	stp_cont_awt:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 610) 	u8	orej_retry_supp:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 611) 	u8	config_others:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 612) 	u8      configuring:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 613) 	u8      conf_route_table:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 614) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 615) 	u8      _r_c;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 616) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 617) 	u8      enclosure_logical_id[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 618) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 619) 	u8      _r_d[12];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 620) } __attribute__ ((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 621) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 622) struct discover_resp {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 623) 	u8    _r_a[5];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 624) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 625) 	u8    phy_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 626) 	__be16 _r_b;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 627) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 628) 	u8    _r_d:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 629) 	u8    attached_dev_type:3;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 630) 	u8    _r_c:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 631) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 632) 	u8    _r_e:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 633) 	u8    linkrate:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 634) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 635) 	u8    _r_f:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 636) 	u8    iproto:3;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 637) 	u8    attached_sata_host:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 638) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 639) 	u8    attached_sata_ps:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 640) 	u8    _r_g:3;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 641) 	u8    tproto:3;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 642) 	u8    attached_sata_dev:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 643) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 644) 	u8    sas_addr[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 645) 	u8    attached_sas_addr[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 646) 	u8    attached_phy_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 647) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 648) 	u8    _r_h[7];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 649) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 650) 	u8    pmin_linkrate:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 651) 	u8    hmin_linkrate:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 652) 	u8    pmax_linkrate:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 653) 	u8    hmax_linkrate:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 654) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 655) 	u8    change_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 656) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 657) 	u8    virtual:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 658) 	u8    _r_i:3;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 659) 	u8    pptv:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 660) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 661) 	u8    _r_j:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 662) 	u8    routing_attr:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 663) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 664) 	u8    conn_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 665) 	u8    conn_el_index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 666) 	u8    conn_phy_link;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 667) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 668) 	u8    _r_k[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 669) } __attribute__ ((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 670) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 671) struct report_phy_sata_resp {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 672) 	u8    _r_a[5];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 673) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 674) 	u8    phy_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 675) 	u8    _r_b;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 676) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 677) 	u8    _r_c:6;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 678) 	u8    affil_supp:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 679) 	u8    affil_valid:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 680) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 681) 	u32   _r_d;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 682) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 683) 	u8    stp_sas_addr[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 684) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 685) 	struct dev_to_host_fis fis;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 686) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 687) 	u32   _r_e;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 688) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 689) 	u8    affil_stp_ini_addr[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 690) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 691) 	__be32 crc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 692) } __attribute__ ((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 693) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 694) struct smp_resp {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 695) 	u8    frame_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 696) 	u8    function;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 697) 	u8    result;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 698) 	u8    reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 699) 	union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 700) 		struct report_general_resp  rg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 701) 		struct discover_resp        disc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 702) 		struct report_phy_sata_resp rps;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 703) 	};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 704) } __attribute__ ((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 705) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 706) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 707) #error "Bitfield order not defined!"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 708) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 709) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 710) #endif /* _SAS_H_ */