isci: Intel(R) C600 Series Chipset Storage Control Unit Driver
[deliverable/linux.git] / drivers / scsi / isci / core / intel_ata.h
1 /*
2 * This file is provided under a dual BSD/GPLv2 license. When using or
3 * redistributing this file, you may do so under either license.
4 *
5 * GPL LICENSE SUMMARY
6 *
7 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of version 2 of the GNU General Public License as
11 * published by the Free Software Foundation.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
21 * The full GNU General Public License is included in this distribution
22 * in the file called LICENSE.GPL.
23 *
24 * BSD LICENSE
25 *
26 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
27 * All rights reserved.
28 *
29 * Redistribution and use in source and binary forms, with or without
30 * modification, are permitted provided that the following conditions
31 * are met:
32 *
33 * * Redistributions of source code must retain the above copyright
34 * notice, this list of conditions and the following disclaimer.
35 * * Redistributions in binary form must reproduce the above copyright
36 * notice, this list of conditions and the following disclaimer in
37 * the documentation and/or other materials provided with the
38 * distribution.
39 * * Neither the name of Intel Corporation nor the names of its
40 * contributors may be used to endorse or promote products derived
41 * from this software without specific prior written permission.
42 *
43 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
44 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
45 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
46 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
47 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
48 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
49 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
50 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
51 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
52 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
53 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54 */
55
56 /**
57 * This file defines all of the ATA related constants, enumerations, and types.
58 * Please note that this file does not necessarily contain an exhaustive
59 * list of all constants, commands, sub-commands, etc.
60 *
61 *
62 */
63
64 #ifndef _ATA_H_
65 #define _ATA_H_
66
67 #include <linux/types.h>
68
69 /**
70 *
71 *
72 * ATA_COMMAND_CODES These constants depict the various ATA command codes
73 * defined in the ATA/ATAPI specification.
74 */
75 #define ATA_IDENTIFY_DEVICE 0xEC
76 #define ATA_CHECK_POWER_MODE 0xE5
77 #define ATA_STANDBY 0xE2
78 #define ATA_STANDBY_IMMED 0xE0
79 #define ATA_IDLE_IMMED 0xE1
80 #define ATA_IDLE 0xE3
81 #define ATA_FLUSH_CACHE 0xE7
82 #define ATA_FLUSH_CACHE_EXT 0xEA
83 #define ATA_READ_DMA_EXT 0x25
84 #define ATA_READ_DMA 0xC8
85 #define ATA_READ_SECTORS_EXT 0x24
86 #define ATA_READ_SECTORS 0x20
87 #define ATA_WRITE_DMA_EXT 0x35
88 #define ATA_WRITE_DMA 0xCA
89 #define ATA_WRITE_SECTORS_EXT 0x34
90 #define ATA_WRITE_SECTORS 0x30
91 #define ATA_WRITE_UNCORRECTABLE 0x45
92 #define ATA_READ_VERIFY_SECTORS 0x40
93 #define ATA_READ_VERIFY_SECTORS_EXT 0x42
94 #define ATA_READ_BUFFER 0xE4
95 #define ATA_WRITE_BUFFER 0xE8
96 #define ATA_EXECUTE_DEVICE_DIAG 0x90
97 #define ATA_SET_FEATURES 0xEF
98 #define ATA_SMART 0xB0
99 #define ATA_PACKET_IDENTIFY 0xA1
100 #define ATA_PACKET 0xA0
101 #define ATA_READ_FPDMA 0x60
102 #define ATA_WRITE_FPDMA 0x61
103 #define ATA_READ_LOG_EXT 0x2F
104 #define ATA_NOP 0x00
105 #define ATA_DEVICE_RESET 0x08
106 #define ATA_MEDIA_EJECT 0xED
107
108 /**
109 *
110 *
111 * ATA_SMART_SUB_COMMAND_CODES These constants define the ATA SMART command
112 * sub-codes that can be executed.
113 */
114 #define ATA_SMART_SUB_CMD_ENABLE 0xD8
115 #define ATA_SMART_SUB_CMD_DISABLE 0xD9
116 #define ATA_SMART_SUB_CMD_RETURN_STATUS 0xDA
117 #define ATA_SMART_SUB_CMD_READ_LOG 0xD5
118
119 /**
120 *
121 *
122 * ATA_SET_FEATURES_SUB_COMMAND_CODES These constants define the ATA SET
123 * FEATURES command sub-codes that can be executed.
124 */
125 #define ATA_SET_FEATURES_SUB_CMD_ENABLE_CACHE 0x02
126 #define ATA_SET_FEATURES_SUB_CMD_DISABLE_CACHE 0x82
127 #define ATA_SET_FEATURES_SUB_CMD_DISABLE_READ_AHEAD 0x55
128 #define ATA_SET_FEATURES_SUB_CMD_ENABLE_READ_AHEAD 0xAA
129 #define ATA_SET_FEATURES_SUB_CMD_SET_TRANSFER_MODE 0x3
130
131 /**
132 *
133 *
134 * ATA_READ_LOG_EXT_PAGE_CODES This is a list of log page codes available for
135 * use.
136 */
137 #define ATA_LOG_PAGE_NCQ_ERROR 0x10
138 #define ATA_LOG_PAGE_SMART_SELF_TEST 0x06
139 #define ATA_LOG_PAGE_EXTENDED_SMART_SELF_TEST 0x07
140
141 /**
142 *
143 *
144 * ATA_LOG_PAGE_NCQ_ERROR_CONSTANTS These constants define standard values for
145 * use when requesting the NCQ error log page.
146 */
147 #define ATA_LOG_PAGE_NCQ_ERROR_SECTOR 0
148 #define ATA_LOG_PAGE_NCQ_ERROR_SECTOR_COUNT 1
149
150 /**
151 *
152 *
153 * ATA_STATUS_REGISTER_BITS The following are status register bit definitions
154 * per ATA/ATAPI-7.
155 */
156 #define ATA_STATUS_REG_BSY_BIT 0x80
157 #define ATA_STATUS_REG_DEVICE_FAULT_BIT 0x20
158 #define ATA_STATUS_REG_ERROR_BIT 0x01
159
160 /**
161 *
162 *
163 * ATA_ERROR_REGISTER_BITS The following are error register bit definitions per
164 * ATA/ATAPI-7.
165 */
166 #define ATA_ERROR_REG_NO_MEDIA_BIT 0x02
167 #define ATA_ERROR_REG_ABORT_BIT 0x04
168 #define ATA_ERROR_REG_MEDIA_CHANGE_REQUEST_BIT 0x08
169 #define ATA_ERROR_REG_ID_NOT_FOUND_BIT 0x10
170 #define ATA_ERROR_REG_MEDIA_CHANGE_BIT 0x20
171 #define ATA_ERROR_REG_UNCORRECTABLE_BIT 0x40
172 #define ATA_ERROR_REG_WRITE_PROTECTED_BIT 0x40
173 #define ATA_ERROR_REG_ICRC_BIT 0x80
174
175 /**
176 *
177 *
178 * ATA_CONTROL_REGISTER_BITS The following are control register bit definitions
179 * per ATA/ATAPI-7
180 */
181 #define ATA_CONTROL_REG_INTERRUPT_ENABLE_BIT 0x02
182 #define ATA_CONTROL_REG_SOFT_RESET_BIT 0x04
183 #define ATA_CONTROL_REG_HIGH_ORDER_BYTE_BIT 0x80
184
185 /**
186 *
187 *
188 * ATA_DEVICE_HEAD_REGISTER_BITS The following are device/head register bit
189 * definitions per ATA/ATAPI-7.
190 */
191 #define ATA_DEV_HEAD_REG_LBA_MODE_ENABLE 0x40
192 #define ATA_DEV_HEAD_REG_FUA_ENABLE 0x80
193
194 /**
195 *
196 *
197 * ATA_IDENTIFY_DEVICE_FIELD_LENGTHS The following constants define the number
198 * of bytes contained in various fields found in the IDENTIFY DEVICE data
199 * structure.
200 */
201 #define ATA_IDENTIFY_SERIAL_NUMBER_LEN 20
202 #define ATA_IDENTIFY_MODEL_NUMBER_LEN 40
203 #define ATA_IDENTIFY_FW_REVISION_LEN 8
204 #define ATA_IDENTIFY_48_LBA_LEN 8
205 #define ATA_IDENTIFY_MEDIA_SERIAL_NUMBER_LEN 30
206 #define ATA_IDENTIFY_WWN_LEN 8
207
208 /**
209 *
210 *
211 * ATA_IDENTIFY_DEVICE_FIELD_MASKS The following constants define bit masks
212 * utilized to determine if a feature is supported/enabled or if a bit is
213 * simply set inside of the IDENTIFY DEVICE data structre.
214 */
215 #define ATA_IDENTIFY_REMOVABLE_MEDIA_ENABLE 0x0080
216 #define ATA_IDENTIFY_CAPABILITIES1_NORMAL_DMA_ENABLE 0x0100
217 #define ATA_IDENTIFY_CAPABILITIES1_STANDBY_ENABLE 0x2000
218 #define ATA_IDENTIFY_COMMAND_SET_SUPPORTED0_SMART_ENABLE 0x0001
219 #define ATA_IDENTIFY_COMMAND_SET_SUPPORTED1_48BIT_ENABLE 0x0400
220 #define ATA_IDENTIFY_COMMAND_SET_WWN_SUPPORT_ENABLE 0x0100
221 #define ATA_IDENTIFY_COMMAND_SET_ENABLED0_SMART_ENABLE 0x0001
222 #define ATA_IDENTIFY_SATA_CAPABILITIES_NCQ_ENABLE 0x0100
223 #define ATA_IDENTIFY_NCQ_QUEUE_DEPTH_ENABLE 0x001F
224 #define ATA_IDENTIFY_SECTOR_LARGER_THEN_512_ENABLE 0x0100
225 #define ATA_IDENTIFY_LOGICAL_SECTOR_PER_PHYSICAL_SECTOR_MASK 0x000F
226 #define ATA_IDENTIFY_LOGICAL_SECTOR_PER_PHYSICAL_SECTOR_ENABLE 0x2000
227 #define ATA_IDENTIFY_WRITE_UNCORRECTABLE_SUPPORT 0x0004
228 #define ATA_IDENTIFY_COMMAND_SET_SMART_SELF_TEST_SUPPORTED 0x0002
229
230 /**
231 *
232 *
233 * ATAPI_IDENTIFY_DEVICE_FIELD_MASKS These constants define the various bit
234 * definitions for the fields in the PACKET IDENTIFY DEVICE data structure.
235 */
236 #define ATAPI_IDENTIFY_16BYTE_CMD_PCKT_ENABLE 0x01
237
238 /**
239 *
240 *
241 * ATA_PACKET_FEATURE_BITS These constants define the various bit definitions
242 * for the ATA PACKET feature register.
243 */
244 #define ATA_PACKET_FEATURE_DMA 0x01
245 #define ATA_PACKET_FEATURE_OVL 0x02
246 #define ATA_PACKET_FEATURE_DMADIR 0x04
247
248 /**
249 *
250 *
251 * ATA_Device_Power_Mode_Values These constants define the power mode values
252 * returned by ATA_Check_Power_Mode
253 */
254 #define ATA_STANDBY_POWER_MODE 0x00
255 #define ATA_IDLE_POWER_MODE 0x80
256 #define ATA_ACTIVE_POWER_MODE 0xFF
257
258 /**
259 *
260 *
261 * ATA_WRITE_UNCORRECTIABLE feature field values These constants define the
262 * Write Uncorrectable feature values used with the SATI translation.
263 */
264 #define ATA_WRITE_UNCORRECTABLE_PSUEDO 0x55
265 #define ATA_WRITE_UNCORRECTABLE_FLAGGED 0xAA
266
267
268
269 /**
270 * struct ATA_IDENTIFY_DEVICE - This structure depicts the ATA IDENTIFY DEVICE
271 * data format.
272 *
273 *
274 */
275 struct ata_identify_device_data {
276 u16 general_config_bits; /* word 00 */
277 u16 obsolete0; /* word 01 (num cylinders) */
278 u16 vendor_specific_config_bits; /* word 02 */
279 u16 obsolete1; /* word 03 (num heads) */
280 u16 retired1[2]; /* words 04-05 */
281 u16 obsolete2; /* word 06 (sectors / track) */
282 u16 reserved_for_compact_flash1[2]; /* words 07-08 */
283 u16 retired0; /* word 09 */
284 u8 serial_number[ATA_IDENTIFY_SERIAL_NUMBER_LEN]; /* word 10-19 */
285 u16 retired2[2]; /* words 20-21 */
286 u16 obsolete4; /* word 22 */
287 u8 firmware_revision[ATA_IDENTIFY_FW_REVISION_LEN]; /* words 23-26 */
288 u8 model_number[ATA_IDENTIFY_MODEL_NUMBER_LEN]; /* words 27-46 */
289 u16 max_sectors_per_multiple; /* word 47 */
290 u16 reserved0; /* word 48 */
291 u16 capabilities1; /* word 49 */
292 u16 capabilities2; /* word 50 */
293 u16 obsolete5[2]; /* words 51-52 */
294 u16 validity_bits; /* word 53 */
295 u16 obsolete6[5]; /*
296 * words 54-58 Used to be:
297 * current cylinders,
298 * current heads,
299 * current sectors/Track,
300 * current capacity */
301 u16 current_max_sectors_per_multiple; /* word 59 */
302 u8 total_num_sectors[4]; /* words 60-61 */
303 u16 obsolete7; /* word 62 */
304 u16 multi_word_dma_mode; /* word 63 */
305 u16 pio_modes_supported; /* word 64 */
306 u16 min_multiword_dma_transfer_cycle; /* word 65 */
307 u16 rec_min_multiword_dma_transfer_cycle; /* word 66 */
308 u16 min_pio_transfer_no_flow_ctrl; /* word 67 */
309 u16 min_pio_transfer_with_flow_ctrl; /* word 68 */
310 u16 reserved1[2]; /* words 69-70 */
311 u16 reserved2[4]; /* words 71-74 */
312 u16 queue_depth; /* word 75 */
313 u16 serial_ata_capabilities; /* word 76 */
314 u16 serial_ata_reserved; /* word 77 */
315 u16 serial_ata_features_supported; /* word 78 */
316 u16 serial_ata_features_enabled; /* word 79 */
317 u16 major_version_number; /* word 80 */
318 u16 minor_version_number; /* word 81 */
319 u16 command_set_supported0; /* word 82 */
320 u16 command_set_supported1; /* word 83 */
321 u16 command_set_supported_extention; /* word 84 */
322 u16 command_set_enabled0; /* word 85 */
323 u16 command_set_enabled1; /* word 86 */
324 u16 command_set_default; /* word 87 */
325 u16 ultra_dma_mode; /* word 88 */
326 u16 security_erase_completion_time; /* word 89 */
327 u16 enhanced_security_erase_time; /* word 90 */
328 u16 current_power_mgmt_value; /* word 91 */
329 u16 master_password_revision; /* word 92 */
330 u16 hardware_reset_result; /* word 93 */
331 u16 current_acoustic_management_value; /* word 94 */
332 u16 stream_min_request_size; /* word 95 */
333 u16 stream_transfer_time; /* word 96 */
334 u16 stream_access_latency; /* word 97 */
335 u16 stream_performance_granularity[2]; /* words 98-99 */
336 u8 max_48bit_lba[ATA_IDENTIFY_48_LBA_LEN]; /* words 100-103 */
337 u16 streaming_transfer_time; /* word 104 */
338 u16 reserved3; /* word 105 */
339 u16 physical_logical_sector_info; /* word 106 */
340 u16 acoustic_test_interseek_delay; /* word 107 */
341 u8 world_wide_name[ATA_IDENTIFY_WWN_LEN]; /* words 108-111 */
342 u8 reserved_for_wwn_extention[ATA_IDENTIFY_WWN_LEN]; /* words 112-115 */
343 u16 reserved4; /* word 116 */
344 u8 words_per_logical_sector[4]; /* words 117-118 */
345 u16 command_set_supported2; /* word 119 */
346 u16 reserved5[7]; /* words 120-126 */
347 u16 removable_media_status; /* word 127 */
348 u16 security_status; /* word 128 */
349 u16 vendor_specific1[31]; /* words 129-159 */
350 u16 cfa_power_mode1; /* word 160 */
351 u16 reserved_for_compact_flash2[7]; /* words 161-167 */
352 u16 device_nominal_form_factor; /* word 168 */
353 u16 reserved_for_compact_flash3[7]; /* words 169-175 */
354 u16 current_media_serial_number[ATA_IDENTIFY_MEDIA_SERIAL_NUMBER_LEN]; /* words 176-205 */
355 u16 reserved6[3]; /* words 206-208 */
356 u16 logical_sector_alignment; /* words 209 */
357 u16 reserved7[7]; /* words 210-216 */
358 u16 nominal_media_rotation_rate; /* word 217 */
359 u16 reserved8[37]; /* words 218-254 */
360 u16 integrity_word; /* word 255 */
361
362 };
363
364 #define ATA_IDENTIFY_DEVICE_GET_OFFSET(field_name) \
365 ((unsigned long)&(((struct ata_identify_device_data *)0)->field_name))
366 #define ATA_IDENTIFY_DEVICE_WCE_ENABLE 0x20
367 #define ATA_IDENTIFY_DEVICE_RA_ENABLE 0x40
368
369 /**
370 * struct ATAPI_IDENTIFY_PACKET_DATA - The following structure depicts the
371 * ATA-ATAPI 7 version of the IDENTIFY PACKET DEVICE data structure.
372 *
373 *
374 */
375 struct atapi_identify_packet_device {
376 u16 generalConfigBits; /* word 00 */
377 u16 reserved0; /* word 01 (num cylinders) */
378 u16 uniqueConfigBits; /* word 02 */
379 u16 reserved1[7]; /* words 03 - 09 */
380 u8 serialNumber[ATA_IDENTIFY_SERIAL_NUMBER_LEN]; /* word 10-19 */
381 u16 reserved2[3]; /* words 20-22 */
382 u8 firmwareRevision[ATA_IDENTIFY_FW_REVISION_LEN]; /* words 23-26 */
383 u8 modelNumber[ATA_IDENTIFY_MODEL_NUMBER_LEN]; /* words 27-46 */
384 u16 reserved4[2]; /* words 47-48 */
385 u16 capabilities1; /* word 49 */
386 u16 capabilities2; /* word 50 */
387 u16 obsolete0[2]; /* words 51-52 */
388 u16 validityBits; /* word 53 */
389 u16 reserved[8]; /* words 54-61 */
390
391 u16 DMADIRBitRequired; /* word 62, page2 */
392 u16 multiWordDmaMode; /* word 63 */
393 u16 pioModesSupported; /* word 64 */
394 u16 minMultiwordDmaTransferCycle; /* word 65 */
395 u16 recMinMultiwordDmaTransferCycle; /* word 66 */
396 u16 minPioTransferNoFlowCtrl; /* word 67 */
397 u16 minPioTransferWithFlowCtrl; /* word 68 */
398 u16 reserved6[2]; /* words 69-70 */
399 u16 nsFromPACKETReceiptToBusRelease; /* word 71 */
400 u16 nsFromSERVICEReceiptToBSYreset; /* wore 72 */
401 u16 reserved7[2]; /* words 73-74 */
402 u16 queueDepth; /* word 75 */
403 u16 serialAtaCapabilities; /* word 76 */
404 u16 serialAtaReserved; /* word 77 */
405 u16 serialAtaFeaturesSupported; /* word 78 */
406 u16 serialAtaFeaturesEnabled; /* word 79 */
407
408 u16 majorVersionNumber; /* word 80, page3 */
409 u16 minorVersionNumber; /* word 81 */
410 u16 commandSetSupported0; /* word 82 */
411 u16 commandSetSupported1; /* word 83 */
412
413 u16 commandSetSupportedExtention; /* word 84, page4 */
414 u16 commandSetEnabled0; /* word 85 */
415 u16 commandSetEnabled1; /* word 86 */
416 u16 commandSetDefault; /* word 87 */
417
418 u16 ultraDmaMode; /* word 88, page5 */
419 u16 reserved8[4]; /* words 89 - 92 */
420
421 u16 hardwareResetResult; /* word 93, page6 */
422 u16 currentAcousticManagementValue; /* word 94 */
423 u16 reserved9[30]; /* words 95-124 */
424 u16 ATAPIByteCount0Behavior; /* word 125 */
425 u16 obsolete1; /* word 126 */
426 u16 removableMediaStatus; /* word 127, */
427
428 u16 securityStatus; /* word 128, page7 */
429 u16 vendorSpecific1[31]; /* words 129-159 */
430 u16 reservedForCompactFlash[16]; /* words 160-175 */
431 u16 reserved10[79]; /* words 176-254 */
432 u16 integrityWord; /* word 255 */
433 };
434
435 /**
436 * struct ata_extended_smart_self_test_log - The following structure depicts
437 * the ATA-8 version of the Extended SMART self test log page descriptor
438 * entry.
439 *
440 *
441 */
442 union ata_descriptor_entry {
443 struct DESCRIPTOR_ENTRY {
444 u8 lba_field;
445 u8 status_byte;
446 u8 time_stamp_low;
447 u8 time_stamp_high;
448 u8 checkpoint_byte;
449 u8 failing_lba_low;
450 u8 failing_lba_mid;
451 u8 failing_lba_high;
452 u8 failing_lba_low_ext;
453 u8 failing_lba_mid_ext;
454 u8 failing_lba_high_ext;
455
456 u8 vendor_specific1;
457 u8 vendor_specific2;
458 u8 vendor_specific3;
459 u8 vendor_specific4;
460 u8 vendor_specific5;
461 u8 vendor_specific6;
462 u8 vendor_specific7;
463 u8 vendor_specific8;
464 u8 vendor_specific9;
465 u8 vendor_specific10;
466 u8 vendor_specific11;
467 u8 vendor_specific12;
468 u8 vendor_specific13;
469 u8 vendor_specific14;
470 u8 vendor_specific15;
471 } DESCRIPTOR_ENTRY;
472
473 u8 descriptor_entry[26];
474
475 };
476
477 /**
478 * struct ata_extended_smart_self_test_log - The following structure depicts
479 * the ATA-8 version of the SMART self test log page descriptor entry.
480 *
481 *
482 */
483 union ata_smart_descriptor_entry {
484 struct SMART_DESCRIPTOR_ENTRY {
485 u8 lba_field;
486 u8 status_byte;
487 u8 time_stamp_low;
488 u8 time_stamp_high;
489 u8 checkpoint_byte;
490 u8 failing_lba_low;
491 u8 failing_lba_mid;
492 u8 failing_lba_high;
493 u8 failing_lba_low_ext;
494
495 u8 vendor_specific1;
496 u8 vendor_specific2;
497 u8 vendor_specific3;
498 u8 vendor_specific4;
499 u8 vendor_specific5;
500 u8 vendor_specific6;
501 u8 vendor_specific7;
502 u8 vendor_specific8;
503 u8 vendor_specific9;
504 u8 vendor_specific10;
505 u8 vendor_specific11;
506 u8 vendor_specific12;
507 u8 vendor_specific13;
508 u8 vendor_specific14;
509 u8 vendor_specific15;
510 } SMART_DESCRIPTOR_ENTRY;
511
512 u8 smart_descriptor_entry[24];
513
514 };
515
516 /**
517 * struct ata_extended_smart_self_test_log - The following structure depicts
518 * the ATA-8 version of the Extended SMART self test log page.
519 *
520 *
521 */
522 struct ata_extended_smart_self_test_log {
523 u8 self_test_log_data_structure_revision_number; /* byte 0 */
524 u8 reserved0; /* byte 1 */
525 u8 self_test_descriptor_index[2]; /* byte 2-3 */
526
527 union ata_descriptor_entry descriptor_entrys[19]; /* bytes 4-497 */
528
529 u8 vendor_specific[2]; /* byte 498-499 */
530 u8 reserved1[11]; /* byte 500-510 */
531 u8 data_structure_checksum; /* byte 511 */
532
533 };
534
535 /**
536 * struct ata_extended_smart_self_test_log - The following structure depicts
537 * the ATA-8 version of the SMART self test log page.
538 *
539 *
540 */
541 struct ata_smart_self_test_log {
542 u8 self_test_log_data_structure_revision_number[2]; /* bytes 0-1 */
543
544 union ata_smart_descriptor_entry descriptor_entrys[21]; /* bytes 2-505 */
545
546 u8 vendor_specific[2]; /* byte 506-507 */
547 u8 self_test_index; /* byte 508 */
548 u8 reserved1[2]; /* byte 509-510 */
549 u8 data_structure_checksum; /* byte 511 */
550
551 };
552
553 #endif /* _ATA_H_ */
554
This page took 0.060751 seconds and 5 git commands to generate.