multipath-tools: configure hitachi ams2000 and hus100 as full active arrays
[multipath-tools/.git] / libmultipath / hwtable.c
1 #include <stdio.h>
2
3 #include "checkers.h"
4 #include "vector.h"
5 #include "defaults.h"
6 #include "structs.h"
7 #include "config.h"
8 #include "pgpolicies.h"
9 #include "prio.h"
10 #include "hwtable.h"
11
12 /*
13  * Tuning suggestions on these parameters should go to
14  * dm-devel@redhat.com (subscribers-only, see README)
15  *
16  * You are welcome to claim maintainership over a controller
17  * family. Please mail the currently enlisted maintainer and
18  * the upstream package maintainer.
19  *
20  * Please, use the TEMPLATE below to add new hardware.
21  *
22  * WARNING:
23  *
24  * Devices with a proprietary handler must also be included in
25  * the kernel side. Currently at drivers/scsi/scsi_dh.c
26  *
27  * Moreover, if a device needs a special treatment by the SCSI
28  * subsystem it should be included in drivers/scsi/scsi_devinfo.c
29  */
30
31 #if 0
32         /*
33          * Copy this TEMPLATE to add new hardware.
34          *
35          * Keep only mandatory(.vendor and .product) and modified attributes.
36          * Attributes with default values must be removed.
37          * .vendor, .product, .revision and .bl_product are POSIX Extended regex.
38          *
39          * COMPANY_NAME
40          *
41          * Maintainer : XXX
42          * Mail : XXX
43          */
44         {
45                 /* If product-ID is different from marketing name add a comment */
46                 .vendor        = "VENDOR",
47                 .product       = "PRODUCT",
48                 .revision      = "REVISION",
49                 .bl_product    = "BL_PRODUCT",
50                 .pgpolicy      = FAILOVER,
51                 .uid_attribute = "ID_SERIAL",
52                 .selector      = "service-time 0",
53                 .checker_name  = TUR,
54                 .alias_prefix  = "mpath",
55                 .features      = "0",
56                 .hwhandler     = "0",
57                 .prio_name     = PRIO_CONST,
58                 .prio_args     = "",
59                 .pgfailback    = -FAILBACK_MANUAL,
60                 .rr_weight     = RR_WEIGHT_NONE,
61                 .no_path_retry = NO_PATH_RETRY_UNDEF,
62                 .minio         = 1000,
63                 .minio_rq      = 1,
64                 .flush_on_last_del = FLUSH_DISABLED,
65                 .user_friendly_names = USER_FRIENDLY_NAMES_OFF,
66                 .fast_io_fail  = 5,
67                 .dev_loss      = 600,
68                 .retain_hwhandler = RETAIN_HWHANDLER_ON,
69                 .detect_prio   = DETECT_PRIO_ON,
70                 .detect_checker = DETECT_CHECKER_ON,
71                 .deferred_remove = DEFERRED_REMOVE_OFF,
72                 .delay_watch_checks = DELAY_CHECKS_OFF,
73                 .delay_wait_checks = DELAY_CHECKS_OFF,
74                 .skip_kpartx   = SKIP_KPARTX_OFF,
75                 .max_sectors_kb = MAX_SECTORS_KB_UNDEF,
76                 .ghost_delay   = GHOST_DELAY_OFF,
77         },
78 #endif
79
80 static struct hwentry default_hw[] = {
81         /*
82          * Generic NVMe devices
83          *
84          * Due to the parsing logic in find_hwe(), generic entries
85          * have to be put on top of this list, and more specific ones
86          * below.
87          */
88         {
89                 .vendor        = "NVME",
90                 .product       = ".*",
91                 .uid_attribute = "ID_WWN",
92                 .checker_name  = NONE,
93                 .retain_hwhandler = RETAIN_HWHANDLER_OFF,
94         },
95         /*
96          * Apple
97          *
98          * Maintainer : Shyam Sundar
99          * Mail : g.shyamsundar@yahoo.co.in
100          */
101         {
102                 .vendor        = "APPLE",
103                 .product       = "Xserve RAID",
104                 .pgpolicy      = MULTIBUS,
105         },
106         /*
107          * HPE
108          */
109         {
110                 .vendor        = "3PARdata",
111                 .product       = "VV",
112                 .pgpolicy      = GROUP_BY_PRIO,
113                 .pgfailback    = -FAILBACK_IMMEDIATE,
114                 .hwhandler     = "1 alua",
115                 .prio_name     = PRIO_ALUA,
116                 .no_path_retry = 18,
117                 .fast_io_fail  = 10,
118                 .dev_loss      = MAX_DEV_LOSS_TMO,
119         },
120         {
121                 /* RA8000 / ESA12000 */
122                 .vendor        = "DEC",
123                 .product       = "HSG80",
124                 .no_path_retry = NO_PATH_RETRY_QUEUE,
125                 .hwhandler     = "1 hp_sw",
126                 .pgpolicy      = GROUP_BY_PRIO,
127                 .checker_name  = HP_SW,
128                 .prio_name     = PRIO_HP_SW,
129         },
130         {
131                 /* VIRTUAL ARRAY 7400 */
132                 .vendor        = "HP",
133                 .product       = "A6189A",
134                 .pgpolicy      = MULTIBUS,
135                 .no_path_retry = 12,
136         },
137         {
138                 /* MSA 1000/1500 and EVA 3000/5000, with old firmware */
139                 .vendor        = "(COMPAQ|HP)",
140                 .product       = "(MSA|HSV)1[01]0",
141                 .hwhandler     = "1 hp_sw",
142                 .pgpolicy      = GROUP_BY_PRIO,
143                 .no_path_retry = 12,
144                 .checker_name  = HP_SW,
145                 .prio_name     = PRIO_HP_SW,
146         },
147         {
148                 /* MSA 1000/1500 with new firmware */
149                 .vendor        = "(COMPAQ|HP)",
150                 .product       = "MSA VOLUME",
151                 .pgpolicy      = GROUP_BY_PRIO,
152                 .pgfailback    = -FAILBACK_IMMEDIATE,
153                 .no_path_retry = 12,
154                 .prio_name     = PRIO_ALUA,
155         },
156         {
157                 /* EVA 3000/5000 with new firmware, EVA 4000/6000/8000 */
158                 .vendor        = "(COMPAQ|HP)",
159                 .product       = "(HSV1[01]1|HSV2[01]0|HSV3[046]0|HSV4[05]0)",
160                 .pgpolicy      = GROUP_BY_PRIO,
161                 .pgfailback    = -FAILBACK_IMMEDIATE,
162                 .no_path_retry = 12,
163                 .prio_name     = PRIO_ALUA,
164         },
165         {
166                 /* MSA2000 family with old firmware */
167                 .vendor        = "HP",
168                 .product       = "(MSA2[02]12fc|MSA2012i)",
169                 .pgpolicy      = MULTIBUS,
170                 .no_path_retry = 18,
171         },
172         {
173                 /* MSA2000 family with new firmware */
174                 .vendor        = "HP",
175                 .product       = "(MSA2012sa|MSA23(12|24)(fc|i|sa)|MSA2000s VOLUME)",
176                 .pgpolicy      = GROUP_BY_PRIO,
177                 .pgfailback    = -FAILBACK_IMMEDIATE,
178                 .no_path_retry = 18,
179                 .prio_name     = PRIO_ALUA,
180         },
181         {
182                 /* MSA 1040, 1050, 2040 and 2050 families */
183                 .vendor        = "HP",
184                 .product       = "MSA [12]0[45]0 SA[NS]",
185                 .pgpolicy      = GROUP_BY_PRIO,
186                 .pgfailback    = -FAILBACK_IMMEDIATE,
187                 .no_path_retry = 18,
188                 .prio_name     = PRIO_ALUA,
189         },
190         {
191                 /* SAN Virtualization Services Platform */
192                 .vendor        = "HP",
193                 .product       = "HSVX700",
194                 .hwhandler     = "1 alua",
195                 .pgpolicy      = GROUP_BY_PRIO,
196                 .pgfailback    = -FAILBACK_IMMEDIATE,
197                 .no_path_retry = 12,
198                 .prio_name     = PRIO_ALUA,
199         },
200         {
201                 /* Smart Array */
202                 .vendor        = "HP",
203                 .product       = "LOGICAL VOLUME",
204                 .pgpolicy      = MULTIBUS,
205                 .no_path_retry = 12,
206         },
207         {
208                 /* P2000 family */
209                 .vendor        = "HP",
210                 .product       = "(P2000 G3 FC|P2000G3 FC/iSCSI|P2000 G3 SAS|P2000 G3 iSCSI)",
211                 .pgpolicy      = GROUP_BY_PRIO,
212                 .pgfailback    = -FAILBACK_IMMEDIATE,
213                 .no_path_retry = 18,
214                 .prio_name     = PRIO_ALUA,
215         },
216         {
217                 /* StoreVirtual 4000 and 3200 families */
218                 .vendor        = "LEFTHAND",
219                 .product       = "(P4000|iSCSIDisk|FCDISK)",
220                 .pgpolicy      = GROUP_BY_PRIO,
221                 .pgfailback    = -FAILBACK_IMMEDIATE,
222                 .no_path_retry = 18,
223                 .prio_name     = PRIO_ALUA,
224         },
225         {
226                 /* Nimble Storage */
227                 .vendor        = "Nimble",
228                 .product       = "Server",
229                 .hwhandler     = "1 alua",
230                 .pgpolicy      = GROUP_BY_PRIO,
231                 .pgfailback    = -FAILBACK_IMMEDIATE,
232                 .prio_name     = PRIO_ALUA,
233                 .no_path_retry = NO_PATH_RETRY_QUEUE,
234         },
235                 /* SGI */
236         {
237                 .vendor        = "SGI",
238                 .product       = "TP9100",
239                 .pgpolicy      = MULTIBUS,
240         },
241         {
242                 /* Total Performance family */
243                 .vendor        = "SGI",
244                 .product       = "TP9[3457]00",
245                 .bl_product    = "Universal Xport",
246                 .pgpolicy      = GROUP_BY_PRIO,
247                 .checker_name  = RDAC,
248                 .features      = "2 pg_init_retries 50",
249                 .hwhandler     = "1 rdac",
250                 .prio_name     = PRIO_RDAC,
251                 .pgfailback    = -FAILBACK_IMMEDIATE,
252                 .no_path_retry = 30,
253         },
254         {
255                 /* InfiniteStorage family */
256                 .vendor        = "SGI",
257                 .product       = "IS",
258                 .bl_product    = "Universal Xport",
259                 .pgpolicy      = GROUP_BY_PRIO,
260                 .checker_name  = RDAC,
261                 .features      = "2 pg_init_retries 50",
262                 .hwhandler     = "1 rdac",
263                 .prio_name     = PRIO_RDAC,
264                 .pgfailback    = -FAILBACK_IMMEDIATE,
265                 .no_path_retry = 30,
266         },
267         {
268                 /* (DDN) */
269                 .vendor        = "SGI",
270                 .product       = "^DD[46]A-",
271                 .pgpolicy      = GROUP_BY_PRIO,
272                 .pgfailback    = -FAILBACK_IMMEDIATE,
273                 .prio_name     = PRIO_ALUA,
274                 .no_path_retry = 30,
275         },
276         /*
277          * DataDirect Networks
278          */
279         {
280                 .vendor        = "DDN",
281                 .product       = "SAN DataDirector",
282                 .pgpolicy      = MULTIBUS,
283         },
284         {
285                 .vendor        = "DDN",
286                 .product       = "^EF3010",
287                 .pgpolicy      = MULTIBUS,
288                 .no_path_retry = 30,
289         },
290         {
291                 .vendor        = "DDN",
292                 .product       = "^(EF3015|S2A|SFA)",
293                 .pgpolicy      = GROUP_BY_PRIO,
294                 .pgfailback    = -FAILBACK_IMMEDIATE,
295                 .prio_name     = PRIO_ALUA,
296                 .no_path_retry = 30,
297         },
298         /*
299          * Dell EMC
300          */
301         {
302                 /* Symmetrix / DMX / VMAX */
303                 .vendor        = "EMC",
304                 .product       = "SYMMETRIX",
305                 .pgpolicy      = MULTIBUS,
306                 .no_path_retry = 6,
307         },
308         {
309                 /* DGC CLARiiON CX/AX / EMC VNX and Unity */
310                 .vendor        = "^DGC",
311                 .product       = "^(RAID|DISK|VRAID)",
312                 .bl_product    = "LUNZ",
313                 .hwhandler     = "1 emc",
314                 .pgpolicy      = GROUP_BY_PRIO,
315                 .pgfailback    = -FAILBACK_IMMEDIATE,
316                 .no_path_retry = (300 / DEFAULT_CHECKINT),
317                 .checker_name  = EMC_CLARIION,
318                 .prio_name     = PRIO_EMC,
319         },
320         {
321                 /* Invista / VPLEX */
322                 .vendor        = "EMC",
323                 .product       = "Invista",
324                 .bl_product    = "LUNZ",
325                 .pgpolicy      = MULTIBUS,
326                 .no_path_retry = 5,
327         },
328         {
329                 .vendor        = "XtremIO",
330                 .product       = "XtremApp",
331                 .pgpolicy      = MULTIBUS,
332         },
333         {
334                 /*
335                  * Dell SC Series, formerly Compellent
336                  *
337                  * Maintainer : Sean McGinnis
338                  * Mail : sean_mcginnis@dell.com
339                  */
340                 .vendor        = "COMPELNT",
341                 .product       = "Compellent Vol",
342                 .pgpolicy      = MULTIBUS,
343                 .no_path_retry = NO_PATH_RETRY_QUEUE,
344         },
345         {
346                 /* MD Series */
347                 .vendor        = "DELL",
348                 .product       = "^MD3",
349                 .bl_product    = "Universal Xport",
350                 .pgpolicy      = GROUP_BY_PRIO,
351                 .checker_name  = RDAC,
352                 .features      = "2 pg_init_retries 50",
353                 .hwhandler     = "1 rdac",
354                 .prio_name     = PRIO_RDAC,
355                 .pgfailback    = -FAILBACK_IMMEDIATE,
356                 .no_path_retry = 30,
357         },
358         /*
359          * Fujitsu
360          */
361         {
362                 .vendor        = "FSC",
363                 .product       = "CentricStor",
364                 .pgpolicy      = GROUP_BY_SERIAL,
365         },
366         {
367                 .vendor        = "FUJITSU",
368                 .product       = "ETERNUS_DX(H|L|M|400|8000)",
369                 .pgpolicy      = GROUP_BY_PRIO,
370                 .pgfailback    = -FAILBACK_IMMEDIATE,
371                 .no_path_retry = 10,
372                 .prio_name     = PRIO_ALUA,
373         },
374         {
375                 /* FibreCAT S80 */
376                 .vendor        = "(EUROLOGC|EuroLogc)",
377                 .product       = "FC2502",
378                 .pgpolicy      = MULTIBUS,
379         },
380         {
381                 .vendor        = "FUJITSU",
382                 .product       = "E[234]000",
383                 .pgpolicy      = GROUP_BY_PRIO,
384                 .pgfailback    = -FAILBACK_IMMEDIATE,
385                 .no_path_retry = 10,
386                 .prio_name     = PRIO_ALUA,
387         },
388         {
389                 .vendor        = "FUJITSU",
390                 .product       = "E[68]000",
391                 .pgpolicy      = MULTIBUS,
392                 .no_path_retry = 10,
393         },
394         /*
395          * Hitachi
396          *
397          * Maintainer : Matthias Rudolph
398          * Mail : matthias.rudolph@hds.com
399          */
400         {
401                 /* USP-V, HUS VM, VSP, VSP G1X00 and VSP GX00 families / HP XP */
402                 .vendor        = "(HITACHI|HP)",
403                 .product       = "^OPEN-",
404                 .pgpolicy      = MULTIBUS,
405         },
406         {
407                 /* AMS other than AMS 2000 */
408                 .vendor        = "HITACHI",
409                 .product       = "^DF",
410                 .no_path_retry = NO_PATH_RETRY_QUEUE,
411                 .pgpolicy      = GROUP_BY_PRIO,
412                 .pgfailback    = -FAILBACK_IMMEDIATE,
413                 .prio_name     = PRIO_HDS,
414         },
415         {
416                 /* AMS 2000 and HUS 100 families */
417                 .vendor        = "HITACHI",
418                 .product       = "^DF600F",
419                 .pgpolicy      = MULTIBUS,
420         },
421         /*
422          * IBM
423          *
424          * Maintainer : Hannes Reinecke
425          * Mail : hare@suse.de
426          */
427         {
428                 .vendor        = "IBM",
429                 .product       = "ProFibre 4000R",
430                 .pgpolicy      = MULTIBUS,
431         },
432         {
433                 /* DS4300 / FAStT600 */
434                 .vendor        = "IBM",
435                 .product       = "^1722-600",
436                 .bl_product    = "Universal Xport",
437                 .pgpolicy      = GROUP_BY_PRIO,
438                 .checker_name  = RDAC,
439                 .features      = "2 pg_init_retries 50",
440                 .hwhandler     = "1 rdac",
441                 .prio_name     = PRIO_RDAC,
442                 .pgfailback    = -FAILBACK_IMMEDIATE,
443                 .no_path_retry = 30,
444         },
445         {
446                 /* DS4100 / FAStT100 */
447                 .vendor        = "IBM",
448                 .product       = "^1724",
449                 .bl_product    = "Universal Xport",
450                 .pgpolicy      = GROUP_BY_PRIO,
451                 .checker_name  = RDAC,
452                 .features      = "2 pg_init_retries 50",
453                 .hwhandler     = "1 rdac",
454                 .prio_name     = PRIO_RDAC,
455                 .pgfailback    = -FAILBACK_IMMEDIATE,
456                 .no_path_retry = 30,
457         },
458         {
459                 /* DS3000 / DS3200 / DS3300 / DS3400 / Boot DS */
460                 .vendor        = "IBM",
461                 .product       = "^1726",
462                 .bl_product    = "Universal Xport",
463                 .pgpolicy      = GROUP_BY_PRIO,
464                 .checker_name  = RDAC,
465                 .features      = "2 pg_init_retries 50",
466                 .hwhandler     = "1 rdac",
467                 .prio_name     = PRIO_RDAC,
468                 .pgfailback    = -FAILBACK_IMMEDIATE,
469                 .no_path_retry = 30,
470         },
471         {
472                 /* DS4400 / DS4500 / FAStT700 / FAStT900 */
473                 .vendor        = "IBM",
474                 .product       = "^1742",
475                 .bl_product    = "Universal Xport",
476                 .pgpolicy      = GROUP_BY_PRIO,
477                 .checker_name  = RDAC,
478                 .features      = "2 pg_init_retries 50",
479                 .hwhandler     = "1 rdac",
480                 .prio_name     = PRIO_RDAC,
481                 .pgfailback    = -FAILBACK_IMMEDIATE,
482                 .no_path_retry = 30,
483         },
484         {
485                 /* DS3500 / DS3512 / DS3524 */
486                 .vendor        = "IBM",
487                 .product       = "^1746",
488                 .bl_product    = "Universal Xport",
489                 .pgpolicy      = GROUP_BY_PRIO,
490                 .checker_name  = RDAC,
491                 .features      = "2 pg_init_retries 50",
492                 .hwhandler     = "1 rdac",
493                 .prio_name     = PRIO_RDAC,
494                 .pgfailback    = -FAILBACK_IMMEDIATE,
495                 .no_path_retry = 30,
496         },
497         {
498                 /* DCS3860 */
499                 .vendor        = "IBM",
500                 .product       = "^1813",
501                 .bl_product    = "Universal Xport",
502                 .pgpolicy      = GROUP_BY_PRIO,
503                 .checker_name  = RDAC,
504                 .features      = "2 pg_init_retries 50",
505                 .hwhandler     = "1 rdac",
506                 .prio_name     = PRIO_RDAC,
507                 .pgfailback    = -FAILBACK_IMMEDIATE,
508                 .no_path_retry = 30,
509         },
510         {
511                 /* DS3950 / DS4200 / DS4700 / DS5020 */
512                 .vendor        = "IBM",
513                 .product       = "^1814",
514                 .bl_product    = "Universal Xport",
515                 .pgpolicy      = GROUP_BY_PRIO,
516                 .checker_name  = RDAC,
517                 .features      = "2 pg_init_retries 50",
518                 .hwhandler     = "1 rdac",
519                 .prio_name     = PRIO_RDAC,
520                 .pgfailback    = -FAILBACK_IMMEDIATE,
521                 .no_path_retry = 30,
522         },
523         {
524                 /* DS4800 */
525                 .vendor        = "IBM",
526                 .product       = "^1815",
527                 .bl_product    = "Universal Xport",
528                 .pgpolicy      = GROUP_BY_PRIO,
529                 .checker_name  = RDAC,
530                 .features      = "2 pg_init_retries 50",
531                 .hwhandler     = "1 rdac",
532                 .prio_name     = PRIO_RDAC,
533                 .pgfailback    = -FAILBACK_IMMEDIATE,
534                 .no_path_retry = 30,
535         },
536         {
537                 /* DS5000 / DS5100 / DS5300 / DCS3700 */
538                 .vendor        = "IBM",
539                 .product       = "^1818",
540                 .bl_product    = "Universal Xport",
541                 .pgpolicy      = GROUP_BY_PRIO,
542                 .checker_name  = RDAC,
543                 .features      = "2 pg_init_retries 50",
544                 .hwhandler     = "1 rdac",
545                 .prio_name     = PRIO_RDAC,
546                 .pgfailback    = -FAILBACK_IMMEDIATE,
547                 .no_path_retry = 30,
548         },
549         {
550                 /* Netfinity Fibre Channel RAID Controller Unit */
551                 .vendor        = "IBM",
552                 .product       = "^3526",
553                 .bl_product    = "Universal Xport",
554                 .pgpolicy      = GROUP_BY_PRIO,
555                 .checker_name  = RDAC,
556                 .features      = "2 pg_init_retries 50",
557                 .hwhandler     = "1 rdac",
558                 .prio_name     = PRIO_RDAC,
559                 .pgfailback    = -FAILBACK_IMMEDIATE,
560                 .no_path_retry = 30,
561         },
562         {
563                 /* FAStT200 and FAStT500 */
564                 .vendor        = "IBM",
565                 .product       = "^(3542|3552)",
566                 .bl_product    = "Universal Xport",
567                 .pgpolicy      = GROUP_BY_PRIO,
568                 .checker_name  = RDAC,
569                 .features      = "2 pg_init_retries 50",
570                 .hwhandler     = "1 rdac",
571                 .prio_name     = PRIO_RDAC,
572                 .pgfailback    = -FAILBACK_IMMEDIATE,
573                 .no_path_retry = 30,
574         },
575         {
576                 /* Enterprise Storage Server / Shark family */
577                 .vendor        = "IBM",
578                 .product       = "^2105",
579                 .no_path_retry = NO_PATH_RETRY_QUEUE,
580                 .pgpolicy      = MULTIBUS,
581         },
582         {
583                 /* DS6000 / DS6800 */
584                 .vendor        = "IBM",
585                 .product       = "^1750500",
586                 .no_path_retry = NO_PATH_RETRY_QUEUE,
587                 .pgpolicy      = GROUP_BY_PRIO,
588                 .pgfailback    = -FAILBACK_IMMEDIATE,
589                 .prio_name     = PRIO_ALUA,
590         },
591         {
592                 /* DS8000 family */
593                 .vendor        = "IBM",
594                 .product       = "^2107900",
595                 .no_path_retry = NO_PATH_RETRY_QUEUE,
596                 .pgpolicy      = MULTIBUS,
597         },
598         {
599                 /* Storwize family / SAN Volume Controller / Flex System V7000 / FlashSystem V840/V9000 */
600                 .vendor        = "IBM",
601                 .product       = "^2145",
602                 .no_path_retry = NO_PATH_RETRY_QUEUE,
603                 .pgpolicy      = GROUP_BY_PRIO,
604                 .pgfailback    = -FAILBACK_IMMEDIATE,
605                 .prio_name     = PRIO_ALUA,
606         },
607         {
608                 .vendor        = "IBM",
609                 .product       = "S/390 DASD ECKD",
610                 .bl_product    = "S/390",
611                 .uid_attribute = "ID_UID",
612                 .no_path_retry = NO_PATH_RETRY_QUEUE,
613                 .pgpolicy      = MULTIBUS,
614         },
615         {
616                 .vendor        = "IBM",
617                 .product       = "S/390 DASD FBA",
618                 .bl_product    = "S/390",
619                 .uid_attribute = "ID_UID",
620                 .no_path_retry = NO_PATH_RETRY_QUEUE,
621                 .pgpolicy      = MULTIBUS,
622         },
623         {
624                 /* Power RAID */
625                 .vendor        = "IBM",
626                 .product       = "^IPR",
627                 .no_path_retry = NO_PATH_RETRY_QUEUE,
628                 .hwhandler     = "1 alua",
629                 .pgpolicy      = GROUP_BY_PRIO,
630                 .pgfailback    = -FAILBACK_IMMEDIATE,
631                 .prio_name     = PRIO_ALUA,
632         },
633         {
634                 /* SAS RAID Controller Module (RSSM) */
635                 .vendor        = "IBM",
636                 .product       = "1820N00",
637                 .pgpolicy      = GROUP_BY_PRIO,
638                 .pgfailback    = -FAILBACK_IMMEDIATE,
639                 .no_path_retry = NO_PATH_RETRY_QUEUE,
640                 .prio_name     = PRIO_ALUA,
641         },
642         {
643                 /* XIV Storage System / FlashSystem A9000/A9000R */
644                 .vendor        = "(XIV|IBM)",
645                 .product       = "(NEXTRA|2810XIV)",
646                 .no_path_retry = NO_PATH_RETRY_QUEUE,
647                 .pgpolicy      = MULTIBUS,
648         },
649         {
650                 /* TMS RamSan / FlashSystem 710/720/810/820/840/900 */
651                 .vendor        = "(TMS|IBM)",
652                 .product       = "(RamSan|FlashSystem)",
653                 .pgpolicy      = MULTIBUS,
654         },
655         {
656                 /* (DDN) DCS9900, SONAS 2851-DR1 */
657                 .vendor        = "IBM",
658                 .product       = "^(DCS9900|2851)",
659                 .pgpolicy      = GROUP_BY_PRIO,
660                 .pgfailback    = -FAILBACK_IMMEDIATE,
661                 .prio_name     = PRIO_ALUA,
662                 .no_path_retry = 30,
663         },
664                 /*
665                  * IBM Power Virtual SCSI Devices
666                  *
667                  * Maintainer : Brian King
668                  * Mail : brking@linux.vnet.ibm.com
669                  */
670         {
671                 .vendor        = "AIX",
672                 .product       = "VDASD",
673                 .pgpolicy      = MULTIBUS,
674                 .no_path_retry = (300 / DEFAULT_CHECKINT),
675         },
676         {
677                 /* 3303 NVDISK */
678                 .vendor        = "IBM",
679                 .product       = "3303[ ]+NVDISK",
680                 .no_path_retry = (300 / DEFAULT_CHECKINT),
681         },
682         {
683                 .vendor        = "AIX",
684                 .product       = "NVDISK",
685                 .hwhandler     = "1 alua",
686                 .pgpolicy      = GROUP_BY_PRIO,
687                 .pgfailback    = -FAILBACK_IMMEDIATE,
688                 .no_path_retry = (300 / DEFAULT_CHECKINT),
689                 .prio_name     = PRIO_ALUA,
690         },
691         /*
692          * NetApp
693          */
694         {
695                 /*
696                  * ONTAP family
697                  *
698                  * Maintainer : Martin George
699                  * Mail : marting@netapp.com
700                  */
701                 .vendor        = "NETAPP",
702                 .product       = "LUN",
703                 .features      = "2 pg_init_retries 50",
704                 .no_path_retry = NO_PATH_RETRY_QUEUE,
705                 .pgpolicy      = GROUP_BY_PRIO,
706                 .pgfailback    = -FAILBACK_IMMEDIATE,
707                 .flush_on_last_del = FLUSH_ENABLED,
708                 .dev_loss      = MAX_DEV_LOSS_TMO,
709                 .prio_name     = PRIO_ONTAP,
710         },
711         {
712                 /*
713                  * SANtricity(RDAC) family
714                  *
715                  * Maintainer : NetApp RDAC team
716                  * Mail : ng-eseries-upstream-maintainers@netapp.com
717                  */
718                 .vendor        = "(NETAPP|LSI|ENGENIO)",
719                 .product       = "INF-01-00",
720                 .bl_product    = "Universal Xport",
721                 .pgpolicy      = GROUP_BY_PRIO,
722                 .checker_name  = RDAC,
723                 .features      = "2 pg_init_retries 50",
724                 .hwhandler     = "1 rdac",
725                 .prio_name     = PRIO_RDAC,
726                 .pgfailback    = -FAILBACK_IMMEDIATE,
727                 .no_path_retry = 30,
728         },
729         {
730                 /*
731                  * SolidFir family
732                  *
733                  * Maintainer : PJ Waskiewicz
734                  * Mail : pj.waskiewicz@netapp.com
735                  */
736                 .vendor        = "SolidFir",
737                 .product       = "SSD SAN",
738                 .pgpolicy      = MULTIBUS,
739                 .no_path_retry = 24,
740         },
741         {
742                 /*
743                  * NVMe-FC namespace devices: MULTIBUS, queueing preferred
744                  *
745                  * The hwtable is searched backwards, so place this after "Generic NVMe"
746                  */
747                 .vendor        = "NVME",
748                 .product       = "^NetApp ONTAP Controller",
749                 .uid_attribute = "ID_WWN",
750                 .checker_name  = NONE,
751                 .pgpolicy      = MULTIBUS,
752                 .no_path_retry = NO_PATH_RETRY_QUEUE,
753                 .retain_hwhandler = RETAIN_HWHANDLER_OFF,
754         },
755         /*
756          * Nexenta
757          *
758          * Maintainer : Yacine Kheddache
759          * Mail : yacine@alyseo.com
760          */
761         {
762                 .vendor        = "NEXENTA",
763                 .product       = "COMSTAR",
764                 .pgpolicy      = GROUP_BY_SERIAL,
765                 .no_path_retry = 30,
766         },
767         /*
768          * NEC
769          */
770         {
771                 /* M-Series */
772                 .vendor        = "NEC",
773                 .product       = "DISK ARRAY",
774                 .hwhandler     = "1 alua",
775                 .pgpolicy      = GROUP_BY_PRIO,
776                 .pgfailback    = -FAILBACK_IMMEDIATE,
777                 .prio_name     = PRIO_ALUA,
778         },
779         /*
780          * Oracle
781          */
782                 /*
783                  * Pillar Data / Oracle FS
784                  *
785                  * Maintainer : Srinivasan Ramani
786                  * Mail : srinivas.ramani@oracle.com
787                  */
788         {
789                 .vendor        = "^Pillar",
790                 .product       = "^Axiom",
791                 .pgpolicy      = GROUP_BY_PRIO,
792                 .pgfailback    = -FAILBACK_IMMEDIATE,
793                 .prio_name     = PRIO_ALUA,
794         },
795         {
796                 .vendor        = "^Oracle",
797                 .product       = "^Oracle FS",
798                 .pgpolicy      = GROUP_BY_PRIO,
799                 .pgfailback    = -FAILBACK_IMMEDIATE,
800                 .prio_name     = PRIO_ALUA,
801         },
802                 /* Sun - StorageTek */
803         {
804                 /* B210, B220, B240 and B280 */
805                 .vendor        = "STK",
806                 .product       = "BladeCtlr",
807                 .bl_product    = "Universal Xport",
808                 .pgpolicy      = GROUP_BY_PRIO,
809                 .checker_name  = RDAC,
810                 .features      = "2 pg_init_retries 50",
811                 .hwhandler     = "1 rdac",
812                 .prio_name     = PRIO_RDAC,
813                 .pgfailback    = -FAILBACK_IMMEDIATE,
814                 .no_path_retry = 30,
815         },
816         {
817                 /* 9176, D173, D178, D210, D220, D240 and D280 */
818                 .vendor        = "STK",
819                 .product       = "OPENstorage",
820                 .bl_product    = "Universal Xport",
821                 .pgpolicy      = GROUP_BY_PRIO,
822                 .checker_name  = RDAC,
823                 .features      = "2 pg_init_retries 50",
824                 .hwhandler     = "1 rdac",
825                 .prio_name     = PRIO_RDAC,
826                 .pgfailback    = -FAILBACK_IMMEDIATE,
827                 .no_path_retry = 30,
828         },
829         {
830                 /* 6540 */
831                 .vendor        = "STK",
832                 .product       = "FLEXLINE 380",
833                 .bl_product    = "Universal Xport",
834                 .pgpolicy      = GROUP_BY_PRIO,
835                 .checker_name  = RDAC,
836                 .features      = "2 pg_init_retries 50",
837                 .hwhandler     = "1 rdac",
838                 .prio_name     = PRIO_RDAC,
839                 .pgfailback    = -FAILBACK_IMMEDIATE,
840                 .no_path_retry = 30,
841         },
842         {
843                 /* (Dot Hill) 3310, 3320, 3510 and 3511 */
844                 .vendor        = "SUN",
845                 .product       = "StorEdge 3",
846                 .pgpolicy      = MULTIBUS,
847         },
848         {
849                 .vendor        = "SUN",
850                 .product       = "STK6580_6780",
851                 .bl_product    = "Universal Xport",
852                 .pgpolicy      = GROUP_BY_PRIO,
853                 .checker_name  = RDAC,
854                 .features      = "2 pg_init_retries 50",
855                 .hwhandler     = "1 rdac",
856                 .prio_name     = PRIO_RDAC,
857                 .pgfailback    = -FAILBACK_IMMEDIATE,
858                 .no_path_retry = 30,
859         },
860         {
861                 /* 6130 / 6140 */
862                 .vendor        = "SUN",
863                 .product       = "CSM[12]00_R",
864                 .bl_product    = "Universal Xport",
865                 .pgpolicy      = GROUP_BY_PRIO,
866                 .checker_name  = RDAC,
867                 .features      = "2 pg_init_retries 50",
868                 .hwhandler     = "1 rdac",
869                 .prio_name     = PRIO_RDAC,
870                 .pgfailback    = -FAILBACK_IMMEDIATE,
871                 .no_path_retry = 30,
872         },
873         {
874                 /* 2500 / 2510 / 2530 / 2540 */
875                 .vendor        = "SUN",
876                 .product       = "LCSM100_[IEFS]",
877                 .bl_product    = "Universal Xport",
878                 .pgpolicy      = GROUP_BY_PRIO,
879                 .checker_name  = RDAC,
880                 .features      = "2 pg_init_retries 50",
881                 .hwhandler     = "1 rdac",
882                 .prio_name     = PRIO_RDAC,
883                 .pgfailback    = -FAILBACK_IMMEDIATE,
884                 .no_path_retry = 30,
885         },
886         {
887                 .vendor        = "SUN",
888                 .product       = "SUN_6180",
889                 .bl_product    = "Universal Xport",
890                 .pgpolicy      = GROUP_BY_PRIO,
891                 .checker_name  = RDAC,
892                 .features      = "2 pg_init_retries 50",
893                 .hwhandler     = "1 rdac",
894                 .prio_name     = PRIO_RDAC,
895                 .pgfailback    = -FAILBACK_IMMEDIATE,
896                 .no_path_retry = 30,
897         },
898         {
899                 .vendor        = "SUN",
900                 .product       = "ArrayStorage",
901                 .bl_product    = "Universal Xport",
902                 .pgpolicy      = GROUP_BY_PRIO,
903                 .checker_name  = RDAC,
904                 .features      = "2 pg_init_retries 50",
905                 .hwhandler     = "1 rdac",
906                 .prio_name     = PRIO_RDAC,
907                 .pgfailback    = -FAILBACK_IMMEDIATE,
908                 .no_path_retry = 30,
909         },
910         {
911                 /* ZFS Storage Appliances */
912                 .vendor        = "SUN",
913                 .product       = "(Sun Storage|ZFS Storage|COMSTAR)",
914                 .pgpolicy      = GROUP_BY_PRIO,
915                 .pgfailback    = -FAILBACK_IMMEDIATE,
916                 .prio_name     = PRIO_ALUA,
917                 .no_path_retry = 30,
918         },
919         /*
920          * Pivot3
921          *
922          * Maintainer : Bart Brooks
923          * Mail : bartb@pivot3.com
924          */
925         {
926                 .vendor        = "PIVOT3",
927                 .product       = "RAIGE VOLUME",
928                 .no_path_retry = NO_PATH_RETRY_QUEUE,
929                 .pgpolicy      = MULTIBUS,
930         },
931         {
932                 .vendor        = "(NexGen|Pivot3)",
933                 .product       = "(TierStore|vSTAC)",
934                 .pgpolicy      = GROUP_BY_PRIO,
935                 .pgfailback    = -FAILBACK_IMMEDIATE,
936                 .prio_name     = PRIO_ALUA,
937                 .no_path_retry = NO_PATH_RETRY_QUEUE,
938         },
939         /*
940          * Intel
941          */
942         {
943                 .vendor        = "(Intel|INTEL)",
944                 .product       = "Multi-Flex",
945                 .bl_product    = "VTrak V-LUN",
946                 .hwhandler     = "1 alua",
947                 .pgpolicy      = GROUP_BY_PRIO,
948                 .pgfailback    = -FAILBACK_IMMEDIATE,
949                 .no_path_retry = NO_PATH_RETRY_QUEUE,
950                 .prio_name     = PRIO_ALUA,
951         },
952         /*
953          * Linux-IO Target
954          */
955         {
956                 .vendor        = "(LIO-ORG|SUSE)",
957                 .product       = "RBD",
958                 .hwhandler     = "1 alua",
959                 .pgpolicy      = GROUP_BY_PRIO,
960                 .pgfailback    = -FAILBACK_IMMEDIATE,
961                 .no_path_retry = 12,
962                 .prio_name     = PRIO_ALUA,
963         },
964         /*
965          * DataCore
966          */
967         {
968                 .vendor        = "DataCore",
969                 .product       = "SANmelody",
970                 .pgpolicy      = GROUP_BY_PRIO,
971                 .pgfailback    = -FAILBACK_IMMEDIATE,
972                 .no_path_retry = NO_PATH_RETRY_QUEUE,
973                 .prio_name     = PRIO_ALUA,
974         },
975         {
976                 /* SANsymphony */
977                 .vendor        = "DataCore",
978                 .product       = "Virtual Disk",
979                 .pgpolicy      = GROUP_BY_PRIO,
980                 .pgfailback    = -FAILBACK_IMMEDIATE,
981                 .no_path_retry = NO_PATH_RETRY_QUEUE,
982                 .prio_name     = PRIO_ALUA,
983         },
984         /*
985          * Pure Storage
986          */
987         {
988                 .vendor        = "PURE",
989                 .product       = "FlashArray",
990                 .pgpolicy      = MULTIBUS,
991         },
992         /*
993          * Huawei
994          */
995         {
996                 /* OceanStor V3 */
997                 .vendor        = "HUAWEI",
998                 .product       = "XSG1",
999                 .pgpolicy      = GROUP_BY_PRIO,
1000                 .prio_name     = PRIO_ALUA,
1001         },
1002         /*
1003          * Red Hat
1004          *
1005          * Maintainer: Mike Christie
1006          * Mail: mchristi@redhat.com
1007          */
1008         {
1009                 .vendor        = "Ceph",
1010                 .product       = "RBD",
1011                 .checker_name  = RBD,
1012                 .deferred_remove = DEFERRED_REMOVE_ON,
1013         },
1014         /*
1015          * Kove
1016          */
1017         {
1018                 .vendor        = "KOVE",
1019                 .product       = "XPD",
1020                 .pgpolicy      = MULTIBUS,
1021         },
1022         /*
1023          * Infinidat
1024          *
1025          * Maintainer: Arnon Yaari
1026          * Mail: arnony@infinidat.com
1027          */
1028         {
1029                 .vendor        = "NFINIDAT",
1030                 .product       = "InfiniBox",
1031                 .pgpolicy      = GROUP_BY_PRIO,
1032                 .pgfailback    = 30,
1033                 .prio_name     = PRIO_ALUA,
1034                 .selector      = "round-robin 0",
1035                 .rr_weight     = RR_WEIGHT_PRIO,
1036                 .no_path_retry = NO_PATH_RETRY_FAIL,
1037                 .minio         = 1,
1038                 .minio_rq      = 1,
1039                 .flush_on_last_del = FLUSH_ENABLED,
1040                 .fast_io_fail  = 15,
1041                 .dev_loss      = 15,
1042         },
1043         /*
1044          * Kaminario
1045          */
1046         {
1047                 .vendor        = "KMNRIO",
1048                 .product       = "K2",
1049                 .pgpolicy      = MULTIBUS,
1050         },
1051         /*
1052          * Tegile Systems
1053          */
1054         {
1055                 .vendor        = "TEGILE",
1056                 .product       = "(ZEBI-(FC|ISCSI)|INTELLIFLASH)",
1057                 .hwhandler     = "1 alua",
1058                 .pgpolicy      = GROUP_BY_PRIO,
1059                 .pgfailback    = -FAILBACK_IMMEDIATE,
1060                 .prio_name     = PRIO_ALUA,
1061                 .no_path_retry = 10,
1062         },
1063         /*
1064          * Imation/Nexsan
1065          */
1066         {
1067                 /* E-Series */
1068                 .vendor        = "NEXSAN",
1069                 .product       = "NXS-B0",
1070                 .pgpolicy      = GROUP_BY_PRIO,
1071                 .pgfailback    = -FAILBACK_IMMEDIATE,
1072                 .prio_name     = PRIO_ALUA,
1073                 .no_path_retry = 15,
1074         },
1075         {
1076                 /* SATABeast / SATABoy */
1077                 .vendor        = "NEXSAN",
1078                 .product       = "SATAB",
1079                 .pgpolicy      = GROUP_BY_PRIO,
1080                 .pgfailback    = -FAILBACK_IMMEDIATE,
1081                 .prio_name     = PRIO_ALUA,
1082                 .no_path_retry = 15,
1083         },
1084         {
1085                 /* NST / UNITY */
1086                 .vendor        = "Nexsan",
1087                 .product       = "(NestOS|NST5000)",
1088                 .hwhandler     = "1 alua",
1089                 .pgpolicy      = GROUP_BY_PRIO,
1090                 .pgfailback    = -FAILBACK_IMMEDIATE,
1091                 .prio_name     = PRIO_ALUA,
1092                 .no_path_retry = 30,
1093         },
1094         /*
1095          * Xiotech
1096          */
1097         {
1098                 /* Intelligent Storage Elements family */
1099                 .vendor        = "(XIOTECH|XIOtech)",
1100                 .product       = "ISE",
1101                 .pgpolicy      = MULTIBUS,
1102                 .no_path_retry = 12,
1103         },
1104         {
1105                 /* iglu blaze family */
1106                 .vendor        = "(XIOTECH|XIOtech)",
1107                 .product       = "IGLU DISK",
1108                 .pgpolicy      = MULTIBUS,
1109                 .no_path_retry = 30,
1110         },
1111         {
1112                 /* Magnitude family */
1113                 .vendor        = "(XIOTECH|XIOtech)",
1114                 .product       = "Magnitude",
1115                 .pgpolicy      = MULTIBUS,
1116                 .no_path_retry = 30,
1117         },
1118         /*
1119          * Violin Memory
1120          */
1121         {
1122                 /* 3000 / 6000 Series */
1123                 .vendor        = "VIOLIN",
1124                 .product       = "SAN ARRAY$",
1125                 .pgpolicy      = GROUP_BY_SERIAL,
1126                 .no_path_retry = 30,
1127         },
1128         {
1129                 .vendor        = "VIOLIN",
1130                 .product       = "SAN ARRAY ALUA",
1131                 .hwhandler     = "1 alua",
1132                 .pgpolicy      = GROUP_BY_PRIO,
1133                 .pgfailback    = -FAILBACK_IMMEDIATE,
1134                 .prio_name     = PRIO_ALUA,
1135                 .no_path_retry = 30,
1136         },
1137         {
1138                 /* FSP 7000 family */
1139                 .vendor        = "VIOLIN",
1140                 .product       = "CONCERTO ARRAY",
1141                 .pgpolicy      = MULTIBUS,
1142                 .no_path_retry = 30,
1143         },
1144         /*
1145          * Promise Technology
1146          */
1147         {
1148                 .vendor        = "Promise",
1149                 .product       = "VTrak",
1150                 .bl_product    = "VTrak V-LUN",
1151                 .hwhandler     = "1 alua",
1152                 .pgpolicy      = GROUP_BY_PRIO,
1153                 .pgfailback    = -FAILBACK_IMMEDIATE,
1154                 .prio_name     = PRIO_ALUA,
1155                 .no_path_retry = 30,
1156         },
1157         {
1158                 .vendor        = "Promise",
1159                 .product       = "Vess",
1160                 .bl_product    = "Vess V-LUN",
1161                 .hwhandler     = "1 alua",
1162                 .pgpolicy      = GROUP_BY_PRIO,
1163                 .pgfailback    = -FAILBACK_IMMEDIATE,
1164                 .prio_name     = PRIO_ALUA,
1165                 .no_path_retry = 30,
1166         },
1167         /*
1168          * Infortrend Technology
1169          */
1170         {
1171                 /* EonStor / ESVA */
1172                 .vendor        = "^IFT",
1173                 .product       = ".*",
1174                 .pgpolicy      = GROUP_BY_PRIO,
1175                 .pgfailback    = -FAILBACK_IMMEDIATE,
1176                 .prio_name     = PRIO_ALUA,
1177                 .no_path_retry = 30,
1178         },
1179         /*
1180          * Seagate Technology (Dot Hill Systems)
1181          */
1182         {
1183                 /* SANnet family */
1184                 .vendor        = "DotHill",
1185                 .product       = "SANnet",
1186                 .pgpolicy      = MULTIBUS,
1187                 .no_path_retry = 30,
1188         },
1189         {
1190                 /* R/Evolution family */
1191                 .vendor        = "DotHill",
1192                 .product       = "R/Evo",
1193                 .pgpolicy      = GROUP_BY_PRIO,
1194                 .pgfailback    = -FAILBACK_IMMEDIATE,
1195                 .prio_name     = PRIO_ALUA,
1196                 .no_path_retry = 30,
1197         },
1198         {
1199                 /* AssuredSAN family */
1200                 .vendor        = "DotHill",
1201                 .product       = "^DH",
1202                 .pgpolicy      = GROUP_BY_PRIO,
1203                 .pgfailback    = -FAILBACK_IMMEDIATE,
1204                 .prio_name     = PRIO_ALUA,
1205                 .no_path_retry = 30,
1206         },
1207         /*
1208          * AccelStor
1209          */
1210         {
1211                 /* NeoSapphire */
1212                 .vendor        = "AStor",
1213                 .product       = "NeoSapphire",
1214                 .pgpolicy      = MULTIBUS,
1215                 .no_path_retry = 30,
1216         },
1217         /*
1218          * INSPUR
1219          */
1220         {
1221                 /* AS5300/AS5500 G2 */
1222                 .vendor        = "INSPUR",
1223                 .product       = "MCS",
1224                 .pgpolicy      = GROUP_BY_PRIO,
1225                 .pgfailback    = -FAILBACK_IMMEDIATE,
1226                 .prio_name     = PRIO_ALUA,
1227         },
1228         /*
1229          * EOL
1230          */
1231         {
1232                 .vendor        = NULL,
1233                 .product       = NULL,
1234         },
1235 };
1236
1237 int setup_default_hwtable(vector hw)
1238 {
1239         int r = 0;
1240         struct hwentry * hwe = default_hw;
1241
1242         while (hwe->vendor) {
1243                 r += store_hwe(hw, hwe);
1244                 hwe++;
1245         }
1246         return r;
1247 }