xref: /freebsd/sys/dev/isci/scil/sati_request_sense.c (revision 685dc743dc3b5645e34836464128e1c0558b404b)
1f11c7f63SJim Harris /*-
2718cf2ccSPedro F. Giffuni  * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0
3718cf2ccSPedro F. Giffuni  *
4f11c7f63SJim Harris  * This file is provided under a dual BSD/GPLv2 license.  When using or
5f11c7f63SJim Harris  * redistributing this file, you may do so under either license.
6f11c7f63SJim Harris  *
7f11c7f63SJim Harris  * GPL LICENSE SUMMARY
8f11c7f63SJim Harris  *
9f11c7f63SJim Harris  * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
10f11c7f63SJim Harris  *
11f11c7f63SJim Harris  * This program is free software; you can redistribute it and/or modify
12f11c7f63SJim Harris  * it under the terms of version 2 of the GNU General Public License as
13f11c7f63SJim Harris  * published by the Free Software Foundation.
14f11c7f63SJim Harris  *
15f11c7f63SJim Harris  * This program is distributed in the hope that it will be useful, but
16f11c7f63SJim Harris  * WITHOUT ANY WARRANTY; without even the implied warranty of
17f11c7f63SJim Harris  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18f11c7f63SJim Harris  * General Public License for more details.
19f11c7f63SJim Harris  *
20f11c7f63SJim Harris  * You should have received a copy of the GNU General Public License
21f11c7f63SJim Harris  * along with this program; if not, write to the Free Software
22f11c7f63SJim Harris  * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
23f11c7f63SJim Harris  * The full GNU General Public License is included in this distribution
24f11c7f63SJim Harris  * in the file called LICENSE.GPL.
25f11c7f63SJim Harris  *
26f11c7f63SJim Harris  * BSD LICENSE
27f11c7f63SJim Harris  *
28f11c7f63SJim Harris  * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
29f11c7f63SJim Harris  * All rights reserved.
30f11c7f63SJim Harris  *
31f11c7f63SJim Harris  * Redistribution and use in source and binary forms, with or without
32f11c7f63SJim Harris  * modification, are permitted provided that the following conditions
33f11c7f63SJim Harris  * are met:
34f11c7f63SJim Harris  *
35f11c7f63SJim Harris  *   * Redistributions of source code must retain the above copyright
36f11c7f63SJim Harris  *     notice, this list of conditions and the following disclaimer.
37f11c7f63SJim Harris  *   * Redistributions in binary form must reproduce the above copyright
38f11c7f63SJim Harris  *     notice, this list of conditions and the following disclaimer in
39f11c7f63SJim Harris  *     the documentation and/or other materials provided with the
40f11c7f63SJim Harris  *     distribution.
41f11c7f63SJim Harris  *
42f11c7f63SJim Harris  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
43f11c7f63SJim Harris  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
44f11c7f63SJim Harris  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
45f11c7f63SJim Harris  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
46f11c7f63SJim Harris  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
47f11c7f63SJim Harris  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
48f11c7f63SJim Harris  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
49f11c7f63SJim Harris  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
50f11c7f63SJim Harris  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
51f11c7f63SJim Harris  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
52f11c7f63SJim Harris  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
53f11c7f63SJim Harris  */
54f11c7f63SJim Harris 
55f11c7f63SJim Harris #include <sys/cdefs.h>
56f11c7f63SJim Harris /**
57f11c7f63SJim Harris  * @file
58f11c7f63SJim Harris  * @brief This file contains the implementation to translate
59f11c7f63SJim Harris  *        SCSI Request Sense command based of the SAT spec.
60f11c7f63SJim Harris  */
61f11c7f63SJim Harris 
62f11c7f63SJim Harris #if !defined(DISABLE_SATI_REQUEST_SENSE)
63f11c7f63SJim Harris 
64f11c7f63SJim Harris #include <dev/isci/scil/sati_request_sense.h>
65f11c7f63SJim Harris #include <dev/isci/scil/sati_device.h>
66f11c7f63SJim Harris #include <dev/isci/scil/sati_util.h>
67f11c7f63SJim Harris #include <dev/isci/scil/intel_scsi.h>
68f11c7f63SJim Harris #include <dev/isci/scil/intel_ata.h>
69f11c7f63SJim Harris #include <dev/isci/scil/intel_sat.h>
70f11c7f63SJim Harris #include <dev/isci/scil/sati_callbacks.h>
71f11c7f63SJim Harris #include <dev/isci/scil/sati_mode_pages.h>
72f11c7f63SJim Harris 
73f11c7f63SJim Harris #define MRIE_BYTE 3
74f11c7f63SJim Harris #define DEXCPT_BYTE 2
75f11c7f63SJim Harris 
76f11c7f63SJim Harris /**
77f11c7f63SJim Harris  * @brief This method will translate the SCSI request sense command
78f11c7f63SJim Harris  *        into corresponding ATA commands.  Depending on supported and enabled
79f11c7f63SJim Harris  *        capabilities like SMART, different ATA commands can be selected.
80f11c7f63SJim Harris  *        For more information on the parameters passed to this method,
81f11c7f63SJim Harris  *        please reference sati_translate_command().
82f11c7f63SJim Harris  *
83f11c7f63SJim Harris  * @return Indicates if the command translation succeeded.
84f11c7f63SJim Harris  * @retval SATI_SUCCESS indicates that the translation was supported and occurred
85f11c7f63SJim Harris  *         without error.
86f11c7f63SJim Harris  * @retval SATI_FAILURE_CHECK_RESPONSE_DATA This value is returned if
87*01d74e5cSGordon Bergling  *         the SATII is processing a format unit command.
88f11c7f63SJim Harris  * @retval SATI_COMPLETE indicates that the translation was supported, occurred without
89f11c7f63SJim Harris  *         error, and no additional translation is necessary.
90f11c7f63SJim Harris  */
sati_request_sense_translate_command(SATI_TRANSLATOR_SEQUENCE_T * sequence,void * scsi_io,void * ata_io)91f11c7f63SJim Harris SATI_STATUS sati_request_sense_translate_command(
92f11c7f63SJim Harris    SATI_TRANSLATOR_SEQUENCE_T * sequence,
93f11c7f63SJim Harris    void                       * scsi_io,
94f11c7f63SJim Harris    void                       * ata_io
95f11c7f63SJim Harris )
96f11c7f63SJim Harris {
97f11c7f63SJim Harris    U8 * cdb = sati_cb_get_cdb_address(scsi_io);
98f11c7f63SJim Harris 
99f11c7f63SJim Harris    //check if SATI is processing format unit command
100f11c7f63SJim Harris    switch(sequence->device->state)
101f11c7f63SJim Harris    {
102f11c7f63SJim Harris       case SATI_DEVICE_STATE_FORMAT_UNIT_IN_PROGRESS:
103f11c7f63SJim Harris          sati_scsi_sense_data_construct(
104f11c7f63SJim Harris             sequence,
105f11c7f63SJim Harris             scsi_io,
106f11c7f63SJim Harris             SCSI_STATUS_GOOD,
107f11c7f63SJim Harris             SCSI_SENSE_NOT_READY,
108f11c7f63SJim Harris             SCSI_ASC_LUN_FORMAT_IN_PROGRESS,
109f11c7f63SJim Harris             SCSI_ASCQ_LUN_FORMAT_IN_PROGRESS
110f11c7f63SJim Harris          );
111f11c7f63SJim Harris          return SATI_COMPLETE;
112f11c7f63SJim Harris       break;
113f11c7f63SJim Harris 
114f11c7f63SJim Harris       case SATI_DEVICE_STATE_UNIT_ATTENTION_CONDITION:
115f11c7f63SJim Harris          sati_scsi_sense_data_construct(
116f11c7f63SJim Harris             sequence,
117f11c7f63SJim Harris             scsi_io,
118f11c7f63SJim Harris             SCSI_STATUS_GOOD,
119f11c7f63SJim Harris             SCSI_SENSE_UNIT_ATTENTION,
120f11c7f63SJim Harris             sequence->device->unit_attention_asc,
121f11c7f63SJim Harris             sequence->device->unit_attention_ascq
122f11c7f63SJim Harris          );
123f11c7f63SJim Harris          return SATI_COMPLETE;
124f11c7f63SJim Harris       break;
125f11c7f63SJim Harris       //sending sense data status Idle, this is set by start_stop_unit
126f11c7f63SJim Harris       case SATI_DEVICE_STATE_IDLE:
127f11c7f63SJim Harris          sati_scsi_sense_data_construct(
128f11c7f63SJim Harris             sequence,
129f11c7f63SJim Harris             scsi_io,
130f11c7f63SJim Harris             SCSI_STATUS_GOOD,
131f11c7f63SJim Harris             SCSI_SENSE_NO_SENSE,
132f11c7f63SJim Harris             SCSI_ASC_POWER_STATE_CHANGE,
133f11c7f63SJim Harris             SCSI_ASCQ_IDLE_CONDITION_ACTIVATE_BY_COMMAND
134f11c7f63SJim Harris          );
135f11c7f63SJim Harris          return SATI_COMPLETE;
136f11c7f63SJim Harris       break;
137f11c7f63SJim Harris       //sending sense data status Standby, this is set by start_stop_unit
138f11c7f63SJim Harris       case SATI_DEVICE_STATE_STANDBY:
139f11c7f63SJim Harris          sati_scsi_sense_data_construct(
140f11c7f63SJim Harris             sequence,
141f11c7f63SJim Harris             scsi_io,
142f11c7f63SJim Harris             SCSI_STATUS_GOOD,
143f11c7f63SJim Harris             SCSI_SENSE_NO_SENSE,
144f11c7f63SJim Harris             SCSI_ASC_POWER_STATE_CHANGE,
145f11c7f63SJim Harris             SCSI_ASCQ_STANDBY_CONDITION_ACTIVATE_BY_COMMAND
146f11c7f63SJim Harris          );
147f11c7f63SJim Harris          return SATI_COMPLETE;
148f11c7f63SJim Harris       break;
149f11c7f63SJim Harris 
150f11c7f63SJim Harris       case SATI_DEVICE_STATE_STOPPED:
151f11c7f63SJim Harris          sati_scsi_sense_data_construct(
152f11c7f63SJim Harris             sequence,
153f11c7f63SJim Harris             scsi_io,
154f11c7f63SJim Harris             SCSI_STATUS_GOOD,
155f11c7f63SJim Harris             SCSI_SENSE_NO_SENSE,
156f11c7f63SJim Harris             SCSI_ASC_NO_ADDITIONAL_SENSE,
157f11c7f63SJim Harris             SCSI_ASCQ_NO_ADDITIONAL_SENSE
158f11c7f63SJim Harris          );
159f11c7f63SJim Harris          return SATI_COMPLETE;
160f11c7f63SJim Harris       break;
161f11c7f63SJim Harris 
162f11c7f63SJim Harris       default:
163f11c7f63SJim Harris       break;
164f11c7f63SJim Harris    }
165f11c7f63SJim Harris 
166f11c7f63SJim Harris    sequence->allocation_length = sati_get_cdb_byte(cdb, 4);
167f11c7f63SJim Harris 
168f11c7f63SJim Harris    //Check if the device has SMART support & SMART enabled
169f11c7f63SJim Harris    if(sequence->device->capabilities & SATI_DEVICE_CAP_SMART_SUPPORT)
170f11c7f63SJim Harris    {
171f11c7f63SJim Harris        if(sequence->device->capabilities & SATI_DEVICE_CAP_SMART_ENABLE)
172f11c7f63SJim Harris        {
173f11c7f63SJim Harris             sati_ata_smart_return_status_construct(
174f11c7f63SJim Harris                            ata_io,
175f11c7f63SJim Harris                            sequence,
176f11c7f63SJim Harris                            ATA_SMART_SUB_CMD_RETURN_STATUS
177f11c7f63SJim Harris             );
178f11c7f63SJim Harris 
179f11c7f63SJim Harris             sequence->type = SATI_SEQUENCE_REQUEST_SENSE_SMART_RETURN_STATUS;
180f11c7f63SJim Harris             return SATI_SUCCESS;
181f11c7f63SJim Harris         }
182f11c7f63SJim Harris    }
183f11c7f63SJim Harris    sati_ata_check_power_mode_construct(ata_io, sequence);
184f11c7f63SJim Harris    sequence->type = SATI_SEQUENCE_REQUEST_SENSE_CHECK_POWER_MODE;
185f11c7f63SJim Harris    return SATI_SUCCESS;
186f11c7f63SJim Harris }
187f11c7f63SJim Harris 
188f11c7f63SJim Harris /**
189f11c7f63SJim Harris  * @brief This method will translate the response to the SATI Request Sense
190f11c7f63SJim Harris  *        translation. ATA_Check_Power_Mode and ATA_SMART_Return_Status will
191f11c7f63SJim Harris  *        be translated into a SCSI sense data response.
192f11c7f63SJim Harris  *
193f11c7f63SJim Harris  * @return SATI_STATUS Indicates if the response translation succeeded.
194f11c7f63SJim Harris  *
195f11c7f63SJim Harris  */
sati_request_sense_translate_response(SATI_TRANSLATOR_SEQUENCE_T * sequence,void * scsi_io,void * ata_io)196f11c7f63SJim Harris SATI_STATUS sati_request_sense_translate_response(
197f11c7f63SJim Harris    SATI_TRANSLATOR_SEQUENCE_T * sequence,
198f11c7f63SJim Harris    void                       * scsi_io,
199f11c7f63SJim Harris    void                       * ata_io
200f11c7f63SJim Harris )
201f11c7f63SJim Harris {
202f11c7f63SJim Harris    U8 * register_fis = sati_cb_get_d2h_register_fis_address(ata_io);
203f11c7f63SJim Harris    U32 mid_register;
204f11c7f63SJim Harris    U32 high_register;
205f11c7f63SJim Harris    U32 sector_count;
206f11c7f63SJim Harris    SATI_STATUS status = SATI_FAILURE;
207f11c7f63SJim Harris 
208f11c7f63SJim Harris    if(sati_get_ata_status(register_fis) & ATA_STATUS_REG_ERROR_BIT)
209f11c7f63SJim Harris    {
210f11c7f63SJim Harris       sati_scsi_sense_data_construct(
211f11c7f63SJim Harris          sequence,
212f11c7f63SJim Harris          scsi_io,
213f11c7f63SJim Harris          SCSI_STATUS_CHECK_CONDITION,
214f11c7f63SJim Harris          SCSI_SENSE_ABORTED_COMMAND,
215f11c7f63SJim Harris          SCSI_ASC_NO_ADDITIONAL_SENSE ,
216f11c7f63SJim Harris          SCSI_ASCQ_NO_ADDITIONAL_SENSE
217f11c7f63SJim Harris       );
218f11c7f63SJim Harris       status = SATI_FAILURE_CHECK_RESPONSE_DATA;
219f11c7f63SJim Harris    }
220f11c7f63SJim Harris    else
221f11c7f63SJim Harris    {
222f11c7f63SJim Harris       switch(sequence->type)
223f11c7f63SJim Harris       {
224f11c7f63SJim Harris          case SATI_SEQUENCE_REQUEST_SENSE_SMART_RETURN_STATUS:
225f11c7f63SJim Harris 
226f11c7f63SJim Harris             mid_register = sati_get_ata_lba_mid(register_fis);
227f11c7f63SJim Harris             high_register = sati_get_ata_lba_high(register_fis);
228f11c7f63SJim Harris             if(mid_register == ATA_MID_REGISTER_THRESHOLD_EXCEEDED
229f11c7f63SJim Harris                && high_register == ATA_HIGH_REGISTER_THRESHOLD_EXCEEDED)
230f11c7f63SJim Harris             {
231f11c7f63SJim Harris                sati_request_sense_data_response_construct(
232f11c7f63SJim Harris                   sequence,
233f11c7f63SJim Harris                   scsi_io,
234f11c7f63SJim Harris                   SCSI_SENSE_NO_SENSE,
235f11c7f63SJim Harris                   SCSI_ASC_HARDWARE_IMPENDING_FAILURE,
236f11c7f63SJim Harris                   SCSI_ASCQ_GENERAL_HARD_DRIVE_FAILURE
237f11c7f63SJim Harris                );
238f11c7f63SJim Harris                status = SATI_COMPLETE;
239f11c7f63SJim Harris             }
240f11c7f63SJim Harris             else
241f11c7f63SJim Harris             {
242f11c7f63SJim Harris                sati_request_sense_data_response_construct(
243f11c7f63SJim Harris                   sequence,
244f11c7f63SJim Harris                   scsi_io,
245f11c7f63SJim Harris                   SCSI_SENSE_NO_SENSE,
246f11c7f63SJim Harris                   SCSI_ASC_NO_ADDITIONAL_SENSE,
247f11c7f63SJim Harris                   SCSI_ASCQ_NO_ADDITIONAL_SENSE
248f11c7f63SJim Harris                );
249f11c7f63SJim Harris                status = SATI_COMPLETE;
250f11c7f63SJim Harris             }
251f11c7f63SJim Harris          break;
252f11c7f63SJim Harris 
253f11c7f63SJim Harris          case SATI_SEQUENCE_REQUEST_SENSE_CHECK_POWER_MODE:
254f11c7f63SJim Harris 
255f11c7f63SJim Harris             sector_count = sati_get_ata_sector_count(register_fis);
256f11c7f63SJim Harris 
257f11c7f63SJim Harris             switch(sector_count)
258f11c7f63SJim Harris             {
259f11c7f63SJim Harris                 case ATA_STANDBY_POWER_MODE:
260f11c7f63SJim Harris                    sati_request_sense_data_response_construct(
261f11c7f63SJim Harris                       sequence,
262f11c7f63SJim Harris                       scsi_io,
263f11c7f63SJim Harris                       SCSI_SENSE_NO_SENSE,
264f11c7f63SJim Harris                       SCSI_ASC_POWER_STATE_CHANGE,
265f11c7f63SJim Harris                       SCSI_ASCQ_POWER_STATE_CHANGE_TO_STANDBY
266f11c7f63SJim Harris                    );
267f11c7f63SJim Harris                    status = SATI_COMPLETE;
268f11c7f63SJim Harris                 break;
269f11c7f63SJim Harris 
270f11c7f63SJim Harris                 case ATA_IDLE_POWER_MODE:
271f11c7f63SJim Harris                    sati_request_sense_data_response_construct(
272f11c7f63SJim Harris                       sequence,
273f11c7f63SJim Harris                       scsi_io,
274f11c7f63SJim Harris                       SCSI_SENSE_NO_SENSE,
275f11c7f63SJim Harris                       SCSI_ASC_POWER_STATE_CHANGE,
276f11c7f63SJim Harris                       SCSI_ASCQ_POWER_STATE_CHANGE_TO_IDLE
277f11c7f63SJim Harris                    );
278f11c7f63SJim Harris                    status = SATI_COMPLETE;
279f11c7f63SJim Harris                 break;
280f11c7f63SJim Harris 
281f11c7f63SJim Harris                 case ATA_ACTIVE_POWER_MODE:
282f11c7f63SJim Harris                    sati_request_sense_data_response_construct(
283f11c7f63SJim Harris                       sequence,
284f11c7f63SJim Harris                       scsi_io,
285f11c7f63SJim Harris                       SCSI_SENSE_NO_SENSE,
286f11c7f63SJim Harris                       SCSI_ASC_NO_ADDITIONAL_SENSE,
287f11c7f63SJim Harris                       SCSI_ASCQ_NO_ADDITIONAL_SENSE
288f11c7f63SJim Harris                    );
289f11c7f63SJim Harris                    status = SATI_COMPLETE;
290f11c7f63SJim Harris                 break;
291f11c7f63SJim Harris 
292f11c7f63SJim Harris                 default:
293f11c7f63SJim Harris                 break;
294f11c7f63SJim Harris              }
295f11c7f63SJim Harris          break;
296f11c7f63SJim Harris 
297f11c7f63SJim Harris          default:
298f11c7f63SJim Harris             sati_request_sense_data_response_construct(
299f11c7f63SJim Harris                sequence,
300f11c7f63SJim Harris                scsi_io,
301f11c7f63SJim Harris                SCSI_SENSE_NO_SENSE,
302f11c7f63SJim Harris                SCSI_ASC_NO_ADDITIONAL_SENSE,
303f11c7f63SJim Harris                SCSI_ASCQ_NO_ADDITIONAL_SENSE
304f11c7f63SJim Harris             );
305f11c7f63SJim Harris             status = SATI_COMPLETE;
306f11c7f63SJim Harris       }
307f11c7f63SJim Harris    }
308f11c7f63SJim Harris 
309f11c7f63SJim Harris    return status;
310f11c7f63SJim Harris }
311f11c7f63SJim Harris 
312f11c7f63SJim Harris /**
313f11c7f63SJim Harris  * @brief This method will construct a response for the sati_request_sense
314f11c7f63SJim Harris  *        translation. The response will be returned in the data buffer instead
315f11c7f63SJim Harris  *        of the response buffer, using sense data format described in SPC-4.
316f11c7f63SJim Harris  *
317f11c7f63SJim Harris  */
sati_request_sense_data_response_construct(SATI_TRANSLATOR_SEQUENCE_T * sequence,void * scsi_io,U8 sense_key,U8 additional_sense_code,U8 additional_sense_code_qualifier)318f11c7f63SJim Harris void sati_request_sense_data_response_construct(
319f11c7f63SJim Harris    SATI_TRANSLATOR_SEQUENCE_T * sequence,
320f11c7f63SJim Harris    void                       * scsi_io,
321f11c7f63SJim Harris    U8                           sense_key,
322f11c7f63SJim Harris    U8                           additional_sense_code,
323f11c7f63SJim Harris    U8                           additional_sense_code_qualifier
324f11c7f63SJim Harris )
325f11c7f63SJim Harris {
326f11c7f63SJim Harris    sati_set_data_byte(
327f11c7f63SJim Harris       sequence,
328f11c7f63SJim Harris       scsi_io,
329f11c7f63SJim Harris       0,
330f11c7f63SJim Harris       SCSI_FIXED_CURRENT_RESPONSE_CODE | SCSI_FIXED_SENSE_DATA_VALID_BIT
331f11c7f63SJim Harris    );
332f11c7f63SJim Harris 
333f11c7f63SJim Harris    sati_set_data_byte(sequence, scsi_io, 1, 0);
334f11c7f63SJim Harris    sati_set_data_byte(sequence, scsi_io, 2, sense_key);
335f11c7f63SJim Harris    sati_set_data_byte(sequence, scsi_io, 3, 0);
336f11c7f63SJim Harris    sati_set_data_byte(sequence, scsi_io, 4, 0);
337f11c7f63SJim Harris    sati_set_data_byte(sequence, scsi_io, 5, 0);
338f11c7f63SJim Harris    sati_set_data_byte(sequence, scsi_io, 6, 0);
339f11c7f63SJim Harris    sati_set_data_byte(sequence, scsi_io, 7, 0);
340f11c7f63SJim Harris    sati_set_data_byte(sequence, scsi_io, 8, 0);
341f11c7f63SJim Harris    sati_set_data_byte(sequence, scsi_io, 9, 0);
342f11c7f63SJim Harris    sati_set_data_byte(sequence, scsi_io, 10, 0);
343f11c7f63SJim Harris    sati_set_data_byte(sequence, scsi_io, 11, 0);
344f11c7f63SJim Harris    sati_set_data_byte(sequence, scsi_io, 12, additional_sense_code);
345f11c7f63SJim Harris    sati_set_data_byte(sequence, scsi_io, 13, additional_sense_code_qualifier);
346f11c7f63SJim Harris    sati_set_data_byte(sequence, scsi_io, 14, 0);
347f11c7f63SJim Harris    sati_set_data_byte(sequence, scsi_io, 15, 0);
348f11c7f63SJim Harris    sati_set_data_byte(sequence, scsi_io, 16, 0);
349f11c7f63SJim Harris    sati_set_data_byte(sequence, scsi_io, 17, 0);
350f11c7f63SJim Harris }
351f11c7f63SJim Harris 
352f11c7f63SJim Harris #endif // !defined(DISABLE_SATI_REQUEST_SENSE)
353f11c7f63SJim Harris 
354