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