Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ata add more fields to ata_smart_attr, add structure...



details:   https://anonhg.NetBSD.org/src/rev/92b0d6f9d18f
branches:  trunk
changeset: 556567:92b0d6f9d18f
user:      lha <lha%NetBSD.org@localhost>
date:      Sat Dec 20 19:53:54 2003 +0000

description:
add more fields to ata_smart_attr, add structures for selftest log

diffstat:

 sys/dev/ata/atavar.h |  28 ++++++++++++++++++++++++++--
 1 files changed, 26 insertions(+), 2 deletions(-)

diffs (53 lines):

diff -r faadb7e952fd -r 92b0d6f9d18f sys/dev/ata/atavar.h
--- a/sys/dev/ata/atavar.h      Sat Dec 20 19:45:52 2003 +0000
+++ b/sys/dev/ata/atavar.h      Sat Dec 20 19:53:54 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atavar.h,v 1.35 2003/12/14 05:33:29 thorpej Exp $      */
+/*     $NetBSD: atavar.h,v 1.36 2003/12/20 19:53:54 lha Exp $  */
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.
@@ -236,7 +236,9 @@
        u_int8_t                id;             /* attribute id number */
        u_int16_t               flags;
        u_int8_t                value;          /* attribute value */
-       u_int8_t                vendor_specific[8];
+       u_int8_t                worst;
+       u_int8_t                raw[6];
+       u_int8_t                reserved;
 } __attribute__((packed));
 
 struct ata_smart_attributes {
@@ -271,6 +273,26 @@
        int8_t                  checksum;
 } __attribute__((packed));
 
+struct ata_smart_selftest {
+       u_int8_t                number;
+       u_int8_t                status;
+       uint16_t                time_stamp;
+       u_int8_t                failure_check_point;
+       u_int32_t               lba_first_error;
+       u_int8_t                vendor_specific[15];
+} __attribute__((packed));
+
+struct ata_smart_selftestlog {
+       u_int16_t               data_structure_revision;
+       struct ata_smart_selftest log_entries[21];
+       u_int8_t                vendorspecific[2];
+       u_int8_t                mostrecenttest;
+       u_int8_t                reserved[2];
+       u_int8_t                checksum;
+} __attribute__((packed));
+
+#ifdef _KERNEL
+
 int    wdc_downgrade_mode(struct ata_drive_datas *, int);
 
 struct ataparams;
@@ -284,3 +306,5 @@
 void   ata_dmaerr(struct ata_drive_datas *, int);
 
 #endif /* _DEV_ATA_ATAVAR_H_ */
+
+#endif /* _KERNEL */



Home | Main Index | Thread Index | Old Index