copy in new quirk table from smartmontools
authorLennart Poettering <lennart@poettering.net>
Tue, 24 Mar 2009 00:51:02 +0000 (01:51 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 24 Mar 2009 00:51:02 +0000 (01:51 +0100)
atasmart.c

index 743ecaa..99c1453 100644 (file)
@@ -926,8 +926,9 @@ typedef struct SkSmartQuirkDatabase {
         SkSmartQuirk quirk;
 } SkSmartQuirkDatabase;
 
-/* %STRINGPOOLSTART% */
 static const SkSmartQuirkDatabase quirk_database[] = { {
+
+        /*** Fujitsu */
                 "^FUJITSU MHR2040AT$",
                 NULL,
                 SK_SMART_QUIRK_9_POWERONSECONDS|
@@ -940,18 +941,38 @@ static const SkSmartQuirkDatabase quirk_database[] = { {
                 SK_SMART_QUIRK_192_EMERGENCYRETRACTCYCLECT|
                 SK_SMART_QUIRK_200_WRITEERRORCOUNT|
                 SK_SMART_QUIRK_201_DETECTEDTACOUNT
-
         }, {
-                "^SAMSUNG SV4012H$",
+                "^("
+                "FUJITSU M1623TAU|"
+                "FUJITSU MHG2...ATU?.*|"
+                "FUJITSU MHH2...ATU?.*|"
+                "FUJITSU MHJ2...ATU?.*|"
+                "FUJITSU MHK2...ATU?.*|"
+                "FUJITSU MHL2300AT|"
+                "FUJITSU MHM2(20|15|10|06)0AT|"
+                "FUJITSU MHN2...AT|"
+                "FUJITSU MHR2020AT|"
+                "FUJITSU MHT2...(AH|AS|AT|BH)U?.*|"
+                "FUJITSU MHU2...ATU?.*|"
+                "FUJITSU MHV2...(AH|AS|AT|BH|BS|BT).*|"
+                "FUJITSU MP[A-G]3...A[HTEV]U?.*"
+                ")$",
                 NULL,
-                SK_SMART_QUIRK_9_POWERONHALFMINUTES
+                SK_SMART_QUIRK_9_POWERONSECONDS
         }, {
-                "^SAMSUNG SV0412H$",
+
+        /*** Samsung ***/
+                "^("
+                "SAMSUNG SV4012H|"
+                "SAMSUNG SP(0451|08[0124]2|12[0145]3|16[0145]4)[CN]"
+                ")$",
                 NULL,
-                SK_SMART_QUIRK_9_POWERONHALFMINUTES|
-                SK_SMART_QUIRK_194_10XCELSIUS
+                SK_SMART_QUIRK_9_POWERONHALFMINUTES
         }, {
-                "^SAMSUNG SV1204H$",
+                "^("
+                "SAMSUNG SV0412H|"
+                "SAMSUNG SV1204H"
+                ")$",
                 NULL,
                 SK_SMART_QUIRK_9_POWERONHALFMINUTES|
                 SK_SMART_QUIRK_194_10XCELSIUS
@@ -960,69 +981,78 @@ static const SkSmartQuirkDatabase quirk_database[] = { {
                 "^RR100-07$",
                 SK_SMART_QUIRK_9_POWERONHALFMINUTES
         }, {
+                "^SAMSUNG SP80A4H$",
+                "^RT100-06$",
+                SK_SMART_QUIRK_9_POWERONHALFMINUTES
+        }, {
                 "^SAMSUNG SP8004H$",
                 "^QW100-61$",
                 SK_SMART_QUIRK_9_POWERONHALFMINUTES
         }, {
-                "^SAMSUNG",
-                ".*-(2[3-9]|3[0-9])$",
-                SK_SMART_QUIRK_9_POWERONHALFMINUTES
 
-        }, {
-                "^Maxtor 2B0(0[468]|1[05]|20)H1$",
+        /*** Maxtor */
+                "^("
+                "Maxtor 2B0(0[468]|1[05]|20)H1|"
+                "Maxtor 4G(120J6|160J[68])|"
+                "Maxtor 4D0(20H1|40H2|60H3|80H4)"
+                ")$",
                 NULL,
                 SK_SMART_QUIRK_9_POWERONMINUTES|
                 SK_SMART_QUIRK_194_UNKNOWN
         }, {
-                "^Maxtor 4G(120J6|160J[68])$",
+                "^("
+                "Maxtor 2F0[234]0[JL]0|"
+                "Maxtor 8(1280A2|2160A4|2560A4|3840A6|4000A6|5120A8)|"
+                "Maxtor 8(2160D2|3228D3|3240D3|4320D4|6480D6|8400D8|8455D8)|"
+                "Maxtor 9(0510D4|0576D4|0648D5|0720D5|0840D6|0845D6|0864D6|1008D7|1080D8|1152D8)|"
+                "Maxtor 9(1(360|350|202)D8|1190D7|10[12]0D6|0840D5|06[48]0D4|0510D3|1(350|202)E8|1010E6|0840E5|0640E4)|"
+                "Maxtor 9(0512D2|0680D3|0750D3|0913D4|1024D4|1360D6|1536D6|1792D7|2048D8)|"
+                "Maxtor 9(2732U8|2390U7|204[09]U6|1707U5|1366U4|1024U3|0845U3|0683U2)|"
+                "Maxtor 4(R0[68]0[JL]0|R1[26]0L0|A160J0|R120L4)|"
+                "Maxtor (91728D8|91512D7|91303D6|91080D5|90845D4|90645D3|90648D[34]|90432D2)|"
+                "Maxtor 9(0431U1|0641U2|0871U2|1301U3|1741U4)|"
+                "Maxtor (94091U8|93071U6|92561U5|92041U4|91731U4|91531U3|91361U3|91021U2|90841U2|90651U2)|"
+                "Maxtor (33073U4|32049U3|31536U2|30768U1|33073H4|32305H3|31536H2|30768H1)|"
+                "Maxtor (93652U8|92739U6|91826U4|91369U3|90913U2|90845U2|90435U1)|"
+                "Maxtor 9(0684U2|1024U2|1362U3|1536U3|2049U4|2562U5|3073U6|4098U8)|"
+                "Maxtor (54098[UH]8|53073[UH]6|52732[UH]6|52049[UH]4|51536[UH]3|51369[UH]3|51024[UH]2)|"
+                "Maxtor 3(1024H1|1535H2|2049H2|3073H3|4098H4)( B)?|"
+                "Maxtor 5(4610H6|4098H6|3073H4|2049H3|1536H2|1369H2|1023H2)|"
+                "Maxtor 9(1023U2|1536U2|2049U3|2305U3|3073U4|4610U6|6147U8)|"
+                "Maxtor 9(1023H2|1536H2|2049H3|2305H3|3073H4|4098H6|4610H6|6147H8)|"
+                "Maxtor 5T0(60H6|40H4|30H3|20H2|10H1)|"
+                "Maxtor (98196H8|96147H6)|"
+                "Maxtor 4W(100H6|080H6|060H4|040H3|030H2)|"
+                "Maxtor 6(E0[234]|K04)0L0|"
+                "Maxtor 6(B(30|25|20|16|12|10|08)0[MPRS]|L(080[MLP]|(100|120)[MP]|160[MP]|200[MPRS]|250[RS]|300[RS]))0|"
+                "Maxtor 6Y((060|080|120|160)L0|(060|080|120|160|200|250)P0|(060|080|120|160|200|250)M0)|"
+                "Maxtor 7Y250[PM]0|"
+                "Maxtor [45]A(25|30|32)0[JN]0|"
+                "Maxtor 7L(25|30)0[SR]0|"
+                ")$",
                 NULL,
-                SK_SMART_QUIRK_9_POWERONMINUTES|
-                SK_SMART_QUIRK_194_UNKNOWN
+                SK_SMART_QUIRK_9_POWERONMINUTES
         }, {
-                "^Maxtor 4D0(20H1|40H2|60H3|80H4)$",
-                NULL,
-                SK_SMART_QUIRK_9_POWERONMINUTES|
-                SK_SMART_QUIRK_194_UNKNOWN
 
-        }, {
-                "^HITACHI_DK14FA-20B$",
-                NULL,
-                SK_SMART_QUIRK_9_POWERONMINUTES|
-                SK_SMART_QUIRK_193_LOADUNLOAD
-        }, {
-                "^HITACHI_DK23..-..B?$",
+
+        /*** Hitachi */
+                "^("
+                "HITACHI_DK14FA-20B|"
+                "HITACHI_DK23..-..B?|"
+                "HITACHI_DK23FA-20J|HTA422020F9AT[JN]0|"
+                "HE[JN]4230[23]0F9AT00|"
+                "HTC4260[23]0G5CE00|HTC4260[56]0G8CE00|"
+                ")$",
                 NULL,
                 SK_SMART_QUIRK_9_POWERONMINUTES|
                 SK_SMART_QUIRK_193_LOADUNLOAD
         }, {
-                "^(HITACHI_DK23FA-20J|HTA422020F9AT[JN]0)$",
-                NULL,
-                SK_SMART_QUIRK_9_POWERONMINUTES|
-                SK_SMART_QUIRK_193_LOADUNLOAD
 
-        }, {
-                "Maxtor",
-                NULL,
-                SK_SMART_QUIRK_9_POWERONMINUTES
-        }, {
-                "MAXTOR",
-                NULL,
-                SK_SMART_QUIRK_9_POWERONMINUTES
-        }, {
-                "Fujitsu",
-                NULL,
-                SK_SMART_QUIRK_9_POWERONSECONDS
-        }, {
-                "FUJITSU",
-                NULL,
-                SK_SMART_QUIRK_9_POWERONSECONDS
-        }, {
                 NULL,
                 NULL,
                 0
         }
 };
-/* %STRINGPOOLSTOP% */
 
 static int match(const char*regex, const char *s, SkBool *result) {
         int k;
@@ -1062,7 +1092,7 @@ static int lookup_quirks(const char *model, const char *firmware, SkSmartQuirk *
                 if (db->model) {
                         SkBool matching = FALSE;
 
-                        if ((k = match(_P(db->model), model, &matching)) < 0)
+                        if ((k = match(db->model, model, &matching)) < 0)
                                 return k;
 
                         if (!matching)
@@ -1072,7 +1102,7 @@ static int lookup_quirks(const char *model, const char *firmware, SkSmartQuirk *
                 if (db->firmware) {
                         SkBool matching = FALSE;
 
-                        if ((k = match(_P(db->firmware), firmware, &matching)) < 0)
+                        if ((k = match(db->firmware, firmware, &matching)) < 0)
                                 return k;
 
                         if (!matching)
@@ -1268,7 +1298,7 @@ static void find_threshold(SkDisk *d, SkSmartAttributeParsedData *a) {
         a->good_valid = FALSE;
         a->good = TRUE;
 
-        /* Always-Fail and Always-Pssing thresholds are not relevant
+        /* Always-Fail and Always-Passing thresholds are not relevant
          * for our assessment. */
         if (p[1] >= 1 && p[1] <= 0xFD) {