libmultipath/hwtable: remove inherited props from ONTAP NVMe
[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                 .pgpolicy      = MULTIBUS,
750                 .no_path_retry = NO_PATH_RETRY_QUEUE,
751         },
752         /*
753          * Nexenta
754          *
755          * Maintainer : Yacine Kheddache
756          * Mail : yacine@alyseo.com
757          */
758         {
759                 .vendor        = "NEXENTA",
760                 .product       = "COMSTAR",
761                 .pgpolicy      = GROUP_BY_SERIAL,
762                 .no_path_retry = 30,
763         },
764         /*
765          * NEC
766          */
767         {
768                 /* M-Series */
769                 .vendor        = "NEC",
770                 .product       = "DISK ARRAY",
771                 .hwhandler     = "1 alua",
772                 .pgpolicy      = GROUP_BY_PRIO,
773                 .pgfailback    = -FAILBACK_IMMEDIATE,
774                 .prio_name     = PRIO_ALUA,
775         },
776         /*
777          * Oracle
778          */
779                 /*
780                  * Pillar Data / Oracle FS
781                  *
782                  * Maintainer : Srinivasan Ramani
783                  * Mail : srinivas.ramani@oracle.com
784                  */
785         {
786                 .vendor        = "^Pillar",
787                 .product       = "^Axiom",
788                 .pgpolicy      = GROUP_BY_PRIO,
789                 .pgfailback    = -FAILBACK_IMMEDIATE,
790                 .prio_name     = PRIO_ALUA,
791         },
792         {
793                 .vendor        = "^Oracle",
794                 .product       = "^Oracle FS",
795                 .pgpolicy      = GROUP_BY_PRIO,
796                 .pgfailback    = -FAILBACK_IMMEDIATE,
797                 .prio_name     = PRIO_ALUA,
798         },
799                 /* Sun - StorageTek */
800         {
801                 /* B210, B220, B240 and B280 */
802                 .vendor        = "STK",
803                 .product       = "BladeCtlr",
804                 .bl_product    = "Universal Xport",
805                 .pgpolicy      = GROUP_BY_PRIO,
806                 .checker_name  = RDAC,
807                 .features      = "2 pg_init_retries 50",
808                 .hwhandler     = "1 rdac",
809                 .prio_name     = PRIO_RDAC,
810                 .pgfailback    = -FAILBACK_IMMEDIATE,
811                 .no_path_retry = 30,
812         },
813         {
814                 /* 9176, D173, D178, D210, D220, D240 and D280 */
815                 .vendor        = "STK",
816                 .product       = "OPENstorage",
817                 .bl_product    = "Universal Xport",
818                 .pgpolicy      = GROUP_BY_PRIO,
819                 .checker_name  = RDAC,
820                 .features      = "2 pg_init_retries 50",
821                 .hwhandler     = "1 rdac",
822                 .prio_name     = PRIO_RDAC,
823                 .pgfailback    = -FAILBACK_IMMEDIATE,
824                 .no_path_retry = 30,
825         },
826         {
827                 /* 6540 */
828                 .vendor        = "STK",
829                 .product       = "FLEXLINE 380",
830                 .bl_product    = "Universal Xport",
831                 .pgpolicy      = GROUP_BY_PRIO,
832                 .checker_name  = RDAC,
833                 .features      = "2 pg_init_retries 50",
834                 .hwhandler     = "1 rdac",
835                 .prio_name     = PRIO_RDAC,
836                 .pgfailback    = -FAILBACK_IMMEDIATE,
837                 .no_path_retry = 30,
838         },
839         {
840                 /* (Dot Hill) 3310, 3320, 3510 and 3511 */
841                 .vendor        = "SUN",
842                 .product       = "StorEdge 3",
843                 .pgpolicy      = MULTIBUS,
844         },
845         {
846                 .vendor        = "SUN",
847                 .product       = "STK6580_6780",
848                 .bl_product    = "Universal Xport",
849                 .pgpolicy      = GROUP_BY_PRIO,
850                 .checker_name  = RDAC,
851                 .features      = "2 pg_init_retries 50",
852                 .hwhandler     = "1 rdac",
853                 .prio_name     = PRIO_RDAC,
854                 .pgfailback    = -FAILBACK_IMMEDIATE,
855                 .no_path_retry = 30,
856         },
857         {
858                 /* 6130 / 6140 */
859                 .vendor        = "SUN",
860                 .product       = "CSM[12]00_R",
861                 .bl_product    = "Universal Xport",
862                 .pgpolicy      = GROUP_BY_PRIO,
863                 .checker_name  = RDAC,
864                 .features      = "2 pg_init_retries 50",
865                 .hwhandler     = "1 rdac",
866                 .prio_name     = PRIO_RDAC,
867                 .pgfailback    = -FAILBACK_IMMEDIATE,
868                 .no_path_retry = 30,
869         },
870         {
871                 /* 2500 / 2510 / 2530 / 2540 */
872                 .vendor        = "SUN",
873                 .product       = "LCSM100_[IEFS]",
874                 .bl_product    = "Universal Xport",
875                 .pgpolicy      = GROUP_BY_PRIO,
876                 .checker_name  = RDAC,
877                 .features      = "2 pg_init_retries 50",
878                 .hwhandler     = "1 rdac",
879                 .prio_name     = PRIO_RDAC,
880                 .pgfailback    = -FAILBACK_IMMEDIATE,
881                 .no_path_retry = 30,
882         },
883         {
884                 .vendor        = "SUN",
885                 .product       = "SUN_6180",
886                 .bl_product    = "Universal Xport",
887                 .pgpolicy      = GROUP_BY_PRIO,
888                 .checker_name  = RDAC,
889                 .features      = "2 pg_init_retries 50",
890                 .hwhandler     = "1 rdac",
891                 .prio_name     = PRIO_RDAC,
892                 .pgfailback    = -FAILBACK_IMMEDIATE,
893                 .no_path_retry = 30,
894         },
895         {
896                 .vendor        = "SUN",
897                 .product       = "ArrayStorage",
898                 .bl_product    = "Universal Xport",
899                 .pgpolicy      = GROUP_BY_PRIO,
900                 .checker_name  = RDAC,
901                 .features      = "2 pg_init_retries 50",
902                 .hwhandler     = "1 rdac",
903                 .prio_name     = PRIO_RDAC,
904                 .pgfailback    = -FAILBACK_IMMEDIATE,
905                 .no_path_retry = 30,
906         },
907         {
908                 /* ZFS Storage Appliances */
909                 .vendor        = "SUN",
910                 .product       = "(Sun Storage|ZFS Storage|COMSTAR)",
911                 .pgpolicy      = GROUP_BY_PRIO,
912                 .pgfailback    = -FAILBACK_IMMEDIATE,
913                 .prio_name     = PRIO_ALUA,
914                 .no_path_retry = 30,
915         },
916         /*
917          * Pivot3
918          *
919          * Maintainer : Bart Brooks
920          * Mail : bartb@pivot3.com
921          */
922         {
923                 .vendor        = "PIVOT3",
924                 .product       = "RAIGE VOLUME",
925                 .no_path_retry = NO_PATH_RETRY_QUEUE,
926                 .pgpolicy      = MULTIBUS,
927         },
928         {
929                 .vendor        = "(NexGen|Pivot3)",
930                 .product       = "(TierStore|vSTAC)",
931                 .pgpolicy      = GROUP_BY_PRIO,
932                 .pgfailback    = -FAILBACK_IMMEDIATE,
933                 .prio_name     = PRIO_ALUA,
934                 .no_path_retry = NO_PATH_RETRY_QUEUE,
935         },
936         /*
937          * Intel
938          */
939         {
940                 .vendor        = "(Intel|INTEL)",
941                 .product       = "Multi-Flex",
942                 .bl_product    = "VTrak V-LUN",
943                 .hwhandler     = "1 alua",
944                 .pgpolicy      = GROUP_BY_PRIO,
945                 .pgfailback    = -FAILBACK_IMMEDIATE,
946                 .no_path_retry = NO_PATH_RETRY_QUEUE,
947                 .prio_name     = PRIO_ALUA,
948         },
949         /*
950          * Linux-IO Target
951          */
952         {
953                 .vendor        = "(LIO-ORG|SUSE)",
954                 .product       = "RBD",
955                 .hwhandler     = "1 alua",
956                 .pgpolicy      = GROUP_BY_PRIO,
957                 .pgfailback    = -FAILBACK_IMMEDIATE,
958                 .no_path_retry = 12,
959                 .prio_name     = PRIO_ALUA,
960         },
961         /*
962          * DataCore
963          */
964         {
965                 .vendor        = "DataCore",
966                 .product       = "SANmelody",
967                 .pgpolicy      = GROUP_BY_PRIO,
968                 .pgfailback    = -FAILBACK_IMMEDIATE,
969                 .no_path_retry = NO_PATH_RETRY_QUEUE,
970                 .prio_name     = PRIO_ALUA,
971         },
972         {
973                 /* SANsymphony */
974                 .vendor        = "DataCore",
975                 .product       = "Virtual Disk",
976                 .pgpolicy      = GROUP_BY_PRIO,
977                 .pgfailback    = -FAILBACK_IMMEDIATE,
978                 .no_path_retry = NO_PATH_RETRY_QUEUE,
979                 .prio_name     = PRIO_ALUA,
980         },
981         /*
982          * Pure Storage
983          */
984         {
985                 .vendor        = "PURE",
986                 .product       = "FlashArray",
987                 .pgpolicy      = MULTIBUS,
988         },
989         /*
990          * Huawei
991          */
992         {
993                 /* OceanStor V3 */
994                 .vendor        = "HUAWEI",
995                 .product       = "XSG1",
996                 .pgpolicy      = GROUP_BY_PRIO,
997                 .prio_name     = PRIO_ALUA,
998         },
999         /*
1000          * Kove
1001          */
1002         {
1003                 .vendor        = "KOVE",
1004                 .product       = "XPD",
1005                 .pgpolicy      = MULTIBUS,
1006         },
1007         /*
1008          * Infinidat
1009          *
1010          * Maintainer: Arnon Yaari
1011          * Mail: arnony@infinidat.com
1012          */
1013         {
1014                 .vendor        = "NFINIDAT",
1015                 .product       = "InfiniBox",
1016                 .pgpolicy      = GROUP_BY_PRIO,
1017                 .pgfailback    = 30,
1018                 .prio_name     = PRIO_ALUA,
1019                 .selector      = "round-robin 0",
1020                 .rr_weight     = RR_WEIGHT_PRIO,
1021                 .no_path_retry = NO_PATH_RETRY_FAIL,
1022                 .minio         = 1,
1023                 .minio_rq      = 1,
1024                 .flush_on_last_del = FLUSH_ENABLED,
1025                 .fast_io_fail  = 15,
1026                 .dev_loss      = 15,
1027         },
1028         /*
1029          * Kaminario
1030          */
1031         {
1032                 .vendor        = "KMNRIO",
1033                 .product       = "K2",
1034                 .pgpolicy      = MULTIBUS,
1035         },
1036         /*
1037          * Tegile Systems
1038          */
1039         {
1040                 .vendor        = "TEGILE",
1041                 .product       = "(ZEBI-(FC|ISCSI)|INTELLIFLASH)",
1042                 .hwhandler     = "1 alua",
1043                 .pgpolicy      = GROUP_BY_PRIO,
1044                 .pgfailback    = -FAILBACK_IMMEDIATE,
1045                 .prio_name     = PRIO_ALUA,
1046                 .no_path_retry = 10,
1047         },
1048         /*
1049          * Imation/Nexsan
1050          */
1051         {
1052                 /* E-Series */
1053                 .vendor        = "NEXSAN",
1054                 .product       = "NXS-B0",
1055                 .pgpolicy      = GROUP_BY_PRIO,
1056                 .pgfailback    = -FAILBACK_IMMEDIATE,
1057                 .prio_name     = PRIO_ALUA,
1058                 .no_path_retry = 15,
1059         },
1060         {
1061                 /* SATABeast / SATABoy */
1062                 .vendor        = "NEXSAN",
1063                 .product       = "SATAB",
1064                 .pgpolicy      = GROUP_BY_PRIO,
1065                 .pgfailback    = -FAILBACK_IMMEDIATE,
1066                 .prio_name     = PRIO_ALUA,
1067                 .no_path_retry = 15,
1068         },
1069         {
1070                 /* NST / UNITY */
1071                 .vendor        = "Nexsan",
1072                 .product       = "(NestOS|NST5000)",
1073                 .hwhandler     = "1 alua",
1074                 .pgpolicy      = GROUP_BY_PRIO,
1075                 .pgfailback    = -FAILBACK_IMMEDIATE,
1076                 .prio_name     = PRIO_ALUA,
1077                 .no_path_retry = 30,
1078         },
1079         /*
1080          * Xiotech
1081          */
1082         {
1083                 /* Intelligent Storage Elements family */
1084                 .vendor        = "(XIOTECH|XIOtech)",
1085                 .product       = "ISE",
1086                 .pgpolicy      = MULTIBUS,
1087                 .no_path_retry = 12,
1088         },
1089         {
1090                 /* iglu blaze family */
1091                 .vendor        = "(XIOTECH|XIOtech)",
1092                 .product       = "IGLU DISK",
1093                 .pgpolicy      = MULTIBUS,
1094                 .no_path_retry = 30,
1095         },
1096         {
1097                 /* Magnitude family */
1098                 .vendor        = "(XIOTECH|XIOtech)",
1099                 .product       = "Magnitude",
1100                 .pgpolicy      = MULTIBUS,
1101                 .no_path_retry = 30,
1102         },
1103         /*
1104          * Violin Memory
1105          */
1106         {
1107                 /* 3000 / 6000 Series */
1108                 .vendor        = "VIOLIN",
1109                 .product       = "SAN ARRAY$",
1110                 .pgpolicy      = GROUP_BY_SERIAL,
1111                 .no_path_retry = 30,
1112         },
1113         {
1114                 .vendor        = "VIOLIN",
1115                 .product       = "SAN ARRAY ALUA",
1116                 .hwhandler     = "1 alua",
1117                 .pgpolicy      = GROUP_BY_PRIO,
1118                 .pgfailback    = -FAILBACK_IMMEDIATE,
1119                 .prio_name     = PRIO_ALUA,
1120                 .no_path_retry = 30,
1121         },
1122         {
1123                 /* FSP 7000 family */
1124                 .vendor        = "VIOLIN",
1125                 .product       = "CONCERTO ARRAY",
1126                 .pgpolicy      = MULTIBUS,
1127                 .no_path_retry = 30,
1128         },
1129         /*
1130          * Promise Technology
1131          */
1132         {
1133                 .vendor        = "Promise",
1134                 .product       = "VTrak",
1135                 .bl_product    = "VTrak V-LUN",
1136                 .hwhandler     = "1 alua",
1137                 .pgpolicy      = GROUP_BY_PRIO,
1138                 .pgfailback    = -FAILBACK_IMMEDIATE,
1139                 .prio_name     = PRIO_ALUA,
1140                 .no_path_retry = 30,
1141         },
1142         {
1143                 .vendor        = "Promise",
1144                 .product       = "Vess",
1145                 .bl_product    = "Vess V-LUN",
1146                 .hwhandler     = "1 alua",
1147                 .pgpolicy      = GROUP_BY_PRIO,
1148                 .pgfailback    = -FAILBACK_IMMEDIATE,
1149                 .prio_name     = PRIO_ALUA,
1150                 .no_path_retry = 30,
1151         },
1152         /*
1153          * Infortrend Technology
1154          */
1155         {
1156                 /* EonStor / ESVA */
1157                 .vendor        = "^IFT",
1158                 .product       = ".*",
1159                 .pgpolicy      = GROUP_BY_PRIO,
1160                 .pgfailback    = -FAILBACK_IMMEDIATE,
1161                 .prio_name     = PRIO_ALUA,
1162                 .no_path_retry = 30,
1163         },
1164         /*
1165          * Seagate Technology (Dot Hill Systems)
1166          */
1167         {
1168                 /* SANnet family */
1169                 .vendor        = "DotHill",
1170                 .product       = "SANnet",
1171                 .pgpolicy      = MULTIBUS,
1172                 .no_path_retry = 30,
1173         },
1174         {
1175                 /* R/Evolution family */
1176                 .vendor        = "DotHill",
1177                 .product       = "R/Evo",
1178                 .pgpolicy      = GROUP_BY_PRIO,
1179                 .pgfailback    = -FAILBACK_IMMEDIATE,
1180                 .prio_name     = PRIO_ALUA,
1181                 .no_path_retry = 30,
1182         },
1183         {
1184                 /* AssuredSAN family */
1185                 .vendor        = "DotHill",
1186                 .product       = "^DH",
1187                 .pgpolicy      = GROUP_BY_PRIO,
1188                 .pgfailback    = -FAILBACK_IMMEDIATE,
1189                 .prio_name     = PRIO_ALUA,
1190                 .no_path_retry = 30,
1191         },
1192         /*
1193          * AccelStor
1194          */
1195         {
1196                 /* NeoSapphire */
1197                 .vendor        = "AStor",
1198                 .product       = "NeoSapphire",
1199                 .pgpolicy      = MULTIBUS,
1200                 .no_path_retry = 30,
1201         },
1202         /*
1203          * INSPUR
1204          */
1205         {
1206                 /* AS5300/AS5500 G2 */
1207                 .vendor        = "INSPUR",
1208                 .product       = "MCS",
1209                 .pgpolicy      = GROUP_BY_PRIO,
1210                 .pgfailback    = -FAILBACK_IMMEDIATE,
1211                 .prio_name     = PRIO_ALUA,
1212         },
1213         /*
1214          * EOL
1215          */
1216         {
1217                 .vendor        = NULL,
1218                 .product       = NULL,
1219         },
1220 };
1221
1222 int setup_default_hwtable(vector hw)
1223 {
1224         int r = 0;
1225         struct hwentry * hwe = default_hw;
1226
1227         while (hwe->vendor) {
1228                 r += store_hwe(hw, hwe);
1229                 hwe++;
1230         }
1231         return r;
1232 }