aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/request.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-06-27 14:56:41 -0400
committerDan Williams <dan.j.williams@intel.com>2011-07-03 07:04:51 -0400
commitba7cb22342a66505a831bb7e4541fef90e0193c9 (patch)
tree759acb8d84333dd0e61ac5c157ef3c4661bfe74c /drivers/scsi/isci/request.h
parentdb0562509800a2d4cb5cb14a66413c30484f165c (diff)
isci: rename / clean up scic_sds_stp_request
* Rename scic_sds_stp_request to isci_stp_request * Remove the unused fields and union indirection Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/request.h')
-rw-r--r--drivers/scsi/isci/request.h84
1 files changed, 21 insertions, 63 deletions
diff --git a/drivers/scsi/isci/request.h b/drivers/scsi/isci/request.h
index 7628decbd535..7fd98531d1f2 100644
--- a/drivers/scsi/isci/request.h
+++ b/drivers/scsi/isci/request.h
@@ -89,67 +89,25 @@ enum sci_request_protocol {
89 SCIC_STP_PROTOCOL 89 SCIC_STP_PROTOCOL
90}; /* XXX remove me, use sas_task.{dev|task_proto} instead */; 90}; /* XXX remove me, use sas_task.{dev|task_proto} instead */;
91 91
92struct scic_sds_stp_request { 92/**
93 union { 93 * isci_stp_request - extra request infrastructure to handle pio/atapi protocol
94 u32 ncq; 94 * @pio_len - number of bytes requested at PIO setup
95 95 * @status - pio setup ending status value to tell us if we need
96 u32 udma; 96 * to wait for another fis or if the transfer is complete. Upon
97 97 * receipt of a d2h fis this will be the status field of that fis.
98 struct scic_sds_stp_pio_request { 98 * @sgl - track pio transfer progress as we iterate through the sgl
99 /* 99 * @device_cdb_len - atapi device advertises it's transfer constraints at setup
100 * Total transfer for the entire PIO request recorded 100 */
101 * at request constuction time. 101struct isci_stp_request {
102 * 102 u32 pio_len;
103 * @todo Should we just decrement this value for each 103 u8 status;
104 * byte of data transitted or received to elemenate 104
105 * the current_transfer_bytes field? 105 struct isci_stp_pio_sgl {
106 */ 106 int index;
107 u32 total_transfer_bytes; 107 u8 set;
108 108 u32 offset;
109 /* 109 } sgl;
110 * Total number of bytes received/transmitted in data 110 u32 device_cdb_len;
111 * frames since the start of the IO request. At the
112 * end of the IO request this should equal the
113 * total_transfer_bytes.
114 */
115 u32 current_transfer_bytes;
116
117 /*
118 * The number of bytes requested in the in the PIO
119 * setup.
120 */
121 u32 pio_transfer_bytes;
122
123 /*
124 * PIO Setup ending status value to tell us if we need
125 * to wait for another FIS or if the transfer is
126 * complete. On the receipt of a D2H FIS this will be
127 * the status field of that FIS.
128 */
129 u8 ending_status;
130
131 /*
132 * On receipt of a D2H FIS this will be the ending
133 * error field if the ending_status has the
134 * SATA_STATUS_ERR bit set.
135 */
136 u8 ending_error;
137
138 struct scic_sds_request_pio_sgl {
139 int sgl_index;
140 u8 sgl_set;
141 u32 sgl_offset;
142 } request_current;
143 } pio;
144
145 struct {
146 /*
147 * The number of bytes requested in the PIO setup
148 * before CDB data frame.
149 */
150 u32 device_preferred_cdb_length;
151 } packet;
152 } type;
153}; 111};
154 112
155struct scic_sds_request { 113struct scic_sds_request {
@@ -235,14 +193,14 @@ struct scic_sds_request {
235 } smp; 193 } smp;
236 194
237 struct { 195 struct {
238 struct scic_sds_stp_request req; 196 struct isci_stp_request req;
239 struct host_to_dev_fis cmd; 197 struct host_to_dev_fis cmd;
240 struct dev_to_host_fis rsp; 198 struct dev_to_host_fis rsp;
241 } stp; 199 } stp;
242 }; 200 };
243}; 201};
244 202
245static inline struct scic_sds_request *to_sci_req(struct scic_sds_stp_request *stp_req) 203static inline struct scic_sds_request *to_sci_req(struct isci_stp_request *stp_req)
246{ 204{
247 struct scic_sds_request *sci_req; 205 struct scic_sds_request *sci_req;
248 206