Print this page
MFV: illumos-omnios@aea0472ecb9ee91fa70556d6f6a941c10c989f1d
Add support for Emulex Corporation Lancer Gen6: LPe32000 FC Host Adapter
Author: Andy Fiddaman <omnios@citrus-it.co.uk>
NEX-1878 update emlxs from source provided by Emulex

@@ -20,10 +20,11 @@
  */
 
 /*
  * Copyright (c) 2004-2011 Emulex. All rights reserved.
  * Use is subject to license terms.
+ * Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
  */
 
 #include <emlxs.h>
 
 /* #define EMLXS_POOL_DEBUG */

@@ -159,10 +160,46 @@
                         seg->fc_hi_water = MEM_CTBUF_COUNT;
                         seg->fc_lo_water = MEM_CTBUF_COUNT;
                         seg->fc_step = 1;
                         break;
 
+                case MEM_SGL1K:
+                        (void) strlcpy(seg->fc_label, "1K SGL Pool",
+                            sizeof (seg->fc_label));
+                        seg->fc_memtag  = MEM_SGL1K;
+                        seg->fc_memsize = 0x400;
+                        seg->fc_memflag = FC_MBUF_DMA | FC_MBUF_SNGLSG;
+                        seg->fc_memalign = 32;
+                        seg->fc_hi_water = 0x5000;
+                        seg->fc_lo_water = 0;
+                        seg->fc_step = 0x100;
+                        break;
+
+                case MEM_SGL2K:
+                        (void) strlcpy(seg->fc_label, "2K SGL Pool",
+                            sizeof (seg->fc_label));
+                        seg->fc_memtag  = MEM_SGL2K;
+                        seg->fc_memsize = 0x800;
+                        seg->fc_memflag = FC_MBUF_DMA | FC_MBUF_SNGLSG;
+                        seg->fc_memalign = 32;
+                        seg->fc_hi_water = 0x5000;
+                        seg->fc_lo_water = 0;
+                        seg->fc_step = 0x100;
+                        break;
+
+                case MEM_SGL4K:
+                        (void) strlcpy(seg->fc_label, "4K SGL Pool",
+                            sizeof (seg->fc_label));
+                        seg->fc_memtag  = MEM_SGL4K;
+                        seg->fc_memsize = 0x1000;
+                        seg->fc_memflag = FC_MBUF_DMA | FC_MBUF_SNGLSG;
+                        seg->fc_memalign = 32;
+                        seg->fc_hi_water = 0x5000;
+                        seg->fc_lo_water = 0;
+                        seg->fc_step = 0x100;
+                        break;
+
 #ifdef SFCT_SUPPORT
                 case MEM_FCTBUF:
                         /* These are the unsolicited FCT buffers. */
                         if (!(port->flag & EMLXS_TGT_ENABLED)) {
                                 continue;

@@ -1051,11 +1088,11 @@
                 bzero(buf_info, sizeof (MBUF_INFO));
                 buf_info->size = sizeof (MATCHMAP);
                 buf_info->virt = (void *)mp;
                 emlxs_mem_free(hba, buf_info);
 
-                return (0);
+                return (NULL);
         }
         bp = (uint8_t *)buf_info->virt;
         bzero(bp, buf_info->size);
 
         mp->virt = buf_info->virt;