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