multipathd: fix reservation_key check
[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
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 */
402                 .vendor        = "(HITACHI|HP)",
403                 .product       = "^OPEN-",
404                 .pgpolicy      = MULTIBUS,
405         },
406         {
407                 /* AMS 2000 and HUS 100 families */
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          * IBM
417          *
418          * Maintainer : Hannes Reinecke
419          * Mail : hare@suse.de
420          */
421         {
422                 .vendor        = "IBM",
423                 .product       = "ProFibre 4000R",
424                 .pgpolicy      = MULTIBUS,
425         },
426         {
427                 /* DS4300 / FAStT600 */
428                 .vendor        = "IBM",
429                 .product       = "^1722-600",
430                 .bl_product    = "Universal Xport",
431                 .pgpolicy      = GROUP_BY_PRIO,
432                 .checker_name  = RDAC,
433                 .features      = "2 pg_init_retries 50",
434                 .hwhandler     = "1 rdac",
435                 .prio_name     = PRIO_RDAC,
436                 .pgfailback    = -FAILBACK_IMMEDIATE,
437                 .no_path_retry = 30,
438         },
439         {
440                 /* DS4100 / FAStT100 */
441                 .vendor        = "IBM",
442                 .product       = "^1724",
443                 .bl_product    = "Universal Xport",
444                 .pgpolicy      = GROUP_BY_PRIO,
445                 .checker_name  = RDAC,
446                 .features      = "2 pg_init_retries 50",
447                 .hwhandler     = "1 rdac",
448                 .prio_name     = PRIO_RDAC,
449                 .pgfailback    = -FAILBACK_IMMEDIATE,
450                 .no_path_retry = 30,
451         },
452         {
453                 /* DS3000 / DS3200 / DS3300 / DS3400 / Boot DS */
454                 .vendor        = "IBM",
455                 .product       = "^1726",
456                 .bl_product    = "Universal Xport",
457                 .pgpolicy      = GROUP_BY_PRIO,
458                 .checker_name  = RDAC,
459                 .features      = "2 pg_init_retries 50",
460                 .hwhandler     = "1 rdac",
461                 .prio_name     = PRIO_RDAC,
462                 .pgfailback    = -FAILBACK_IMMEDIATE,
463                 .no_path_retry = 30,
464         },
465         {
466                 /* DS4400 / DS4500 / FAStT700 / FAStT900 */
467                 .vendor        = "IBM",
468                 .product       = "^1742",
469                 .bl_product    = "Universal Xport",
470                 .pgpolicy      = GROUP_BY_PRIO,
471                 .checker_name  = RDAC,
472                 .features      = "2 pg_init_retries 50",
473                 .hwhandler     = "1 rdac",
474                 .prio_name     = PRIO_RDAC,
475                 .pgfailback    = -FAILBACK_IMMEDIATE,
476                 .no_path_retry = 30,
477         },
478         {
479                 /* DS3500 / DS3512 / DS3524 */
480                 .vendor        = "IBM",
481                 .product       = "^1746",
482                 .bl_product    = "Universal Xport",
483                 .pgpolicy      = GROUP_BY_PRIO,
484                 .checker_name  = RDAC,
485                 .features      = "2 pg_init_retries 50",
486                 .hwhandler     = "1 rdac",
487                 .prio_name     = PRIO_RDAC,
488                 .pgfailback    = -FAILBACK_IMMEDIATE,
489                 .no_path_retry = 30,
490         },
491         {
492                 /* DCS3860 */
493                 .vendor        = "IBM",
494                 .product       = "^1813",
495                 .bl_product    = "Universal Xport",
496                 .pgpolicy      = GROUP_BY_PRIO,
497                 .checker_name  = RDAC,
498                 .features      = "2 pg_init_retries 50",
499                 .hwhandler     = "1 rdac",
500                 .prio_name     = PRIO_RDAC,
501                 .pgfailback    = -FAILBACK_IMMEDIATE,
502                 .no_path_retry = 30,
503         },
504         {
505                 /* DS3950 / DS4200 / DS4700 / DS5020 */
506                 .vendor        = "IBM",
507                 .product       = "^1814",
508                 .bl_product    = "Universal Xport",
509                 .pgpolicy      = GROUP_BY_PRIO,
510                 .checker_name  = RDAC,
511                 .features      = "2 pg_init_retries 50",
512                 .hwhandler     = "1 rdac",
513                 .prio_name     = PRIO_RDAC,
514                 .pgfailback    = -FAILBACK_IMMEDIATE,
515                 .no_path_retry = 30,
516         },
517         {
518                 /* DS4800 */
519                 .vendor        = "IBM",
520                 .product       = "^1815",
521                 .bl_product    = "Universal Xport",
522                 .pgpolicy      = GROUP_BY_PRIO,
523                 .checker_name  = RDAC,
524                 .features      = "2 pg_init_retries 50",
525                 .hwhandler     = "1 rdac",
526                 .prio_name     = PRIO_RDAC,
527                 .pgfailback    = -FAILBACK_IMMEDIATE,
528                 .no_path_retry = 30,
529         },
530         {
531                 /* DS5000 / DS5100 / DS5300 / DCS3700 */
532                 .vendor        = "IBM",
533                 .product       = "^1818",
534                 .bl_product    = "Universal Xport",
535                 .pgpolicy      = GROUP_BY_PRIO,
536                 .checker_name  = RDAC,
537                 .features      = "2 pg_init_retries 50",
538                 .hwhandler     = "1 rdac",
539                 .prio_name     = PRIO_RDAC,
540                 .pgfailback    = -FAILBACK_IMMEDIATE,
541                 .no_path_retry = 30,
542         },
543         {
544                 /* Netfinity Fibre Channel RAID Controller Unit */
545                 .vendor        = "IBM",
546                 .product       = "^3526",
547                 .bl_product    = "Universal Xport",
548                 .pgpolicy      = GROUP_BY_PRIO,
549                 .checker_name  = RDAC,
550                 .features      = "2 pg_init_retries 50",
551                 .hwhandler     = "1 rdac",
552                 .prio_name     = PRIO_RDAC,
553                 .pgfailback    = -FAILBACK_IMMEDIATE,
554                 .no_path_retry = 30,
555         },
556         {
557                 /* FAStT200 and FAStT500 */
558                 .vendor        = "IBM",
559                 .product       = "^(3542|3552)",
560                 .bl_product    = "Universal Xport",
561                 .pgpolicy      = GROUP_BY_PRIO,
562                 .checker_name  = RDAC,
563                 .features      = "2 pg_init_retries 50",
564                 .hwhandler     = "1 rdac",
565                 .prio_name     = PRIO_RDAC,
566                 .pgfailback    = -FAILBACK_IMMEDIATE,
567                 .no_path_retry = 30,
568         },
569         {
570                 /* Enterprise Storage Server / Shark family */
571                 .vendor        = "IBM",
572                 .product       = "^2105",
573                 .no_path_retry = NO_PATH_RETRY_QUEUE,
574                 .pgpolicy      = MULTIBUS,
575         },
576         {
577                 /* DS6000 / DS6800 */
578                 .vendor        = "IBM",
579                 .product       = "^1750500",
580                 .no_path_retry = NO_PATH_RETRY_QUEUE,
581                 .pgpolicy      = GROUP_BY_PRIO,
582                 .pgfailback    = -FAILBACK_IMMEDIATE,
583                 .prio_name     = PRIO_ALUA,
584         },
585         {
586                 /* DS8000 family */
587                 .vendor        = "IBM",
588                 .product       = "^2107900",
589                 .no_path_retry = NO_PATH_RETRY_QUEUE,
590                 .pgpolicy      = MULTIBUS,
591         },
592         {
593                 /* Storwize family / SAN Volume Controller / Flex System V7000 / FlashSystem V840/V9000 */
594                 .vendor        = "IBM",
595                 .product       = "^2145",
596                 .no_path_retry = NO_PATH_RETRY_QUEUE,
597                 .pgpolicy      = GROUP_BY_PRIO,
598                 .pgfailback    = -FAILBACK_IMMEDIATE,
599                 .prio_name     = PRIO_ALUA,
600         },
601         {
602                 .vendor        = "IBM",
603                 .product       = "S/390 DASD ECKD",
604                 .bl_product    = "S/390",
605                 .uid_attribute = "ID_UID",
606                 .no_path_retry = NO_PATH_RETRY_QUEUE,
607                 .pgpolicy      = MULTIBUS,
608         },
609         {
610                 .vendor        = "IBM",
611                 .product       = "S/390 DASD FBA",
612                 .bl_product    = "S/390",
613                 .uid_attribute = "ID_UID",
614                 .no_path_retry = NO_PATH_RETRY_QUEUE,
615                 .pgpolicy      = MULTIBUS,
616         },
617         {
618                 /* Power RAID */
619                 .vendor        = "IBM",
620                 .product       = "^IPR",
621                 .no_path_retry = NO_PATH_RETRY_QUEUE,
622                 .hwhandler     = "1 alua",
623                 .pgpolicy      = GROUP_BY_PRIO,
624                 .pgfailback    = -FAILBACK_IMMEDIATE,
625                 .prio_name     = PRIO_ALUA,
626         },
627         {
628                 /* SAS RAID Controller Module (RSSM) */
629                 .vendor        = "IBM",
630                 .product       = "1820N00",
631                 .pgpolicy      = GROUP_BY_PRIO,
632                 .pgfailback    = -FAILBACK_IMMEDIATE,
633                 .no_path_retry = NO_PATH_RETRY_QUEUE,
634                 .prio_name     = PRIO_ALUA,
635         },
636         {
637                 /* XIV Storage System / FlashSystem A9000/A9000R */
638                 .vendor        = "(XIV|IBM)",
639                 .product       = "(NEXTRA|2810XIV)",
640                 .no_path_retry = NO_PATH_RETRY_QUEUE,
641                 .pgpolicy      = MULTIBUS,
642         },
643         {
644                 /* TMS RamSan / FlashSystem 710/720/810/820/840/900 */
645                 .vendor        = "(TMS|IBM)",
646                 .product       = "(RamSan|FlashSystem)",
647                 .pgpolicy      = MULTIBUS,
648         },
649         {
650                 /* (DDN) DCS9900, SONAS 2851-DR1 */
651                 .vendor        = "IBM",
652                 .product       = "^(DCS9900|2851)",
653                 .pgpolicy      = GROUP_BY_PRIO,
654                 .pgfailback    = -FAILBACK_IMMEDIATE,
655                 .prio_name     = PRIO_ALUA,
656                 .no_path_retry = 30,
657         },
658                 /*
659                  * IBM Power Virtual SCSI Devices
660                  *
661                  * Maintainer : Brian King
662                  * Mail : brking@linux.vnet.ibm.com
663                  */
664         {
665                 .vendor        = "AIX",
666                 .product       = "VDASD",
667                 .pgpolicy      = MULTIBUS,
668                 .no_path_retry = (300 / DEFAULT_CHECKINT),
669         },
670         {
671                 /* 3303 NVDISK */
672                 .vendor        = "IBM",
673                 .product       = "3303[ ]+NVDISK",
674                 .no_path_retry = (300 / DEFAULT_CHECKINT),
675         },
676         {
677                 .vendor        = "AIX",
678                 .product       = "NVDISK",
679                 .hwhandler     = "1 alua",
680                 .pgpolicy      = GROUP_BY_PRIO,
681                 .pgfailback    = -FAILBACK_IMMEDIATE,
682                 .no_path_retry = (300 / DEFAULT_CHECKINT),
683                 .prio_name     = PRIO_ALUA,
684         },
685         /*
686          * NetApp
687          */
688         {
689                 /*
690                  * ONTAP family
691                  *
692                  * Maintainer : Martin George
693                  * Mail : marting@netapp.com
694                  */
695                 .vendor        = "NETAPP",
696                 .product       = "LUN",
697                 .features      = "2 pg_init_retries 50",
698                 .no_path_retry = NO_PATH_RETRY_QUEUE,
699                 .pgpolicy      = GROUP_BY_PRIO,
700                 .pgfailback    = -FAILBACK_IMMEDIATE,
701                 .flush_on_last_del = FLUSH_ENABLED,
702                 .dev_loss      = MAX_DEV_LOSS_TMO,
703                 .prio_name     = PRIO_ONTAP,
704         },
705         {
706                 /*
707                  * SANtricity(RDAC) family
708                  *
709                  * Maintainer : NetApp RDAC team
710                  * Mail : ng-eseries-upstream-maintainers@netapp.com
711                  */
712                 .vendor        = "(NETAPP|LSI|ENGENIO)",
713                 .product       = "INF-01-00",
714                 .bl_product    = "Universal Xport",
715                 .pgpolicy      = GROUP_BY_PRIO,
716                 .checker_name  = RDAC,
717                 .features      = "2 pg_init_retries 50",
718                 .hwhandler     = "1 rdac",
719                 .prio_name     = PRIO_RDAC,
720                 .pgfailback    = -FAILBACK_IMMEDIATE,
721                 .no_path_retry = 30,
722         },
723         {
724                 /*
725                  * SolidFir family
726                  *
727                  * Maintainer : PJ Waskiewicz
728                  * Mail : pj.waskiewicz@netapp.com
729                  */
730                 .vendor        = "SolidFir",
731                 .product       = "SSD SAN",
732                 .pgpolicy      = MULTIBUS,
733                 .no_path_retry = 24,
734         },
735         {
736                 /*
737                  * NVMe-FC namespace devices: MULTIBUS, queueing preferred
738                  *
739                  * The hwtable is searched backwards, so place this after "Generic NVMe"
740                  */
741                 .vendor        = "NVME",
742                 .product       = "^NetApp ONTAP Controller",
743                 .uid_attribute = "ID_WWN",
744                 .checker_name  = NONE,
745                 .pgpolicy      = MULTIBUS,
746                 .no_path_retry = NO_PATH_RETRY_QUEUE,
747                 .retain_hwhandler = RETAIN_HWHANDLER_OFF,
748         },
749         /*
750          * Nexenta
751          *
752          * Maintainer : Yacine Kheddache
753          * Mail : yacine@alyseo.com
754          */
755         {
756                 .vendor        = "NEXENTA",
757                 .product       = "COMSTAR",
758                 .pgpolicy      = GROUP_BY_SERIAL,
759                 .no_path_retry = 30,
760         },
761         /*
762          * NEC
763          */
764         {
765                 /* M-Series */
766                 .vendor        = "NEC",
767                 .product       = "DISK ARRAY",
768                 .hwhandler     = "1 alua",
769                 .pgpolicy      = GROUP_BY_PRIO,
770                 .pgfailback    = -FAILBACK_IMMEDIATE,
771                 .prio_name     = PRIO_ALUA,
772         },
773         /*
774          * Oracle
775          */
776                 /*
777                  * Pillar Data / Oracle FS
778                  *
779                  * Maintainer : Srinivasan Ramani
780                  * Mail : srinivas.ramani@oracle.com
781                  */
782         {
783                 .vendor        = "^Pillar",
784                 .product       = "^Axiom",
785                 .pgpolicy      = GROUP_BY_PRIO,
786                 .pgfailback    = -FAILBACK_IMMEDIATE,
787                 .prio_name     = PRIO_ALUA,
788         },
789         {
790                 .vendor        = "^Oracle",
791                 .product       = "^Oracle FS",
792                 .pgpolicy      = GROUP_BY_PRIO,
793                 .pgfailback    = -FAILBACK_IMMEDIATE,
794                 .prio_name     = PRIO_ALUA,
795         },
796                 /* Sun - StorageTek */
797         {
798                 /* B210, B220, B240 and B280 */
799                 .vendor        = "STK",
800                 .product       = "BladeCtlr",
801                 .bl_product    = "Universal Xport",
802                 .pgpolicy      = GROUP_BY_PRIO,
803                 .checker_name  = RDAC,
804                 .features      = "2 pg_init_retries 50",
805                 .hwhandler     = "1 rdac",
806                 .prio_name     = PRIO_RDAC,
807                 .pgfailback    = -FAILBACK_IMMEDIATE,
808                 .no_path_retry = 30,
809         },
810         {
811                 /* 9176, D173, D178, D210, D220, D240 and D280 */
812                 .vendor        = "STK",
813                 .product       = "OPENstorage",
814                 .bl_product    = "Universal Xport",
815                 .pgpolicy      = GROUP_BY_PRIO,
816                 .checker_name  = RDAC,
817                 .features      = "2 pg_init_retries 50",
818                 .hwhandler     = "1 rdac",
819                 .prio_name     = PRIO_RDAC,
820                 .pgfailback    = -FAILBACK_IMMEDIATE,
821                 .no_path_retry = 30,
822         },
823         {
824                 /* 6540 */
825                 .vendor        = "STK",
826                 .product       = "FLEXLINE 380",
827                 .bl_product    = "Universal Xport",
828                 .pgpolicy      = GROUP_BY_PRIO,
829                 .checker_name  = RDAC,
830                 .features      = "2 pg_init_retries 50",
831                 .hwhandler     = "1 rdac",
832                 .prio_name     = PRIO_RDAC,
833                 .pgfailback    = -FAILBACK_IMMEDIATE,
834                 .no_path_retry = 30,
835         },
836         {
837                 /* (Dot Hill) 3310, 3320, 3510 and 3511 */
838                 .vendor        = "SUN",
839                 .product       = "StorEdge 3",
840                 .pgpolicy      = MULTIBUS,
841         },
842         {
843                 .vendor        = "SUN",
844                 .product       = "STK6580_6780",
845                 .bl_product    = "Universal Xport",
846                 .pgpolicy      = GROUP_BY_PRIO,
847                 .checker_name  = RDAC,
848                 .features      = "2 pg_init_retries 50",
849                 .hwhandler     = "1 rdac",
850                 .prio_name     = PRIO_RDAC,
851                 .pgfailback    = -FAILBACK_IMMEDIATE,
852                 .no_path_retry = 30,
853         },
854         {
855                 /* 6130 / 6140 */
856                 .vendor        = "SUN",
857                 .product       = "CSM[12]00_R",
858                 .bl_product    = "Universal Xport",
859                 .pgpolicy      = GROUP_BY_PRIO,
860                 .checker_name  = RDAC,
861                 .features      = "2 pg_init_retries 50",
862                 .hwhandler     = "1 rdac",
863                 .prio_name     = PRIO_RDAC,
864                 .pgfailback    = -FAILBACK_IMMEDIATE,
865                 .no_path_retry = 30,
866         },
867         {
868                 /* 2500 / 2510 / 2530 / 2540 */
869                 .vendor        = "SUN",
870                 .product       = "LCSM100_[IEFS]",
871                 .bl_product    = "Universal Xport",
872                 .pgpolicy      = GROUP_BY_PRIO,
873                 .checker_name  = RDAC,
874                 .features      = "2 pg_init_retries 50",
875                 .hwhandler     = "1 rdac",
876                 .prio_name     = PRIO_RDAC,
877                 .pgfailback    = -FAILBACK_IMMEDIATE,
878                 .no_path_retry = 30,
879         },
880         {
881                 .vendor        = "SUN",
882                 .product       = "SUN_6180",
883                 .bl_product    = "Universal Xport",
884                 .pgpolicy      = GROUP_BY_PRIO,
885                 .checker_name  = RDAC,
886                 .features      = "2 pg_init_retries 50",
887                 .hwhandler     = "1 rdac",
888                 .prio_name     = PRIO_RDAC,
889                 .pgfailback    = -FAILBACK_IMMEDIATE,
890                 .no_path_retry = 30,
891         },
892         {
893                 /* ZFS Storage Appliances */
894                 .vendor        = "SUN",
895                 .product       = "(Sun Storage|ZFS Storage|COMSTAR)",
896                 .pgpolicy      = GROUP_BY_PRIO,
897                 .pgfailback    = -FAILBACK_IMMEDIATE,
898                 .prio_name     = PRIO_ALUA,
899                 .no_path_retry = 30,
900         },
901         /*
902          * Pivot3
903          *
904          * Maintainer : Bart Brooks
905          * Mail : bartb@pivot3.com
906          */
907         {
908                 .vendor        = "PIVOT3",
909                 .product       = "RAIGE VOLUME",
910                 .no_path_retry = NO_PATH_RETRY_QUEUE,
911                 .pgpolicy      = MULTIBUS,
912         },
913         {
914                 .vendor        = "(NexGen|Pivot3)",
915                 .product       = "(TierStore|vSTAC)",
916                 .pgpolicy      = GROUP_BY_PRIO,
917                 .pgfailback    = -FAILBACK_IMMEDIATE,
918                 .prio_name     = PRIO_ALUA,
919                 .no_path_retry = NO_PATH_RETRY_QUEUE,
920         },
921         /*
922          * Intel
923          */
924         {
925                 .vendor        = "(Intel|INTEL)",
926                 .product       = "Multi-Flex",
927                 .bl_product    = "VTrak V-LUN",
928                 .hwhandler     = "1 alua",
929                 .pgpolicy      = GROUP_BY_PRIO,
930                 .pgfailback    = -FAILBACK_IMMEDIATE,
931                 .no_path_retry = NO_PATH_RETRY_QUEUE,
932                 .prio_name     = PRIO_ALUA,
933         },
934         /*
935          * Linux-IO Target
936          */
937         {
938                 .vendor        = "(LIO-ORG|SUSE)",
939                 .product       = "RBD",
940                 .hwhandler     = "1 alua",
941                 .pgpolicy      = GROUP_BY_PRIO,
942                 .pgfailback    = -FAILBACK_IMMEDIATE,
943                 .no_path_retry = 12,
944                 .prio_name     = PRIO_ALUA,
945         },
946         /*
947          * DataCore
948          */
949         {
950                 .vendor        = "DataCore",
951                 .product       = "SANmelody",
952                 .pgpolicy      = GROUP_BY_PRIO,
953                 .pgfailback    = -FAILBACK_IMMEDIATE,
954                 .no_path_retry = NO_PATH_RETRY_QUEUE,
955                 .prio_name     = PRIO_ALUA,
956         },
957         {
958                 /* SANsymphony */
959                 .vendor        = "DataCore",
960                 .product       = "Virtual Disk",
961                 .pgpolicy      = GROUP_BY_PRIO,
962                 .pgfailback    = -FAILBACK_IMMEDIATE,
963                 .no_path_retry = NO_PATH_RETRY_QUEUE,
964                 .prio_name     = PRIO_ALUA,
965         },
966         /*
967          * Pure Storage
968          */
969         {
970                 .vendor        = "PURE",
971                 .product       = "FlashArray",
972                 .pgpolicy      = MULTIBUS,
973         },
974         /*
975          * Huawei
976          */
977         {
978                 /* OceanStor V3 */
979                 .vendor        = "HUAWEI",
980                 .product       = "XSG1",
981                 .pgpolicy      = GROUP_BY_PRIO,
982                 .prio_name     = PRIO_ALUA,
983         },
984         /*
985          * Red Hat
986          *
987          * Maintainer: Mike Christie
988          * Mail: mchristi@redhat.com
989          */
990         {
991                 .vendor        = "Ceph",
992                 .product       = "RBD",
993                 .checker_name  = RBD,
994                 .deferred_remove = DEFERRED_REMOVE_ON,
995         },
996         /*
997          * Kove
998          */
999         {
1000                 .vendor        = "KOVE",
1001                 .product       = "XPD",
1002                 .pgpolicy      = MULTIBUS,
1003         },
1004         /*
1005          * Infinidat
1006          *
1007          * Maintainer: Arnon Yaari
1008          * Mail: arnony@infinidat.com
1009          */
1010         {
1011                 .vendor        = "NFINIDAT",
1012                 .product       = "InfiniBox",
1013                 .pgpolicy      = GROUP_BY_PRIO,
1014                 .pgfailback    = 30,
1015                 .prio_name     = PRIO_ALUA,
1016                 .selector      = "round-robin 0",
1017                 .rr_weight     = RR_WEIGHT_PRIO,
1018                 .no_path_retry = NO_PATH_RETRY_FAIL,
1019                 .minio         = 1,
1020                 .minio_rq      = 1,
1021                 .flush_on_last_del = FLUSH_ENABLED,
1022                 .fast_io_fail  = 15,
1023                 .dev_loss      = 15,
1024         },
1025         /*
1026          * Kaminario
1027          */
1028         {
1029                 .vendor        = "KMNRIO",
1030                 .product       = "K2",
1031                 .pgpolicy      = MULTIBUS,
1032         },
1033         /*
1034          * Tegile Systems
1035          */
1036         {
1037                 .vendor        = "TEGILE",
1038                 .product       = "(ZEBI-(FC|ISCSI)|INTELLIFLASH)",
1039                 .hwhandler     = "1 alua",
1040                 .pgpolicy      = GROUP_BY_PRIO,
1041                 .pgfailback    = -FAILBACK_IMMEDIATE,
1042                 .prio_name     = PRIO_ALUA,
1043                 .no_path_retry = 10,
1044         },
1045         /*
1046          * Imation/Nexsan
1047          */
1048         {
1049                 /* E-Series */
1050                 .vendor        = "NEXSAN",
1051                 .product       = "NXS-B0",
1052                 .pgpolicy      = GROUP_BY_PRIO,
1053                 .pgfailback    = -FAILBACK_IMMEDIATE,
1054                 .prio_name     = PRIO_ALUA,
1055                 .no_path_retry = 15,
1056         },
1057         {
1058                 /* SATABeast / SATABoy */
1059                 .vendor        = "NEXSAN",
1060                 .product       = "SATAB",
1061                 .pgpolicy      = GROUP_BY_PRIO,
1062                 .pgfailback    = -FAILBACK_IMMEDIATE,
1063                 .prio_name     = PRIO_ALUA,
1064                 .no_path_retry = 15,
1065         },
1066         {
1067                 /* NST / UNITY */
1068                 .vendor        = "Nexsan",
1069                 .product       = "(NestOS|NST5000)",
1070                 .hwhandler     = "1 alua",
1071                 .pgpolicy      = GROUP_BY_PRIO,
1072                 .pgfailback    = -FAILBACK_IMMEDIATE,
1073                 .prio_name     = PRIO_ALUA,
1074                 .no_path_retry = 30,
1075         },
1076         /*
1077          * Xiotech
1078          */
1079         {
1080                 /* Intelligent Storage Elements family */
1081                 .vendor        = "(XIOTECH|XIOtech)",
1082                 .product       = "ISE",
1083                 .pgpolicy      = MULTIBUS,
1084                 .no_path_retry = 12,
1085         },
1086         {
1087                 /* iglu blaze family */
1088                 .vendor        = "(XIOTECH|XIOtech)",
1089                 .product       = "IGLU DISK",
1090                 .pgpolicy      = MULTIBUS,
1091                 .no_path_retry = 30,
1092         },
1093         {
1094                 /* Magnitude family */
1095                 .vendor        = "(XIOTECH|XIOtech)",
1096                 .product       = "Magnitude",
1097                 .pgpolicy      = MULTIBUS,
1098                 .no_path_retry = 30,
1099         },
1100         /*
1101          * Violin Memory
1102          */
1103         {
1104                 /* 3000 / 6000 Series */
1105                 .vendor        = "VIOLIN",
1106                 .product       = "SAN ARRAY$",
1107                 .pgpolicy      = GROUP_BY_SERIAL,
1108                 .no_path_retry = 30,
1109         },
1110         {
1111                 .vendor        = "VIOLIN",
1112                 .product       = "SAN ARRAY ALUA",
1113                 .hwhandler     = "1 alua",
1114                 .pgpolicy      = GROUP_BY_PRIO,
1115                 .pgfailback    = -FAILBACK_IMMEDIATE,
1116                 .prio_name     = PRIO_ALUA,
1117                 .no_path_retry = 30,
1118         },
1119         {
1120                 /* FSP 7000 family */
1121                 .vendor        = "VIOLIN",
1122                 .product       = "CONCERTO ARRAY",
1123                 .pgpolicy      = MULTIBUS,
1124                 .no_path_retry = 30,
1125         },
1126         /*
1127          * Promise Technology
1128          */
1129         {
1130                 .vendor        = "Promise",
1131                 .product       = "VTrak",
1132                 .bl_product    = "VTrak V-LUN",
1133                 .hwhandler     = "1 alua",
1134                 .pgpolicy      = GROUP_BY_PRIO,
1135                 .pgfailback    = -FAILBACK_IMMEDIATE,
1136                 .prio_name     = PRIO_ALUA,
1137                 .no_path_retry = 30,
1138         },
1139         {
1140                 .vendor        = "Promise",
1141                 .product       = "Vess",
1142                 .bl_product    = "Vess V-LUN",
1143                 .hwhandler     = "1 alua",
1144                 .pgpolicy      = GROUP_BY_PRIO,
1145                 .pgfailback    = -FAILBACK_IMMEDIATE,
1146                 .prio_name     = PRIO_ALUA,
1147                 .no_path_retry = 30,
1148         },
1149         /*
1150          * Infortrend Technology
1151          */
1152         {
1153                 /* EonStor / ESVA */
1154                 .vendor        = "^IFT",
1155                 .product       = ".*",
1156                 .pgpolicy      = GROUP_BY_PRIO,
1157                 .pgfailback    = -FAILBACK_IMMEDIATE,
1158                 .prio_name     = PRIO_ALUA,
1159                 .no_path_retry = 30,
1160         },
1161         /*
1162          * Seagate Technology (Dot Hill Systems)
1163          */
1164         {
1165                 /* SANnet family */
1166                 .vendor        = "DotHill",
1167                 .product       = "SANnet",
1168                 .pgpolicy      = MULTIBUS,
1169                 .no_path_retry = 30,
1170         },
1171         {
1172                 /* R/Evolution family */
1173                 .vendor        = "DotHill",
1174                 .product       = "R/Evo",
1175                 .pgpolicy      = GROUP_BY_PRIO,
1176                 .pgfailback    = -FAILBACK_IMMEDIATE,
1177                 .prio_name     = PRIO_ALUA,
1178                 .no_path_retry = 30,
1179         },
1180         {
1181                 /* AssuredSAN family */
1182                 .vendor        = "DotHill",
1183                 .product       = "^DH",
1184                 .pgpolicy      = GROUP_BY_PRIO,
1185                 .pgfailback    = -FAILBACK_IMMEDIATE,
1186                 .prio_name     = PRIO_ALUA,
1187                 .no_path_retry = 30,
1188         },
1189         /*
1190          * AccelStor
1191          */
1192         {
1193                 /* NeoSapphire */
1194                 .vendor        = "AStor",
1195                 .product       = "NeoSapphire",
1196                 .pgpolicy      = MULTIBUS,
1197                 .no_path_retry = 30,
1198         },
1199         /*
1200          * INSPUR
1201          */
1202         {
1203                 /* AS5300/AS5500 G2 */
1204                 .vendor        = "INSPUR",
1205                 .product       = "MCS",
1206                 .pgpolicy      = GROUP_BY_PRIO,
1207                 .pgfailback    = -FAILBACK_IMMEDIATE,
1208                 .prio_name     = PRIO_ALUA,
1209         },
1210         /*
1211          * EOL
1212          */
1213         {
1214                 .vendor        = NULL,
1215                 .product       = NULL,
1216         },
1217 };
1218
1219 int setup_default_hwtable(vector hw)
1220 {
1221         int r = 0;
1222         struct hwentry * hwe = default_hw;
1223
1224         while (hwe->vendor) {
1225                 r += store_hwe(hw, hwe);
1226                 hwe++;
1227         }
1228         return r;
1229 }